Move a Hub to a new URL#
Sometimes we may want to change the URL and naming convention of a hub we have deployed, e.g., renaming the previous ‘researchdelight’ hub to ‘showcase’ 2i2c-org/infrastructure#3279.
Rename config files and update file references
Our naming conventions mean that we have config files in the form
<hub-name>.values.yamland these are explicitly listed as a hub entry within the associated
cluster.yamlfile where the hub is deployed. These files should be renamed
<new-hub-name>.values.yamland updated in the associated
Update instance of the old hub name within the config files
This will mostly be related to URLs, e.g.,
jupyterhub.ingress.hostsand OAuth callback URLs for authentication.
Some variables, e.g. references to scratch buckets or kubernetes annotations, may remain the same, unless you also update the related terraform config. This is optional, and only recommended if consistency of the scratch bucket names is crucial for the community.
Update any instances of the old hub name in the
namefield is changed (as opposed to only the
display_namefield), this will cause the deployer/helm to deploy a new hub under a new namespace bearing the new hubname. The namespace bearing the old hub name will continue to exist and will need cleaning up manually, since helm does not have the concept of renaming a namespace. Depending on how different the new name is from the old, this is a judgment call to make.
Add a redirect from the old URL to the new one
Open a Pull Request with the changes for review
Once the PR has been approved:
Update A/CNAME records in Namecheap for the new URL
Update the relevant OAuth app for the new URL
Merge the PR