Difficulty: intermediate
Estimated Time: 15-20 minutes

The Project Jupyter web site describes Jupyter notebooks as:

an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.

Jupyter notebooks can be deployed direct to Linux, macOS or Windows environments, or in containerized environments such as Docker, Kubernetes and OpenShift.

In this workshop you will learn how you can provide persistent workspaces for multiple users, for working on Jupyter notebooks, using JupyterHub. Access to the Jupyter notebooks will be gated using OpenShift cluster authentication. The Jupyter notebook instance will be attached to the OpenShift cluster so that users can interact with and deploy workloads to the cluster required by the Jupyter notebooks.

The examples shown will make use of sample Jupyter notebook images, JupyterHub images, and templates, from the Jupyter on OpenShift project, a community project for demonstrating how Jupyter notebooks and JupyterHub can be deployed to OpenShift.

In this workshop you learnt how you can provide persistent workspaces for multiple users, for working on Jupyter notebooks, using JupyterHub. The environment gated access to the Jupyter notebooks using OpenShift cluster authentication. The Jupyter notebook instances were attached to the OpenShift cluster so that users could interact with and deploy workloads to the cluster required by the Jupyter notebooks.

Further details on the example JupyterHub images and templates used in this workshop can be found at:

This Git repository is part of the Jupyter on OpenShift project, a community project for demonstrating how Jupyter notebooks and JupyterHub can be deployed to OpenShift.

Check out the other workshops here for details of how to deploy a single Jupyter notebook and create your own custom notebook images.

For information on work done by Red Hat relevant to the data science, AI and ML space, visit:

Also check out the Red Hat projects radanalytics.io and Open Data Hub.

Multi-user Workspace Using JupyterHub

Step 1 of 6

Topic 1 - Loading the Required Images

The Jupyter on OpenShift project provides Jupyter notebook and JupyterHub images which have been purpose built to work best with OpenShift.

Before you can deploy JupyterHub, you first need to load the images for the Jupyter notebook application and JupyterHub into your project in OpenShift. You only need to load this once in a project. You can then use it in creating as many different JupyterHub deployments as you need.

In this workshop the step of loading the Jupyter notebook and JupyterHub images has already been done for you.

To verify that the images have been loaded run the command:

oc get imagestreams -o name

You should see that the s2i-minimal-notebook and jupyterhub image stream exists.

You can inspect the image stream by running:

oc describe imagestream s2i-minimal-notebook

You should see that the image stream includes tags for 3.5 and 3.6. These correspond to versions of the image for Python 3.5 and Python 3.6.

When deploying JupyterHub, either of these images for the Jupyter notebook can be used, or a custom Jupyter notebook image you built could instead be used.