Lab 2 - Setup Dev Environment
Last updated
Last updated
Before doing this step you need to have access to an Azure Subscription, read here for how to get access.
Sign in with your Azure account that has access to the subscription you want to use
You should see the screen below
Click "create new" to create a new resource group.
Enter a name for the resource group in the name field like: "devcontainer_RG"
Click "OK"
Select the region closest to you from the dropdown
Name, you can change the name or leave it as is.
Click "Review + create"
If all is well you should see "Validation Passed" in green
Click "Create" to start creating the resources. (This can take 1-5 minutes)
After a few minutes you should see "Your deployment is complete"
Click on the button: "Go to resource" this will bring you to the newly created DevContainer resources
The "Go to resource" button will bring you the screen above. Copy the IP address, you need this address later on.
Don't have Visual Studio code installed on your machine, download Visual Studio Code here!
This workshop only works with the stable version, not with Insiders.
Open Visual Studio Code
Click on the extensions icon on the left (crtl-shift-x)
In the search bar search for: remote-ssh
Click Install
Click the green >< button in the bottom left corner
Select "Connect to Host"
Enter user@host in the field. Replace user with: globalai and host with the IP address from your deployment in the previous step.
Press enter
A new VSCode window will open.
A Windows Security alert might pop-up, if it does click: "Allow access"
Select: Linux
Select: Continue
Enter the password: back2gether
You are now connected to your Remote Dev Container!
Open a Terminal, you can do this using the Top menu > Terminal > New Terminal
The terminal appears at the bottom of VSCode
Click the extensions icon on the left
Search for: ms-toolsai.jupyter
Click install
Search for: ms-python.python
Click install
Search for: REST Client
Click install
To activate the extensions you need to reload VSCode
In the Top Menu click "View" > Command Palette (crtl-shift-p)
Type: "reload"
Select: "Developer Reload Window"
VSCode will reload
It will ask for the password again, enter the password: back2gether
In the terminal type "az login"
Open a browser window and navigate to: https://microsoft.com/devicelogin
Enter the code displayed in the terminal
Sign in with your Microsoft Account that has access to the subscription you want to use.
Click continue to confirm you are signing in using the Azure CLI
You can close the browser window.
In the terminal you should see a long JSON document with all the Azure Subscriptions your user account has access to.
In the terminal type: "az account list --output table"
You should see a list of all the subscriptions your account has access to.
To set the default subscription type in the terminal: "az account set -s <SubscriptionId>" Replace SubscriptionId with the subscriptionid you want to use.
Now this subscription will be used to create your Azure Resources by default
You are now ready to start developing using Visual Studio Code and a Remote Dev Container
In this lab you have completed these tasks: