Skip to content

Installing JupyterHub with OpenShift

keywords: jupyterhub, openshift, kubernetes, scalable, jupyter, python, nbgitpuller, docker

Introduction

We need a scalable and flexible implementation of Jupyter for education and research. In educational settings, students typically require one or two CPU cores and a small amount of memory, whereas researchers often need many cores and large memory allocations. Our goal is to build a system capable of supporting up to 150 students in a single day.

Valuable lessons were learned with previous tests using microk8s on a small number of servers. Very recently the TU acquired a very powerful OpenShift cluster providing the kubernetes environment that has enough recourses to implement this service.

This document provides a very short instruction on how to build this service.

Setting up your computer

You will build this service using the command line tools for openshift.

Setting up OpenShift

The RedHat OpenShift server can be found here:

  • https://console-openshift-console.apps.ocp.k8s.tudelft.nl

After logging in with your netid (surfconext) this will show you a list of Projects you created on this server.

Create a new project with an appropriate name for your intended jupyterhub service (i.e. the teaching course id). In this document this will be referred to as <ns> short for ‘namespace’. In Kubernetes you will need a namespace to setup or configure your service and this namespace is the name of your openshift project.

On the top row of the website click the question mark and select “Command Line Tools”. From here click “Copy login command”. This will take you to a new webpage where you have to login again with your netid. Now click on “Display Token” and copy the the complete command starting with oc login --token=.... You need this command later to configure your computer to connect to the openshift server.