Skip to content

Commit

Permalink
Merge pull request #14 from CIROH-UA/fixing-deployment
Browse files Browse the repository at this point in the history
Fixing deployment
  • Loading branch information
romer8 authored Oct 31, 2024
2 parents 766d12e + 7b73b33 commit 1cdacfe
Show file tree
Hide file tree
Showing 27 changed files with 370 additions and 864 deletions.
25 changes: 11 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ RUN pip install --no-cache-dir --quiet -r piprequirements.txt && \
micromamba clean --all --yes && \
export PYTHON_SITE_PACKAGE_PATH=$(${CONDA_HOME}/envs/${CONDA_ENV_NAME}/bin/python -m site | grep -a -m 1 "site-packages" | head -1 | sed 's/.$//' | sed -e 's/^\s*//' -e '/^$/d'| sed 's![^/]*$!!' | cut -c2-) &&\
cd ${TETHYS_HOME}/extensions/tethysext-ciroh_theme && python setup.py install && \
cd ${TETHYS_HOME}/apps/tethysapp-tethys_app_store && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/app_store.yml && \
cd ${TETHYS_HOME}/apps/ggst && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/ggst.yml && \
cd ${TETHYS_HOME}/apps/tethysapp-metdataexplorer && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/metdataexplorer.yml && \
cd ${TETHYS_HOME}/apps/tethysapp-swe && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/swe.yml && \
cd ${TETHYS_HOME}/apps/tethysapp-hydrocompute && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/hydrocompute.yml && \
cd ${TETHYS_HOME}/apps/gwdm && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/gwdm.yml && \
cd ${TETHYS_HOME}/apps/snow-inspector && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/snow-inspector.yml && \
cd ${TETHYS_HOME}/apps/aquainsight && mv ${TETHYS_HOME}/apps/aquainsight/reactapp/config/development.env ${TETHYS_HOME}/apps/aquainsight/reactapp/config/production.env && npm install && npm run build && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/aquainsight.yml && \
cd ${TETHYS_HOME}/apps/Tethys-CSES && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/community_streamflow_evaluation_system.yml && \
cd ${TETHYS_HOME}/apps/hydroshare_api_tethysapp && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/hydroshare_api_tethysapp.yml && \
cd ${TETHYS_HOME}/apps/Water-Data-Explorer && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/water_data_explorer.yml && \
cd ${TETHYS_HOME}/apps/tethysapp-tethys_app_store && tethys install -w -N -q && \
cd ${TETHYS_HOME}/apps/ggst && tethys install -w -N -q && \
cd ${TETHYS_HOME}/apps/tethysapp-metdataexplorer && tethys install -w -N -q && \
cd ${TETHYS_HOME}/apps/tethysapp-swe && tethys install -w -N -q && \
cd ${TETHYS_HOME}/apps/tethysapp-hydrocompute && tethys install -w -N -q && \
cd ${TETHYS_HOME}/apps/gwdm && tethys install -w -N -q && \
cd ${TETHYS_HOME}/apps/snow-inspector && tethys install -w -N -q && \
cd ${TETHYS_HOME}/apps/aquainsight && mv ${TETHYS_HOME}/apps/aquainsight/reactapp/config/development.env ${TETHYS_HOME}/apps/aquainsight/reactapp/config/production.env && npm install && npm run build && tethys install -w -N -q && \
cd ${TETHYS_HOME}/apps/Tethys-CSES && tethys install -w -N -q && \
cd ${TETHYS_HOME}/apps/hydroshare_api_tethysapp && tethys install -w -N -q && \
cd ${TETHYS_HOME}/apps/Water-Data-Explorer && tethys install -w -N -q && \
rm -rf /var/lib/apt/lists/* && \
find -name '*.a' -delete && \
rm -rf ${CONDA_HOME}/envs/${CONDA_ENV_NAME}/conda-meta && \
Expand All @@ -53,9 +53,6 @@ FROM tethysplatform/tethys-core:dev-py3.12-dj3.2 as build
COPY --chown=www:www --from=base ${CONDA_HOME}/envs/${CONDA_ENV_NAME} ${CONDA_HOME}/envs/${CONDA_ENV_NAME}
COPY config/tethys/asgi_supervisord.conf ${TETHYS_HOME}/asgi_supervisord.conf
COPY config/tethys/supervisord.conf /etc/supervisor/supervisord.conf
COPY config/tethys/update_tethys_apps.py ${TETHYS_HOME}
COPY config/tethys/update_proxy_apps.py ${TETHYS_HOME}
COPY config/tethys/update_state.sh ${TETHYS_HOME}
COPY config/tethys/gwdm/post_setup_gwdm.py ${TETHYS_HOME}

COPY salt/ /srv/salt/
Expand Down
2 changes: 1 addition & 1 deletion apps/aquainsight
Submodule aquainsight updated from eef9e1 to b8f391
2 changes: 1 addition & 1 deletion charts/ciroh/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: ciroh
appVersion: '0.0.1'
description: 'Tethys portal for CIROH'
type: application
version: 0.1.6
version: 0.1.7
dependencies:
- name: 'postgis'
repository: 'https://romer8.github.io/misc-helm-charts'
Expand Down
110 changes: 26 additions & 84 deletions charts/ciroh/ci/prod_aws_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,6 @@ tethys:
- name: thredds-persistent-storage
mountPath: '/var/lib/tethys_persist/thredds_data/tethys'
subPath: 'tethys'
- name: config-volume
mountPath: '/usr/lib/tethys/portal_changes.yml'
subPath: portal_changes.yml
- name: config-volume
mountPath: '/usr/lib/tethys/proxy_apps.yml'
subPath: proxy_apps.yml
volumes:
- name: tethys-persist-pv
persistentVolumeClaim:
Expand All @@ -137,11 +131,13 @@ tethys:
configMap:
name: 'cirohportal-prod-configmap'
env:
PUBLIC_PORTAL_PROTOCOL:
value: 'https'
TETHYS_DB_ENGINE:
value: 'django.db.backends.postgresql'
SKIP_DB_SETUP:
value: true
# gwdm settings
value: false
# gwdm envs
GWDM_WORKSPACE_NAME:
value: 'gwdm'
GWDM_STORE_NAME:
Expand All @@ -154,6 +150,28 @@ tethys:
value: 'aquifer'
GWDM_WELL_LAYER_NAME:
value: 'well'
GWDM_CS_DATA_DIRECTORY:
value: /var/lib/tethys_persist/thredds_data/tethys/gwdm_data_directory
GWDM_CS_THREDDS_DIRECTORY:
value: /var/lib/tethys_persist/thredds_data/tethys/gwdm_thredds_directory
GWDM_CS_THREDDS_CATALOG:
value: 'http://portal.ciroh.org/thredds/catalog/ciroh_data/tethys/gwdm_thredds_directory/catalog.xml'
# ggst envs
GGST_CS_THREDDS_DIRECTORY:
value: '/var/lib/tethys_persist/thredds_data/tethys/ggst_thredds_directory'
GGST_CS_THREDDS_CATALOG:
value: 'http://portal.ciroh.org/thredds/catalog/ciroh_data/tethys/ggst_thredds_directory/catalog.xml'
GGST_CS_GLOBAL_OUTPUT_DIRECTORY:
value: /usr/lib/tethys
GGST_CS_EARTHDATA_USERNAME:
value: byugrace
GGST_CS_CONDA_PYTHON_PATH:
value: /opt/conda/envs/tethys/bin/python
# mde envs
MDE_CS_DISCLAIMER_HEADER:
value: 'CIROH Met Data Explorer'
MDE_CS_DISCLAIMER_MESSAGE:
value: 'The CIROH Met Data Explorer is provided as a tool for accessing and exploring meteorological datasets. While we strive to ensure the accuracy and reliability of the information presented, data sourced from third-party providers may contain errors or omissions. Users are responsible for independently verifying any information obtained through the app before making decisions based on it'
# Tethys settings
PREFIX_URL:
value: 't'
Expand Down Expand Up @@ -209,82 +227,6 @@ tethys:
value: ''

workspace_size: '16Gi'
portal_changes:
apps:
ggst:
services:
custom_settings:
conda_python_path: /opt/conda/envs/tethys/bin/python
earthdata_pass: byuGRACE1
earthdata_username: byugrace
global_output_directory: /usr/lib/tethys
grace_thredds_catalog: 'http://portal.ciroh.org/thredds/catalog/ciroh_data/tethys/ggst_thredds_directory/catalog.xml'
grace_thredds_directory: /var/lib/tethys_persist/thredds_data/tethys/ggst_thredds_directory
metdataexplorer:
services:
custom_settings:
disclaimer_header: GIO TERMS OF SERVICE 4
disclaimer_message: The MDE is a happy tethys application
persistent:
thredds_db: tethys_postgis
swe:
services:
custom_settings: {}
spatial:
thredds_service: tethys_thredds

water_data_explorer:
services:
custom_settings: {}
persistent:
catalog_db: tethys_postgis

gwdm:
services:
custom_settings:
gw_data_directory: /var/lib/tethys_persist/thredds_data/tethys/gwdm_data_directory
gw_thredds_directory: /var/lib/tethys_persist/thredds_data/tethys/gwdm_thredds_directory
gw_thredds_catalog: 'http://portal.ciroh.org/thredds/catalog/ciroh_data/tethys/gwdm_thredds_directory/catalog.xml'
persistent:
gwdb: tethys_postgis
spatial:
primary_geoserver: tethys_geoserver
primary_thredds: tethys_thredds

proxy_apps:
owp_nwm_map_viewer:
name: OWP NWM Map Viewer
endpoint: https://water.noaa.gov/map
logo_url: /t/static/ciroh_theme/images/owp.png
description: Proxy app for Office in Water Prediction
tags: NOAA
enabled: true
show_in_apps_library: true
order: 0
back_url: web
open_in_new_tab: true
ciroh_jupyterhub:
name: CIROH JupyterHub
endpoint: https://jupyterhub.cuahsi.org/hub/login
logo_url: /t/static/ciroh_theme/images/jupyterhub.png
description: Proxy app for the CIROH JupyterHub
tags: CUAHSI
enabled: true
show_in_apps_library: true
order: 1
back_url: web
open_in_new_tab: true
hydroshare:
name: HydroShare
endpoint: https://www.hydroshare.org/home/
logo_url: /t/static/ciroh_theme/images/HydroShare.png
description: Proxy app for the Hydroshare app
tags: CUAHSI
enabled: true
show_in_apps_library: true
order: 2
back_url: web
open_in_new_tab: true

djangocms:
image:
Expand Down
Loading

0 comments on commit 1cdacfe

Please sign in to comment.