How to Setup your Environment for JupyterHub and BrownDog
- open docker
- execute https://opensource.ncsa.illinois.edu/bitbucket/projects/BD/repos/jupyter/browse/jupyterhub/jupyterhub.sh
JupyterHub is now running at http://127.0.0.1:8000/jupyter/
( install virtualenv)
install python libs in https://opensource.ncsa.illinois.edu/bitbucket/projects/BD/repos/jupyter/browse/jpost.py (flask & glob2)
check the log specified in jpost.py exist.
export FLASK_APP=jpost.py
flask run
post to localhost:5000/jupyter
(flask quick start: http://flask.pocoo.org/docs/0.12/quickstart/)
Instructions on how to get JupyterHub working with Browndog
Initial rough draft notes: JupyterHub
How to change a JupyterHub config
- Make changes and update new copy of jupyterhub_config
- At the command line type:
service jupyterhub stop
- If necessary you can use use "docker ps" to confirm if the docker container is still running
- Next type:
docker stop <main CONTAINER ID>
- browser stops running
- Type:
service jupyterhub start
- NOTE: don't use /home/ubuntu/start_jupyterhub.sh
Known Issues
- You cannot set ACCESS-CONTROL to '* for jupyterhub', it is not working - See https://github.com/jupyterhub/jupyterhub/issues/1087
- don't change port 8000 or 8081, JupyterHub will talk to these two ports and there is no clear way to setup.
possible issue if you change: kernel not found. - DO NOT USE latest singleuser image, THIS DOES NOT WORK
see https://github.com/jupyterhub/dockerspawner/issues/155
Known working images: jupyterhub/singleuser:0.7, jupyter/r-notebook:93b880cb801c
Typical Things You Might Want to do with JupyterHub
What is the URL
Where is the repository
How to start JupyterHub
Typical functions
Logging
Topic | bdfiddle | login API | custom API | jupyterhub |
---|---|---|---|---|
URL | http://bd-jupyterhub.ncsa.illinois.edu:8000/jupyter/hub/login or | http://bd-jupyterhub.ncsa.illinois.edu:8889/jupyter | http://bd-jupyterhub.ncsa.illinois.edu:8000/jupyter/hub/login or | |
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/browse | dockerhub |
how to start | MAMP or start as normal php project | on bd-jupyter.ncsa.illinois.edu sudo service jupyterhub start on local update config file | run wit docker, start with script on bd-jupyterhub, so need to start this separately. | same as login API |
function |
|
|
| jupyterhub |
log | refer to bdfiddle set up. |
or open Kitematic on local machine | log_filename = "/home/ubuntu/logs/jpost_flask.log" (this is setup in jpost.py) | or open Kitematic on local machine |