Skip to content
This repository has been archived by the owner on Feb 5, 2021. It is now read-only.

Installation

Mohammad Wasil edited this page Oct 1, 2018 · 10 revisions

Installation

Created Freitag 21 September 2018

  • Create instance on google vm
    • VM Instance
      • Change server to euroep-west1-b
      • Costumize cpu and memory
      • Choose boot disk and change the disk size
      • Firewall: allow http and https traffic
    • Snapshot
      • Create a snapshot for backup
    • IP external
      • Create reserved static ip
      • Attach static ip to the instance
  1. On the instance a. Install nginx

*sudo apt install nginx

b. Install certbot 1. Go to: https://certbot.eff.org/lets-encrypt/debianstretch-nginx 2. Install: sudo apt-get install python-certbot-nginx -t stretch-backports 3. Obtain ssl certificate (got certbot url) * sudo certbot certonly --authenticator standalone --pre-hook "nginx -s stop" --post-hook "nginx" * Configure let's encript * cd /etc/letsencrypt * sudo chmod 777 -R archive/ * sudo chmod 777 -R live/ c. Shutdown pc, and configure cloud dns in gcloud and in your dns provider 1. In your dns provider a. Add A record in the name server that points to your ip address 2. In google dns cloud a. Create zone and add your domain and your name server (A, NS and CNAME record) d. Create cookie secret, proxy auth token and dhparam.pem for jupyterhub 1. Create cookie secret * mkdir /srv/jupyterhub * cd /srv/ jupyterhub * sudo touch jupyterhub_cookie_secret * sudo chown :sudo jupyterhub_cookie_secret * sudo chmod g+rw jupyterhub_cookie_secret * sudo openssl rand -hex 32 > jupyterhub_cookie_secret * sudo chmod 600 jupyterhub_cookie_secret 2. Create proxy auth token * cd /srv/jupyterhub * sudo touch proxy_auth_token * sudo chown :sudo proxy_auth_token * sudo chmod g+rw proxy_auth_token * sudo openssl rand -hex 32 > proxy_auth_token * sudo chmod 600 proxy_auth_token 3. Generate dhparam.pem * cd /etc/nginx * sudo touch dhparam.pem * sudo chown :sudo dhparam.pem * sudo chmod g+rw dhparam.pem * sudo openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 * sudo chmod 600 dhparam.pem e. Modify nginx config (go to repo) 1. Modify nginx config (by default it's the same as in repository) 2. Modify /etc/nginx/sites-enabled/default f. Install jupyterhub: https://jupyterhub.readthedocs.io/en/stable/quickstart.html 5. Install python 3.5: no greater than 3.5, otherwise ot will break nodejs,npm 6. Install pip3: sudo apt install python3-pip 7. Install nodejs: https://nodejs.org/en/download/package-manager/ 8. Install jupyter notebook: sudo pip3 install jupyter 9. Install jupyterhub a. sudo python3 -m pip install jupyterhub b. sudo npm install -g configurable-http-proxy c. sudo python3 -m pip install notebook 10. Install systemd spawner: https://github.com/jupyterhub/systemdspawner g. Install nbgrader 1. Global install + assignment list a. pip3 install nbgrader b. jupyter serverextension enable --system --py nbgrader c. jupyter nbextension install --system --py nbgrader --overwrite d. jupyter nbextension enable --sys-prefix assignment_list/main --section=tree e. jupyter serverextension enable --sys-prefix nbgrader.server_extensions.assignment_list f. Extensions 1. pip3 install jupyterlab 2. jupyter labextension install jupyterlab-drawio 3. Contrib * pip install jupyter_contrib_nbextensions * jupyter contrib nbextension install --sys-prefix * enable contrib extensions: * jupyter nbextension enable --sys-prefix codefolding/main * jupyter nbextension enable --sys-prefix nbTranslate/main * jupyter nbextension enable --user codefolding/main 4. RISE (presentation) a. ttps://github.com/damianavila/RISE 2. Instructor only (local) a. jupyter nbextension enable --user --py nbgrader

Clone this wiki locally