This document lays out the steps needed to setup a BinderHub deployment on Google Cloud using Kubernetes. All steps needed will be talked about in detail plus all insight i’ve gained through going through the process will be talked about for the benefit of the reader. Most of the setup was accomplished by following the Zero to BinderHub guide.
One can mostly follow the tutorial on the website.
- On step 7, creating a node pool for users. The command won’t run unless either --region
or --zone option was specified. I chose --region us-central1-b, the region that I used was
the same one used in step 4 in the Kubernetes guide.
Helm, the package manager for Kubernetes, is a useful tool for: installing, upgrading and managing applications on a Kubernetes cluster. Helm packages are called charts . Like for the last part, one can mostly follow the tutorial on the website, where a lot of additional information regarding Helm can be found too.
- The commands in the guide should be run on the Google Cloud Shell that was used in
the last step. - Closing or disconnecting from the console will remove helm , and one has to
reinstall it again with
'curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash'
to use helm commands to control the cluster.
BinderHub builds Docker images out of Git repositories, and then pushes them to a Docker registry so that JupyterHub can launch user servers based on these images. There are several options available to use as a container registry, the one that will be used for this tutorial is DockerHub. One can follow the tutorial for DockerHub on the website. It also seems possible to run your own server as a Container Registry.
In this step, we setup BinderHub on the Kubernetes cluster using Helm. One can mostly use the website.
- At the '1.2.2 Initialization' section, the command at step 2 has to be run in order for
steps further in the installation to work.
In this setp, we setup BinderHub Authentication following the steps on this website. This step is only useful if we want to redirect our users to a login page when they arrive at our BinderHub URL. Usually we will not need a login page (mybinder.org does not have a login page).
- Binder Oauth requires a binderhub domain and a jupyterhub domain.
In this step, we can customize JupyterHub user resource and other customization by editing config.yaml. This page provides a general jupyterHub customization description, but the format it provides is incorrect. See the config-template.yaml file provided. More explanations can be found on page1 and page2
Get more help about Binderhub on discourse and GitHub issue and mybinder github