Skip to content

Commit e09cb9c

Browse files
authored
Merge pull request #58225 from kgremban/nov16-quickstartvm
Improve clarity of quickstarts
2 parents 2379879 + a1cc5c2 commit e09cb9c

File tree

4 files changed

+60
-38
lines changed

4 files changed

+60
-38
lines changed

articles/iot-edge/quickstart-linux.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ description: In this quickstart, learn how to deploy prebuilt code remotely to a
44
author: kgremban
55
manager: philmea
66
ms.author: kgremban
7-
ms.date: 08/14/2018
7+
ms.date: 10/14/2018
88
ms.topic: quickstart
99
ms.service: iot-edge
1010
services: iot-edge
1111
ms.custom: mvc
12-
13-
experimental: true
14-
experiment_id: 21cb7321-bcff-4b
1512
---
1613

1714
# Quickstart: Deploy your first IoT Edge module to a Linux x64 device
@@ -56,9 +53,11 @@ IoT Edge device:
5653
* A Linux device or virtual machine to act as your IoT Edge device. If you want to create a virtual machine in Azure, use the following command to get started quickly:
5754

5855
```azurecli-interactive
59-
az vm create --resource-group IoTEdgeResources --name EdgeVM --image Canonical:UbuntuServer:16.04-LTS:latest --admin-username azureuser --generate-ssh-keys --size Standard_B1ms
56+
az vm create --resource-group IoTEdgeResources --name EdgeVM --image Canonical:UbuntuServer:16.04-LTS:latest --admin-username azureuser --generate-ssh-keys --size Standard_DS1_v2
6057
```
6158

59+
When you create a new virtual machine, make a note of the **publicIpAddress**, which is provided as part of the create command output. You use this public IP address to connect to the virtual machine later in the quickstart.
60+
6261
## Create an IoT hub
6362

6463
Start the quickstart by creating your IoT hub with Azure CLI.
@@ -73,7 +72,7 @@ The following code creates a free **F1** hub in the resource group **IoTEdgeReso
7372
az iot hub create --resource-group IoTEdgeResources --name {hub_name} --sku F1
7473
```
7574

76-
If you get an error because there's already one free hub in your subscription, change the SKU to **S1**.
75+
If you get an error because there's already one free hub in your subscription, change the SKU to **S1**. If you get an error that the IoT Hub name isn't available, it means that someone else already has a hub with that name. Try a new name.
7776

7877
## Register an IoT Edge device
7978

@@ -82,21 +81,23 @@ Register an IoT Edge device with your newly created IoT hub.
8281

8382
Create a device identity for your simulated device so that it can communicate with your IoT hub. The device identity lives in the cloud, and you use a unique device connection string to associate a physical device to a device identity.
8483

85-
Since IoT Edge devices behave and can be managed differently than typical IoT devices, you declare this to be an IoT Edge device from the beginning.
84+
Since IoT Edge devices behave and can be managed differently than typical IoT devices, declare this identity to be for an IoT Edge device with the `--edge-enabled` flag.
8685

8786
1. In the Azure cloud shell, enter the following command to create a device named **myEdgeDevice** in your hub.
8887

8988
```azurecli-interactive
9089
az iot hub device-identity create --hub-name {hub_name} --device-id myEdgeDevice --edge-enabled
9190
```
9291

93-
1. Retrieve the connection string for your device, which links your physical device with its identity in IoT Hub.
92+
If you get an error about iothubowner policy keys, make sure that your cloud shell is running the latest version of the azure-cli-iot-ext extension.
93+
94+
2. Retrieve the connection string for your device, which links your physical device with its identity in IoT Hub.
9495

9596
```azurecli-interactive
9697
az iot hub device-identity show-connection-string --device-id myEdgeDevice --hub-name {hub_name}
9798
```
9899

99-
1. Copy the connection string and save it. You'll use this value to configure the IoT Edge runtime in the next section.
100+
3. Copy the connection string and save it. You'll use this value to configure the IoT Edge runtime in the next section.
100101

101102
## Install and start the IoT Edge runtime
102103

@@ -107,13 +108,21 @@ The IoT Edge runtime is deployed on all IoT Edge devices. It has three component
107108

108109
During the runtime configuration, you provide a device connection string. Use the string that you retrieved from the Azure CLI. This string associates your physical device with the IoT Edge device identity in Azure.
109110

110-
Complete the following steps in the Linux machine or VM that you prepared to function as an IoT Edge device.
111+
### Connect to your IoT Edge device
112+
113+
The steps in this section all take place on your IoT Edge device. If you're using your own machine as the IoT Edge device, you can skip this part. If you're using a virtual machine or secondary hardware, you want to connect to that machine now.
114+
115+
If you created an Azure virtual machine for this quickstart, retrieve the public IP address that was output by the creation command. You can also find the public IP address on your virtual machine's overview page in the Azure portal. Use the following command to connect to your virtual machine. Replace **{publicIpAddress}** with your machine's address.
116+
117+
```azurecli-interactive
118+
ssh azureuser@{publicIpAddress}
119+
```
111120

112121
### Register your device to use the software repository
113122

114123
The packages that you need to run the IoT Edge runtime are managed in a software repository. Configure your IoT Edge device to access this repository.
115124

116-
The steps in this section are for x64 devices running **Ubuntu 16.04**. To access the software repository on other versions of Linux or device architectures, see [Install the Azure IoT Edge runtime on Linux (x64)](how-to-install-iot-edge-linux.md) or [Install Azure IoT Edge runtime on Linux (ARM32v7/armhf)](how-to-install-iot-edge-linux-arm.md).
125+
The steps in this section are for x64 devices running **Ubuntu 16.04**. To access the software repository on other versions of Linux or device architectures, see [Install the Azure IoT Edge runtime on Linux (x64)](how-to-install-iot-edge-linux.md) or [Linux (ARM32v7/armhf)](how-to-install-iot-edge-linux-arm.md).
117126

118127
1. On the machine that you're using as an IoT Edge device, install the repository configuration.
119128

@@ -162,7 +171,7 @@ The security daemon installs as a system service so that the IoT Edge runtime st
162171
sudo apt-get install iotedge
163172
```
164173

