This phase is about a fast initial hub setup that later could be fine-tuned.
Definition of ready¶
The following lists the information that needs to be available to the engineer before this phase can start.
Name of the hub
Will Dask gateway be required?
Splash image
URL of the community’s webpage
Funded by information (name and URL)
Authentication mechanism
List of admin users
Outputs¶
At the end of Phase 3.1 both 2i2c engineers and the other admin users can login into the hub.
The file assets that should have been generated and included in the PR should be:
➕ config/clusters/<new-cluster-name>
├── common.values.yaml
├── <new-hub-name>.values.yaml
└── enc-<new-hub-name>.secret.values.yamlAnd the following existing file should have been updated if the new hub was the first in a cluster:
~ .github/workflows
└── deploy-hubs.yamlInitial setup runbook¶
All of the following steps must be followed in order to consider phase 3.1 complete. Steps might contain references to other smaller, topic-specific runbooks that are gathered together and listed in the order they should be carried out in by an engineer.
Create the relevant
values.yamlfile/s under the appropriate cluster directoryexport CLUSTER_NAME=cluster-name; export HUB_NAME=hub-nameIf you’re adding a hub to an existing cluster with hubs on it then create only one file to hold the specific hub configuration via
touch ./config/clusters/$CLUSTER_NAME/$HUB_NAME.values.yamlIf the cluster has currently no hubs
but will have more than one (and chances are it will as this is a common 2i2c practice to always deploy a staging hub alongside a production one), then create two values.yaml files under the appropriate cluster directory.
One file will hold the common hubs configuration and one will hold the specific hub configuration.
Make sure you are in the root of the infrastructure repository and run:
touch ./config/clusters/$CLUSTER_NAME/$HUB_NAME.values.yaml; touch ./config/clusters/$CLUSTER_NAME/common.values.yaml
Run the deployer to generate a sample basic hub configuration
The easiest way to add new configuration is to use the deployer to generate an initial sample config.
You will be asked to input all the information needed for the command to run successfully. Follow the instructions on the screen and using the information provided to you, fill in all the fields.
If you’re adding a hub to an existing cluster with hubs on it
Then run the deployer command below to generate config for the specific hub configuration:
If this will be a regular JupyterHub then:
Run:
deployer generate hub-asset main-values-fileSetup the relevant Authentication Provider with relevant credentials
See Enable authentication for steps on how to achieve this.
If this will be a binderhub style hub, then run:
deployer generate hub-asset binderhub-ui-values-fileAnd continue following the guide at Make binderhub-ui hub.
If the cluster has currently no hubs
Determine the address of the storage server that a hub on this cluster should use to connect to it
AWSGoogle CloudAzureGet the address of the storage via terraform and store it as it will be required in a later step.
Make sure you are in the right terraform directory, i.e.
terraform/projects/awsand the right terraform workspace by runningterraform workspace show.Run:
terraform output ebs_volume_id_mapGet the address of the storage via terraform and store it as it will be required in a later step.
Make sure you are in the right terraform directory, i.e.
terraform/projects/awsand the right terraform workspace by runningterraform workspace show.Run:
terraform output persistent_disk_id_maptf output azure_fileshare_url
Run the deployer command below to generate config for the common hubs configuration, passing the admin users one by one:
deployer generate hub-asset common-values-file --admin-users admin1 --admin-users admin2
Then reference these files in a new entry under the
hubskey in the cluster’scluster.yamlfileYou can use the
deployer generate hub-assetsubcommand to generate the relevant entry to insert into cluster.yaml file.deployer generate hub-asset cluster-entry --cluster-name $CLUSTER_NAME --hub-name $HUB_NAMEEnable dask-gateway
Use the info provided in the new hub GitHub issue for the
Dask gatewaysection. If Dask gateway will be needed, then choose abasehub, and follow the guide on how to enable dask-gateway on an existing hub.Add the new cluster and staging hub to CI/CD
To ensure the new cluster and its hubs are appropriately handled by our CI/CD system, please add it as an entry in the following places in the
deploy-hubs.yamlGitHub Actions workflow file:The job named
upgrade-supportneeds a list of clusters being automatically deployed by our CI/CD system. Add an entry for the new cluster here.If the hub has
stagingin its name (assuming a cluster can have many staging hubs), the job calledupgrade-stagingrequires a list of staging hubs per cluster. Add an entry for the new staging hub here.
Create a Pull Request with the new hub entry
And get a team member to review it.
Merge the PR once it’s approved Once you merge the pull request, the GitHub Action workflow will detect that a new entry has been added to the configuration file.
It will then deploy a new JupyterHub with the configuration you’ve specified onto the corresponding cluster.
Monitor the action to make sure that it completes
If something goes wrong and the workflow does not finish, try deploying locally to access the logs to help understand what is going on. It may be necessary to make new changes to the hub’s configuration via a Pull Request, or to revert the old Pull Request if you cannot determine how to resolve the problem.
Log in to the hub
And ensure that the hub works as expected from a user’s perspective.
Send a link to the hub’s Community Representative(s) So they can confirm that it works from their perspective as well.
FreshDesk Usage
Create a New Ticket and set the Requester to one of the Community Representatives Description can be ‘New Hub’.
Verify that the Requester is associated a Company. Look at the right hand info screen on FreshDesk. Look for fields:
Community Representatives
Hub
Grafana URL
If those fields are missing than this Requester is not correctly associated with a Community or the Community is missing these fields. (Yes, this will not generalize fully when a community has more than one hub... we’ll get there.)
Reply to a the ticket and click the ‘Canned Response’ icon and choose “Your {{ticket.company.name}} hub is now available” and replace the body of the reply.
Add the required bcc: field manually and edit the response as needed to included additional information (like log on details)
Click Send