Lab 2 - Setup Dev Environment
Before doing this step you need to have access to an Azure Subscription, read here for how to get access.
- 1.
- 2.Sign in with your Azure account that has access to the subscription you want to use
- 3.You should see the screen below

- 1.Click "create new" to create a new resource group.
- 1.Enter a name for the resource group in the name field like: "devcontainer_RG"
- 2.Click "OK"
- 2.Select the region closest to you from the dropdown
- 3.Name, you can change the name or leave it as is.
- 4.Click "Review + create"

- 1.If all is well you should see "Validation Passed" in green
- 2.Click "Create" to start creating the resources. (This can take 1-5 minutes)

- 1.After a few minutes you should see "Your deployment is complete"
- 2.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.
This workshop only works with the stable version, not with Insiders.

- 1.Open Visual Studio Code
- 2.Click on the extensions icon on the left (crtl-shift-x)
- 3.In the search bar search for: remote-ssh
- 4.Click Install

- 1.Click the green >< button in the bottom left corner
- 2.Select "Connect to Host"

- 1.Enter [email protected] in the field. Replace user with: globalai and host with the IP address from your deployment in the previous step.
- 2.Press enter
- 3.A new VSCode window will open.
- 4.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!

- 1.Open a Terminal, you can do this using the Top menu > Terminal > New Terminal
- 2.The terminal appears at the bottom of VSCode
- 1.Click the extensions icon on the left
- 2.Search for: ms-toolsai.jupyter
- 3.Click install
- 4.Search for: ms-python.python
- 5.Click install
- 6.Search for: REST Client
- 7.Click install

- 1.To activate the extensions you need to reload VSCode
- 2.In the Top Menu click "View" > Command Palette (crtl-shift-p)
- 3.Type: "reload"
- 4.Select: "Developer Reload Window"
- 5.VSCode will reload
- 6.It will ask for the password again, enter the password: back2gether

- 1.In the terminal type "az login"
- 2.
- 3.Enter the code displayed in the terminal
- 4.Sign in with your Microsoft Account that has access to the subscription you want to use.
- 5.Click continue to confirm you are signing in using the Azure CLI
- 6.You can close the browser window.
- 7.In the terminal you should see a long JSON document with all the Azure Subscriptions your user account has access to.
- 1.In the terminal type: "az account list --output table"
- 2.You should see a list of all the subscriptions your account has access to.
- 3.To set the default subscription type in the terminal: "az account set -s <SubscriptionId>" Replace SubscriptionId with the subscriptionid you want to use.
- 4.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:
- Deployed a DevContainer in an Azure Container Instance
- Connected your local Visual Studio to the DevContainer
- Installed some additional extensions in Visual Studio Code
- Connected to your Azure account using the CLI in your DevContainer
- Set the default Azure Subscription