Skip to content

Commit

Permalink
Added steps to provision Azure IoTHub
Browse files Browse the repository at this point in the history
  • Loading branch information
lokijota committed Feb 1, 2020
1 parent 6127e91 commit f75a549
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions AzureSetup.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Provision required Azure services

## Create an IoT Hub
## Provision IoT Hub/Device in Azure

## Create an IoT Device in the IoT Hub
The following operations can all be done from the Azure Portal. I'm showing the commands using the Azure CLI which I find more convenient.

1. Create a resource group with the command: `az group create -l northeurope -g RES_GROUP_NAME`
2. Crete an IoT Hub with the command: `az iot hub create -l northeurope -g RES_GROUP_NAME --sku B1 -n IOTHUB_NAME`

- This is a Basic 1 tier, which means that features like cloud-to-device messaging won't be available. If you want to use them, provision an S1 instead.

3. Create an IoT Device with the command `az iot hub device-identity create -g RES_GROUP_NAME -n IOTHUB_NAME --device-id NAME_YOUR_DEVICE`. This creates an IoT device configuration on the IoT Hub, which you'll use to push readings to it. By default the authentication method is Shared Access Key.

4. Copy the IoT device's Connection String, with the command: `az iot hub device-identity show-connection-string -g RES_GROUP_NAME -n IOTHUB_NAME --device-id NAME_YOUR_DEVICE`. Copy the string starting with "Hostname=..." to a text editor for later use.

0 comments on commit f75a549

Please sign in to comment.