Skip to content

Latest commit

 

History

History
66 lines (36 loc) · 3.41 KB

setup-development-environment.md

File metadata and controls

66 lines (36 loc) · 3.41 KB

Setup development environment

https://unsplash.com/photos/9HI8UJMSdZA

The following items are required to proceed with this master class/workshop.

Azure CLI configuration

We will assume that you will have your CLI logged in to your Azure account. It's also nice to configure the CLI with some defaults like showing results in tables.

Azure CLI configuration

Also I will use CLI interactive mode to have stuff like auto-complete and command descriptions. To enter interactive mode, simply type az interactive Most screenshots will be done from interactive mode.

To install IoT hub extension, run:

az extension add --name azure-iot

Create IoT hub

The core Azure resource we need (at least in the cloud) is Azure IoT hub. So, we need to create one.

First, create a resource group to hold all resources in this master class. Southeast Asia region is picked because it has some Azure IoT hub preview features that we may use like distributed tracing.

az group create --name iotedge-rg --location southeastasia

Create a standard tier IoT hub. Standard tier is mainly required to use IoT Edge. The general advice is to use standard tier unless your solution is basically around telemetry collection. You will notice that in interactive mode we can skip typing the az command altogether. Also IoT Hub name should be globally unique. So try replacing any future master-hub reference with <your-first-name>-master-hub .

iot hub create --resource-group iotedge-rg --sku S1 --hub-name master-hub

Open Azure portal in the browser and verify that IoT hub is created in the right resource group/region.

Configure VS Code to connect to IoT hub

Open VS Code and make sure to sign in to your Azure Account and select the correct subscription if you have access to more than one. Use Ctrl+Shift+P to open command palette.

From command palette, search for "select iot" to pick the command for wiring VS Code with our IoT hub.

Select the command above then select the subscription and IoT hub under this subscription. Once done, our master-hub will be available in VS Code Explorer view.