diff --git a/README.md b/README.md index 41f9157..b32cbcd 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ You can enable it for your jupyterhub with the following lines in your `jupyterhub_config.py` file ```python -c.JupyterHub.spawner_class = 'systemdspawner.SystemdSpawner' +c.JupyterHub.spawner_class = "systemd" ``` Note that to confirm systemdspawner has been installed in the correct jupyterhub diff --git a/check-kernel.bash b/check-kernel.bash index 5f92de9..b055e0d 100755 --- a/check-kernel.bash +++ b/check-kernel.bash @@ -1,7 +1,11 @@ #!/bin/bash - +# +# SystemdSpawner's config cpu_limit and mem_limit needs certain linux kernel +# options enabled, otherwise they will fail silently. Running this script checks +# if they are. +# # Partially stolen from https://github.com/docker/docker/blob/master/contrib/check-config.sh - +# possibleConfigs=( '/proc/config.gz' "/boot/config-$(uname -r)" diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..7823bb4 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,2 @@ +This file should describe how to use the jupyterhub.service file together with a +basic jupyterhub_config.py yet to be provided. diff --git a/jupyterhub.service b/examples/jupyterhub.service similarity index 50% rename from jupyterhub.service rename to examples/jupyterhub.service index d1125b7..6916067 100644 --- a/jupyterhub.service +++ b/examples/jupyterhub.service @@ -1,3 +1,10 @@ +# This is a systemd unit file describing a how to start a jupyterhub, provided +# as an example. +# +# systemd ref: https://www.freedesktop.org/wiki/Software/systemd/ +# unit file ref: https://www.freedesktop.org/software/systemd/man/systemd.unit.html +# syntax ref: https://www.freedesktop.org/software/systemd/man/systemd.syntax.html +# [Service] ExecStart=/usr/local/bin/jupyterhub --no-ssl --config /etc/local/jupyterhub/jupyterhub_config.py ReadOnlyDirectories=/