This page covers best-practices in upgrading your JupyterHub deployment via updates
to the Helm Chart.
Upgrading from one version of the Helm Chart to the
next should be as seamless as possible, and generally shouldn’t require major
changes to your deployment. Check the CHANGELOG
for each release to find out if there are any breaking changes in the newest version.
For additional help, feel free to reach out to us on gitter
or the mailing list!
These steps are critical before performing a major upgrade.
Always backup your database!
Review the CHANGELOG for incompatible changes and upgrade instructions.
Update your configuration accordingly.
User servers may need be stopped prior to the upgrade,
or restarted after it.
If you are planning an upgrade of a critical major installation,
we recommend you test the upgrade out on a staging cluster first
before applying it to production.
See the CHANGELOG.
Release 0.5 contains a major JupyterHub version bump (from 0.7.2 to 0.8).
Since it is a major upgrade of JupyterHub that changes how authentication is
implemented, user servers must be stopped during the upgrade.
The database schema has also changed, so a database upgrade must be performed.
See the documentation for v0.5 for the upgrade process
as well as the CHANGELOG
for this release for more information about changes.
This section covers upgrade information specific to the following:
helm upgrade command
RBAC (Role Based Access Control)
Custom Docker images
After modifying your config.yaml file according to the CHANGELOG, you will need
<YOUR-HELM-RELEASE-NAME> to run the upgrade commands. To find <YOUR-RELEASE-NAME>, run:
Make sure to test the upgrade on a staging environment before doing the upgrade on
a production system!
To run the upgrade:
helm upgrade --cleanup-on-fail <YOUR-HELM-RELEASE-NAME> jupyterhub/jupyterhub --version=<RELEASE-VERSION> -f config.yaml
For example, to upgrade to v0.6, enter and substituting <YOUR-HELM-RELEASE-NAME> and version v0.6:
helm upgrade --cleanup-on-fail <YOUR-HELM-RELEASE-NAME> jupyterhub/jupyterhub --version=v0.6 -f config.yaml
This release contains a major JupyterHub version bump (from 0.7.2 to 0.8). If
you are using the default database provider (SQLite), then the required db upgrades
will be performed automatically when you do a helm upgrade.
Default (SQLite): The database upgrade will be performed automatically when you
perform the upgrade
MySQL / PostgreSQL: You will execute the following steps, which includes a manual update of your database:
Make a full backup of your database, just in case things go bad.
Make sure that the database user used by JupyterHub to connect to your database
can perform schema migrations like adding new tables, altering tables, etc.
In your config.yaml, add the following config:
Do a helm upgrade. This should perform the database upgrade needed.
Remove the lines added in step 3, and do another helm upgrade.
If you are using a custom built image, make sure that the version of the
JupyterHub package installed in it is now 0.8.1. It needs to be 0.8.1 for it to work with
v0.6 of the helm chart.
For example, if you are using pip to install JupyterHub in your custom Docker Image,
you would use:
RUN pip install --no-cache-dir jupyterhub==0.8.1
Each Helm Chart is packaged with a specific version of JupyterHub (and
other software as well). See the Helm Chart repository for
information about the versions of relevant software packages.
If the upgrade is failing on a test system or a system that does not serve users, you can try
deleting the helm chart using:
helm delete <YOUR-HELM-RELEASE-NAME>
helm list may be used to find .