165-
2. Open the IoT Edge configuration file. It is a protected file so you may have to use elevated privileges to access it.
174+
2. Open the IoT Edge configuration file. It's a protected file so you may have to use elevated privileges to access it.
166175

167176
```bash
168177
sudo nano /etc/iotedge/config.yaml
@@ -240,15 +249,15 @@ View the messages being sent from the tempSensor module:
240249

241250
The temperature sensor module may be waiting to connect to Edge Hub if the last line you see in the log is `Using transport Mqtt_Tcp_Only`. Try killing the module and letting the Edge Agent restart it. You can kill it with the command `sudo docker stop tempSensor`.
242251

243-
You can also view the telemetry as it arrives at your IoT hub by using the [Azure IoT Toolkit extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit).
252+
You can also watch the messages arrive at your IoT hub by using the [Azure IoT Toolkit extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit).
244253

245254
## Clean up resources
246255

247256
If you want to continue on to the IoT Edge tutorials, you can use the device that you registered and set up in this quickstart. Otherwise, you can delete the Azure resources that you created and remove the IoT Edge runtime from your device.
248257

249258
### Delete Azure resources
250259

251-
If you created your virtual machine and IoT hub in a new resource group, you can delete that group and all the associated resources. If there's anything in that resource group that you want to keep, then just delete the individual resources that you want to clean up.
260+
If you created your virtual machine and IoT hub in a new resource group, you can delete that group and all the associated resources. Double check the contents of the resource group to make sure that there's nothing you want to keep. If you don't want to delete the whole group, you can delete individual resources instead.
252261

253262
Remove the **IoTEdgeResources** group.
254263

articles/iot-edge/quickstart.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ description: Try out Azure IoT Edge by running analytics on a simulated edge dev
44
author: kgremban
55
manager: philmea
66
ms.author: kgremban
7-
ms.date: 08/02/2018
7+
ms.date: 10/02/2018
88
ms.topic: quickstart
99
ms.service: iot-edge
1010
services: iot-edge
1111
ms.custom: mvc
12-
13-
#experimental: true
14-
#experiment_id: 2c2f48c7-50a9-4e
1512
---
1613

1714
# Quickstart: Deploy your first IoT Edge module from the Azure portal to a Windows device - preview
@@ -59,8 +56,8 @@ IoT Edge device:
5956
* A Windows computer or virtual machine to act as your IoT Edge device. Use a supported Windows version:
6057
* Windows 10 or newer
6158
* Windows Server 2016 or newer
62-
* If it's a Windows computer, ensure it meets the [system requirements](https://docs.microsoft.com/virtualization/hyper-v-on-windows/reference/hyper-v-requirements) for Hyper-V.
63-
* If it's a virtual machine, enable [nested virtualization](https://docs.microsoft.com/virtualization/hyper-v-on-windows/user-guide/nested-virtualization) and allocate at least 2GB memory.
59+
* If it's a Windows computer, check that it meets the [system requirements](https://docs.microsoft.com/virtualization/hyper-v-on-windows/reference/hyper-v-requirements) for Hyper-V.
60+
* If it's a virtual machine, enable [nested virtualization](https://docs.microsoft.com/virtualization/hyper-v-on-windows/user-guide/nested-virtualization) and allocate at least 2 GB memory.
6461
* Install [Docker for Windows](https://docs.docker.com/docker-for-windows/install/) and make sure it's running.
6562

6663
> [!TIP]
@@ -80,7 +77,7 @@ The following code creates a free **F1** hub in the resource group **IoTEdgeReso
8077
az iot hub create --resource-group IoTEdgeResources --name {hub_name} --sku F1
8178
```
8279

