Rewrite bootstrapper in Python

- This was going to get too complex for bash. Only way to
  kill those scripts is before they get too complex.
- Better progress messages from bootstrapper.
- Differentiate between bootstrapper & installer
- Cleanup documentation a little bit
This commit is contained in:
yuvipanda
2018-07-02 15:12:26 -07:00
parent a3cb0e0825
commit 715860707b
10 changed files with 178 additions and 101 deletions

View File

@@ -34,13 +34,13 @@ The easiest & safest way to develop & test TLJH is with `Docker <https://www.doc
sudo docker exec -it tljh-dev /bin/bash
#. Run the installer from inside the container (see step above):
The container image is already set up to default to a ``dev`` install, so
#. Run the bootstrapper from inside the container (see step above):
The container image is already set up to default to a ``dev`` install, so
it'll install from your local repo rather than from github.
.. code-block:: console
bash /srv/src/installer/install.bash
python3 /srv/src/bootstrap/bootstrap.py
The primary hub environment will also be in your PATH already for convenience.
@@ -51,8 +51,8 @@ The easiest & safest way to develop & test TLJH is with `Docker <https://www.doc
#. Make some changes to the repository. You can test easily depending on what
you changed.
* If you changed the ``installer/install.bash`` script or any of its dependencies,
you can test it by running ``bash /srv/src/installer/install.bash``.
* If you changed the ``bootstrap/bootstrap.py`` script or any of its dependencies,
you can test it by running ``python3 /srv/src/bootstrap/bootstrap.py``.
* If you changed the ``tljh/installer.py`` code (or any of its dependencies),
you can test it by running ``python3 -m tljh.installer``.

View File

@@ -10,7 +10,7 @@ The quick way to install The Littlest JupyterHub (tljh) is:
.. code-block:: bash
curl https://raw.githubusercontent.com/yuvipanda/the-littlest-jupyterhub/master/installer/install.bash | sudo bash -
curl https://raw.githubusercontent.com/yuvipanda/the-littlest-jupyterhub/master/bootstrap/bootstrap.py | sudo python3 -
This takes 2-5 minutes to run. When completed, you can access your new JupyterHub
at the public IP of your server!
@@ -21,7 +21,7 @@ after installation.
Slightly less quick installation
--------------------------------
If you can read ``bash`` and are nervous about the previous installation method,
If you can read ``python3`` and are nervous about the previous installation method,
you can inspect the installer script before running it.
@@ -29,7 +29,7 @@ you can inspect the installer script before running it.
.. code-block:: bash
curl https://raw.githubusercontent.com/yuvipanda/the-littlest-jupyterhub/master/installer/install.bash -o install.bash
curl https://raw.githubusercontent.com/yuvipanda/the-littlest-jupyterhub/master/bootstrap/bootstrap.py -o bootstrap.py
2. Read the install script source using your favorite text editor
@@ -37,6 +37,6 @@ you can inspect the installer script before running it.
.. code-block:: bash
sudo install.bash
sudo python3 bootstrap.py
This should have the exact same effects as the quick installer method.

View File

@@ -11,10 +11,10 @@ On a fresh Ubuntu 18.04 server, you can install The Littlest JupyterHub with:
.. code-block:: bash
curl https://raw.githubusercontent.com/yuvipanda/the-littlest-jupyterhub/master/installer/install.bash | sudo bash -
curl https://raw.githubusercontent.com/yuvipanda/the-littlest-jupyterhub/master/bootstrap/bootstrap.py | sudo python3 -
This takes 2-5 minutes to run. When completed, you can access your new JupyterHub
at the public IP of your server!
at the public IP of your server! Read the :ref:`tutorial_quickstart` next.
If this installation method (``curl <arbitrary-url> | sudo bash -``)
makes you nervous, check out the :ref:`other installation methods <installation>` we support!

View File

@@ -25,7 +25,7 @@ Step 1: Install the Littlest JupyterHub (TLJH)
.. code-block:: bash
curl https://raw.githubusercontent.com/yuvipanda/the-littlest-jupyterhub/master/installer/install.bash | sudo bash -
curl https://raw.githubusercontent.com/yuvipanda/the-littlest-jupyterhub/master/bootstrap/bootstrap.py | sudo python3 -
This takes about 1-3 minutes to finish. When completed, you can visit the
public IP of your server to use your JupyterHub! You can log in with any username