In the following the necessary steps are described how to setup a Jupyter Server on a Compute Cloud Instance that can be used for a course. All accounts are temporary and only have access to this special instance.
The course instructor can set the password for the duration of the course and later on deactivate the accounts again. The server is accessible from every client on the internet and the course instructor therefore should monitor the server for suspicious activity or change the password for access in case an account got compromized. However, the server is isolated from all other resources at LRZ like Linux Cluster or SuperMUC so that the amount of damage is small that can be performed by an attacker.
You should have some experience in setting up a linux OS on an empty machine and some basic understanding how linux works.
- Get a Linux Cluster Project (see: Access and Login to the Linux-Cluster)
- Get Compute Cloud Access for that project (see: Compute Cloud of SuperMUC-NG)
- Start a new instance on the LRZ Compute Cloud where the number of cores should be the number of participants of the course. In general 20 cores should be fine.
- Choose Ubuntu for the OS.
- You need a private/public key for login from your terminal/desktop
- Do not change the root password. By doing that root cannout be attacked from the outside
- Use sudo for installation of the software.
- generate a floating IP for the internet and associate it with your server
Installation of the software
- Use sudo
- Download miniconda from conda as root and install it
- Using conda install the following packages:
- Jupyter Server using conda see: https://jupyter.org/install
- Jupyter Hub
- for general installation see: https://jupyterhub.readthedocs.io/en/stable/quickstart.html
- as systemd service see: https://github.com/jupyterhub/jupyterhub/wiki/Run-jupyterhub-as-a-system-service
- Kernels for the software you want to use (R-Kernel, tensorflow, etc...) see: https://github.com/IRkernel/IRkernel
Provide user accounts as many as are needed for the course. Do not give them a login shell. By doing that, users can only use the jupyter hub interface to login.
These commands come in handy for setting user passwords and cleaning up user directories after the course: