Skip to content
eWaterCycle Experiment Launcher
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
docs
ewatercycle_experiment_launcher
tests
.editorconfig
.gitignore
.travis.yml
.zenodo.json
CHANGELOG.md
CITATION.cff
CONTRIBUTING.rst
LICENSE
MANIFEST.in
Makefile
README.md
jupyterhub_config.py.example
requirements_dev.txt
setup.cfg
setup.py
sonar-project.properties
tox.ini

README.md

experiment-launcher

Build Status SonarCloud quality gate SonarCloud coverage DOI

eWaterCycle Experiment Launcher a webservice to generate and launch a Jupyter notebook.

The API of the webservice is described in OpenAPI specification at openapi.yaml and can be seen in Swagger UI

Install

JupyterHub server

The experiment launcher needs to communicate with a Jupyter Hub server. The JupyterHub server must running with a service which has a known token and has admin rights.

pip install jupyterhub dockerspawner
sudo npm install -g configurable-http-proxy
cp jupyterhub_config.py.example jupyterhub_config.py
# Generate token
export JUPYTERHUB_TOKEN=$(openssl rand -hex 32)
echo $JUPYTERHUB_TOKEN
# Set token
nano jupyterhub_config.py
docker pull ewatercycle/jupyterlab-experiment-builder
jupyterhub

Test JupyterHub by going to http://172.17.0.1:8000 and login with OS credentials.

Installation for production

pip install ewatercycle_experiment_launcher

Installation for development

To install the launcher in development mode clone the repo and run

python setup.py develop

Run

# JUPYTERHUB_TOKEN env var should be set to same value as token in jupyterhub_config.py
export JUPYTERHUB_URL=http://172.17.0.1:8000
gunicorn -w 4 -b 0.0.0.0:8888 ewatercycle_experiment_launcher.serve:app

Goto http://localhost:8888/ui/ for Swagger UI.

The JupyterHub and Experiment Launcher use local OS accounts for authentication and authorization.

In the Swagger UI you must authorize before trying an operation.

When running on Internet make sure https is enforced so the authentication is secure.

The webservice by default runs on / base path. This can be changed by setting the BASE_PATH environment variable. For example export BASE_PATH=/launcher will host the Swagger UI on http://localhost:8888/launcher/ui/ .

You can’t perform that action at this time.