-
Notifications
You must be signed in to change notification settings - Fork 369
Update jetstream docs #1038
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
Draft
zonca
wants to merge
14
commits into
jupyterhub:main
Choose a base branch
from
zonca:update-jetstream-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+69
−127
Draft
Update jetstream docs #1038
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a4858da
Update Jetstream tutorial
zonca 512935a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ae503c3
Clarify instructions for running the TLJH bootstrap script in the Jet…
zonca 4807b7d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e6851d9
Apply suggestions from code review
zonca c370398
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5194153
Apply suggestion from @julianpistorius
zonca 45bec8e
Apply suggestion from @julianpistorius
zonca c639c75
Apply suggestion from @julianpistorius
zonca 684481f
Apply suggestion from @julianpistorius
zonca 0cd259b
Apply suggestion from @julianpistorius
zonca 752f605
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6b2d93a
Apply suggestion from @julianpistorius
zonca 72967f2
Document how to reveal exouser passphrase in Exosphere
zonca File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,152 +1,101 @@ | ||||||||||||
(install-jetstream)= | ||||||||||||
|
||||||||||||
# Installing on Jetstream | ||||||||||||
# Installing on Jetstream2 | ||||||||||||
|
||||||||||||
## Goal | ||||||||||||
|
||||||||||||
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 | ||||||||||||
[Jetstream](https://jetstream-cloud.org/). | ||||||||||||
[Jetstream2](https://jetstream-cloud.org/). | ||||||||||||
|
||||||||||||
## Prerequisites | ||||||||||||
|
||||||||||||
1. A Jetstream account with an XSEDE allocation; for more information, | ||||||||||||
see the [Jetstream Allocations help page](http://wiki.jetstream-cloud.org/Jetstream+Allocations). | ||||||||||||
see the [Jetstream Allocations help page](https://jetstream-cloud.org/allocations/). | ||||||||||||
Comment on lines
13
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed the link, and added a second one.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cannot apply this suggestion, possibly becuase it changes the number of lines? |
||||||||||||
|
||||||||||||
## Step 1: Installing The Littlest JupyterHub | ||||||||||||
## Step 1: Launch a Jetstream2 instance | ||||||||||||
|
||||||||||||
Let's create the server on which we can run JupyterHub. | ||||||||||||
We'll create a new Jetstream2 instance: | ||||||||||||
|
||||||||||||
1. Log in to [the Jetstream portal](https://use.jetstream-cloud.org/). You need an allocation | ||||||||||||
to launch instances. | ||||||||||||
1. Log in to the [Jetstream2 portal](https://use.jetstream-cloud.org/). You must have (and select) an allocation in order to launch instances. Click the allocation you want to charge. | ||||||||||||
2. Click **Create** ➜ **Instance**. | ||||||||||||
3. From the list of images, select **Ubuntu 24.04** (Jammy or newer is required for current TLJH releases). | ||||||||||||
4. In the **Create Instance** dialog: | ||||||||||||
1. Set a descriptive **Instance Name** (this is used in the default hostname and helps users recognize it). | ||||||||||||
2. Choose an **Instance Size**. We suggest `m3.small` (2 vCPUs / 8 GiB RAM) or larger for more than a couple of users. The absolute minimum TLJH can start with is about **1 GiB** RAM, but you'll quickly run out with real workloads. | ||||||||||||
zonca marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||
- See the resource estimation guide: [Choosing resources](/howto/admin/resource-estimation) for help picking CPU, RAM, and disk. | ||||||||||||
3. (Optional) Increase the **Volume Size** if you expect many users or large datasets. You can not easily shrink later. | ||||||||||||
5. Launch the instance (click **Create Instance** / **Launch**). | ||||||||||||
zonca marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||
|
||||||||||||
2. Select the **Launch New Instance** option to get going. | ||||||||||||
## Step 2: Install The Littlest JupyterHub | ||||||||||||
|
||||||||||||
```{image} ../images/providers/jetstream/launch-instance-first-button.png | ||||||||||||
:alt: Launch new instance button with description. | ||||||||||||
``` | ||||||||||||
1. Wait a few minutes for the instance to show the status "Ready" | ||||||||||||
2. Copy the **Hostname** under **Credentials**, it will be of the form: `yourinstancename.xxx0000000.projects.jetstream-cloud.org`, where `xxx000000` is the allocation ID. Keep it handy, we will use it multiple times in the next steps. | ||||||||||||
|
||||||||||||
This takes you to a page with a list of base images you can choose for your | ||||||||||||
server. | ||||||||||||
3. SSH into the instance with the `exouser` user: | ||||||||||||
zonca marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||
|
||||||||||||
3. Under **Image Search**, search for **Ubuntu 22.04**, and select the | ||||||||||||
**Ubuntu 22.04 Devel and Docker** image. | ||||||||||||
```bash | ||||||||||||
ssh [email protected] | ||||||||||||
``` | ||||||||||||
|
||||||||||||
```{image} ../images/providers/jetstream/select-image.png | ||||||||||||
:alt: Select Ubuntu 22.04 x64 image from image list | ||||||||||||
``` | ||||||||||||
4. Run the TLJH bootstrap script, replace <admin-user-name> with the name of the first admin user for this JupyterHub. Choose any name you like (don’t forget to remove the brackets!). This admin user can log in after the JupyterHub is set up, and can configure it to their needs. | ||||||||||||
|
||||||||||||
4. Once selected, you will see more information about this image. Click the | ||||||||||||
**Launch** button on the top right. | ||||||||||||
```bash | ||||||||||||
curl -L https://tljh.jupyter.org/bootstrap.py | sudo -E python3 - --admin <admin-user-name> | ||||||||||||
``` | ||||||||||||
|
||||||||||||
```{image} ../images/providers/jetstream/launch-instance-second-button.png | ||||||||||||
:alt: Launch selected image with Launch button on top right | ||||||||||||
``` | ||||||||||||
5. Open the Hostname in a web browser (http on port 80). You should see the JupyterHub login page. Your browser will warn about the site not being secure (no HTTPS)—we'll enable HTTPS in the next step. Do not login yet, first setup HTTPS, so we avoid transmitting the password in clear text. | ||||||||||||
|
||||||||||||
5. A dialog titled **Launch an Instance / Basic Options** pops up, with various | ||||||||||||
options for configuring your instance. | ||||||||||||
## Step 2: Enable HTTPS | ||||||||||||
|
||||||||||||
```{image} ../images/providers/jetstream/launch-instance-dialog.png | ||||||||||||
:alt: Launch an Instance / Basic Options dialog box | ||||||||||||
``` | ||||||||||||
Encrypted (HTTPS) access is strongly recommended before inviting users. | ||||||||||||
|
||||||||||||
1. Give your server a descriptive **Instance Name**. | ||||||||||||
See the full guide: [Enable HTTPS](/howto/admin/https). Below is a quick recipe for using the default Jetstream-provided hostname. | ||||||||||||
|
||||||||||||
2. Select an appropriate **Instance Size**. We suggest m1.medium or larger. | ||||||||||||
Make sure your instance has at least **1GB** of RAM. | ||||||||||||
1. In the terminal inside the instance, configure Let's Encrypt (replace with a real email you control): | ||||||||||||
zonca marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||
```bash | ||||||||||||
sudo tljh-config set https.enabled true | ||||||||||||
sudo tljh-config set https.letsencrypt.email [email protected] | ||||||||||||
sudo tljh-config add-item https.letsencrypt.domains yourinstancename.xxx0000000.projects.jetstream-cloud.org | ||||||||||||
sudo tljh-config reload proxy | ||||||||||||
``` | ||||||||||||
2. Wait ~30–60 seconds, then reload the site using https://. If certificate issuance fails, check the logs: | ||||||||||||
```bash | ||||||||||||
sudo journalctl -u traefik --since "10 minutes ago" | grep -i acme | ||||||||||||
``` | ||||||||||||
|
||||||||||||
Check out our guide on How To [](/howto/admin/resource-estimation) to help pick | ||||||||||||
how much Memory, CPU & disk space your server needs. | ||||||||||||
Tips: | ||||||||||||
|
||||||||||||
3. If you have multiple allocations, make sure you are 'charging' this server | ||||||||||||
to the correct allocation. | ||||||||||||
- Make sure ports 80 and 443 are open in your Jetstream security group (they are open by default for new projects; adjust only if you customized network policies). | ||||||||||||
- If you later attach a custom domain, add it with another `add-item` command and reload the proxy again. | ||||||||||||
|
||||||||||||
6. 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. | ||||||||||||
## Step 3: Customize your JupyterHub deployment | ||||||||||||
zonca marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||
|
||||||||||||
A dialog titled **Launch an Instance / Advanced Options** should pop up. | ||||||||||||
1. Now log in with the `<admin-user-name>` at https://yourinstancename.xxx000000.projects.jetstream-cloud.org. Since this is the first login, you'll be prompted to set a password. Choose a strong password and store it safely. This password is now the credential for that admin user. | ||||||||||||
zonca marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||
|
||||||||||||
```{image} ../images/providers/jetstream/add-deployment-script-dialog.png | ||||||||||||
:alt: Dialog box allowing you to add a new script. | ||||||||||||
``` | ||||||||||||
Next common tasks: | ||||||||||||
|
||||||||||||
7. Click the **Create New Script** button. This will open up another dialog | ||||||||||||
box! | ||||||||||||
- Add additional users or admins: [User management](/howto/admin/add-users) | ||||||||||||
- Install Python / conda packages for all users: [Customize user environment](/howto/user-env) | ||||||||||||
- Install optional system packages: `sudo apt install <package>` (restart user servers afterwards) | ||||||||||||
- Pre-install JupyterLab extensions: see [Enable extensions](/howto/admin/enable-extensions) | ||||||||||||
- Update TLJH itself: [Upgrading TLJH](/topic/installer-upgrade-actions) | ||||||||||||
zonca marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||
|
||||||||||||
```{image} ../images/providers/jetstream/create-script-dialog.png | ||||||||||||
:alt: Launch an Instance / Advanced Options dialog box | ||||||||||||
``` | ||||||||||||
Browse the full How-To index for more: [/howto/index](/howto/index) | ||||||||||||
zonca marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||
|
||||||||||||
8. Under **Input Type**, select **Raw Text**. This should make a text box titled | ||||||||||||
**Raw Text** visible on the right side of the dialog box. | ||||||||||||
Copy the text below, and paste it into the **Raw Text** text box. Replace | ||||||||||||
`<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 | ||||||||||||
can configure it to their needs. **Remember to add your username**! | ||||||||||||
## Ask for help | ||||||||||||
|
||||||||||||
```bash | ||||||||||||
#!/bin/bash | ||||||||||||
curl -L https://tljh.jupyter.org/bootstrap.py \ | ||||||||||||
| sudo python3 - \ | ||||||||||||
--admin <admin-user-name> | ||||||||||||
``` | ||||||||||||
Need a hand? | ||||||||||||
|
||||||||||||
:::{note} | ||||||||||||
See [](/topic/installer-actions) if you want to understand exactly what the installer is doing. | ||||||||||||
[](/topic/customizing-installer) documents other options that can be passed to the installer. | ||||||||||||
::: | ||||||||||||
- For Jetstream2 specific questions (allocations, quotas, instance lifecycle, networking, etc.), use the Jetstream support resources: <https://docs.jetstream-cloud.org/overview/support/> | ||||||||||||
zonca marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||
- For The Littlest JupyterHub usage, configuration, or upgrade questions, search or post in the Jupyter forum TLJH category: <https://discourse.jupyter.org/c/jupyterhub/tljh> | ||||||||||||
zonca marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||
- If you believe you have found a TLJH bug or have a clear documentation improvement, open an issue (or pull request if you have a proposed fix) in the TLJH GitHub repository: <https://github.com/jupyterhub/the-littlest-jupyterhub> | ||||||||||||
zonca marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||
|
||||||||||||
9. Under **Execution Strategy Type**, select **Run script on first boot**. | ||||||||||||
When asking for help about TLJH, it is often useful to provide: | ||||||||||||
|
||||||||||||
10. Under **Deployment Type**, select **Wait for script to complete**. | ||||||||||||
- A short description of what you were trying to do and what happened instead | ||||||||||||
- Relevant log excerpts (see [](/troubleshooting/logs)) | ||||||||||||
- Your TLJH version (`sudo tljh-config show | grep version` if present in config) and the output of `lsb_release -a` for the OS | ||||||||||||
- Any custom installer flags or `tljh-config` changes you have applied | ||||||||||||
|
||||||||||||
11. Click the **Save and Add Script** button on the bottom right. This should hide | ||||||||||||
the dialog box. | ||||||||||||
12. 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. | ||||||||||||
13. Click the **Launch Instance** button on the bottom right. This should turn it | ||||||||||||
into a spinner, and your server is getting created! | ||||||||||||
```{image} ../images/providers/jetstream/launching-spinner.png | ||||||||||||
:alt: Launch button turns into a spinner | ||||||||||||
``` | ||||||||||||
14. 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. | ||||||||||||
``` | ||||||||||||
15. 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! | ||||||||||||
16. 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 | ||||||||||||
``` | ||||||||||||
17. 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. | ||||||||||||
18. Congratulations, you have a running working JupyterHub! | ||||||||||||
## Step 2: Adding more users | ||||||||||||
```{include} add-users.md | ||||||||||||
``` | ||||||||||||
|
||||||||||||
## Step 3: Install conda / pip packages for all users | ||||||||||||
|
||||||||||||
```{include} add-packages.md | ||||||||||||
``` | ||||||||||||
This information helps others debug and answer more quickly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.