Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desactivate named servers #180

Merged
merged 4 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions docs/configuration/namedservers.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
Named Servers
=============

By default users can run up to ``2`` simultaneous servers using the
`named servers functionality in JupyterHub <https://jupyterhub.readthedocs.io/en/stable/reference/config-user-env.html#named-servers>`_.
By default, users can run only one server at once.

If a user tries to start more servers, they will be shown the following message:
`Named servers functionality <https://jupyterhub.readthedocs.io/en/stable/reference/config-user-env.html#named-servers>`_ in JupyterHub
can be activated to let the user run several servers.

.. image:: ../images/configuration/namedservers.png
:alt: Named Servers limit
:width: 100%
:align: center
To allow up to 2 simultaneous named servers (in addition to the default one), create the file ``named_servers_config.py``
in the directory ``/opt/tljh/config/jupyterhub_config.d`` with the following content:

.. code-block:: text

c.JupyterHub.allow_named_servers = True
c.JupyterHub.named_server_limit_per_user = 2

Then, reload tljh:

.. code-block:: text

sudo tljh-config reload

Have a look to `named servers documentation <https://jupyterhub.readthedocs.io/en/stable/reference/config-user-env.html#named-servers>`_
pierrepo marked this conversation as resolved.
Show resolved Hide resolved
for more details.
Binary file removed docs/images/configuration/namedservers.png
Binary file not shown.
3 changes: 1 addition & 2 deletions tljh-plasma/tljh_plasma/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ def tljh_custom_jupyterhub_config(c, tljh_config_file=CONFIG_FILE):
c.JupyterHub.cleanup_servers = False
c.JupyterHub.authenticator_class = PAMAuthenticator
c.JupyterHub.spawner_class = PlasmaSpawner
c.JupyterHub.allow_named_servers = True
c.JupyterHub.named_server_limit_per_user = 2
c.JupyterHub.allow_named_servers = False
jtpio marked this conversation as resolved.
Show resolved Hide resolved
c.JupyterHub.template_paths.insert(
0, os.path.join(os.path.dirname(__file__), "templates")
)
Expand Down