From 3a2bcb54ed24150959767e6dcdf6fb764ddd11d0 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Mon, 23 Jan 2023 18:22:47 -0500 Subject: [PATCH 1/7] jupyter: re-enable terminal for all users It was disabled to avoid malicious usage but with the monitoring in place and the demo account restricted to limited resources, it's probably safe to try enabling this again. For legitimate users, not having the terminal is pretty annoying. Should not penalize legit users for some rogue users. --- CHANGES.md | 11 ++++++++++- .../config/jupyterhub/jupyterhub_config.py.template | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 940c4e868..cd981f034 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,7 +14,16 @@ [Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest) ------------------------------------------------------------------------------------------------------------------ -[//]: # (list changes here, using '-' for each new entry, remove this when items are added) +## Changes: +- Jupyter: re-enable terminal for all users + + It was disabled to avoid malicious usage but with the monitoring in + place and the demo account restricted to limited resources, it's + probably safe to try enabling this again. + + For legitimate users, not having the terminal is pretty annoying. + Should not penalize legit users for some rogue users. + [1.22.8](https://github.com/bird-house/birdhouse-deploy/tree/1.22.8) (2023-01-24) ------------------------------------------------------------------------------------------------------------------ diff --git a/birdhouse/config/jupyterhub/jupyterhub_config.py.template b/birdhouse/config/jupyterhub/jupyterhub_config.py.template index 9c62fb9ae..95af23fb3 100644 --- a/birdhouse/config/jupyterhub/jupyterhub_config.py.template +++ b/birdhouse/config/jupyterhub/jupyterhub_config.py.template @@ -136,7 +136,7 @@ c.Spawner.http_timeout = 60 # default 30 c.Spawner.start_timeout = 120 # default 60 ## Extra arguments to be passed to the single-user server. -c.Spawner.args = ["--NotebookApp.terminals_enabled=False"] +#c.Spawner.args = ["--NotebookApp.terminals_enabled=False"] c.DockerSpawner.extra_host_config = { # start init pid 1 process to reap defunct processes From 0e78b246cbd86f2ca9d523722c4ee3f5f3b7469e Mon Sep 17 00:00:00 2001 From: Long Vu Date: Mon, 23 Jan 2023 19:11:25 -0500 Subject: [PATCH 2/7] jupyter: allow recursive directory deletion This was not possible before since non-empty dir deletion was not possible. --- CHANGES.md | 4 ++++ birdhouse/config/jupyterhub/jupyterhub_config.py.template | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index cd981f034..8d78ab0e1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,10 @@ ------------------------------------------------------------------------------------------------------------------ ## Changes: +- Jupyter: allow recursive directory deletion + + This was not possible before since non-empty dir deletion was not possible. + - Jupyter: re-enable terminal for all users It was disabled to avoid malicious usage but with the monitoring in diff --git a/birdhouse/config/jupyterhub/jupyterhub_config.py.template b/birdhouse/config/jupyterhub/jupyterhub_config.py.template index 95af23fb3..15f504251 100644 --- a/birdhouse/config/jupyterhub/jupyterhub_config.py.template +++ b/birdhouse/config/jupyterhub/jupyterhub_config.py.template @@ -136,7 +136,11 @@ c.Spawner.http_timeout = 60 # default 30 c.Spawner.start_timeout = 120 # default 60 ## Extra arguments to be passed to the single-user server. -#c.Spawner.args = ["--NotebookApp.terminals_enabled=False"] +c.Spawner.args = [ + # Allow non-empty directory deletion which enable recursive dir deletion. + # https://jupyter-server.readthedocs.io/en/latest/other/full-config.html + "--FileContentsManager.always_delete_dir = True", + ] c.DockerSpawner.extra_host_config = { # start init pid 1 process to reap defunct processes From 06f7c6fcafae5284f7cbd144b5de245fd7c21fd6 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 24 Jan 2023 17:37:02 -0500 Subject: [PATCH 3/7] jupyter: typo in previous allow non-empty dir delete config The container died instantly on creation startup. --- birdhouse/config/jupyterhub/jupyterhub_config.py.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/birdhouse/config/jupyterhub/jupyterhub_config.py.template b/birdhouse/config/jupyterhub/jupyterhub_config.py.template index 15f504251..dd24f8996 100644 --- a/birdhouse/config/jupyterhub/jupyterhub_config.py.template +++ b/birdhouse/config/jupyterhub/jupyterhub_config.py.template @@ -139,7 +139,7 @@ c.Spawner.start_timeout = 120 # default 60 c.Spawner.args = [ # Allow non-empty directory deletion which enable recursive dir deletion. # https://jupyter-server.readthedocs.io/en/latest/other/full-config.html - "--FileContentsManager.always_delete_dir = True", + "--FileContentsManager.always_delete_dir=True", ] c.DockerSpawner.extra_host_config = { From 66871855bb022963bfb54dda663d4023e22d082e Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 24 Jan 2023 18:30:11 -0500 Subject: [PATCH 4/7] fix regression with the previous introduction of DELAYED_EVAL Fix this error found during autodeploy: ``` fix GeoServer data dir permission on first run only, when data dir do not exist yet. + DATA_DIR='${DATA_PERSIST_ROOT}/geoserver' + '[' -n ] + docker run --rm --name fix-geoserver-data-dir-perm --volume '${DATA_PERSIST_ROOT}/geoserver:/datadir' --env FIRST_RUN_ONLY bash:5.1.4 bash -xc 'if [ -z "$FIRST_RUN_ONLY" -o ! -f /datadir/global.xml ]; \ then chown -R 1000:10001 /datadir; else echo "No execute."; fi' docker: Error response from daemon: create ${DATA_PERSIST_ROOT}/geoserver: "${DATA_PERSIST_ROOT}/geoserver" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path. See 'docker run --help'. ``` --- CHANGES.md | 7 +++++++ birdhouse/default.env | 11 +++++++++++ birdhouse/deployment/certbotwrapper | 2 ++ birdhouse/deployment/deploy.sh | 6 ++++++ birdhouse/deployment/fix-geoserver-data-dir-perm | 2 ++ birdhouse/deployment/fix-write-perm | 2 ++ birdhouse/deployment/install-deploy-notebook | 2 ++ birdhouse/deployment/trigger-deploy-notebook | 3 +++ birdhouse/deployment/triggerdeploy.sh | 2 ++ birdhouse/pavics-compose.sh | 6 +----- birdhouse/scripts/check-autodeploy-repos | 4 ++++ birdhouse/scripts/create-magpie-users | 4 ++++ birdhouse/scripts/detect-user-install-in-jupyter-env | 2 ++ .../scripts/extract-jupyter-users-from-magpie-db | 5 +++++ birdhouse/scripts/migrate-jupyterhub-user-persistence | 2 ++ birdhouse/scripts/sync-data | 4 ++++ 16 files changed, 59 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8d78ab0e1..19f1cba56 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -28,6 +28,13 @@ For legitimate users, not having the terminal is pretty annoying. Should not penalize legit users for some rogue users. +## Fixes: +- Vars in DELAYED_EVAL list are not expanded properly outside of `pavics-compose.sh` + + There are other scripts sourcing `default.env` and `env.local` and all those + scripts have to expand the vars in DELAYED_EVAL list to have their actual + values. + [1.22.8](https://github.com/bird-house/birdhouse-deploy/tree/1.22.8) (2023-01-24) ------------------------------------------------------------------------------------------------------------------ diff --git a/birdhouse/default.env b/birdhouse/default.env index b52dda7f1..4980935d0 100644 --- a/birdhouse/default.env +++ b/birdhouse/default.env @@ -133,3 +133,14 @@ export DELAYED_EVAL=' MAGPIE_PERSIST_DIR GEOSERVER_DATA_DIR ' + +# All scripts sourcing default.env and env.local and needing to use any vars +# in DELAYED_EVAL list need to call this function to actually resolve the +# value of each var in DELAYED_EVAL list. +process_delayed_eval() { + for i in ${DELAYED_EVAL}; do + v="`eval "echo \\$${i}"`" + eval 'export ${i}="`eval "echo ${v}"`"' + echo "delayed eval '`env |grep ${i}=`'" + done +} diff --git a/birdhouse/deployment/certbotwrapper b/birdhouse/deployment/certbotwrapper index d8c29ec55..745a1399a 100755 --- a/birdhouse/deployment/certbotwrapper +++ b/birdhouse/deployment/certbotwrapper @@ -64,6 +64,8 @@ else echo "WARNING: '$ENV_LOCAL_FILE' not found." fi +process_delayed_eval + set -x # resume logging/tracing CERT_DOMAIN="$PAVICS_FQDN_PUBLIC" diff --git a/birdhouse/deployment/deploy.sh b/birdhouse/deployment/deploy.sh index e53e03594..1d9ede8cc 100755 --- a/birdhouse/deployment/deploy.sh +++ b/birdhouse/deployment/deploy.sh @@ -110,6 +110,8 @@ echo "deploy START_TIME=$START_TIME" # Read AUTODEPLOY_EXTRA_REPOS . $ENV_LOCAL_FILE +process_delayed_eval + set -x for adir in $COMPOSE_DIR $AUTODEPLOY_EXTRA_REPOS; do @@ -135,6 +137,8 @@ set +x # hide passwd in env.local in logs . $ENV_LOCAL_FILE set -x +process_delayed_eval + # stop all to force reload any changed config that are volume-mount into the containers ./pavics-compose.sh stop @@ -177,6 +181,8 @@ set +x # hide passwd in env.local in logs . $ENV_LOCAL_FILE set -x +process_delayed_eval + # restart everything, only changed containers will be destroyed and recreated ./pavics-compose.sh up -d diff --git a/birdhouse/deployment/fix-geoserver-data-dir-perm b/birdhouse/deployment/fix-geoserver-data-dir-perm index 3014901fa..91200fad8 100755 --- a/birdhouse/deployment/fix-geoserver-data-dir-perm +++ b/birdhouse/deployment/fix-geoserver-data-dir-perm @@ -24,6 +24,8 @@ if [ -e "birdhouse/env.local" ]; then . birdhouse/env.local fi +process_delayed_eval + set -x DATA_DIR="$GEOSERVER_DATA_DIR" diff --git a/birdhouse/deployment/fix-write-perm b/birdhouse/deployment/fix-write-perm index 16c9ca8a0..c06002362 100755 --- a/birdhouse/deployment/fix-write-perm +++ b/birdhouse/deployment/fix-write-perm @@ -51,6 +51,8 @@ if [ -e "birdhouse/env.local" ]; then . birdhouse/env.local fi +process_delayed_eval + DEFAULT_EXTRA_DATA_DIR="$GEOSERVER_DATA_DIR/ $JUPYTERHUB_USER_DATA_DIR/ \ $MAGPIE_PERSIST_DIR/" diff --git a/birdhouse/deployment/install-deploy-notebook b/birdhouse/deployment/install-deploy-notebook index 177e470d1..da390bd4b 100755 --- a/birdhouse/deployment/install-deploy-notebook +++ b/birdhouse/deployment/install-deploy-notebook @@ -36,6 +36,8 @@ if [ -f "$REPO_ROOT/birdhouse/env.local" ]; then . "$REPO_ROOT/birdhouse/env.local" fi +process_delayed_eval + set -x cat $REPO_ROOT/birdhouse/deployment/trigger-deploy-notebook | envsubst '${JUPYTERHUB_USER_DATA_DIR}' | sudo tee $CRON_FILE diff --git a/birdhouse/deployment/trigger-deploy-notebook b/birdhouse/deployment/trigger-deploy-notebook index d9abd6b53..54fd43bc1 100755 --- a/birdhouse/deployment/trigger-deploy-notebook +++ b/birdhouse/deployment/trigger-deploy-notebook @@ -43,6 +43,9 @@ if [ -e "$COMPOSE_DIR/env.local" ]; then . "$COMPOSE_DIR/env.local" # optional override JUPYTERHUB_USER_DATA_DIR set -x fi +if [ -e "$COMPOSE_DIR/default.env" ]; then + process_delayed_eval +fi NOTEBOOK_DIR_MNT="/notebook_dir" TUTORIAL_NOTEBOOKS_DIR="tutorial-notebooks" diff --git a/birdhouse/deployment/triggerdeploy.sh b/birdhouse/deployment/triggerdeploy.sh index 99c2625b8..f562a19db 100755 --- a/birdhouse/deployment/triggerdeploy.sh +++ b/birdhouse/deployment/triggerdeploy.sh @@ -178,6 +178,8 @@ triggerdeploy START_TIME=$START_TIME" # Read AUTODEPLOY_EXTRA_REPOS . $ENV_LOCAL_FILE +process_delayed_eval + set -x SHOULD_TRIGGER="" diff --git a/birdhouse/pavics-compose.sh b/birdhouse/pavics-compose.sh index 9e6d7e3ea..c9e531a22 100755 --- a/birdhouse/pavics-compose.sh +++ b/birdhouse/pavics-compose.sh @@ -123,11 +123,7 @@ done # components. [ -f env.local ] && . ./env.local -for i in ${DELAYED_EVAL}; do - v="`eval "echo \\$${i}"`" - eval 'export ${i}="`eval "echo ${v}"`"' - echo "delayed eval '`env |grep ${i}=`'" -done +process_delayed_eval for i in ${VARS} do diff --git a/birdhouse/scripts/check-autodeploy-repos b/birdhouse/scripts/check-autodeploy-repos index 95d53d454..5d9812f49 100755 --- a/birdhouse/scripts/check-autodeploy-repos +++ b/birdhouse/scripts/check-autodeploy-repos @@ -16,6 +16,10 @@ if [ -f "$COMPOSE_DIR/env.local" ]; then . "${COMPOSE_DIR}/env.local" fi +if [ -f "$COMPOSE_DIR/default.env" ]; then + process_delayed_eval +fi + for r in $COMPOSE_DIR $AUTODEPLOY_EXTRA_REPOS; do echo "=== $r" diff --git a/birdhouse/scripts/create-magpie-users b/birdhouse/scripts/create-magpie-users index 570f5e8ca..1faf66f79 100755 --- a/birdhouse/scripts/create-magpie-users +++ b/birdhouse/scripts/create-magpie-users @@ -82,6 +82,10 @@ if [ -f "$COMPOSE_DIR/env.local" ]; then . "${COMPOSE_DIR}/env.local" fi +if [ -f "$COMPOSE_DIR/default.env" ]; then + process_delayed_eval +fi + ############################################################################## # Allow override using same name env var. diff --git a/birdhouse/scripts/detect-user-install-in-jupyter-env b/birdhouse/scripts/detect-user-install-in-jupyter-env index 03ed00680..69aed7a6f 100755 --- a/birdhouse/scripts/detect-user-install-in-jupyter-env +++ b/birdhouse/scripts/detect-user-install-in-jupyter-env @@ -18,6 +18,8 @@ if [ -e "$THIS_DIR/../env.local" ]; then . $THIS_DIR/../env.local fi +process_delayed_eval + set -x START_TIME="`date -Isecond`" diff --git a/birdhouse/scripts/extract-jupyter-users-from-magpie-db b/birdhouse/scripts/extract-jupyter-users-from-magpie-db index e885acd39..8a3ef1bcf 100755 --- a/birdhouse/scripts/extract-jupyter-users-from-magpie-db +++ b/birdhouse/scripts/extract-jupyter-users-from-magpie-db @@ -33,6 +33,11 @@ if [ -f "$COMPOSE_DIR/env.local" ]; then . "${COMPOSE_DIR}/env.local" fi +if [ -f "$COMPOSE_DIR/default.env" ]; then + process_delayed_eval +fi + + set -x echo "SELECT email,user_name FROM users ORDER BY email" | docker exec -i postgres-magpie psql -U $POSTGRES_MAGPIE_USERNAME $MAGPIE_DB_NAME diff --git a/birdhouse/scripts/migrate-jupyterhub-user-persistence b/birdhouse/scripts/migrate-jupyterhub-user-persistence index 56e921f2a..bf8acf600 100755 --- a/birdhouse/scripts/migrate-jupyterhub-user-persistence +++ b/birdhouse/scripts/migrate-jupyterhub-user-persistence @@ -16,6 +16,8 @@ if [ -e "$COMPOSE_DIR/env.local" ]; then . $COMPOSE_DIR/env.local fi +process_delayed_eval + PUBLIC_USERNAME="$JUPYTER_DEMO_USER" BASE_CMD="docker run -it --rm --name migrate_jupyterhub_user_persistence \ diff --git a/birdhouse/scripts/sync-data b/birdhouse/scripts/sync-data index 1ccf4c01e..0059dd3a2 100755 --- a/birdhouse/scripts/sync-data +++ b/birdhouse/scripts/sync-data @@ -28,6 +28,10 @@ if [ -f "$COMPOSE_DIR/env.local" ]; then . "${COMPOSE_DIR}/env.local" fi +if [ -f "$COMPOSE_DIR/default.env" ]; then + process_delayed_eval +fi + SOURCE_HOST="$1"; shift FORCE_MODE="$1" From 4679b070d5965a61c0a885a3acf69f3502657296 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 24 Jan 2023 19:05:35 -0500 Subject: [PATCH 5/7] env.local.example: no need for delayed eval since env.local file is always read last env.local will always have the latest updated values so no need for delayed eval. --- birdhouse/env.local.example | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/birdhouse/env.local.example b/birdhouse/env.local.example index 366c22ebe..bf67d03a0 100644 --- a/birdhouse/env.local.example +++ b/birdhouse/env.local.example @@ -285,8 +285,7 @@ export GEOSERVER_ADMIN_PASSWORD=geoserverpass # For example, a user named "bob" will have his data in $JUPYTERHUB_USER_DATA_DIR/bob # and this folder will be mounted when he logs into JupyterHub. # (note: if using 'DATA_PERSIST_ROOT', it must be defined earlier, either in this file or from 'default.env') -# Must use single-quote for delayed eval. -#export JUPYTERHUB_USER_DATA_DIR='$DATA_PERSIST_ROOT/jupyterhub_user_data' +#export JUPYTERHUB_USER_DATA_DIR="$DATA_PERSIST_ROOT/jupyterhub_user_data" # Path to the file containing the clientID for the google drive extension for jupyterlab # This file will be mounted into JupyterLab instances. From a84d7cd6d1c26b217ae6a858546eacb6d464c10e Mon Sep 17 00:00:00 2001 From: Long Vu Date: Wed, 25 Jan 2023 09:59:44 -0500 Subject: [PATCH 6/7] Revert "fix regression with the previous introduction of DELAYED_EVAL" This reverts commit 66871855bb022963bfb54dda663d4023e22d082e. To be implemented better in a different PR. Francis proposed to centralize all the sourcing logic of default.env and env.local and calling process_delayed_eval in a same file so all scripts to not have to remember the loading sequence and we have a central location to update that loading sequence without having to edit all the scripts in the future. --- CHANGES.md | 7 ------- birdhouse/default.env | 11 ----------- birdhouse/deployment/certbotwrapper | 2 -- birdhouse/deployment/deploy.sh | 6 ------ birdhouse/deployment/fix-geoserver-data-dir-perm | 2 -- birdhouse/deployment/fix-write-perm | 2 -- birdhouse/deployment/install-deploy-notebook | 2 -- birdhouse/deployment/trigger-deploy-notebook | 3 --- birdhouse/deployment/triggerdeploy.sh | 2 -- birdhouse/pavics-compose.sh | 6 +++++- birdhouse/scripts/check-autodeploy-repos | 4 ---- birdhouse/scripts/create-magpie-users | 4 ---- birdhouse/scripts/detect-user-install-in-jupyter-env | 2 -- .../scripts/extract-jupyter-users-from-magpie-db | 5 ----- birdhouse/scripts/migrate-jupyterhub-user-persistence | 2 -- birdhouse/scripts/sync-data | 4 ---- 16 files changed, 5 insertions(+), 59 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 19f1cba56..8d78ab0e1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -28,13 +28,6 @@ For legitimate users, not having the terminal is pretty annoying. Should not penalize legit users for some rogue users. -## Fixes: -- Vars in DELAYED_EVAL list are not expanded properly outside of `pavics-compose.sh` - - There are other scripts sourcing `default.env` and `env.local` and all those - scripts have to expand the vars in DELAYED_EVAL list to have their actual - values. - [1.22.8](https://github.com/bird-house/birdhouse-deploy/tree/1.22.8) (2023-01-24) ------------------------------------------------------------------------------------------------------------------ diff --git a/birdhouse/default.env b/birdhouse/default.env index 4980935d0..b52dda7f1 100644 --- a/birdhouse/default.env +++ b/birdhouse/default.env @@ -133,14 +133,3 @@ export DELAYED_EVAL=' MAGPIE_PERSIST_DIR GEOSERVER_DATA_DIR ' - -# All scripts sourcing default.env and env.local and needing to use any vars -# in DELAYED_EVAL list need to call this function to actually resolve the -# value of each var in DELAYED_EVAL list. -process_delayed_eval() { - for i in ${DELAYED_EVAL}; do - v="`eval "echo \\$${i}"`" - eval 'export ${i}="`eval "echo ${v}"`"' - echo "delayed eval '`env |grep ${i}=`'" - done -} diff --git a/birdhouse/deployment/certbotwrapper b/birdhouse/deployment/certbotwrapper index 745a1399a..d8c29ec55 100755 --- a/birdhouse/deployment/certbotwrapper +++ b/birdhouse/deployment/certbotwrapper @@ -64,8 +64,6 @@ else echo "WARNING: '$ENV_LOCAL_FILE' not found." fi -process_delayed_eval - set -x # resume logging/tracing CERT_DOMAIN="$PAVICS_FQDN_PUBLIC" diff --git a/birdhouse/deployment/deploy.sh b/birdhouse/deployment/deploy.sh index 1d9ede8cc..e53e03594 100755 --- a/birdhouse/deployment/deploy.sh +++ b/birdhouse/deployment/deploy.sh @@ -110,8 +110,6 @@ echo "deploy START_TIME=$START_TIME" # Read AUTODEPLOY_EXTRA_REPOS . $ENV_LOCAL_FILE -process_delayed_eval - set -x for adir in $COMPOSE_DIR $AUTODEPLOY_EXTRA_REPOS; do @@ -137,8 +135,6 @@ set +x # hide passwd in env.local in logs . $ENV_LOCAL_FILE set -x -process_delayed_eval - # stop all to force reload any changed config that are volume-mount into the containers ./pavics-compose.sh stop @@ -181,8 +177,6 @@ set +x # hide passwd in env.local in logs . $ENV_LOCAL_FILE set -x -process_delayed_eval - # restart everything, only changed containers will be destroyed and recreated ./pavics-compose.sh up -d diff --git a/birdhouse/deployment/fix-geoserver-data-dir-perm b/birdhouse/deployment/fix-geoserver-data-dir-perm index 91200fad8..3014901fa 100755 --- a/birdhouse/deployment/fix-geoserver-data-dir-perm +++ b/birdhouse/deployment/fix-geoserver-data-dir-perm @@ -24,8 +24,6 @@ if [ -e "birdhouse/env.local" ]; then . birdhouse/env.local fi -process_delayed_eval - set -x DATA_DIR="$GEOSERVER_DATA_DIR" diff --git a/birdhouse/deployment/fix-write-perm b/birdhouse/deployment/fix-write-perm index c06002362..16c9ca8a0 100755 --- a/birdhouse/deployment/fix-write-perm +++ b/birdhouse/deployment/fix-write-perm @@ -51,8 +51,6 @@ if [ -e "birdhouse/env.local" ]; then . birdhouse/env.local fi -process_delayed_eval - DEFAULT_EXTRA_DATA_DIR="$GEOSERVER_DATA_DIR/ $JUPYTERHUB_USER_DATA_DIR/ \ $MAGPIE_PERSIST_DIR/" diff --git a/birdhouse/deployment/install-deploy-notebook b/birdhouse/deployment/install-deploy-notebook index da390bd4b..177e470d1 100755 --- a/birdhouse/deployment/install-deploy-notebook +++ b/birdhouse/deployment/install-deploy-notebook @@ -36,8 +36,6 @@ if [ -f "$REPO_ROOT/birdhouse/env.local" ]; then . "$REPO_ROOT/birdhouse/env.local" fi -process_delayed_eval - set -x cat $REPO_ROOT/birdhouse/deployment/trigger-deploy-notebook | envsubst '${JUPYTERHUB_USER_DATA_DIR}' | sudo tee $CRON_FILE diff --git a/birdhouse/deployment/trigger-deploy-notebook b/birdhouse/deployment/trigger-deploy-notebook index 54fd43bc1..d9abd6b53 100755 --- a/birdhouse/deployment/trigger-deploy-notebook +++ b/birdhouse/deployment/trigger-deploy-notebook @@ -43,9 +43,6 @@ if [ -e "$COMPOSE_DIR/env.local" ]; then . "$COMPOSE_DIR/env.local" # optional override JUPYTERHUB_USER_DATA_DIR set -x fi -if [ -e "$COMPOSE_DIR/default.env" ]; then - process_delayed_eval -fi NOTEBOOK_DIR_MNT="/notebook_dir" TUTORIAL_NOTEBOOKS_DIR="tutorial-notebooks" diff --git a/birdhouse/deployment/triggerdeploy.sh b/birdhouse/deployment/triggerdeploy.sh index f562a19db..99c2625b8 100755 --- a/birdhouse/deployment/triggerdeploy.sh +++ b/birdhouse/deployment/triggerdeploy.sh @@ -178,8 +178,6 @@ triggerdeploy START_TIME=$START_TIME" # Read AUTODEPLOY_EXTRA_REPOS . $ENV_LOCAL_FILE -process_delayed_eval - set -x SHOULD_TRIGGER="" diff --git a/birdhouse/pavics-compose.sh b/birdhouse/pavics-compose.sh index c9e531a22..9e6d7e3ea 100755 --- a/birdhouse/pavics-compose.sh +++ b/birdhouse/pavics-compose.sh @@ -123,7 +123,11 @@ done # components. [ -f env.local ] && . ./env.local -process_delayed_eval +for i in ${DELAYED_EVAL}; do + v="`eval "echo \\$${i}"`" + eval 'export ${i}="`eval "echo ${v}"`"' + echo "delayed eval '`env |grep ${i}=`'" +done for i in ${VARS} do diff --git a/birdhouse/scripts/check-autodeploy-repos b/birdhouse/scripts/check-autodeploy-repos index 5d9812f49..95d53d454 100755 --- a/birdhouse/scripts/check-autodeploy-repos +++ b/birdhouse/scripts/check-autodeploy-repos @@ -16,10 +16,6 @@ if [ -f "$COMPOSE_DIR/env.local" ]; then . "${COMPOSE_DIR}/env.local" fi -if [ -f "$COMPOSE_DIR/default.env" ]; then - process_delayed_eval -fi - for r in $COMPOSE_DIR $AUTODEPLOY_EXTRA_REPOS; do echo "=== $r" diff --git a/birdhouse/scripts/create-magpie-users b/birdhouse/scripts/create-magpie-users index 1faf66f79..570f5e8ca 100755 --- a/birdhouse/scripts/create-magpie-users +++ b/birdhouse/scripts/create-magpie-users @@ -82,10 +82,6 @@ if [ -f "$COMPOSE_DIR/env.local" ]; then . "${COMPOSE_DIR}/env.local" fi -if [ -f "$COMPOSE_DIR/default.env" ]; then - process_delayed_eval -fi - ############################################################################## # Allow override using same name env var. diff --git a/birdhouse/scripts/detect-user-install-in-jupyter-env b/birdhouse/scripts/detect-user-install-in-jupyter-env index 69aed7a6f..03ed00680 100755 --- a/birdhouse/scripts/detect-user-install-in-jupyter-env +++ b/birdhouse/scripts/detect-user-install-in-jupyter-env @@ -18,8 +18,6 @@ if [ -e "$THIS_DIR/../env.local" ]; then . $THIS_DIR/../env.local fi -process_delayed_eval - set -x START_TIME="`date -Isecond`" diff --git a/birdhouse/scripts/extract-jupyter-users-from-magpie-db b/birdhouse/scripts/extract-jupyter-users-from-magpie-db index 8a3ef1bcf..e885acd39 100755 --- a/birdhouse/scripts/extract-jupyter-users-from-magpie-db +++ b/birdhouse/scripts/extract-jupyter-users-from-magpie-db @@ -33,11 +33,6 @@ if [ -f "$COMPOSE_DIR/env.local" ]; then . "${COMPOSE_DIR}/env.local" fi -if [ -f "$COMPOSE_DIR/default.env" ]; then - process_delayed_eval -fi - - set -x echo "SELECT email,user_name FROM users ORDER BY email" | docker exec -i postgres-magpie psql -U $POSTGRES_MAGPIE_USERNAME $MAGPIE_DB_NAME diff --git a/birdhouse/scripts/migrate-jupyterhub-user-persistence b/birdhouse/scripts/migrate-jupyterhub-user-persistence index bf8acf600..56e921f2a 100755 --- a/birdhouse/scripts/migrate-jupyterhub-user-persistence +++ b/birdhouse/scripts/migrate-jupyterhub-user-persistence @@ -16,8 +16,6 @@ if [ -e "$COMPOSE_DIR/env.local" ]; then . $COMPOSE_DIR/env.local fi -process_delayed_eval - PUBLIC_USERNAME="$JUPYTER_DEMO_USER" BASE_CMD="docker run -it --rm --name migrate_jupyterhub_user_persistence \ diff --git a/birdhouse/scripts/sync-data b/birdhouse/scripts/sync-data index 0059dd3a2..1ccf4c01e 100755 --- a/birdhouse/scripts/sync-data +++ b/birdhouse/scripts/sync-data @@ -28,10 +28,6 @@ if [ -f "$COMPOSE_DIR/env.local" ]; then . "${COMPOSE_DIR}/env.local" fi -if [ -f "$COMPOSE_DIR/default.env" ]; then - process_delayed_eval -fi - SOURCE_HOST="$1"; shift FORCE_MODE="$1" From de1e51d0baa1b598025a0cf921b8496dcc5599cb Mon Sep 17 00:00:00 2001 From: Long Vu Date: Wed, 25 Jan 2023 17:58:53 -0500 Subject: [PATCH 7/7] =?UTF-8?q?Bump=20version:=201.22.8=20=E2=86=92=201.22?= =?UTF-8?q?.9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 6 +++--- CHANGES.md | 5 +++++ Makefile | 2 +- README.rst | 8 ++++---- RELEASE.txt | 2 +- .../config/canarie-api/docker_configuration.py.template | 8 ++++---- docs/source/conf.py | 4 ++-- 7 files changed, 20 insertions(+), 15 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 766705266..689476bb2 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.22.8 +current_version = 1.22.9 commit = True tag = False tag_name = {new_version} @@ -30,11 +30,11 @@ search = {current_version} replace = {new_version} [bumpversion:file:RELEASE.txt] -search = {current_version} 2023-01-24T02:14:38Z +search = {current_version} 2023-01-25T22:58:52Z replace = {new_version} {utcnow:%Y-%m-%dT%H:%M:%SZ} [bumpversion:part:releaseTime] -values = 2023-01-24T02:14:38Z +values = 2023-01-25T22:58:52Z [bumpversion:file(version):birdhouse/config/canarie-api/docker_configuration.py.template] search = 'version': '{current_version}' diff --git a/CHANGES.md b/CHANGES.md index 8d78ab0e1..013b7780e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,6 +14,11 @@ [Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest) ------------------------------------------------------------------------------------------------------------------ +[//]: # (list changes here, using '-' for each new entry, remove this when items are added) + +[1.22.9](https://github.com/bird-house/birdhouse-deploy/tree/1.22.9) (2023-01-25) +------------------------------------------------------------------------------------------------------------------ + ## Changes: - Jupyter: allow recursive directory deletion diff --git a/Makefile b/Makefile index 31fa47769..d35409f35 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Generic variables override SHELL := bash override APP_NAME := birdhouse-deploy -override APP_VERSION := 1.22.8 +override APP_VERSION := 1.22.9 # utility to remove comments after value of an option variable override clean_opt = $(shell echo "$(1)" | $(_SED) -r -e "s/[ '$'\t'']+$$//g") diff --git a/README.rst b/README.rst index bbe778cfc..96c5d3b31 100644 --- a/README.rst +++ b/README.rst @@ -14,13 +14,13 @@ for a full-fledged production platform. * - releases - | |latest-version| |commits-since| -.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/1.22.8.svg +.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/1.22.9.svg :alt: Commits since latest release - :target: https://github.com/bird-house/birdhouse-deploy/compare/1.22.8...master + :target: https://github.com/bird-house/birdhouse-deploy/compare/1.22.9...master -.. |latest-version| image:: https://img.shields.io/badge/tag-1.22.8-blue.svg?style=flat +.. |latest-version| image:: https://img.shields.io/badge/tag-1.22.9-blue.svg?style=flat :alt: Latest Tag - :target: https://github.com/bird-house/birdhouse-deploy/tree/1.22.8 + :target: https://github.com/bird-house/birdhouse-deploy/tree/1.22.9 .. |readthedocs| image:: https://readthedocs.org/projects/birdhouse-deploy/badge/?version=latest :alt: ReadTheDocs Build Status (latest version) diff --git a/RELEASE.txt b/RELEASE.txt index a950111dd..ff0b5a517 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1 +1 @@ -1.22.8 2023-01-24T02:14:38Z +1.22.9 2023-01-25T22:58:52Z diff --git a/birdhouse/config/canarie-api/docker_configuration.py.template b/birdhouse/config/canarie-api/docker_configuration.py.template index eb39f2523..59ea4fead 100644 --- a/birdhouse/config/canarie-api/docker_configuration.py.template +++ b/birdhouse/config/canarie-api/docker_configuration.py.template @@ -17,8 +17,8 @@ SERVICES = { 'info': { 'name': 'Node', 'synopsis': 'Nodes are data, compute and index endpoints accessed through the PAVICS platform or external clients. The Node service is the backend that allows: data storage, harvesting, indexation and discovery of local and federated data; authentication and authorization; server registration and management. Node service is therefore composed of several other services.', - 'version': '1.22.8', - 'releaseTime': '2023-01-24T02:14:38Z', + 'version': '1.22.9', + 'releaseTime': '2023-01-25T22:58:52Z', 'institution': 'Ouranos', 'researchSubject': 'Climatology', 'supportEmail': '${SUPPORT_EMAIL}', @@ -242,8 +242,8 @@ PLATFORMS = { 'info': { 'name': 'PAVICS', 'synopsis': 'The PAVICS (Power Analytics for Visualization of Climate Science) platform is a collection of climate analysis services served through Open Geospatial Consortium (OGC) protocols. These services include data access, processing and visualization. Both data and algorithms can be accessed either programmatically, through OGC-compliant clients such as QGIS or ArcGIS, or a custom web interface.', - 'version': '1.22.8', - 'releaseTime': '2023-01-24T02:14:38Z', + 'version': '1.22.9', + 'releaseTime': '2023-01-25T22:58:52Z', 'institution': 'Ouranos', 'researchSubject': 'Climatology', 'supportEmail': '${SUPPORT_EMAIL}', diff --git a/docs/source/conf.py b/docs/source/conf.py index 29d8a0e33..2f91d517c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -69,9 +69,9 @@ # built documents. # # The short X.Y version. -version = '1.22.8' +version = '1.22.9' # The full version, including alpha/beta/rc tags. -release = '1.22.8' +release = '1.22.9' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.