JupyterHub for Research Computing

Introduction

Jupyter Hubs are centers that disperse and support Jupyter Notebooks to a User community: Scientists, students,
research teams and the like.

This page describes the operation of a JupyterHub instance on the public cloud. We provide a walk-through
and conceptual framework for both installation and operation. The cloudmaven.org working instance is
not public. However a Jupyter Notebook service is provided at no cost by the Microsoft Azure team;
see this link.

Our first implementation is built on the AWS public cloud. We address cost management,
provision of fully functional working environments for the User pool, software versioning,
data access, ingress and egress. We rely heavily on Anaconda here; but a future revision
will include kubernetes/docker-based scaling. That is: By scaling up the Jupyter Hub can
serve larger groups of people.

Facets of the JupyterHub framework

Set up a machine instance (or instances: to manage many users)

Create options for pre-built collections of Jupyter Notebooks. We will call these Libraries

Build a computation environment that includes Python and necessary Python packages

Establish a User pool with authentication by each User; we use OAuth with GitHub for this

Make sure to give full access to notebooks folder to your user (read/write/execute). You can check current access with:

$ ls -la notebooks

Now Edit jupyterhub_config.py as follows:

$ sudo nano jupyterhub_config.py

#-----------------------------------------------------------------------------------------------------------------------------------------------------# Application configuration#-----------------------------------------------------------------------------------------------------------------------------------------------------# This is an application.c.JupyterHub.authenticator_class='oauthenticator.GitHubOAuthenticator'c.GitHubOAuthenticator.oauth_callback_url='https://your_ip_addrees/hub/oauth_callback'c.GitHubOAuthenticator.client_id='---­­­­­­­Some cryptic string----­­­­­'c.GitHubOAuthenticator.client_secret='---­­­­­­­Some cryptic string----­­­­­'# This is an application.# create system users that don't exist yetc.LocalAuthenticator.create_system_users=Truec.Authenticator.whitelist={'amandalehr','robfatland','aaarendt'}c.Authenticator.admin_users={'amandalehr','robfatland'}c.Spawner.notebook_dir='~/notebooks'c.JupyterHub.ssl_cert='mycert.pem'c.JupyterHub.ssl_key='mykey.key'c.JupyterHub.cookie_secret_file='/home/ubuntu/jupyterhub_cookie_secret'c.JupyterHub.proxy_cmd=['/usr/local/bin/configurable-http-proxy']# Let the Systemctl aware of all the environment pathimportosforvarinos.environ:c.Spawner.env_keep.append(var)