diff --git a/CHANGES.md b/CHANGES.md index 5d1d4cb7..37add6ed 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,7 +15,22 @@ [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 + +- JupyterHub: update `jupyterhub` component default version to [5.2.1](https://github.com/Ouranosinc/jupyterhub/releases/tag/5.2.1-20241114) + + This implements all changes between JupyterHub version + [4.1.6 and 5.2.1](https://jupyterhub.readthedocs.io/en/stable/reference/changelog.html). + + This update requires the following manual upgrade steps: + + - If your local environment file sets the `c.DockerSpawner.image_whitelist` config option in the + `JUPYTERHUB_ENABLE_MULTI_NOTEBOOKS` environnment variable. Change `c.DockerSpawner.image_whitelist` + to `c.DockerSpawner.allowed_images`. + + If you have changed any of the default `jupyterhub` settings you may need to consult the [JupyterHub upgrade + guide](https://jupyterhub.readthedocs.io/en/latest/howto/upgrading-v5.html) to see if any of those settings + have been changed. [2.8.0](https://github.com/bird-house/birdhouse-deploy/tree/2.8.0) (2025-01-17) ------------------------------------------------------------------------------------------------------------------ diff --git a/birdhouse/components/jupyterhub/default.env b/birdhouse/components/jupyterhub/default.env index 91f40f08..c49bce48 100644 --- a/birdhouse/components/jupyterhub/default.env +++ b/birdhouse/components/jupyterhub/default.env @@ -5,7 +5,7 @@ # are applied and must be added to the list of DELAYED_EVAL. export JUPYTERHUB_DOCKER=pavics/jupyterhub -export JUPYTERHUB_VERSION=4.1.5-20240426 +export JUPYTERHUB_VERSION=5.2.1-20241114 export JUPYTERHUB_IMAGE='${JUPYTERHUB_DOCKER}:${JUPYTERHUB_VERSION}' export JUPYTERHUB_IMAGE_URI='registry.hub.docker.com/${JUPYTERHUB_IMAGE}' diff --git a/birdhouse/components/jupyterhub/jupyterhub_config.py.template b/birdhouse/components/jupyterhub/jupyterhub_config.py.template index 44521a50..c58581d6 100644 --- a/birdhouse/components/jupyterhub/jupyterhub_config.py.template +++ b/birdhouse/components/jupyterhub/jupyterhub_config.py.template @@ -176,7 +176,9 @@ c.Spawner.disable_user_config = True c.DockerSpawner.default_url = '/lab' c.DockerSpawner.remove = True # delete containers when servers are stopped +c.DockerSpawner.allowed_images = {c.DockerSpawner.image: c.DockerSpawner.image} # v5.0+ ${JUPYTERHUB_ENABLE_MULTI_NOTEBOOKS} # noqa + c.DockerSpawner.pull_policy = "always" # for images not using pinned version c.DockerSpawner.debug = True c.JupyterHub.log_level = logging.DEBUG @@ -223,6 +225,7 @@ blocked_users = {'authtest', '${CATALOG_USERNAME}', 'anonymous'} c.Authenticator.blacklist = blocked_users # v0.9+ c.Authenticator.blocked_users = blocked_users # v1.2+ +c.Authenticator.allow_all = True # v5.0+ # ------------------------------------------------------------------------------ # Shutdown idle user server based on configured timeouts. diff --git a/birdhouse/env.local.example b/birdhouse/env.local.example index 3b643412..ca483f68 100644 --- a/birdhouse/env.local.example +++ b/birdhouse/env.local.example @@ -281,7 +281,7 @@ export GEOSERVER_ADMIN_PASSWORD="${__DEFAULT__GEOSERVER_ADMIN_PASSWORD}" # allow jupyterhub user selection of which notebook image to run # see https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html #export JUPYTERHUB_ENABLE_MULTI_NOTEBOOKS=" -#c.DockerSpawner.image_whitelist = { +#c.DockerSpawner.allowed_images = { # os.environ['JUPYTERHUB_IMAGE_SELECTION_NAMES'].split()[0]: os.environ['JUPYTERHUB_DOCKER_NOTEBOOK_IMAGES'].split()[0], # os.environ['JUPYTERHUB_IMAGE_SELECTION_NAMES'].split()[1]: os.environ['JUPYTERHUB_DOCKER_NOTEBOOK_IMAGES'].split()[1], # os.environ['JUPYTERHUB_IMAGE_SELECTION_NAMES'].split()[2]: os.environ['JUPYTERHUB_DOCKER_NOTEBOOK_IMAGES'].split()[2], diff --git a/docs/source/migration_guide.rst b/docs/source/migration_guide.rst index 956171e9..e46cd899 100644 --- a/docs/source/migration_guide.rst +++ b/docs/source/migration_guide.rst @@ -3,6 +3,21 @@ Migration Guide =============== +Version 2.9 +----------- + +Version 2.9 updates JupyterHub to version 5. + +To upgrade to version 2.9 from an earlier version: + +- If your local environment file sets the `c.DockerSpawner.image_whitelist` config option in the + `JUPYTERHUB_ENABLE_MULTI_NOTEBOOKS` environnment variable. Change `c.DockerSpawner.image_whitelist` + to `c.DockerSpawner.allowed_images`. + + If you have changed any of the default `jupyterhub` settings you may need to consult the [JupyterHub upgrade + guide](https://jupyterhub.readthedocs.io/en/latest/howto/upgrading-v5.html) to see if any of those settings + have been changed. + Version 2.4 -----------