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.exampleto.env - Update values in
.env. Sensible defaults are provided to enable basic launches.
- Build:
docker-compose build --no-cacheNOTE: the
illumidesk/jupyterhub:chpimage that runs with thedocker-composeversion includes theCHP - Configurable HTTP Proxy. The standard version of theillumidesk/jupyterhub:latestis configured for Kubernetes and therefore will not run with a standarddockerimage.
- Start:
docker-compose up -d- Edit the
jupyterhub/jupyterhub_config.pyconfiguration file to update JupyterHub's configuration. Then restart thejupyterhubcontainer with:
docker-compose restart jupyterhub- Update the
.envfile 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_statewhen the authentication dictionary is persisted from the Authenticator to the Spawner using theJupyterHub.auth_state_enabled = Truesetting. Create a secure random string with theopenssl rand -hex 32command from your preferred terminal. If you don't have access to theopensslcommand, 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 theOAuthenticatorclass.OAUTH2_AUTHORIZE_URL: defaults toNone.OAUTH2_TOKEN_URL: defaults toNone.OAUTH2_TLS_VERIFY: defaults toFalseGENERICAUTH_LOGIN_SERVICE_NAME: defaults toCustom.GENERICAUTH_USERDATA_URL: defaults toNone.GENERICAUTH_USERDATA_METHOD: defaults toGETGENERICAUTH_USERNAME_KEY: defaults topreferred_username.S
MIT