Move tljh-config symlink to /usr/bin

Removes a lot of 'sudo -E' usage, and eventually should
let us get rid of the $PATH override for jupyterhub-admins,
which arguably is less secure than just dropping stuff into
/usr/bin

Also remove sudo -E from apt and mkdir calls. Not necessary.
This commit is contained in:
yuvipanda
2018-08-12 21:52:04 -07:00
parent 1b19e5bfc6
commit 28af89a381
14 changed files with 50 additions and 48 deletions

View File

@@ -78,8 +78,8 @@ admin terminal:
.. code-block:: bash
sudo -E tljh-config add-item users.admin <username>
sudo -E tljh-config reload
sudo tljh-config add-item users.admin <username>
sudo tljh-config reload
If the user is already using the JupyterHub, they might have to stop and
start their server from the control panel to gain new powers.
@@ -92,8 +92,8 @@ an admin terminal:
.. code-block:: bash
sudo -E tljh-config remove-item users.admin <username>
sudo -E tljh-config reload
sudo tljh-config remove-item users.admin <username>
sudo tljh-config reload
If the user is already using the JupyterHub, they will continue to have
some of their admin powers until their server is stopped. Another admin

View File

@@ -19,15 +19,15 @@ Automatic HTTPS with Let's Encrypt
To enable HTTPS via letsencrypt::
sudo -E tljh-config set https.enabled true
sudo -E tljh-config set https.letsencrypt.email you@example.com
sudo -E tljh-config add-item https.letsencrypt.domains yourhub.yourdomain.edu
sudo tljh-config set https.enabled true
sudo tljh-config set https.letsencrypt.email you@example.com
sudo tljh-config add-item https.letsencrypt.domains yourhub.yourdomain.edu
where ``you@example.com`` is your email address and ``yourhub.yourdomain.edu`` is the domain where your hub will be running.
Once you have loaded this, your config should look like::
sudo -E tljh-config show
sudo tljh-config show
.. sourcecode:: yaml
@@ -41,7 +41,7 @@ Once you have loaded this, your config should look like::
Finally, you can reload the proxy to load the new configuration::
sudo -E tljh-config reload proxy
sudo tljh-config reload proxy
At this point, the proxy should negotiate with Let's Encrypt to set up a trusted HTTPS certificate for you.
It may take a moment for the proxy to negotiate with Let's Encrypt to get your certificates, after which you can access your Hub securely at https://yourhub.yourdomain.edu.
@@ -54,14 +54,14 @@ Manual HTTPS with existing key and certificate
You may already have an SSL key and certificate.
If so, you can tell your deployment to use these files::
sudo -E tljh-config set https.enabled true
sudo -E tljh-config set https.tls.key /etc/mycerts/mydomain.key
sudo -E tljh-config set https.tls.cert /etc/mycerts/mydomain.cert
sudo tljh-config set https.enabled true
sudo tljh-config set https.tls.key /etc/mycerts/mydomain.key
sudo tljh-config set https.tls.cert /etc/mycerts/mydomain.cert
Once you have loaded this, your config should look like::
sudo -E tljh-config show
sudo tljh-config show
.. sourcecode:: yaml
@@ -74,6 +74,6 @@ Once you have loaded this, your config should look like::
Finally, you can reload the proxy to load the new configuration::
sudo -E tljh-config reload proxy
sudo tljh-config reload proxy
and now access your Hub securely at https://yourhub.yourdomain.edu.

View File

@@ -18,14 +18,14 @@ Enabling the authenticator
.. code-block:: bash
sudo -E tljh-config set auth.DummyAuthenticator.password <password>
sudo tljh-config set auth.DummyAuthenticator.password <password>
Remember to replace ``<password>`` with the password you choose.
2. Enable the authenticator and reload config to apply configuration:
sudo -E tljh-config set auth.type dummyauthenticator.DummyAuthenticator
sudo -E tljh-config reload
sudo tljh-config set auth.type dummyauthenticator.DummyAuthenticator
sudo tljh-config reload
Users who are currently logged in will continue to be logged in. When they
log out and try to log back in, they will be asked to provide a username and

View File

@@ -16,8 +16,8 @@ Enabling the authenticator
#. Enable the authenticator and reload config to apply the configuration:
sudo -E tljh-config set auth.type firstuseauthenticator.FirstUseAuthenticator
sudo -E tljh-config reload
sudo tljh-config set auth.type firstuseauthenticator.FirstUseAuthenticator
sudo tljh-config reload
Users who are currently logged in will continue to be logged in. When they
log out and try to log back in, they will be asked to provide a username and

View File

@@ -57,19 +57,19 @@ For more information on ``tljh-config``, see :ref:`topic/tljh-config`.
#. Configure the GitHub OAuthenticator to use your client ID and secret with the following commands::
sudo -E tljh-config set auth.GitHubOAuthenticator.client_id '<my-tljh-client-id>'
sudo tljh-config set auth.GitHubOAuthenticator.client_id '<my-tljh-client-id>'
::
sudo -E tljh-config set auth.GitHubOAuthenticator.client_secret '<my-tljh-client-secret>'
sudo tljh-config set auth.GitHubOAuthenticator.client_secret '<my-tljh-client-secret>'
#. Tell your JupyterHub to *use* the GitHub OAuthenticator for authentication::
sudo -E tljh-config set auth.type oauthenticator.github.GitHubOAuthenticator
sudo tljh-config set auth.type oauthenticator.github.GitHubOAuthenticator
#. Restart your JupyterHub so that new users see these changes::
sudo -E tljh-config reload
sudo tljh-config reload
Confirm that the new authentactor works
=======================================

View File

@@ -81,7 +81,7 @@ time. You can download it from your browser `at this link <https://swcarpentry.g
.. code-block:: bash
sudo -E apt-get install unzip
sudo apt install unzip
#. Finally, unzip the the file:

View File

@@ -37,7 +37,7 @@ steps:
.. code-block:: bash
sudo -E mkdir -p /srv/data/my_shared_data_folder
sudo mkdir -p /srv/data/my_shared_data_folder
#. **Download the data** into this folder. See :ref:`howto/content/add-data` for
details on how to do this.

View File

@@ -36,19 +36,19 @@ You can change the default interface users get when they log in by modifying
.. code-block:: yaml
sudo -E tljh-config set user_environment.default_app jupyterlab
sudo tljh-config set user_environment.default_app jupyterlab
#. Alternatively, to launch **nteract** when users log in, run the following in the admin console:
.. code-block:: yaml
sudo -E tljh-config set user_environment.default_app nteract
sudo tljh-config set user_environment.default_app nteract
#. Apply the changes by restarting JupyterHub. This should not disrupt current users.
.. code-block:: yaml
sudo -E tljh-config reload
sudo tljh-config reload
If this causes problems, check the :ref:`troubleshoot_logs_jupyterhub` for clues
on what went wrong.