jupyterhub / traefik-proxy

JupyterHub proxy implementation with traefik
https://jupyterhub-traefik-proxy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
54 stars 30 forks source link

JupyterHub Traefik Proxy

Documentation build status GitHub Workflow Status Latest PyPI version GitHub Discourse Gitter

When JupyterHub starts a server for a user, it will dynamically configure a proxy server so that accessing jupyterhub.example.com/user/<user> routes to the individual Jupyter server. This project enables JupyterHub to dynamically configure the routes of a traefik proxy server!

There are two main implementations of the JupyterHub proxy API, depending on how traefik stores its routing configuration.

For smaller, single-node deployments:

For distributed setups:

Other implementations are maintained on a best-effort basis due to a lack of well-maintained Python clients:

Installation

The documentation contains a complete installation guide with examples for all implementations, including the recommended TraefikRedisProxy.

Running tests

You can then run the all the test suite from the traefik-proxy directory with:

$ pytest

Or you can run a specific test file with:

$ pytest tests/<test-file-name>

There are some tests that use etcdctl command line client for etcd. Make sure to set environment variable ETCDCTL_API=3 before running the tests if etcd version 3.3 or older is used, so that the v3 API to be used, e.g.:

$ export ETCDCTL_API=3