Skip to content

Commit d99aa82

Browse files
committed
Edit intro, tech overview, prerequisites
1 parent 3c3b507 commit d99aa82

File tree

1 file changed

+72
-34
lines changed

1 file changed

+72
-34
lines changed

README.md

Lines changed: 72 additions & 34 deletions
Original file line numberDiff line numberDiff 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)**
129

13-
![JupyterHub single host Docker deployment](internal/jupyterhub-docker.png)
10+
# jupyterhub-deploy-docker
1411

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).
1616

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:
1819

1920
* 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)
33+
in a Docker container on the host.
34+
35+
* **Authenticator**: Uses [OAuthenticator](https://github.com/jupyter/oauthenticator)
36+
and [GitHub OAuth](https://developer.github.com/v3/oauth/) to
37+
authenticate users.
38+
39+
* **Spawner**:Uses [DockerSpawner](https://github.com/jupyter/dockerspawner)
40+
to spawn single-user Jupyter Notebook servers in separate Docker
41+
containers on the same host.
42+
43+
* **Persistence of Hub data**: Persists JupyterHub data in a Docker
44+
volume on the host.
45+
46+
* **Persistence of user notebook directories**: Persists user notebook
47+
directories in Docker volumes on the host.
2148

22-
## Disclaimer
49+
![JupyterHub single host Docker deployment](internal/jupyterhub-docker.png)
2350

24-
This deployment is **NOT** intended for a production environment.
2551

2652
## Prerequisites
2753

28-
* This deployment uses Docker for all the things, via [Docker Compose](https://docs.docker.com/compose/overview/).
29-
It requires [Docker Engine](https://docs.docker.com/engine) 1.12.0 or higher.
30-
See the [installation instructions](https://docs.docker.com/engine/installation/) for your environment.
31-
* This example configures JupyterHub for HTTPS connections (the default).
32-
As such, you must provide TLS certificate chain and key files to the JupyterHub server.
33-
If you do not have your own certificate chain and key, you can either
34-
[create self-signed versions](https://jupyter-notebook.readthedocs.org/en/latest/public_server.html#using-ssl-for-encrypted-communication),
35-
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
4272
docker ps
73+
```
4374

44-
should work.
75+
This command will return running Docker processes.
4576

4677

47-
## Setup GitHub Authentication
78+
## Authenticator setup
4879

4980
This deployment uses GitHub OAuth to authenticate users.
5081
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,
70101
you should ensure that this file remains private
71102
(e.g., do not commit the secrets to source control).
72103

104+
73105
## Build the JupyterHub Docker image
74106

75107
Configure JupyterHub and build it into a Docker image.
@@ -96,7 +128,8 @@ Configure JupyterHub and build it into a Docker image.
96128
make build
97129
```
98130
99-
## Prepare the Jupyter Notebook Image
131+
132+
## Spawner: Prepare the Jupyter Notebook Image
100133
101134
You can configure JupyterHub to spawn Notebook servers from any Docker image, as
102135
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:
130163
make notebook_image
131164
```
132165
166+
133167
## Run JupyterHub
134168
135169
Run the JupyterHub container on the host.
@@ -152,6 +186,8 @@ To bring down the JupyterHub container:
152186
docker-compose down
153187
```
154188
189+
---
190+
155191
## Behind the scenes
156192
157193
`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
177213
docker volume create --name jupyterhub-data
178214
```
179215
216+
---
217+
180218
## FAQ
181219
182220
### How can I view the logs for JupyterHub or users' Notebook servers?

0 commit comments

Comments
 (0)