From 03ddcef7d6d87bce2385582a26b19a8cf4f33bb7 Mon Sep 17 00:00:00 2001 From: Bertrand NOEL Date: Wed, 27 Apr 2016 15:59:56 +0200 Subject: [PATCH] Config and env file to run on local or remote Docker --- env.docker-local.orig | 4 ++++ env.docker-remote.orig | 5 +++++ etc/container_config.py | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 env.docker-local.orig create mode 100644 env.docker-remote.orig create mode 100644 etc/container_config.py diff --git a/env.docker-local.orig b/env.docker-local.orig new file mode 100644 index 0000000..3b59e7e --- /dev/null +++ b/env.docker-local.orig @@ -0,0 +1,4 @@ +GITHUB_CLIENT_ID= +GITHUB_CLIENT_SECRET= +OAUTH_CALLBACK_URL=http://xxxxxxxx:8000/hub/oauth_callback +EVERWARE_WHITELIST=whitelist.txt diff --git a/env.docker-remote.orig b/env.docker-remote.orig new file mode 100644 index 0000000..62ce772 --- /dev/null +++ b/env.docker-remote.orig @@ -0,0 +1,5 @@ +GITHUB_CLIENT_ID= +GITHUB_CLIENT_SECRET= +OAUTH_CALLBACK_URL=http://xxxxxxxx:8000/hub/oauth_callback +EVERWARE_WHITELIST=whitelist.txt +DOCKER_HOST=tcp://xxx.xxx.xxx.xxx:2376 diff --git a/etc/container_config.py b/etc/container_config.py new file mode 100644 index 0000000..7730a12 --- /dev/null +++ b/etc/container_config.py @@ -0,0 +1,18 @@ +# Use this config file to run everware in a container, +# and create user containers in local or remote Docker service +# +# In case of local, don't forget to mount /var/run/docker.sock +# In case of remote, don't forget the DOCKER_HOST environment variable + +c = get_config() +load_subconfig('etc/base_config.py') +load_subconfig('etc/github_auth.py') + +c.JupyterHub.hub_ip = '0.0.0.0' +c.JupyterHub.proxy_api_ip = '0.0.0.0' + +# Change these two next settings: +# IP of the machine where the Everware can be contacted +c.DockerSpawner.hub_ip_connect = 'xxx.xxx.xxx.xxx' +# IP of the machine running Docker service +c.DockerSpawner.container_ip = 'xxx.xxx.xxx.xxx'