You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-edge/quickstart-linux.md
+23-14Lines changed: 23 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,11 @@ description: In this quickstart, learn how to deploy prebuilt code remotely to a
4
4
author: kgremban
5
5
manager: philmea
6
6
ms.author: kgremban
7
-
ms.date: 08/14/2018
7
+
ms.date: 10/14/2018
8
8
ms.topic: quickstart
9
9
ms.service: iot-edge
10
10
services: iot-edge
11
11
ms.custom: mvc
12
-
13
-
experimental: true
14
-
experiment_id: 21cb7321-bcff-4b
15
12
---
16
13
17
14
# Quickstart: Deploy your first IoT Edge module to a Linux x64 device
@@ -56,9 +53,11 @@ IoT Edge device:
56
53
* 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:
57
54
58
55
```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
60
57
```
61
58
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
+
62
61
## Create an IoT hub
63
62
64
63
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
73
72
az iot hub create --resource-group IoTEdgeResources --name {hub_name} --sku F1
74
73
```
75
74
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.
77
76
78
77
## Register an IoT Edge device
79
78
@@ -82,21 +81,23 @@ Register an IoT Edge device with your newly created IoT hub.
82
81
83
82
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.
84
83
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.
86
85
87
86
1. In the Azure cloud shell, enter the following command to create a device named **myEdgeDevice** in your hub.
88
87
89
88
```azurecli-interactive
90
89
az iot hub device-identity create --hub-name {hub_name} --device-id myEdgeDevice --edge-enabled
91
90
```
92
91
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.
94
95
95
96
```azurecli-interactive
96
97
az iot hub device-identity show-connection-string --device-id myEdgeDevice --hub-name {hub_name}
97
98
```
98
99
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.
100
101
101
102
## Install and start the IoT Edge runtime
102
103
@@ -107,13 +108,21 @@ The IoT Edge runtime is deployed on all IoT Edge devices. It has three component
107
108
108
109
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.
109
110
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
+
```
111
120
112
121
### Register your device to use the software repository
113
122
114
123
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.
115
124
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).
117
126
118
127
1. On the machine that you're using as an IoT Edge device, install the repository configuration.
119
128
@@ -162,7 +171,7 @@ The security daemon installs as a system service so that the IoT Edge runtime st
162
171
sudo apt-get install iotedge
163
172
```
164
173
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.
166
175
167
176
```bash
168
177
sudo nano /etc/iotedge/config.yaml
@@ -240,15 +249,15 @@ View the messages being sent from the tempSensor module:
240
249
241
250
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`.
242
251
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).
244
253
245
254
## Clean up resources
246
255
247
256
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.
248
257
249
258
### Delete Azure resources
250
259
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.
Copy file name to clipboardExpand all lines: articles/iot-edge/quickstart.md
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,11 @@ description: Try out Azure IoT Edge by running analytics on a simulated edge dev
4
4
author: kgremban
5
5
manager: philmea
6
6
ms.author: kgremban
7
-
ms.date: 08/02/2018
7
+
ms.date: 10/02/2018
8
8
ms.topic: quickstart
9
9
ms.service: iot-edge
10
10
services: iot-edge
11
11
ms.custom: mvc
12
-
13
-
#experimental: true
14
-
#experiment_id: 2c2f48c7-50a9-4e
15
12
---
16
13
17
14
# Quickstart: Deploy your first IoT Edge module from the Azure portal to a Windows device - preview
@@ -59,8 +56,8 @@ IoT Edge device:
59
56
* A Windows computer or virtual machine to act as your IoT Edge device. Use a supported Windows version:
60
57
* Windows 10 or newer
61
58
* 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.
64
61
* Install [Docker for Windows](https://docs.docker.com/docker-for-windows/install/) and make sure it's running.
65
62
66
63
> [!TIP]
@@ -80,7 +77,7 @@ The following code creates a free **F1** hub in the resource group **IoTEdgeReso
80
77
az iot hub create --resource-group IoTEdgeResources --name {hub_name} --sku F1
81
78
```
82
79
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.
84
81
85
82
## Register an IoT Edge device
86
83
@@ -89,21 +86,23 @@ Register an IoT Edge device with your newly created IoT Hub.
89
86
90
87
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.
91
88
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.
93
90
94
91
1. In the Azure cloud shell, enter the following command to create a device named **myEdgeDevice** in your hub.
95
92
96
93
```azurecli-interactive
97
94
az iot hub device-identity create --device-id myEdgeDevice --hub-name {hub_name} --edge-enabled
98
95
```
99
96
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.
101
100
102
101
```azurecli-interactive
103
102
az iot hub device-identity show-connection-string --device-id myEdgeDevice --hub-name {hub_name}
104
103
```
105
104
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.
107
106
108
107
## Install and start the IoT Edge runtime
109
108
@@ -116,7 +115,9 @@ During the runtime installation, you're asked for a device connection string. Us
116
115
117
116
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).
118
117
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.
120
121
121
122
### Download and install the IoT Edge service
122
123
@@ -193,15 +194,15 @@ iotedge logs tempSensor -f
193
194
194
195

195
196
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).
197
198
198
199
## Clean up resources
199
200
200
201
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.
201
202
202
203
### Delete Azure resources
203
204
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.
Copy file name to clipboardExpand all lines: includes/iot-edge-deploy-module.md
+23-11Lines changed: 23 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,25 +5,34 @@
5
5
author: kgremban
6
6
ms.service: iot-edge
7
7
ms.topic: include
8
-
ms.date: 08/14/2018
8
+
ms.date: 10/14/2018
9
9
ms.author: kgremban
10
10
ms.custom: include file
11
11
---
12
12
13
13
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.
14
14
15
15
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
+

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**.
22
30
23
31

24
32
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**.
27
36
28
37
```json
29
38
{
@@ -33,7 +42,10 @@ One of the key capabilities of Azure IoT Edge is being able to deploy modules to
33
42
}
34
43
```
35
44
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.
38
50
39
51

0 commit comments