All things IllumiDesk containers! In addition to the source Dockerfiles, this repo contains some basic examples on how to use containers with docker
and docker-compose
. However, the grader-setup
services is configured to work with Kubernetes since it relies on the kubectl
Python client.
Future versions may contain a basic Kubernetes-based setup however for these scenarios we recommend using IllumiDesk's helm chart.
For docker-compose based setup:
NOTE: refer to README in the kubernetes folder for the kubernetes POC instructions.
This setup uses docker-compose to launch a JupyterHub instance configure with Postgres. This helps validates custom configurations and assets, such as custom html templates.
Install requirements:
-
Install docker-compose
-
Define Environment Variables
- Copy
.env.example
to.env
- Update values in
.env
. Sensible defaults are provided to enable basic launches.
- Build:
docker-compose build --no-cache
NOTE: the
illumidesk/jupyterhub:chp
image that runs with thedocker-compose
version includes theCHP - Configurable HTTP Proxy
. The standard version of theillumidesk/jupyterhub:latest
is configured for Kubernetes and therefore will not run with a standarddocker
image.
- Start:
docker-compose up -d
- Edit the
jupyterhub/jupyterhub_config.py
configuration file to update JupyterHub's configuration. Then restart thejupyterhub
container with:
docker-compose restart jupyterhub
- Update the
.env
file with your values:JUPYTERHUB_HOST
: the external facing JupyterHub host URL. Defaults tohttp://localhost:8000
.JUPYTERHUB_CRYPT_KEY
:JUPYTERHUB_CRYPT_KEY
: the JupyterHub crytographic key used to encrypt theauth_state
when the authentication dictionary is persisted from the Authenticator to the Spawner using theJupyterHub.auth_state_enabled = True
setting. Create a secure random string with theopenssl rand -hex 32
command from your preferred terminal. If you don't have access to theopenssl
command, any random value should suffice. However, please use a secure value for Production!POSTGRES_DB
: the database name. Defaults tojupyterhub
.POSTGRES_USER
: the database's username. Defaults tojupyterhub
.POSTGRES_PASSWORD
: the database's password. Defaults topassword
.POSTGRES_HOST
: the database host. Defaults topostgres-hub
.OAUTH_CLIENT_ID
: the value of the OAuth2 client.OAUTH_CLIENT_SECRET
: secure random secret created by the OIDC/OAuth2 Authorization Server when setting up a the client.OAUTH_CALLBACK_URL
: defaults to ${JUPYTERHUB_HOST}/hub/oauth_callback which is the standard URL for Authenticators that inherit from theOAuthenticator
class.OAUTH2_AUTHORIZE_URL
: defaults toNone
.OAUTH2_TOKEN_URL
: defaults toNone
.OAUTH2_TLS_VERIFY
: defaults toFalse
GENERICAUTH_LOGIN_SERVICE_NAME
: defaults toCustom
.GENERICAUTH_USERDATA_URL
: defaults toNone
.GENERICAUTH_USERDATA_METHOD
: defaults toGET
GENERICAUTH_USERNAME_KEY
: defaults topreferred_username
.S
MIT