Files
the-littlest-jupyterhub/docs/install/azure.rst

145 lines
5.6 KiB
ReStructuredText
Raw Normal View History

2019-05-20 15:47:10 +01:00
====================
Installing on Azure
====================
Goal
====
By the end of this tutorial, you should have a JupyterHub with some admin
2019-05-20 16:19:06 +01:00
users and a user environment with packages you want to be installed running on
2019-05-20 15:47:10 +01:00
`Microsoft Azure <https://azure.microsoft.com>`_.
Prerequisites
==============
* A Microsoft Azure account.
2019-05-20 16:19:06 +01:00
* To get started you can get a free account which includes 150 dollars worth of Azure credits (`get a free account here <https://azure.microsoft.com/en-us/free//?wt.mc_id=LTJH-github-taallard>`_)
2019-05-20 15:47:10 +01:00
These instructions cover how to set up a Virtual Machine
on Microsoft Azure. For subsequent information about creating
your JupyterHub and configuring it, see `The Littlest JupyterHub guide <https://the-littlest-jupyterhub.readthedocs.io/en/latest/>`_.
Choose your Virtual Machine operating system
=============================================
2019-05-20 16:19:06 +01:00
#. Go to `your Azure portal <https://portal.azure.com/>`_
#. Find virtual machines on your Azure dashboard (left-hand panel)
2019-05-20 15:47:10 +01:00
.. image:: ../images/providers/azure/azure-vms.png
:alt: Virtual machines on Azure portal
#. Click "+ add" to create a new Virtual Machine
.. image:: ../images/providers/azure/add-vm.png
:alt: Add a new virtual machine
#. Select Create VM from Marketplace
.. image:: ../images/providers/azure/create-vm.png
2019-05-20 16:19:06 +01:00
:alt: Create from the marketplace
2019-05-20 16:23:22 +01:00
2019-05-20 15:47:10 +01:00
* **Choose an Ubuntu server for your VM**.
* Click `Ubuntu Server`
* Click `Ubuntu Server 18.04 LTS`
* Make sure `Resource Manager` is selected when creating the virtual machine
.. image:: ../images/providers/azure/ubuntu-vm.png
:alt: Ubuntu VM
Customize the virtual machine
==============================
* Basics
* **Name**. Use a descriptive, short name that you like (note that you cannot use spaces or special characters)
* **VM disk type**. Choose SSD
* **Username**. Choose any username. This will be used to SSH into your VM, it is the root username for your VM.
* **Authentication type**. Change authentication type to "password"
* **Password**. Type in a password. This will be used to SSH into the machine. It is your user password on the VM.
* **Login with Azure Active Directory**. Choose "Disabled" (usually the default)
2019-05-20 16:19:06 +01:00
* **Subscription**. Choose the "Free Trial" if this is what you're using. Otherwise, choose a different plan. This is the billing account that will be charged.
* **Resource group**. Create a new resource group if you don't already have one. Resource groups let you bundle components that you request from Azure. This is overkill for our use case so it's easiest to create a new resource group.
2019-05-20 15:47:10 +01:00
* **Location**. Choose a location near where you expect your users to be located.
.. image:: ../images/providers/azure/password-vm.png
2019-05-20 16:19:06 +01:00
:alt: Add password to VM
2019-05-20 15:47:10 +01:00
* Size
2019-05-20 16:19:06 +01:00
* Choose a machine with enough RAM to accommodate your users. For example, if each user needs 2GB of RAM, and you have 10 total users, you need at least 20GB of RAM on the machine. It's also good to have a few GB of "buffer" RAM beyond what you think you'll need.
2019-05-20 15:47:10 +01:00
* Click on "select image" and choose one of the options, then click "select".
.. image:: ../images/providers/azure/size-vm.png
:alt: Choose vm size
* Settings
2019-05-20 16:13:21 +01:00
* Availability options
* Select no infrastructure redundancy required
2019-05-20 15:47:10 +01:00
* Storage
* **Use managed disks**. Choose "yes"
2019-05-20 16:13:21 +01:00
* **OS disk size**. Click on create and attach a new disk. Select an appropriate type and size and click ok.
.. image:: ../images/providers/azure/disk-vm.png
:alt: Choose disk size
2019-05-20 16:23:22 +01:00
2019-05-20 15:47:10 +01:00
* Network
* **Virtual network**. Do not change this.
* **Subnet**. Do not change this.
* **Public IP address**. Do not change this.
* **Network Security Group**. Choose "Basic"
* **Select public inbound ports**. Check "HTTP", "HTTPS", and "SSH".
* Extensions
* **Extensions**. Should read "No extensions".
* Auto-Shutdown
* **Enable auto-shutdown**. Choose "Off".
* Monitoring
2019-05-20 16:13:21 +01:00
* **Boot diagnostics**. Choose "On".
* **OS guest diagnostics**. Choose "Disabled".
* **Diagnostics storage account**. Leave as the default.
2019-05-20 15:47:10 +01:00
* Managed service identity
2019-05-20 16:13:21 +01:00
* **System assigned managed identity**. Choose "No".
2019-05-20 15:47:10 +01:00
* Backup
* **Backup**. Choose "Disabled".
2019-05-20 16:13:21 +01:00
2019-05-20 15:47:10 +01:00
.. image:: ../images/providers/azure/backup-vm.png
2019-05-20 16:19:06 +01:00
:alt: Choose VM Backup
2019-05-20 15:47:10 +01:00
* Summary -> confirm -> OK
* Confirm that it worked
2019-05-20 16:13:21 +01:00
* Wait for it to be created. This might take about 5-10 minutes.
2019-05-20 16:19:06 +01:00
* After completion, you should see a similar screen to the one below:
2019-05-20 16:13:21 +01:00
.. image:: ../images/providers/azure/deployed-vm.png
2019-05-20 16:19:06 +01:00
:alt: Deployed VM
2019-05-20 15:47:10 +01:00
2019-05-20 16:13:21 +01:00
SSH into your virtual machine
------------------------------
2019-05-20 15:47:10 +01:00
2019-05-20 16:13:21 +01:00
* Click on go to resource (see image above)
2019-05-20 15:47:10 +01:00
* Copy the **Public IP address**
2019-05-20 16:23:22 +01:00
.. image:: ../images/providers/azure/ip-vm.png
:alt: Get IP address
2019-05-20 15:47:10 +01:00
* Open a terminal on your local machine.
2019-05-20 16:13:21 +01:00
* SSH into your VM: ::
ssh <username>@<ip-address>
where the username is the one you chose in the Settings step.
2019-05-20 15:47:10 +01:00
2019-05-20 16:13:21 +01:00
Install JupyterHub
===================
2019-05-20 15:47:10 +01:00
2019-05-20 16:13:21 +01:00
* Follow the guide at `https://the-littlest-jupyterhub.readthedocs.io/en/latest/install/custom.html#install-custom <https://the-littlest-jupyterhub.readthedocs.io/en/latest/install/custom.html#install-custom>`_
2019-05-20 15:47:10 +01:00
2019-05-20 16:13:21 +01:00
(optional) Delete your virtual machine
=======================================
2019-05-20 15:47:10 +01:00
* Go to "Virtual Machines"
2019-05-20 16:13:21 +01:00
* Click on your machine name
2019-05-20 15:47:10 +01:00
* Click on "Stop" to stop the machine temporarily, or "Delete" to delete it permanently.
2019-05-20 16:13:21 +01:00
.. image:: ../images/providers/azure/delete-vm.png
2019-05-20 16:23:22 +01:00
:alt: Delete vm