83-
If you get an error because there's already one free hub in your subscription, change the SKU to **S1**.
80+
If you get an error because there's already one free hub in your subscription, change the SKU to **S1**. If you get an error that the IoT Hub name isn't available, it means that someone else already has a hub with that name. Try a new name.
8481

8582
## Register an IoT Edge device
8683

@@ -89,21 +86,23 @@ Register an IoT Edge device with your newly created IoT Hub.
8986

9087
Create a device identity for your simulated device so that it can communicate with your IoT hub. The device identity lives in the cloud, and you use a unique device connection string to associate a physical device to a device identity.
9188

92-
Since IoT Edge devices behave and can be managed differently than typical IoT devices, you declare this to be an IoT Edge device from the beginning.
89+
Since IoT Edge devices behave and can be managed differently than typical IoT devices, declare this identity to be for an IoT Edge device with the `--edge-enabled` flag.
9390

9491
1. In the Azure cloud shell, enter the following command to create a device named **myEdgeDevice** in your hub.
9592

9693
```azurecli-interactive
9794
az iot hub device-identity create --device-id myEdgeDevice --hub-name {hub_name} --edge-enabled
9895
```
9996

100-
1. Retrieve the connection string for your device, which links your physical device with its identity in IoT Hub.
97+
If you get an error about iothubowner policy keys, make sure that your cloud shell is running the latest version of the azure-cli-iot-ext extension.
98+
99+
2. Retrieve the connection string for your device, which links your physical device with its identity in IoT Hub.
101100

102101
```azurecli-interactive
103102
az iot hub device-identity show-connection-string --device-id myEdgeDevice --hub-name {hub_name}
104103
```
105104

106-
1. Copy the connection string and save it. You'll use this value to configure the IoT Edge runtime in the next section.
105+
3. Copy the connection string and save it. You'll use this value to configure the IoT Edge runtime in the next section.
107106

108107
## Install and start the IoT Edge runtime
109108

@@ -116,7 +115,9 @@ During the runtime installation, you're asked for a device connection string. Us
116115

117116
The instructions in this section configure the IoT Edge runtime with Linux containers. If you want to use Windows containers, see [Install Azure IoT Edge runtime on Windows to use with Windows containers](how-to-install-iot-edge-windows-with-windows.md).
118117

119-
Complete the following steps in the Windows machine or VM that you prepared to function as an IoT Edge device.
118+
### Connect to your IoT Edge device
119+
120+
The steps in this section all take place on your IoT Edge device. If you're using your own machine as the IoT Edge device, you can skip this part. If you're using a virtual machine or secondary hardware, you want to connect to that machine now.
120121

121122
### Download and install the IoT Edge service
122123

@@ -193,15 +194,15 @@ iotedge logs tempSensor -f
193194

194195
![View the data from your module](./media/quickstart/iotedge-logs.png)
195196

