Skip to content

Commit 7c5f1c4

Browse files
committed
some cx
1 parent e57d298 commit 7c5f1c4

File tree

10 files changed

+34
-31
lines changed

10 files changed

+34
-31
lines changed

articles/iot-hub-device-update/device-update-ubuntu-agent.md

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ In this tutorial, you:
3535

3636
## Prepare the VM and device
3737

38-
For convenience, this tutorial uses a [cloud-init](/azure/virtual-machines/linux/using-cloud-init)-based [Azure Resource Manager (ARM) template](/azure/azure-resource-manager/templates/overview) to quickly set up an Ubuntu 22.04 LTS virtual machine (VM). The template installs both the IoT Edge runtime and the Device Update package agent, and then automatically configures the device with provisioning information by using the IoT Edge device connection string you supply. Using the ARM template also avoids the need to start a secure shell (SSH) session to complete setup.
38+
For convenience, this tutorial uses a [cloud-init](/azure/virtual-machines/linux/using-cloud-init) based [Azure Resource Manager (ARM) template](/azure/azure-resource-manager/templates/overview) to quickly set up an Ubuntu 22.04 LTS virtual machine (VM). The template installs both the IoT Edge runtime and the Device Update package agent and automatically configures the device with provisioning information by using the IoT Edge device connection string you supply. Using the ARM template also avoids the need to start a secure shell (SSH) session to complete setup.
3939

4040
1. To run the template, select the following **Deploy to Azure** button:
4141

@@ -58,9 +58,9 @@ For convenience, this tutorial uses a [cloud-init](/azure/virtual-machines/linux
5858

5959
1. Verify that the deployment completes successfully, and allow a few minutes after deployment completes for the post-installation and configuration to finish installing IoT Edge and the device package update agent.
6060

61-
1. You should see a VM resource in the selected resource group. Note the machine name, which is in the format `vm-0000000000000`. Select the VM name to go to its **Overview** page and note its **DNS name**, which is in the format `<dnsLabelPrefix>`.`<location>.cloudapp.azure.com`.
61+
1. You should see a VM resource in the selected resource group. Note the machine name, which is in the format `vm-0000000000000`. Select the VM name, and on the VM **Overview** page, note the **DNS name**, which is in the format `<dnsLabelPrefix>`.`<location>.cloudapp.azure.com`.
6262

63-
:::image type="content" source="../iot-edge/media/how-to-install-iot-edge-ubuntuvm/iotedge-vm-dns-name.png" alt-text="Screenshot showing the DNS name of the IoT Edge VM." lightbox="../iot-edge/media/how-to-install-iot-edge-ubuntuvm/iotedge-vm-dns-name.png":::
63+
:::image type="content" source="../iot-edge/media/how-to-install-iot-edge-ubuntuvm/iotedge-vm-dns-name.png" alt-text="Screenshot showing the DNS name of the IoT Edge VM." lightbox="../iot-edge/media/how-to-install-iot-edge-ubuntuvm/iotedge-vm-dns-name.png":::
6464

6565
> [!TIP]
6666
> To SSH into this VM after setup, use the associated **DNS name** with the command `ssh <admin username>@<DNS name>`.
@@ -74,14 +74,6 @@ For convenience, this tutorial uses a [cloud-init](/azure/virtual-machines/linux
7474
>- [Delivery optimization client license](https://github.com/microsoft/do-client/blob/main/LICENSE)
7575
>
7676
>Read the license terms before using the agent. Agent installation and use constitutes acceptance of these terms. If you don't agree with the license terms, don't use the Device Update agent.
77-
78-
>[!NOTE]
79-
>If you used the [simulator agent](device-update-simulator.md) on this device previously, run the following command to invoke the APT handler and deploy over-the-air package updates for this tutorial.
80-
>
81-
>```sh
82-
>sudo /usr/bin/AducIotAgent --register-content-handler /var/lib/adu/extensions/sources/libmicrosoft_apt_1.so --update-type 'microsoft/apt:1'
83-
>```
84-
8577
1. To install the Device Update agent on the VM, run the following command.
8678

8779
```bash
@@ -94,23 +86,31 @@ For convenience, this tutorial uses a [cloud-init](/azure/virtual-machines/linux
9486
sudo nano /etc/adu/du-config.json
9587
```
9688

97-
1. In the file, set all values that have the `Place value here` tag. Set your `connectionType` as `'AIS'` and `connectionData` as empty string. For more information, see [Configuring a Device Update agent](device-update-configuration-file.md#example-du-configjson-file-contents).
89+
1. In the file, replace all `<placeholder>` values with your own configuration. Set your `connectionType` as `"AIS"` and `connectionData` as an empty string. For an example file, see [Example du-config.json file contents](device-update-configuration-file.md#example-du-configjson-file-contents).
9890

9991
1. Restart the Device Update agent by running the following command.
10092

10193
```bash
10294
sudo systemctl restart deviceupdate-agent
10395
```
10496

97+
>[!NOTE]
98+
>If you used the [simulator agent](device-update-simulator.md) on this device previously, run the following command to invoke the APT handler and deploy over-the-air package updates for this tutorial.
99+
>
100+
>```sh
101+
>sudo /usr/bin/AducIotAgent --register-content-handler /var/lib/adu/extensions/sources/libmicrosoft_apt_1.so --update-type 'microsoft/apt:1'
102+
>```
103+
104+
105105
## Add a group tag to your device
106106
107107
Device Update uses groups to organize devices. Device Update automatically sorts devices into groups based on their assigned tags and compatibility properties. Each device can belong to only one group, but groups can have multiple subgroups to sort different device classes. For more information about tags and groups, see [Manage device groups](create-update-group.md).
108108
109109
1. On the [Azure portal](https://portal.azure.com) IoT hub page for your Device Update instance, select **Device management** > **Devices** from the left navigation.
110-
1. Go to the device twin or module twin for your device.
111-
1. In the device twin or the **Module Identity Twin** of the Device Update agent module, delete any existing Device Update tag values by setting them to null, and then add the following new Device Update group tag.
110+
1. Go to the **Device twin** or **Module Identity** twin for your device.
111+
1. In the device twin or Device Update agent module **Module Identity Twin** file, delete any existing Device Update tag values by setting them to `null`, and then add the following new Device Update group tag.
112112
113-
If you're using device identity with the Device Update agent, make these changes on the device twin. If you're using a Module Identity with the Device Update agent, add the tag in the **Module Identity Twin**.
113+
If you're using device identity with the Device Update agent, make these changes on the device twin. If you're using a Module Identity with the Device Update agent module, add the tag in the **Module Identity Twin**.
114114
115115
```json
116116
"tags": {
@@ -125,44 +125,48 @@ Device Update uses groups to organize devices. Device Update automatically sorts
125125
126126
## Import the update
127127
128-
The *Tutorial_IoTEdge_PackageUpdate.zip* file has the required files for the tutorial. Download the file from the **Assets** section of the latest release on the [GitHub Device Update Releases page](https://github.com/Azure/iot-hub-device-update/releases), and unzip it. The extracted *Tutorial_IoTEdge_PackageUpdate* folder contains the *sample-defender-iot-apt-manifest.json* sample APT manifest and its corresponding *sample-defender-iot--importManifest.json* import manifest.
128+
The *Tutorial_IoTEdge_PackageUpdate.zip* file has the required files for the tutorial. Download the file from the **Assets** section of the latest release on the [GitHub Device Update Releases page](https://github.com/Azure/iot-hub-device-update/releases), and unzip it.
129+
130+
The extracted *Tutorial_IoTEdge_PackageUpdate* folder contains the *sample-defender-iot-apt-manifest.json* sample APT manifest and its corresponding *sample-defender-iot--importManifest.json* import manifest.
129131
130132
1. On the [Azure portal](https://portal.azure.com) IoT hub page for your Device Update instance, select **Device Management** > **Updates** from the left navigation.
131133
1. On the **Updates** page, select **Import a new update**.
132134
1. On the **Import update** page, select **Select from storage container**.
133-
1. On the **Storage accounts** page, select an existing storage account or create a new account by using **+ Storage account**.
134-
1. On the **Containers** page, select an existing container or create a new container by using **+ Container** to use for staging the update files for import.
135+
1. On the **Storage accounts** page, select an existing storage account or create a new account by selecting **+ Storage account**.
136+
1. On the **Containers** page, select an existing container to use for staging the update files for import, or create a new container by selecting **+ Container** and then select it.
135137
136138
:::image type="content" source="media/import-update/storage-account-ppr.png" alt-text="Screenshot that shows Storage accounts and Containers.":::
137139
138140
> [!TIP]
139-
> Using a new container each time you import an update prevents accidentally importing files from previous updates. If you don't use a new container, be sure to delete any files from the existing container.
141+
> Creating a new container each time you import an update prevents accidentally importing files from previous updates. If you don't use a new container, be sure to delete any files from the existing container.
140142
141143
1. On the container page, select **Upload**, drag and drop or browse to and select the update files you downloaded, and then select **Upload**. After they upload, the files appear on the container page.
142144
143145
1. Review and select the files to import, and then select **Select**.
144146
145-
:::image type="content" source="media/import-update/import-select-ppr.png" alt-text="Screenshot that shows selecting uploaded files.":::
147+
:::image type="content" source="media/import-update/import-select-package.png" alt-text="Screenshot that shows selecting uploaded files.":::
146148
147149
1. On the **Import update** screen, select **Import update**.
148150
149-
:::image type="content" source="media/import-update/import-start-2-ppr.png" alt-text="Screenshot that shows Import update.":::
151+
:::image type="content" source="media/import-update/import-start-package.png" alt-text="Screenshot that shows Import update.":::
150152
151153
The import process begins, and the screen switches to the **Updates** screen. After the import succeeds, it appears on the **Updates** tab. For more information about the import process, see [Import an update to Device Update](import-update.md).
152154
153-
:::image type="content" source="media/import-update/update-ready-ppr.png" alt-text="Screenshot that shows job status.":::
155+
:::image type="content" source="media/import-update/update-ready-package.png" alt-text="Screenshot that shows job status.":::
154156
155157
## Deploy the update
156158
157-
You can use the group tag you applied to your device to deploy the update to the device group. Select the **Groups and Deployments** tab at the top of the **Updates** page and view the list of groups and the update compliance chart. The update compliance chart shows the count of devices in various states of compliance: **On latest update**, **New updates available**, and **Updates in progress**. For more information, see [Device Update compliance](device-update-compliance.md).
159+
You can use the group tag you applied to your device to deploy the update to the device group. To view the list of groups and the update compliance chart, select the **Groups and Deployments** tab on the **Updates** page.
158160
159-
You should see the device group that contains the device you set up in this tutorial, along with the available updates for the devices in the group. If there are devices that don't meet the device class requirements of the group, they appear in a corresponding invalid group.
161+
The update compliance chart shows the count of devices in various states of compliance: **On latest update**, **New updates available**, and **Updates in progress**. For more information, see [Device Update compliance](device-update-compliance.md).
160162
161-
:::image type="content" source="media/create-update-group/updated-view.png" alt-text="Screenshot that shows the update compliance view." lightbox="media/create-update-group/updated-view.png":::
163+
Under **Group name**, you should see the device group that contains the device you set up in this tutorial, along with the available updates for the devices in the group. If there are devices that don't meet the device class requirements of the group, they appear in a corresponding invalid group.
162164
163-
To deploy the best available update to the new user-defined group from this view, select **Deploy** next to the group.
165+
To deploy the best available update to your user-defined group from this view, select **Deploy** next to the group.
164166
165-
To initiate the deployment:
167+
:::image type="content" source="media/create-update-group/updated-view.png" alt-text="Screenshot that shows the update compliance view." lightbox="media/create-update-group/updated-view.png":::
168+
169+
### Initiate the deployment:
166170
167171
1. Select the **Current deployment** tab on the **Group details** page, and then select **Deploy** next to the desired update in the **Available updates** section. The best available update for the group is denoted with a **Best** highlight.
168172
@@ -175,18 +179,17 @@ To initiate the deployment:
175179
> [!TIP]
176180
> By default, the **Start** date and time is 24 hours from your current time. Be sure to select a different date and time if you want the deployment to begin sooner.
177181
178-
1. Under **Deployment details**, **Status** turns to **Active**. Under **Available updates**, the selected update is marked with **(deploying)**.
182+
1. On the **Group details** page under **Deployment details**, **Status** turns to **Active**. Under **Available updates**, the selected update is marked with **(deploying)**.
179183
180184
:::image type="content" source="media/deploy-update/deployment-active.png" alt-text="Screenshot that shows the deployment as Active." lightbox="media/deploy-update/deployment-active.png":::
181185
182-
1. On the **Updates** page, view the compliance chart to see that the update is now in progress. After your device successfully updates, your compliance chart and deployment details update to reflect that status.
186+
1. On the the **Groups and Deployments** tab of the **Updates** page, view the compliance chart to see that the update is now in progress. After your device successfully updates, the compliance chart and deployment details update to reflect that status.
183187
184188
:::image type="content" source="media/deploy-update/update-succeeded.png" alt-text="Screenshot that shows the update succeeded." lightbox="media/deploy-update/update-succeeded.png":::
185189
190+
<a name="monitor-the-update-deployment"></a>
186191
## View update deployment history
187192
188-
To view deployment history:
189-
190193
1. Select the **Deployment history** tab at the top of the **Group details** page, and select the **details** link next to the deployment you created.
191194
192195
:::image type="content" source="media/deploy-update/deployments-history.png" alt-text="Screenshot that shows Deployment history." lightbox="media/deploy-update/deployments-history.png":::
5.84 KB
Loading
-38.2 KB
Loading
-3.73 KB
Loading
11.3 KB
Loading
10.6 KB
Loading
598 Bytes
Loading
33 KB
Loading
23.2 KB
Loading
45.8 KB
Loading

0 commit comments

Comments
 (0)