-
Notifications
You must be signed in to change notification settings - Fork 7
Refactor Jupyterhub configuration files #625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mishaschwartz
wants to merge
2
commits into
gpu-resource-allocation
Choose a base branch
from
refactor-jupyterhub-customization
base: gpu-resource-allocation
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Refactor Jupyterhub configuration files #625
mishaschwartz
wants to merge
2
commits into
gpu-resource-allocation
from
refactor-jupyterhub-customization
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/3913/Result ❌ FAILUREBIRDHOUSE_DEPLOY_BRANCH : refactor-jupyterhub-customization DACCS_IAC_BRANCH : master DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-216.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/586/NOTEBOOK TEST RESULTS |
Collaborator
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/3914/Result ❌ FAILUREBIRDHOUSE_DEPLOY_BRANCH : refactor-jupyterhub-customization DACCS_IAC_BRANCH : master DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-91.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/587/NOTEBOOK TEST RESULTS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ci/operations
Continuous Integration components
ci/tests
Issues or changes related to tests scripts
component/jupyterhub
Related to JupyterHub as development frontend with notebooks
component/magpie
Related to https://github.com/Ouranosinc/Magpie
documentation
Improvements or additions to documentation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Previously the jupyterhub configuration was defined in
components/jupyterhub/jupyterhub_config.py.templateexcept for the custom authenticator which was included in thepavics/jupyterhubdocker image. This was fine, except that the configuration was split across two projects and as the configuration got more complex, maintaining these was getting more difficult.This moves all configuration code including the authenticator to a python package named
jupyterhub_customlocated atcomponents/jupyterhub/jupyterhub_custom/. It moves all configurations for the authenticator to themagpie_authenticator.pyfile and all the configurations for the spawner to thecustom_spawner.pyfile. All variables that are settable by environment variables are moved to theconstants.pyfile. This makes it much easier to see which variables are configurable using environment variables all in one place.This change introduces unit tests and style policies (enforced by ruff and pre-commit) for this package to encourage better code practices.
This change should be fully backwards compatible with the exception of the change to how settings for
deprecated-components/catalogis handled (see below). However, it does deprecate some environment variables in favour of better configuration solutions:JUPYTERHUB_ENABLE_MULTI_NOTEBOOKSvariable to set theDockerSpawner.allowed_imagesvariable is deprecated.jupyterhub_config.py.templatefile. This makes it too easy to accidentally insert code that breaks the configuration settings later on. We should avoid code insertion like this whenever possible.DockerSpawner.allowed_imageswill be set based on the values ofJUPYTERHUB_IMAGE_SELECTION_NAMESandJUPYTERHUB_DOCKER_NOTEBOOK_IMAGES. If more than one image is specified by those variables then the user will be able to select which one they want. If you want to specify images other than those in the default those can be set using theJUPYTERHUB_ALLOWED_IMAGESwhich is a yaml or JSON mapping of image names to jupyterlab docker image tags.JUPYTERHUB_ADMIN_USERSvariable to set theDockerSpawner.admin_usersvariable is deprecated.based on roles, not by assigning them to the
admin_usersattribute. This makes it possible to easily revoke admin permissions as well and does not require us to restart Jupyterhub to do so.JUPYTERHUB_ADMIN_GROUP_NAMEvariable (default is "jupyterhub-admin"). Add users to this group in Magpie in order to give them admin permissions on Jupyterhub.JUPYTERHUB_CONFIG_OVERRIDEis deprecated.constants.py. For example:notebook_dir == constants.NOTEBOOK_DIR. The uppercase version is preferred.Note: if your deployment is still using the
deprecated-components/catalogcomponent. You may want to manually set the following inJUPYTERHUB_CONFIG_OVERRIDEsince the automatic addition of the theCATALOG_USERNAMEto theblocked_usersset is no longer part of the default settings (since thedeprecated-components/catalogcomponent has been deprecated for a long time):Changes
Non-breaking changes
Breaking changes
deprecated-components/catalogis still used, then it needs to be manually configured (see above)Related Issue / Discussion
Additional Information
CI Operations
birdhouse_daccs_configs_branch: master
birdhouse_skip_ci: false