196-
You can also view the messages that are received by your IoT hub by using the [Azure IoT Toolkit extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit).
197+
You can also watch the messages arrive at your IoT hub by using the [Azure IoT Toolkit extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit).
197198

198199
## Clean up resources
199200

200201
If you want to continue on to the IoT Edge tutorials, you can use the device that you registered and set up in this quickstart. Otherwise, you can delete the Azure resources that you created and remove the IoT Edge runtime from your device.
201202

202203
### Delete Azure resources
203204

204-
If you created your virtual machine and IoT hub in a new resource group, you can delete that group and all the associated resources. If there's anything in that resource group that you want to keep, then just delete the individual resources that you want to clean up.
205+
If you created your virtual machine and IoT hub in a new resource group, you can delete that group and all the associated resources. Double check the contents of the resource group to make sure that there's nothing you want to keep. If you don't want to delete the whole group, you can delete individual resources instead.
205206

206207
Remove the **IoTEdgeResources** group.
207208

includes/iot-edge-deploy-module.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,34 @@
55
author: kgremban
66
ms.service: iot-edge
77
ms.topic: include
8-
ms.date: 08/14/2018
8+
ms.date: 10/14/2018
99
ms.author: kgremban
1010
ms.custom: include file
1111
---
1212

1313
One of the key capabilities of Azure IoT Edge is being able to deploy modules to your IoT Edge devices from the cloud. An IoT Edge module is an executable package implemented as a container. In this section, you deploy a module that generates telemetry for your simulated device.
1414

1515
1. In the Azure portal, navigate to your IoT hub.
16-
1. Go to **IoT Edge** under **Automatic Device Management** and select your IoT Edge device.
17-
1. Select **Set Modules**.
18-
1. In the **Deployment Modules** section of the **Add Modules** step, click **Add** then select **IoT Edge Module**.
19-
1. In the **Name** field, enter `tempSensor`.
20-
1. In the **Image URI** field, enter `mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0`.
21-
1. Leave the other settings unchanged, and select **Save**.
16+
17+
2. Go to **IoT Edge** under **Automatic Device Management** and select your IoT Edge device.
18+
19+
3. Select **Set Modules**. A three-step wizard opens in the portal, which guides you through adding modules, specifying routes, and reviewing the deployment.
20+
21+
4. In the **Add Modules** step of the wizard, find the **Deployment Modules** section. Click **Add** then select **IoT Edge Module**.
22+
23+
![Add a new IoT Edge module](./media/iot-edge-deploy-module/add-module.png)
24+
25+
5. In the **Name** field, enter `tempSensor`.
26+
27+
6. In the **Image URI** field, enter `mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0`.
28+
29+
7. Leave the other settings unchanged, and select **Save**.
2230

2331
![Save IoT Edge module after entering name and image URI](./media/iot-edge-deploy-module/name-image.png)
2432

25-
1. Back in the **Add Modules** step, select **Next**.
26-
1. In the **Specify routes** step, you should have a default route that sends all messages from all modules to IoT Hub. If not, add the following code then select **Next**.
33+
8. Back in first step of the wizard, select **Next**.
34+
35+
9. In the **Specify Routes** step of the wizard, you should have a default route that sends all messages from all modules to IoT Hub. If not, add the following code then select **Next**.
2736

2837
```json
2938
{
@@ -33,7 +42,10 @@ One of the key capabilities of Azure IoT Edge is being able to deploy modules to
3342
}
3443
```
3544

36-
1. In the **Review Deployment** step, select **Submit**.
37-
1. Return to the device details page and select **Refresh**. In addition to the edgeAgent module that was created when you first started the service, you should see another runtime module called **edgeHub** and the **tempSensor** module listed.
45+
10. In the **Review Deployment** step of the wizard, select **Submit**.
46+
47+
11. Return to the device details page and select **Refresh**. In addition to the edgeAgent module that was created when you first started the service, you should see another runtime module called **edgeHub** and the **tempSensor** module listed.
48+
49+
It may take a few minutes for the new modules to show up. The IoT Edge device has to retrieve its new deployment information from the cloud, start the containers, and then report its new status back to IoT Hub.
3850

3951
![View tempSensor in list of deployed modules](./media/iot-edge-deploy-module/deployed-modules.png)
39.7 KB
Loading

0 commit comments

Comments
 (0)