Skip to content

Commit 2e044a2

Browse files
committed
Freshness review
1 parent 9eba9a3 commit 2e044a2

File tree

4 files changed

+53
-53
lines changed

4 files changed

+53
-53
lines changed
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
### YamlMime:ModuleUnit
2-
uid: learn.oxford.deploy-prebuilt-module-edge-device.4-exercise-setup-communication
3-
title: Exercise - Set up communication between IoT Hub and IoT Edge
4-
metadata:
5-
title: Exercise - Set up communication between IoT Hub and IoT Edge
6-
description: In this unit, there's an exercise and it guides the learner how to set up communication between IoT Hub and IoT Edge
7-
ms.date: 11/27/2023
8-
author: PatAltimore
9-
ms.author: leestott
10-
ms.topic: unit
11-
ms.custom: team=nextgen, devx-track-azurecli
12-
durationInMinutes: 15 # dummy number at present
13-
content: |
14-
[!include[](includes/4-exercise-setup-communication.md)]
15-
1+
### YamlMime:ModuleUnit
2+
uid: learn.oxford.deploy-prebuilt-module-edge-device.4-exercise-setup-communication
3+
title: Exercise - Set up communication between IoT Hub and IoT Edge
4+
metadata:
5+
title: Exercise - Set up communication between IoT Hub and IoT Edge
6+
description: In this unit, there's an exercise and it guides the learner how to set up communication between IoT Hub and IoT Edge
7+
ms.date: 05/09/2025
8+
author: PatAltimore
9+
ms.author: leestott
10+
ms.topic: unit
11+
ms.custom: team=nextgen, devx-track-azurecli
12+
durationInMinutes: 15
13+
content: |
14+
[!include[](includes/4-exercise-setup-communication.md)]
15+

learn-pr/student-evangelism/deploy-prebuilt-module-edge-device/includes/3-how-setup-communication.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.
1+
The following steps summarize how to set up and configure IoT Edge, an IoT Hub, and an IoT device to deploy a module to it.
22

33
1. Define a resource group or use an existing one.
44
1. Create an Azure IoT Edge device.
@@ -38,7 +38,7 @@ Azure IoT Hub lets the virtual device communicate with the cloud. To create a ne
3838

3939
## Ensure the IoT Edge device is ready to run prebuilt modules
4040

41-
Once the edge device is configured, check if it is ready to run a pre-built module.
41+
Once the edge device is configured, check if it's ready to run a prebuilt module.
4242

4343
* Sign in to the edge device using the public IP address for the device and run the `ssh command`.
4444
* Use `iotedge` commands to check if the IoT Edge security daemon is running as a system service.

learn-pr/student-evangelism/deploy-prebuilt-module-edge-device/includes/4-exercise-setup-communication.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
1-
This exercise uses Azure CLI in Azure Cloud Shell to issue the required commands.
1+
This exercise uses the Azure CLI in Azure Cloud Shell to run the required commands.
22

3-
[![An illustration is showing how to connect azure Cloud Shell.](../media/cloud-shell.png)](../media/cloud-shell.png)
3+
[![Screenshot showing how to connect to Azure Cloud Shell.](../media/cloud-shell.png)](../media/cloud-shell.png)
44

55
## Install Azure IoT extension
66

7-
You need to add the Azure IoT extension to the Cloud Shell instance Azure CLI.
7+
Add the Azure IoT extension to the Cloud Shell instance Azure CLI.
88

99
```
1010
az extension add --name azure-iot
1111
```
1212

1313
> [!NOTE]
14-
> This article uses the newest version of the Azure IoT extension, called `azure-iot`. The legacy version is called `azure-cli-iot-ext`.You should only have one version installed at a time. To see what extensions you have installed, use `az extension list`.
14+
> This article uses the newest version of the Azure IoT extension, called `azure-iot`. The legacy version is called `azure-cli-iot-ext`. You should only have one version installed at a time. To check which extensions are installed, run `az extension list`.
1515
>
16-
> Use `az extension remove --name azure-cli-iot-ext` to remove the legacy version of the extension.
16+
> Run `az extension remove --name azure-cli-iot-ext` to remove the legacy version of the extension.
1717
>
18-
> Use `az extension add --name azure-iot` to add the new version of the extension.
18+
> Run `az extension add --name azure-iot` to add the new version of the extension.
1919
2020
## Create a resource group
2121

22-
Create a resource group called "IoTEdgeResources" using the following command:
22+
Create a resource group named "IoTEdgeResources" by running the following command:
2323

2424
```azurecli
2525
az group create --name IoTEdgeResources --location eastus2
2626
```
2727

28-
The resulting output should be similar to this:
28+
The output is similar to the following:
2929

30-
[![An illustration showing the creation of a resource group.](../media/resource-group.png)](../media/resource-group.png)
30+
[![Screenshot of the creation of a resource group.](../media/resource-group.png)](../media/resource-group.png)
3131

3232
## Create an IoT hub
3333

