:sparkles::sparkles: The minimum VM Ubuntu version has been updated to 22.4 thanks to @ionicsolutions :sparkles::sparkles:
Deploy your own Littlest JupyterHub using the blue "Deploy to Azure" button above ππΌ |
This project is licensed under the MIT OSI license.
|
A simple JupyterHub distribution for a small (1-100) number of users on a single server. You can find more info about it in the official docs.
You need an Azure account to be able to spin your JupyterHub.
π€© If you do not have an Azure subscription you can get started with a free Azure subscription with 200 USD
This repository contains the ARM (Azure Resource Manager) template for the Littlest JupyterHub deployment. This template was created to help you deploy a vanilla Littlest JupyterHub by clicking on the "Deploy to Azure" blue button at the top of this document.
It follows the recommended configuration in the official The Littlest JupyterHub docs but eliminates the deployment friction by predefining some standard settings.
The ARM template contains all the configurations needed to deploy your own Littlest JupyterHub on Azure.
This template follows the configuration detailed in https://the-littlest-jupyterhub.readthedocs.io/en/latest/install/azure.html. But it reduces some friction by eliminating the need to create resources manually using the Azure portal.
Note You still need to remove your resources manually when you are done using them. Otherwise, you will be charged for their use.
To deploy your TLJH follow these steps:
Create an Azure account (if you need a free one go to ππΌ this link ππΌ)
Click on the Deploy to Azure
button at the top of this README. This will redirect you to the Azure portal login page.
Login to your account.
Fill in the details on the next screen (see details below):
Create new
and give it a meaningful name (e.g. jupyter-resources
)WestEurope
, you can check all the available regions here)TLHJ-Ubuntu
, but you can choose any name you prefer.Standard_LRS
.By default, the template allows network traffic through HTTP
and HTTPS
.
Once completed, read the terms and conditions and if you are happy with them, go ahead and tick the I agree to the terms and conditions stated above
box and click on the Purchase button.
The deployment will take around 10 minutes - first, all your resources will be deployed, and then THLJ will be installed on your VM.
To check your new Virtual Machine Expand the left-hand panel by clicking on the ">>" button in the top left corner of your dashboard. Find the Virtual Machines tab and click on it.
Click on your Virtual Machine, copy the Public IP address and access it through your web browser.
Warning This page will be unavailable during the installation of the server. If this happens, be patient, give it a bit longer and refresh the page.
Once the installation is complete, you will get a login page like the one below:
Login using the admin username and password you created before
Congratulations you have a running working JupyterHub π
π©πΏβπ»β¨ You are now ready to add users, install packages and start using your JupyterHub. For instructions on how to do this visit ππΌ the official The Littlest JupyterHub documentation.
You can customise the installer by adding command line parameters. From v1.1.0 you can now specify a TLJH install script to customise the installation.
For example, if you want to install Python packages in the user environment from a requirements.txt
file you can pass the parameter --user-requirements-txt-URL <url-to-requirements.txt>
where URL-to-requirements.txt
must be a valid URL:
--user-requirements-txt-URL https://raw.githubusercontent.com/data-8/materials-sp18/master/requirements.txt
Note When pointing to a file on GitHub, make sure to use the 'Raw' version. It should point to
raw.githubusercontent.com
, notgithub.com
.
Let's use as an example the voilΓ -gallery
plugin`. First, you will have to create a bash script with the customised JupyterHub installer:
# !/bin/bash
curl https://raw.githubusercontent.com/jupyterhub/the-littlest-jupyterhub/master/bootstrap/bootstrap.py \
| sudo python3 - \
--plugin git+https://github.com/voila-dashboards/tljh-voila-gallery@master#"egg=tljh-voila-gallery&subdirectory=tljh-voila-gallery"
And update the scriptLocation
parameter accordingly when deploying your littlest JupyterHub (in the details form after you log into your Azure account). For the above example:
https://raw.githubusercontent.com/trallard/TLJH-azure-button/feature-plugins/scripts/install_voila.sh
So once the VM is created and the plugins installed you can go to the public IP of your VM. In the case of the VoilΓ plugin, you will be greeted with this screen instead of the usual TLHJ one:
Always make sure that the script is publicly available (e.g. public repo, public gist) and that you are pointing to the raw
content.
Note For more details on customising your installation visit the main TLJH documentation.
In this repo you will find the following installation scripts:
Vanilla TLHJ install script: ./scripts/install.sh
TLJH + Pangeo plugin script: ./scripts/install_pangeo.sh
TLJH + Voila dashboard plugin script: ./scripts/install_voila.sh
When you deploy a JupyterHub on Azure (either using the Deploy to Azure button or following the steps from the docs) the following resources are created:
They are all grouped in the same region defined for your Resource group.
Also, note that the storage disk created with this template will be of the same type as the OS
disk type` you provide on the template.
If you want to learn more about VM types and sizes, including compatibility between the VMS and storage (standard or premium) you can visit the official Azure Linux VM documentation.
Details on how to delete and stop your virtual machine can be found at https://the-littlest-jupyterhub.readthedocs.io/en/latest/howto/providers/azure.html.
If you want to get rid of all the associated resources after you are done with your JupyterHub the easiest way to do it is to delete the resource group altogether (provided you do not have other resources in this group that you might need later).
To delete a resource group from the Azure portal:
See the useful tips and commands section for the command to delete using the command line and the Azure CLI.
Here are some links that you might find useful when using the content in this repo.
:book: Azure Resource Manager templates docs
:book: The Littlest JupyterHub docs
:book: VM available regions - Azure docs
:book: Azure VM sizes documentation
:book: Azure VMs disks documentation
:book: Install the Azure CLI
If you are familiar with the command line and have the az cli
installed the following commands might come in handy:
az vm list-sizes --location <location> --output table
az vm show --resource-group <resource-group> --name <VirtualMachineName> --query hardwareProfile.vmSize
# First check if the desired size is available
az vm list-vm-resize-options --resource-group <resource-group> --name <VirtualMachineName> --query [].name
# resize the VM
az vm resize --resource-group <resource-group> --name <VirtualMachineName> --size <desired-size>
az vm stop --resource-group <resource-group> --name <VirtualMachineName>
az group delete --name <resource-group> --no-wait --yes
Contributions are welcome. Also, if you encounter any issues, please go ahead and create an issue in this repo.
The detailed contribution guidelines can be found at CONTRIBUTING, make sure to have a look first :eyes: