|
1 |
| -The steps below summarize the process of setting up and configuring IoT Edge, an IoT Hub, and the IoT device to deploy our module to it. |
| 1 | +The steps below summarize how to set up and configure IoT Edge, an IoT Hub, and an IoT device to deploy a module to it. |
2 | 2 |
|
3 |
| -1. Define the resource group or use an existing one. |
| 3 | +1. Define a resource group or use an existing one. |
4 | 4 | 1. Create an Azure IoT Edge device.
|
5 | 5 | 1. Create an Azure IoT Hub or use an existing one.
|
6 | 6 | 1. Register the IoT Edge device to the IoT Hub.
|
7 | 7 |
|
8 |
| -Although you could execute the Azure IoT Edge runtime on your own physical Linux device, we deploy an Ubuntu-based virtual machine to Azure to act as the IoT Edge device. |
| 8 | +Although you can run the Azure IoT Edge runtime on a physical Linux device, this article uses an Ubuntu-based virtual machine in Azure as the IoT Edge device. |
9 | 9 |
|
10 |
| -As a consequence, you need an active Azure subscription to follow the exercises. Either create a free account that comes with a 30 days trial or use your pay-as-you-go subscription. |
| 10 | +You need an active Azure subscription to follow the exercises. Create a free account with a 30-day trial or use a pay-as-you-go subscription. |
11 | 11 |
|
12 | 12 | ## What is a resource group?
|
13 | 13 |
|
14 |
| -A resource group is a container to logically group Azure resources. These resources can be, for example, storage accounts, virtual networks, and virtual machines (VMs) you want to treat as a single entity. The resource group stores metadata about the resources. Therefore, when you specify a location for the resource group, you're selecting where that metadata is stored. For compliance reasons, you may need to keep your data in a particular region. |
| 14 | +A resource group is a container to logically group Azure resources. These resources can include storage accounts, virtual networks, and virtual machines (VMs) that you treat as a single entity. The resource group stores metadata about the resources. When you specify a location for the resource group, you select where that metadata is stored. For compliance reasons, you might need to keep your data in a particular region. |
15 | 15 |
|
16 | 16 | ## Create an Azure IoT Edge device
|
17 | 17 |
|
18 |
| -IoT Edge devices have the IoT Edge runtime installed on them. The Azure "IoT Edge on Ubuntu" virtual machine is an IoT device ready for use. |
| 18 | +IoT Edge devices have the IoT Edge runtime installed. The Azure "IoT Edge on Ubuntu" virtual machine is an IoT device that's ready for use. |
19 | 19 |
|
20 |
| -The **IoT Edge runtime** is a collection of programs that turn a device into an IoT Edge device. Collectively, the IoT Edge runtime components enable IoT Edge devices to receive code to run at the edge and communicate the results with an IoT Hub. |
| 20 | +The **IoT Edge runtime** is a collection of programs that turn a device into an IoT Edge device. These components let IoT Edge devices receive code to run at the edge and communicate results with an IoT Hub. |
21 | 21 |
|
22 |
| -* **IoT Edge module runtime:** starts each time an IoT Edge device boots and bootstraps the device by running the IoT Edge agent. |
23 |
| -* **IoT Edge agent:** facilitates deployment and monitoring of modules on the IoT Edge device, including the IoT Edge hub. |
24 |
| -* **IoT Edge hub:** manages communications between modules on the IoT Edge device and between the device and IoT Hub. |
| 22 | +* **IoT Edge module runtime:** starts whenever an IoT Edge device boots and initializes the device by running the IoT Edge agent. |
| 23 | +* **IoT Edge agent:** manages deployment and monitoring of modules on the IoT Edge device, including the IoT Edge hub. |
| 24 | +* **IoT Edge hub:** handles communications between modules on the IoT Edge device and between the device and IoT Hub. |
25 | 25 |
|
26 | 26 | ## Create an IoT Hub
|
27 | 27 |
|
28 |
| -Azure IoT Hub enables the communication between the virtual device and the cloud. To create a new Azure IoT Hub with the Azure CLI, you'll use the `az iot hub create` command set. |
| 28 | +Azure IoT Hub lets the virtual device communicate with the cloud. To create a new Azure IoT Hub with the Azure CLI, use the `az iot hub create` command set. |
29 | 29 |
|
30 | 30 | > [!NOTE]
|
31 |
| -> Only one **free** IoT hub instance is allowed in a subscription. The free level of IoT Hub works for this exercise. If you've used IoT Hub in the past and already have a free hub created, you can use that IoT hub. |
| 31 | +> Only one **free** IoT hub instance is allowed in a subscription. The free level of IoT Hub works for this exercise. If you've used IoT Hub in the past and already created a free hub, use that IoT hub. |
32 | 32 |
|
33 |
| -## Register the IoT Edge device to IoT Hub |
| 33 | +## Register the IoT Edge device with IoT Hub |
34 | 34 |
|
35 |
| -1. Use the `az iot hub device-identity create` command to create a device identity for your Edge device on Azure. The device identity enables you to communicate with your IoT Hub. |
36 |
| -1. Retrieve the connection string with the `az iot hub device-identity connection-string show` command. Every device identity uses a unique device connection string to associate it with a physical device. |
37 |
| -1. Set up the connection string on the IoT Edge device so it can connect to the IoT Hub. You can do this remotely without connection to the virtual machine by running a script on the device. Use the `az vm run-command` to invoke a script on the edge device and pass the connection string as a parameter. |
| 35 | +1. Run the `az iot hub device-identity create` command to create a device identity for your Edge device on Azure. The device identity lets the device communicate with your IoT Hub. |
| 36 | +1. Run the `az iot hub device-identity connection-string show` command to retrieve the connection string. Each device identity uses a unique connection string to associate it with a physical device. |
| 37 | +1. Set up the connection string on the IoT Edge device so it can connect to the IoT Hub. Do this remotely without connecting to the virtual machine by running a script on the device. Run the `az vm run-command` command to invoke a script on the edge device and pass the connection string as a parameter. |
38 | 38 |
|
39 |
| -## Ensure the IoT Edge device is ready to run pre-built modules |
| 39 | +## Ensure the IoT Edge device is ready to run prebuilt modules |
40 | 40 |
|
41 | 41 | Once the edge device is configured, check if it is ready to run a pre-built module.
|
42 | 42 |
|
43 |
| -* Log on to the edge device using the public IP address for the device and run the `ssh command`. |
44 |
| -* With `iotedge` commands, you can check if the IoT Edge security daemon is running as a system service. |
| 43 | +* Sign in to the edge device using the public IP address for the device and run the `ssh command`. |
| 44 | +* Use `iotedge` commands to check if the IoT Edge security daemon is running as a system service. |
45 | 45 |
|
46 | 46 | > [!NOTE]
|
47 |
| -> You need elevated privileges to run `iotedge` commands. |
| 47 | +> Elevated privileges are required to run `iotedge` commands. |
0 commit comments