You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+72-34Lines changed: 72 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,50 +1,81 @@
1
-
# jupyterhub-deploy-docker
2
-
3
-
This repository provides a reference deployment of [JupyterHub](https://github.com/jupyter/jupyterhub), a multi-user [Jupyter Notebook](http://jupyter.org/) environment, on a **single host** using [Docker](https://docs.docker.com).
4
-
5
-
This deployment:
6
-
7
-
* Runs the [JupyterHub components](https://jupyterhub.readthedocs.org/en/latest/getting-started.html#overview) in a Docker container on the host
8
-
* Uses [DockerSpawner](https://github.com/jupyter/dockerspawner) to spawn single-user Jupyter Notebook servers in separate Docker containers on the same host
9
-
* Persists JupyterHub data in a Docker volume on the host
10
-
* Persists user notebook directories in Docker volumes on the host
11
-
* Uses [OAuthenticator](https://github.com/jupyter/oauthenticator) and [GitHub OAuth](https://developer.github.com/v3/oauth/) to authenticate users
1
+
**[Technical Overview](#technical-overview)** |
2
+
**[Prerequisites](#prerequisites)** |
3
+
**[Authenticator setup](#authenticator-setup)** |
4
+
**[Build the JupyterHub Docker image](#build-the-jupyterhub-docker-image)** |
5
+
**[Spawner: Prepare the Jupyter Notebook Image](#spawner-prepare-the-jupyter-notebook-image)** |
6
+
**[Run JupyterHub](#run-jupyterhub)** |
7
+
**[Behind the scenes](#behind-the-scenes)** |
8
+
**[FAQ](#faq)**
12
9
13
-

10
+
# jupyterhub-deploy-docker
14
11
15
-
## Use Cases
12
+
The **jupyterhub-deploy-docker** repository provides a reference
13
+
deployment of [JupyterHub](https://github.com/jupyter/jupyterhub), a
14
+
multi-user [Jupyter Notebook](http://jupyter.org/) environment, on a
15
+
**single host** using [Docker](https://docs.docker.com).
16
16
17
-
Possible use cases for this deployment may include, but are not limited to:
17
+
Possible **use cases** for this deployment may include, but are not
18
+
limited to:
18
19
19
20
* A JupyterHub demo environment that you can spin up relatively quickly.
20
-
* A multi-user Jupyter Notebook environment for small classes, teams, or departments.
21
+
* A multi-user Jupyter Notebook environment for small classes, teams,
22
+
or departments.
23
+
24
+
**Disclaimer:** This deployment is **NOT** intended for a production
25
+
environment.
26
+
27
+
28
+
## Technical Overview
29
+
30
+
Key components of this reference deployment are:
31
+
32
+
***Host**: Runs the [JupyterHub components](https://jupyterhub.readthedocs.org/en/latest/getting-started.html#overview)
or obtain real ones from [Let's Encrypt](https://letsencrypt.org)
36
-
(see the [letsencrypt example](examples/letsencrypt/README.md) for instructions).
37
-
38
-
From here on, we'll assume you are set up with docker,
39
-
via a local installation or [docker-machine](./docs/docker-machine.md).
40
-
At this point,
41
-
54
+
***Docker**: This deployment uses Docker for all the things, via
55
+
[Docker Compose](https://docs.docker.com/compose/overview/). It
56
+
requires [Docker Engine](https://docs.docker.com/engine) 1.12.0 or
57
+
higher. Use the [Docker installation instructions](https://docs.docker.com/engine/installation/)
58
+
for your environment.
59
+
60
+
***HTTPS and SSL**: This deployment configures JupyterHub to use HTTPS
61
+
connections (the default). You must provide TLS certificate chain and
62
+
key files in the JupyterHub configuration. If you do not have an
63
+
existing certificate chain and key, you can [create self-signed versions](https://jupyter-notebook.readthedocs.org/en/latest/public_server.html#using-ssl-for-encrypted-communication),
64
+
or obtain real ones from [Let's Encrypt](https://letsencrypt.org)
65
+
(see the [letsencrypt example](examples/letsencrypt/README.md) for
66
+
instructions).
67
+
68
+
To verify that you are set up with docker, via a local installation or
69
+
[docker-machine](./docs/docker-machine.md), run:
70
+
71
+
```bash
42
72
docker ps
73
+
```
43
74
44
-
should work.
75
+
This command will return running Docker processes.
45
76
46
77
47
-
## Setup GitHub Authentication
78
+
## Authenticator setup
48
79
49
80
This deployment uses GitHub OAuth to authenticate users.
50
81
It requires that you create a [GitHub application](https://github.com/settings/applications/new).
@@ -70,6 +101,7 @@ If you choose to place the GitHub secrets in this file,
70
101
you should ensure that this file remains private
71
102
(e.g., do not commit the secrets to source control).
72
103
104
+
73
105
## Build the JupyterHub Docker image
74
106
75
107
Configure JupyterHub and build it into a Docker image.
@@ -96,7 +128,8 @@ Configure JupyterHub and build it into a Docker image.
96
128
make build
97
129
```
98
130
99
-
## Prepare the Jupyter Notebook Image
131
+
132
+
## Spawner: Prepare the Jupyter Notebook Image
100
133
101
134
You can configure JupyterHub to spawn Notebook servers from any Docker image, as
102
135
long as the image's `ENTRYPOINT` and/or `CMD` starts a single-user instance of
@@ -130,6 +163,7 @@ You can pull the image using the following command:
130
163
make notebook_image
131
164
```
132
165
166
+
133
167
## Run JupyterHub
134
168
135
169
Run the JupyterHub container on the host.
@@ -152,6 +186,8 @@ To bring down the JupyterHub container:
152
186
docker-compose down
153
187
```
154
188
189
+
---
190
+
155
191
## Behind the scenes
156
192
157
193
`make build` does a few things behind the scenes, to set up the environment for JupyterHub:
@@ -177,6 +213,8 @@ Create a Docker volume to persist JupyterHub data. This volume will reside on
177
213
docker volume create --name jupyterhub-data
178
214
```
179
215
216
+
---
217
+
180
218
## FAQ
181
219
182
220
### How can I view the logs for JupyterHub or users' Notebook servers?
0 commit comments