Jupyter Lab Standalone on Azure
Launch Login Node
To set up a cluster, you will need to import a Flight Solo image.
-
Go to the Microsoft Azure portal.
-
Go to Virtual Machines, and click "Create".
-
Select "Azure virtual machine", which will load this page:
-
On the Basics page:
- Set Subscription to your subscription type.
- Set Resource Group to your desired resource group (where the vm will be kept after creation).
- Set Virtual machine name to any suitable name. (
-
does not work in a name) - Set Image to the imported Flight Solo Image.
- It may be necessary to open the drop-down and/or see all images in order to find the imported image.
- Scroll down to see more options
- Set Size to your choice of size.
- Set Authentication type to
SSH public key
- Set Username to any suitable username.
- Set SSH public key source to the most suitable option, but remember what key was used if creating compute nodes later.
- Fill in the Key pair name/Stored key/Use existing key as appropriate to the chosen public key source.
- Allow traffic to selected ports, and select
SSH(22)
,HTTP(80)
andHTTPS(443)
as the allowed ports. - Set the most appropriate license type.
-
Continuing on to the next page, Disks, all necessary details should already be filled out, so this page can be skipped (unless you know what you want to change). However, it is recommended to select Delete with VM.
-
Go on to the networking tab and fill out the necessary options.
- Set Virtual Network or create a new one by pressing "Create new" and setting a name. Remember what this is for if you create compute nodes.
- Set Subnet to one of the options in the drop-down menu, if it isn't already set. Remember what this is for if you create compute nodes.
- Set Public IP to an existing public IP or create a new one by pressing "Create new" and setting a name.
- Set NIC network security group to "Advanced", and press "Create new" to create a new security group.
- Click on "Add an inbound rule" to open the inbound rule creator
- Create rules to allow
HTTP
,HTTPS
andSSH
traffic from your IP address to the security group. - When complete, press "OK" at the bottom left of the screen to return to image creation.
-
The Management, Monitoring and Tags tabs have more options that aren't necessary for setup. Skip to the tab Advanced
-
In the Custom data and cloud init section, there is a text box. This is where your user data can be specified
-
Azure will take some time to review your settings. If there are no issues click "Create" to finish creation.
General Configuration
Create Node Inventory
-
Parse your node(s) with the command
flight hunter parse
.-
This will display a list of hunted nodes, for example
[flight@login-node.novalocal ~]$ flight hunter parse Select nodes: (Scroll for more nodes) ‣ ⬡ login-node.novalocal - 10.10.0.1 ⬡ compute-node-1.novalocal - 10.10.101.1
-
Select the desired node to be parsed with Space, and you will be taken to the label editor
Choose label: login-node.novalocal
-
Here, you can edit the label like plain text
Choose label: login1
Tip
You can clear the current node name by pressing Down in the label editor.
-
When done editing, press Enter to save. The modified node label will appear next to the ip address and original node label.
Select nodes: login-node.novalocal - 10.10.0.1 (login1) (Scroll for more nodes) ‣ ⬢ login-node.novalocal - 10.10.0.1 (login1) ⬡ compute-node-1.novalocal - 10.10.101.1
-
From this point, you can either hit Enter to finish parsing and process the selected nodes, or continue changing nodes. Either way, you can return to this list by running
flight hunter parse
. -
Save the node inventory before moving on to the next step.
Tip
See
flight hunter parse -h
for more ways to parse nodes.
-
Add genders
- Optionally, you may add genders to the newly parsed node. For example, in the case that the node should have the gender
cluster
andall
then run the command:flight hunter modify-groups --add cluster,all login1
Jupyter Lab Standalone Configuration
-
Configure profile
flight profile configure
- This brings up a UI, where several options need to be set. Use up and down arrow keys to scroll through options and enter to move to the next option. Options in brackets coloured yellow are the default options that will be applied if nothing is entered.
- Cluster type: The type of cluster setup needed, in this case select
Jupyter Standalone
. - Cluster name: The name of the cluster.
- Default user: The user that you log in with.
- Set user password: Set a password to be used for the chosen default user.
- IP or FQDN for Web Access: As described here, this could be the public IP or public hostname.
- Cluster type: The type of cluster setup needed, in this case select
- This brings up a UI, where several options need to be set. Use up and down arrow keys to scroll through options and enter to move to the next option. Options in brackets coloured yellow are the default options that will be applied if nothing is entered.
-
Apply an identity by running the command
flight profile apply
, E.g.!!! tip You can check all available identities for the current profile withflight profile apply standalone1 all-in-one
flight profile identities
-
Wait for the identity to finish applying. You can check the status of all nodes with
flight profile list
.Tip
You can watch the progress of the application with
flight profile view login1 --watch
Success
Congratulations, you've now created a Jupyter Lab Standalone environment! Learn more about Jupyter Lab in their documentation.
Verifying Functionality
-
Put the IP/FQDN used in configuration into your browser to access the Flight Web Suite. It should look something like this:
-
Under "Quick Access" click on "Jupyter" and enter the password set during configuration when requested; it will only need to be entered the first time you connect.
-
On the Jupyter home page, under the "Notebook" section, click on "Python3" to open a new notebook.
-
Enter this code, which will print out a message, wait for a bit, then print again.
import time print("Starting running on Jupyter") time.sleep(3) print("Finished running - goodbye from Jupyter")
-
Click the play button to run the cell, and wait for the result.