How to Setup your Environment for JupyterHub and BrownDog

Instructions on how to get JupyterHub working with Browndog

Initial rough draft notes:   JupyterHub

How to change a JupyterHub config

  1. Make changes and update new copy of jupyterhub_config
  2. At the command line type:
    1. service jupyterhub stop
    2. If necessary you can use use "docker ps"  to confirm if the docker container is still running
  3. Next type:
    1. docker stop <main CONTAINER ID> 
    2. browser stops running
  4. Type:
    1. service jupyterhub start 
    2. NOTE: don't directly use /home/ubuntu/start_jupyterhub.sh

Known Issues

Typical Things You Might Want to do with JupyterHub

  • What is the URL

  • Where is the repository

  • How to start JupyterHub

  • Typical functions

  • Logging

Topicbdfiddlelogin APIcustom APIjupyterhub
URL

https://browndog.ncsa.illinois.edu/bdfiddle

https://browndog.ncsa.illinois.edu/bdfiddle-dev/

http://bd-jupyterhub.ncsa.illinois.edu:8000/jupyter/hub/login

or

https://browndog.ncsa.illinois.edu/jupyter/

http://bd-jupyterhub.ncsa.illinois.edu:8889/jupyter

http://bd-jupyterhub.ncsa.illinois.edu:8000/jupyter/hub/login

or

https://browndog.ncsa.illinois.edu/jupyter/

repo

https://opensource.ncsa.illinois.edu/bitbucket/projects/BD/repos/bdfiddle/browse

bdfiddle/bdfiddle.php

http://jupyterhub.readthedocs.io/en/latest/_static/rest-api/index.html

( login API is contained by jupyterhub.)

https://opensource.ncsa.illinois.edu/bitbucket/projects/BD/repos/jupyter/browsedockerhub
how to startMAMP or start as normal php project

on bd-jupyter.ncsa.illinois.edu

sudo service jupyterhub start

on local

update config file

https://opensource.ncsa.illinois.edu/bitbucket/projects/BD/repos/jupyter/browse/jupyterhub/jupyterhub.sh


run wit docker, start with script on bd-jupyterhub, so need to start this separately.


sudo service jupyter_rest start

same as login API
function
  • start jupyterhub
  • post to login api /custom api.
  • open url
  • crown login
  • if this is the first time, dockerspawner create a new user container.
  • find container with username
  • copy file from /tmp to user container.
jupyterhub
logrefer to bdfiddle set up.
docker ps
docker logs <main CONTAINER ID>
or open Kitematic on local machine

log_filename = "/home/ubuntu/logs/jpost_flask.log"

(this is setup in jpost.py)

docker logs <main CONTAINER ID>
or open Kitematic on local machine

Illustration of JupyterHub Network Flow




  • No labels