2018-08-02 12:35:36 -07:00
|
|
|
.. _install/jetstream:
|
2018-07-03 21:37:42 -07:00
|
|
|
|
2018-07-11 12:00:58 -07:00
|
|
|
=======================
|
|
|
|
|
Installing on Jetstream
|
|
|
|
|
=======================
|
2018-07-03 21:37:42 -07:00
|
|
|
|
|
|
|
|
Goal
|
2018-07-10 11:35:18 -07:00
|
|
|
====
|
2018-07-03 21:37:42 -07:00
|
|
|
|
|
|
|
|
By the end of this tutorial, you should have a JupyterHub with some admin
|
|
|
|
|
users and a user environment with packages you want installed running on
|
2018-07-04 07:25:08 -07:00
|
|
|
`Jetstream <https://jetstream-cloud.org/>`_.
|
2018-07-03 21:37:42 -07:00
|
|
|
|
2018-07-04 07:25:08 -07:00
|
|
|
Prerequisites
|
2018-07-10 11:35:18 -07:00
|
|
|
=============
|
2018-07-03 21:37:42 -07:00
|
|
|
|
2018-07-04 16:07:00 -07:00
|
|
|
#. A Jetstream account with an XSEDE allocation; for more information,
|
2018-07-11 12:00:58 -07:00
|
|
|
see the `Jetstream Allocations help page <http://wiki.jetstream-cloud.org/Jetstream+Allocations>`_.
|
2018-07-03 21:37:42 -07:00
|
|
|
|
|
|
|
|
Step 1: Installing The Littlest JupyterHub
|
2018-07-10 11:35:18 -07:00
|
|
|
==========================================
|
2018-07-03 21:37:42 -07:00
|
|
|
|
|
|
|
|
Let's create the server on which we can run JupyterHub.
|
|
|
|
|
|
2018-07-04 07:25:08 -07:00
|
|
|
#. Log in to `the Jetstream portal <https://use.jetstream-cloud.org/>`_. You need an allocation
|
2018-07-03 21:37:42 -07:00
|
|
|
to launch instances.
|
|
|
|
|
|
|
|
|
|
#. Select the **Launch New Instance** option to get going.
|
|
|
|
|
|
|
|
|
|
.. image:: ../images/providers/jetstream/launch-instance-first-button.png
|
|
|
|
|
:alt: Launch new instance button with description.
|
|
|
|
|
|
|
|
|
|
This takes you to a page with a list of base images you can choose for your
|
|
|
|
|
server.
|
|
|
|
|
|
|
|
|
|
#. Under **Image Search**, search for **Ubuntu 18.04**, and select the
|
|
|
|
|
**Ubuntu 18.04 Devel and Docker** image.
|
|
|
|
|
|
|
|
|
|
.. image:: ../images/providers/jetstream/select-image.png
|
|
|
|
|
:alt: Select Ubuntu 18.04 x64 image from image list
|
|
|
|
|
|
|
|
|
|
#. Once selected, you will see more information about this image. Click the
|
|
|
|
|
**Launch** button on the top right.
|
|
|
|
|
|
|
|
|
|
.. image:: ../images/providers/jetstream/launch-instance-second-button.png
|
|
|
|
|
:alt: Launch selected image with Launch button on top right
|
|
|
|
|
|
|
|
|
|
#. A dialog titled **Launch an Instance / Basic Options** pops up, with various
|
|
|
|
|
options for configuring your instance.
|
|
|
|
|
|
|
|
|
|
.. image:: ../images/providers/jetstream/launch-instance-dialog.png
|
|
|
|
|
:alt: Launch an Instance / Basic Options dialog box
|
|
|
|
|
|
|
|
|
|
#. Give your server a descriptive **Instance Name**.
|
2018-07-04 07:25:08 -07:00
|
|
|
#. Select an appropriate **Instance Size**. We suggest m1.medium or larger.
|
2021-10-18 18:39:50 +05:30
|
|
|
Make sure your instance has at least **1GB** of RAM.
|
2018-07-21 20:37:13 -07:00
|
|
|
|
2018-08-11 11:45:36 -07:00
|
|
|
Check out our guide on How To :ref:`howto/admin/resource-estimation` to help pick
|
2018-07-21 20:37:13 -07:00
|
|
|
how much Memory, CPU & disk space your server needs.
|
|
|
|
|
|
2018-07-03 21:37:42 -07:00
|
|
|
#. If you have multiple allocations, make sure you are 'charging' this server
|
|
|
|
|
to the correct allocation.
|
|
|
|
|
|
|
|
|
|
#. Click the **Advanced Options** link in the bottom left of the popup. This
|
|
|
|
|
lets us configure what the server should do when it starts up. We will use
|
|
|
|
|
this to install The Littlest JupyterHub.
|
|
|
|
|
|
|
|
|
|
A dialog titled **Launch an Instance / Advanced Options** should pop up.
|
|
|
|
|
|
|
|
|
|
.. image:: ../images/providers/jetstream/add-deployment-script-dialog.png
|
|
|
|
|
:alt: Dialog box allowing you to add a new script.
|
|
|
|
|
|
|
|
|
|
#. Click the **Create New Script** button. This will open up another dialog
|
|
|
|
|
box!
|
|
|
|
|
|
|
|
|
|
.. image:: ../images/providers/jetstream/create-script-dialog.png
|
|
|
|
|
:alt: Launch an Instance / Advanced Options dialog box
|
|
|
|
|
|
|
|
|
|
#. Under **Input Type**, select **Raw Text**. This should make a text box titled
|
|
|
|
|
**Raw Text** visible on the right side of the dialog box.
|
2018-07-04 07:25:08 -07:00
|
|
|
Copy the text below, and paste it into the **Raw Text** text box. Replace
|
2018-07-03 21:37:42 -07:00
|
|
|
``<admin-user-name>`` with the name of the first **admin user** for this
|
|
|
|
|
JupyterHub. This admin user can log in after the JupyterHub is set up, and
|
2018-08-02 16:16:19 -07:00
|
|
|
can configure it to their needs. **Remember to add your username**!
|
2018-07-03 21:37:42 -07:00
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
2018-08-01 18:05:34 -07:00
|
|
|
#!/bin/bash
|
2020-07-07 23:14:25 -05:00
|
|
|
curl -L https://tljh.jupyter.org/bootstrap.py \
|
2018-08-01 18:05:34 -07:00
|
|
|
| sudo python3 - \
|
|
|
|
|
--admin <admin-user-name>
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
See :ref:`topic/installer-actions` if you want to understand exactly what the installer is doing.
|
|
|
|
|
:ref:`topic/customizing-installer` documents other options that can be passed to the installer.
|
2018-07-03 21:37:42 -07:00
|
|
|
|
|
|
|
|
#. Under **Execution Strategy Type**, select **Run script on first boot**.
|
|
|
|
|
|
|
|
|
|
#. Under **Deployment Type**, select **Wait for script to complete**.
|
|
|
|
|
|
|
|
|
|
#. Click the **Save and Add Script** button on the bottom right. This should hide
|
|
|
|
|
the dialog box.
|
|
|
|
|
|
|
|
|
|
#. Click the **Continue to Launch** button on the bottom right. This should put you
|
|
|
|
|
back in the **Launch an Instance / Basic Options** dialog box again.
|
|
|
|
|
|
|
|
|
|
#. Click the **Launch Instance** button on the bottom right. This should turn it
|
|
|
|
|
into a spinner, and your server is getting created!
|
|
|
|
|
|
2018-07-03 21:45:20 -07:00
|
|
|
.. image:: ../images/providers/jetstream/launching-spinner.png
|
|
|
|
|
:alt: Launch button turns into a spinner
|
2018-07-03 21:37:42 -07:00
|
|
|
|
|
|
|
|
#. You'll now be shown a dashboard with all your servers and their states. The
|
|
|
|
|
server you just launched will progress through various stages of set up,
|
|
|
|
|
and you can see the progress here.
|
|
|
|
|
|
|
|
|
|
.. image:: ../images/providers/jetstream/deployment-in-progress.png
|
|
|
|
|
:alt: Instances dashboard showing deployment in progress.
|
|
|
|
|
|
|
|
|
|
#. It will take about ten minutes for your server to come up. The status will
|
|
|
|
|
say **Active** and the progress bar will be a solid green. At this point,
|
|
|
|
|
your JupyterHub is ready for use!
|
|
|
|
|
|
|
|
|
|
#. Copy the **IP Address** of your server, and try accessing it from a web
|
|
|
|
|
browser. It should give you a JupyterHub login page.
|
|
|
|
|
|
|
|
|
|
.. image:: ../images/first-login.png
|
|
|
|
|
:alt: JupyterHub log-in page
|
|
|
|
|
|
|
|
|
|
#. Login using the **admin user name** you used in step 8, and a password. Use a
|
|
|
|
|
strong password & note it down somewhere, since this will be the password for
|
|
|
|
|
the admin user account from now on.
|
|
|
|
|
|
|
|
|
|
#. Congratulations, you have a running working JupyterHub!
|
|
|
|
|
|
2018-07-04 07:25:08 -07:00
|
|
|
Step 2: Adding more users
|
2018-07-10 11:35:18 -07:00
|
|
|
==========================
|
2018-07-03 21:37:42 -07:00
|
|
|
|
2018-07-05 16:19:03 -07:00
|
|
|
.. include:: add_users.txt
|
2018-07-03 21:37:42 -07:00
|
|
|
|
|
|
|
|
Step 3: Install conda / pip packages for all users
|
2018-07-10 11:35:18 -07:00
|
|
|
==================================================
|
2018-07-03 21:37:42 -07:00
|
|
|
|
2018-07-05 16:19:03 -07:00
|
|
|
.. include:: add_packages.txt
|