diff --git a/birdhouse/config/jupyterhub/jupyterhub_config.py.template b/birdhouse/config/jupyterhub/jupyterhub_config.py.template index 5f43879f4..ba01a40d9 100644 --- a/birdhouse/config/jupyterhub/jupyterhub_config.py.template +++ b/birdhouse/config/jupyterhub/jupyterhub_config.py.template @@ -135,3 +135,5 @@ c.Authenticator.refresh_pre_spawn = True blocked_users = {'authtest', '${CATALOG_USERNAME}', 'anonymous'} c.Authenticator.blacklist = blocked_users # v0.9+ c.Authenticator.blocked_users = blocked_users # v1.2+ + +${JUPYTERHUB_CONFIG_OVERRIDE} # noqa diff --git a/birdhouse/default.env b/birdhouse/default.env index f936e178b..9d965d5d7 100644 --- a/birdhouse/default.env +++ b/birdhouse/default.env @@ -48,6 +48,10 @@ export JUPYTER_LOGIN_BANNER_BOTTOM_SECTION="" # server for the change to take effect. export JUPYTERHUB_README="$JUPYTERHUB_USER_DATA_DIR/README.ipynb" +# Allow for adding new config or override existing config in +# config/jupyterhub/jupyterhub_config.py.template. +export JUPYTERHUB_CONFIG_OVERRIDE="" + # Folder inside "proxy" container to drop extra monitoring config export CANARIE_MONITORING_EXTRA_CONF_DIR="/conf.d" diff --git a/birdhouse/env.local.example b/birdhouse/env.local.example index 96f114cc8..c22054766 100644 --- a/birdhouse/env.local.example +++ b/birdhouse/env.local.example @@ -294,6 +294,23 @@ export POSTGRES_MAGPIE_PASSWORD=postgres-qwerty # server for the change to take effect. #export JUPYTERHUB_README="/path/to/README.ipynb" +# Allow for adding new config or override existing config in +# config/jupyterhub/jupyterhub_config.py.template. +# +# Sample below will shutdown idle server after 3 days and idle kernel after 8 hours. +# +#export JUPYTERHUB_CONFIG_OVERRIDE=" +#c.Spawner.args.extend([ +## Shut down the server after N seconds with no kernels or terminals running and no activity. +#'--NotebookApp.shutdown_no_activity_timeout=259200', # 3d * 24h/d * 60m/h * 60s/m +## Timeout (in seconds) after which a kernel is considered idle and ready to be culled. +#'--MappingKernelManager.cull_idle_timeout=28800', # 8h * 60m/h * 60s/m +## Culling kernels which have one or more connections for idle but open notebooks. +## Otherwise, browser have to be closed for culling to work. +#'--MappingKernelManager.cull_connected=True', +#]) +#" + # Extra PyWPS config for **all** WPS services (currently only Flyingpigeon, Finch and Raven supported). # export EXTRA_PYWPS_CONFIG=" # [logging] @@ -354,4 +371,4 @@ export POSTGRES_MAGPIE_PASSWORD=postgres-qwerty # To enable emu: add './optional-components/emu' to EXTRA_CONF_DIRS above. # Emu WPS service image if that testing component is enabled -#export EMU_IMAGE="tlvu/emu:watchdog" \ No newline at end of file +#export EMU_IMAGE="tlvu/emu:watchdog" diff --git a/birdhouse/pavics-compose.sh b/birdhouse/pavics-compose.sh index ec6262dce..3619ee81c 100755 --- a/birdhouse/pavics-compose.sh +++ b/birdhouse/pavics-compose.sh @@ -48,6 +48,7 @@ OPTIONAL_VARS=' $JUPYTER_LOGIN_BANNER_TOP_SECTION $JUPYTER_LOGIN_BANNER_BOTTOM_SECTION $JUPYTER_LOGIN_TERMS_URL + $JUPYTERHUB_CONFIG_OVERRIDE $AUTODEPLOY_EXTRA_REPOS_AS_DOCKER_VOLUMES $AUTODEPLOY_PLATFORM_FREQUENCY $AUTODEPLOY_NOTEBOOK_FREQUENCY