This repo contains the shared files used to create a JupyterHub server on Digital Ocean using an Nginx proxy server and SSL security. This deployment is for an Engineering Programming class (ENGR114) at Portland Community College during Winter 2019.
Docs for this deployment of JupyterHub can be found here:
For another deployment of JupyterHub on Digital Ocean with Nginx proxy. See these blog posts:
https://pythonforundergradengineers.com/why-jupyter-hub.html
- Get SSH public and private keys with PuTTYgen. Save SSH keys in Documents/ssh-keys
- Create a new Digital Ocean Droplet (DO server) running Ubuntu 18.04. Include SSH key when Droplet is created
- Log into DO server as root with PuTTY and SSH keys. Create a non-root sudo user (username: peter).
- Log into DO server as non-root sudo user with PuTTY and SSH keys
- Install Miniconda
- Create a conda env with Python 3.6
- Conda install packages including numpy, pandas, matplotlib, jupyter, notebook, scipy, sympy, pyserial and xlrd
- Conda install -c conda-forge jupyterhub pint
- Run JupyterHub (for just a minute) without SSL to see if it works. Go to the DO server IP address and start a notebook.
- Link a Google domain to DO name servers. In the Digital Ocean DNS dashboard, link domain name to DO server.
- Create SSL keys with let's encrypt
- Modify jupyterhub_config.py to include SSL keys
- Install Nginx
- Modify Nginx config to move traffic to JupyterHub and use SSL cirts
- Run jupyterhub as a system service
- Start Nginx and JupyterHub. Should be able to go to https://domain.org and start, run and save a Jupyter notebook.
- Set JupyterLab as the default interface (instead of the regular Jupyter notebook interface)
- Add authentication for GitHub usernames and passwords
- Add authentication for Google usernames and passwords
- Add custom login page
- Pull assignments and notes down from GitHub each time a student logs into JupyterHub.
- Celebrate!