34-
The following code creates a free **F1 tier** hub in the resource group "IoTEdgeResources". Replace `{hub_name}` with a unique name for your IoT Hub.
34+
The following code creates a free **F1 tier** hub in the resource group "IoTEdgeResources." Replace `{hub_name}` with a unique name for your IoT hub.
3535

3636
```azurecli
3737
az iot hub create --resource-group IoTEdgeResources --name {hub_name} --sku F1 --partition-count 2
3838
```
3939

4040
> [!NOTE]
41-
> If you get an error because there's already one free hub in your subscription, change the SKU to **S1**. Each subscription can only have one free IoT hub. 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.
41+
> If you get an error because there's already one free hub in your subscription, change the SKU to **S1**. Each subscription can only have one free IoT hub. If you get an error that the IoT hub name isn't available, it means someone else already has a hub with that name.
4242
4343
## Register an IoT Edge device
4444

45-
In the Azure Cloud Shell, use the following instructions to create a device named "myEdgeDevice" in your hub.
45+
In Azure Cloud Shell, follow these steps to create a device named "myEdgeDevice" in your hub.
4646

4747
### Create a device identity
4848

49-
Since IoT Edge devices behave and can be managed differently compared to typical IoT devices, declare this identity to be for an IoT Edge device with the `--edge-enabled` flag.
49+
IoT Edge devices behave and are managed differently than typical IoT devices. Use the `--edge-enabled` flag to declare this identity as an IoT Edge device.
5050

5151
> [!IMPORTANT]
52-
> If you get an error about "iothubowner policy keys", make sure that your Cloud Shell is running the latest version of the `azure-iot` extension.
52+
> If you see an error about "iothubowner policy keys", ensure that your Cloud Shell is running the latest version of the `azure-iot` extension.
5353
5454
The following command creates the device identity:
5555

@@ -67,15 +67,15 @@ To retrieve the connection string for your device, which links your physical dev
6767
az iot hub device-identity connection-string show --device-id myEdgeDevice --hub-name {hub_name} --output table
6868
```
6969

70-
The resulting output should be similar to this:
70+
The output is similar to the following:
7171

7272
`HostName={YourIoTHubName}.azure-devices.net;DeviceId=MyNodeDevice;SharedAccessKey={YourSharedAccessKey}`
7373

74-
Copy the value of the `connectionString` key from the JSON output and save it. This value is the **device connection string**. You use this to configure the IoT Edge runtime in the next section.
74+
Copy the value of the `connectionString` key from the JSON output and save it. This value is the **device connection string**, which is used to configure the IoT Edge runtime in the next section.
7575

7676
## Deploy the IoT Edge device
7777

78-
Use the following CLI command to create your IoT Edge device based on the prebuilt [iotedge-vm-deploy](https://github.com/Azure/iotedge-vm-deploy) template. Copy the following command into a text editor, replace the placeholder text with your information, then copy into your bash or Cloud Shell window:
78+
Use this CLI command to create your IoT Edge device based on the prebuilt [iotedge-vm-deploy](https://github.com/Azure/iotedge-vm-deploy) template. Copy the command into a text editor, replace the placeholder text with your information, and then paste it into your bash or Cloud Shell window:
7979

8080
```azurecli
8181
az deployment group create \
@@ -89,48 +89,48 @@ az deployment group create \
8989
--parameters adminPasswordOrKey="<REPLACE_WITH_PASSWORD>"
9090
```
9191

92-
Make sure that your password(**adminPasswordOrKey**) must be at least 12 characters long and have three of four of the following: lowercase characters, uppercase characters, digits, and special characters.
92+
Ensure your password (**adminPasswordOrKey**) is at least 12 characters long and includes three of the following: lowercase characters, uppercase characters, digits, and special characters.
9393

94-
It may take a few minutes to create and start the new virtual machine. Once the deployment is complete, you should receive JSON-formatted output in the CLI that contains the SSH information to connect to the virtual machine. Copy the value of the **public SSH** entry of the **outputs** section:
94+
It might take a few minutes to create and start the new virtual machine. After the deployment is complete, you receive JSON-formatted output in the CLI containing the SSH information to connect to the virtual machine. Copy the value of the **public SSH** entry in the **outputs** section:
9595

96-
[![An illustration is showing the public ssh.](../media/public-ssh.png)](../media/public-ssh.png)
96+
[![Screenshot showing the public SSH.](../media/public-ssh.png)](../media/public-ssh.png)
9797

9898
## View the IoT Edge runtime status
9999

100-
Use the following command to connect to your virtual machine. Replace `azureuser` if you used a different username than the one suggested during the deployment of the VM. Replace `{DNS name}` with your machine's DNS name.
100+
Use this command to connect to your virtual machine. Replace `azureuser` if you used a different username during the VM deployment. Replace `<DNS-name>` with your machine's DNS name.
101101

102102
```bash
103-
ssh {admin username}@{DNS name}
103+
ssh <admin-username>@<DNS-name>
104104
```
105105

106106
## Check if the IoT Edge device is configured
107107

108-
To verify that the IoT Edge security daemon is running as a system service, we use `iotedge` commands.
108+
To verify that the IoT Edge security daemon is running as a system service, use `iotedge` commands.
109109

110110
> [!IMPORTANT]
111-
> You need elevated privileges to run iotedge commands.
111+
> You need elevated privileges to run `iotedge` commands.
112112
113-
Run the following commands to test the status of the IoT Edge device:
113+
Run the following command to check the status of the IoT Edge device:
114114

115115
```bash
116116
sudo systemctl status iotedge
117117
```
118118

119119
The resulting output should be similar to this:
120120

121-
![An illustration is showing status of Azure IoT Edge Deamon.](../media/deamon-status.png)
121+
![Screenshot showing the status of Azure IoT Edge daemon.](../media/deamon-status.png)
122122

123-
![An illustration is showing the list of modules running on the virtual device.](../media/iotedge-module-list.png)
123+
![Screenshot showing the list of modules running on the virtual device.](../media/iotedge-module-list.png)
124124

125125
**Your IoT Edge device is now configured.** It's ready to run cloud-deployed modules.
126126

127-
If you need to troubleshoot the service, retrieve the service logs.
127+
To troubleshoot the service, retrieve the service logs.
128128

129129
```bash
130130
journalctl -u iotedge
131131
```
132132

133-
View all the modules running on your IoT Edge device. Since the service just started for the first time, you should only see the **edgeAgent** module running. The edgeAgent module runs by default and helps to install and start any additional modules that you deploy to your device.
133+
View all the modules running on your IoT Edge device. Since the service just started for the first time, only the **edgeAgent** module is running. The edgeAgent module runs by default and helps to install and start any additional modules that you deploy to your device.
134134

135135
```bash
136136
sudo iotedge list
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
Two steps are required to deploy a pre-built module to an edge device:
1+
To deploy a prebuilt module to an edge device:
22

