# Registering and connecting to your Data Science Virtual Machines Welcome to the LIDA-Turing Data Study Group (DSG) 2021! 🎉 During the DSG we'll be doing all computational work on Data Science Virtual Machines (DSVM) provided through Microsoft Azure. In this hackpad we'll walkthrough the steps of registering for a DSVM and connecting. ## Contents - [Azure labs](#Azure-labs) (VET-AI, Morrisons, OSNI, Network rail groups) - [Prerequisites](#Prerequisites) - [Registering](#Registering) - [Registering by email](#Registering-by-email) - [Registering by link](#Registering-by-link) - [Connecting to your VM](#Connecting-to-your-VM1) - [Connecting via the command line](#Connecting-via-the-command-line) - [Connecting with a desktop environment](#Connecting-with-a-desktop-environment) - [LASER](#LASER) (ASDA and Sainbury's groups) ## Azure labs ### Prerequisites When using Azure labs you will need the following: - A Microsoft account (either an institutional login or an @outlook, @hotmail or @live email account). [Sign up for a Microsoft account](https://signup.live.com/). ### Registering There are two ways to register for a DSVM: - Your university email address is registered and and invite is sent to that email - You are provided with a link that you log into using your university email address and register for the specific lab #### Registering by email #### 1. Make sure we know your university email The first crucial step is ensuring we have your University email address on file so that our Azure labs administrators can send you an invite! #### 2. Check your email inbox (including junk) When it's been confirmed invites have been sent out check your email inbox for an invitation email. It will have the following approximate details: ``` Sender: Microsoft Azure <azure-noreply@microsoft.com> Subject: Register for Lab - dsvm_name ``` ![](https://i.imgur.com/bpmcisO.png) **Click the Register for the Lab link** (you may be required to login). #### 3. View your available virtual machine After clicking the link and logging in you will be taken to the Azure labs portal showing you available virtual machines as tiles: ![](https://i.imgur.com/XpHkFM3.png) Congratulations you've successfully registered 🎉🎉 #### Registering by link #### 1. Follow the sign-up link Follow the link provided in a web browser > The link will look something like - https://labs.azure.com/register/8-letters-and-numbers #### 2. Sign in with your Microsoft Account You'll be navigated to a sign-in page like below: ![](https://i.imgur.com/8qmM59G.png) Sign in with a Microsoft account that you wish to register for this workshop (can be an institutional email, @hotmail, @live or @outlook) #### 3. View your available virtual machine After signing in Azure labs will register your account and provide you with a virtual machine. This will be shown as a tile on the Azure lab portal like below: ![](https://i.imgur.com/6DMUM4H.png) ### Connecting to your VM To connect to your VM you need to return to your Azure Labs Portal. ![](https://i.imgur.com/XpHkFM3.png) You need to make sure that the VM shown is turned on. You can start the virtual machine by clicking the toggle icon by `Stopped`. The machine will then transition to a `Starting` state. This can take a few minutes, so why not make a brew ☕ ![](https://i.imgur.com/gExSvMu.png) When the machine is `Running` it will appear as follows on the portal: ![](https://i.imgur.com/sLzFxt2.png) To connect you will next need to click the `Connect to the virtual machine` icon in the button right hand side of the tile. ![](https://i.imgur.com/634tvr3.png) You will be prompted to set a password which will be used whenever you log into the virtual machine. Make a note of the username and type in your prefered password. >Password must include 3 of the following: a number, uppercase character, lowercase character, or a special character ![](https://i.imgur.com/kmpIPCA.png) Once you've submitted your password it will be set on the virtual machine. This can take a couple of minutes. ![](https://i.imgur.com/TOppgNk.png) Once your password is set you should click the `Connect to the virtual machine` icon in the button right hand side of the tile and a new window will pop up with details about how to connect to your virtual machine: ![](https://i.imgur.com/3k7gNrG.png) #### Connecting via the command line Copy-and-paste this `ssh` command from the pop-up into your preferred command line: ![](https://i.imgur.com/UP0v05W.jpg) When you first connect you will be prompted to accept an ECDSA fingerprint similar to this: ```bash= $ ssh -p 58763 tsgleeds2021@ml-lab-76994367-e7f9-4c8a-84bb-10fd356c7685.westeurope.cloudapp.azure.com The authenticity of host '[ml-lab-76994367-e7f9-4c8a-84bb-10fd356c7685.westeurope.cloudapp.azure.com]:58763 ([20.82.72.188]:58763)' can't be established. ECDSA key fingerprint is SHA256:H4RbhUENMFbZeZ9mSxqXLDhsJ59qtiLoPYIAPQ/BtoU. Are you sure you want to continue connecting (yes/no/[fingerprint])? ``` You should accept this by typing `yes` and pressing the `Enter` key. You will then be prompted to enter the password we just set: ```bash= tsgleeds2021@ml-lab-76994367-e7f9-4c8a-\ 84bb-10fd356c7685.westeurope.cloudapp.azure.com's password: ``` Carefully enter your password, as this is a linux system no placeholder characters (*) will appear so be extra careful! Once you've entered your password, press the `Enter` key. > If you get `Permission denied, please try again.` error it probably means you've entered your password incorrectly. Try again! When you succesfully connect you will see the following message and a similar prompt: ```bash= Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 5.4.0-1047-azure x86_64) System information as of Mon Jul 5 13:27:14 UTC 2021 System load: 1.08 Processes: 180 Usage of /: 48.5% of 145.20GB Users logged in: 0 Memory usage: 3% IP address for eth0: 10.0.0.22 Swap usage: 0% IP address for docker0: 172.17.0.1 * Super-optimized for small spaces - read how we shrank the memory footprint of MicroK8s to make it the smallest full K8s around. https://ubuntu.com/blog/microk8s-memory-optimisation 2 updates can be applied immediately. 1 of these updates is a standard security update. To see these additional updates run: apt list --upgradable New release '20.04.2 LTS' available. Run 'do-release-upgrade' to upgrade to it. *************************************************************************** * Welcome to the Ubuntu 18.04 Data Science Virtual Machine! * * * * You can access this DSVM, view the graphical desktop with * * X2Go, or run JupyterLab from a browser on your computer * * For more information, see the docs at https://aka.ms/dsvm/docs. * *************************************************************************** Last login: Mon Jul 5 13:26:49 2021 from 86.140.135.46 tsgleeds2021@ML-RefVm-114914:~$ ``` You are now successfully connected to the virtual machine via the command line! 🎉 #### Connecting with a desktop environment If you would rather connect with a graphical desktop environment you can do so by taking the following steps: 1. Install [X2Go client](https://wiki.x2go.org/doku.php/doc:installation:x2goclient) on your system - This software is available for Windows, MacOS and Linux distros, please follow installation instructions on the X2go installation page 2. Open X2Go once you have installed it and you will see this window: ![](https://i.imgur.com/MQf8eJm.png) 3. To complete this form you will need the connection information that was displayed on Azure labs earlier. In this example say we had the following SSH command to connect: ``` ssh -p 54206 tsgleeds2021@ml-lab-76994367-e7f9-4c8a-84bb-10fd356c7685.westeurope.cloudapp.azure.com ``` We would then complete the Session details on X2Go as follows: - Session name: my-data-science-vm (pick your own name here) - Host: `ml-lab-76994367-e7f9-4c8a-84bb-10fd356c7685.westeurope.cloudapp.azure.com` - SSH Port: `54206` - Session type: Change KDE to XFCE 4. Confirm the session settings by clicking OK: ![](https://i.imgur.com/vHklHpW.png) 5. Click on the session on the top right hand side to start it: ![](https://i.imgur.com/aNpstVP.png) 6. Enter your login (username) and password you set earlier: ![](https://i.imgur.com/YBv88re.png) 7. It will then attempt to connect and if successful a new window will appear ![](https://i.imgur.com/DHmzUgY.png) 8. This new window will appear like below and you will have successfully connected to the Data Science Virtual Machine 🎉 ![](https://i.imgur.com/aDb59zR.png) ## LASER If your project is with ASDA or Sainbury's you'll be using the LASER platform to access the project data. This is a more secure research environment that includes a couple of extra hoops you need to jump through to connect. ### Prerequisites - Have requested a temporary University of Leeds Account (hopefully someone else is taking care of this) - Passed your University of Leeds [IT Information Security Essentials (login required)](https://bit.ly/2N2pVDC) and [IT Information Security Advanced (login required)](https://minerva.leeds.ac.uk/webapps/blackboard/execute/content/blankPage?cmd=view&content_id=_4673004_1&course_id=_460079_1) available via [MINERVA (login required)](https://minerva.leeds.ac.uk/) and emailed result to ircdst@leeds.ac.uk ### LASER Log on guide Once you've met the prerequisites you can following the [guide on how to log on from the LASER documentation website](https://lida-data-analytics-team.github.io/laserdocs/docs/laser_how_to/laser_login.html). Connecting to artifactor on LASER - 10.6.8.132:8082/ui