33
* Choose an IoT Edge module from a container registry
44
* Select the IoT Edge device to receive the module
55

6-
For our scenario, we want to use a module simulating temperature data.
6+
In this scenario, use a module that simulates temperature data.
77

88
* Open the Microsoft Artifact Registry and filter for IoT Edge modules
99
* Search for the module **Simulated Temperature Sensor**
1010
* Choose the IoT Edge device to receive this module
1111

12-
Use the Azure portal to define the stages to deploy the module.
12+
Use the Azure portal to define the stages for deploying the module.
1313

1414
1. **Add modules**: Enter the URI for the **Simulated Temperature Sensor** module.
1515
1. **Specify routes**: Routing specifies how messages are passed between modules and IoT Hub. In this case, we select all messages from all modules to go to IoT Hub.
1616
1. **Review Deployment**: This allows you to preview the deployment manifest JSON file that defines all the modules deployed to your IoT Edge device.
1717

1818
## What is a deployment manifest?
1919

20-
A deployment manifest is a JSON document that describes which modules to deploy, how data flows between the modules and the module twins' desired properties. The deployment manifest tells your device which modules to install and how to configure them to work together. All IoT Edge devices must be configured with a deployment manifest
20+
A deployment manifest is a JSON document that describes which modules to deploy, how data flows between the modules, and the module twins' desired properties. The deployment manifest tells your device which modules to install and how to configure them to work together. All IoT Edge devices must be configured with a deployment manifest.
2121

2222
> [!NOTE]
23-
> When you submit a new deployment to an IoT Edge device, **nothing is pushed to your device**. Instead, the device queries IoT Hub regularly for any new instructions. If the device finds an **updated deployment manifest**, it uses the found information to **pull the module images** from the cloud and starts running the modules locally.
23+
> When you submit a new deployment to an IoT Edge device, **nothing is pushed to your device** Instead, the device regularly queries IoT Hub for any new instructions. If the device finds an **updated deployment manifest**, it uses the information to **pull the module images** from the cloud and starts running the modules locally.
2424
2525
## View generated data
2626

27-
The "Simulated Temperature Sensor" module creates sample data you can use for testing. The module also generates environment data, i.e., data for the machine and the environment around the machine. For example, this sensor might be in a server room, a factory floor, or a wind turbine. The message includes ambient temperature and humidity, machine temperature and pressure, and a timestamp.
27+
The "Simulated Temperature Sensor" module generates sample data for testing. The module also generates environment data, such as data for the machine and its surroundings. For example, this sensor could be in a server room, factory floor, or wind turbine. The message includes ambient temperature, humidity, machine temperature, pressure, and a timestamp.
2828

2929
## Clean up resources
3030

31-
To avoid changes, delete Azure resources as needed, including the device that you created, the resource group. Ensure that the resources deleted won't be needed again.
31+
To prevent unintended changes, delete Azure resources as needed, including the device you created and the resource group. Make sure the resources you delete aren't needed again.

0 commit comments

Comments
 (0)