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-hub-device-update/device-update-ubuntu-agent.md
+34-31Lines changed: 34 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ In this tutorial, you:
35
35
36
36
## Prepare the VM and device
37
37
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.
39
39
40
40
1. To run the template, select the following **Deploy to Azure** button:
41
41
@@ -58,9 +58,9 @@ For convenience, this tutorial uses a [cloud-init](/azure/virtual-machines/linux
58
58
59
59
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.
60
60
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`.
62
62
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":::
64
64
65
65
> [!TIP]
66
66
> 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
>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.
1. To install the Device Update agent on the VM, run the following command.
86
78
87
79
```bash
@@ -94,23 +86,31 @@ For convenience, this tutorial uses a [cloud-init](/azure/virtual-machines/linux
94
86
sudo nano /etc/adu/du-config.json
95
87
```
96
88
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).
98
90
99
91
1. Restart the Device Update agent by running the following command.
100
92
101
93
```bash
102
94
sudo systemctl restart deviceupdate-agent
103
95
```
104
96
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.
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).
108
108
109
109
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.
112
112
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**.
114
114
115
115
```json
116
116
"tags": {
@@ -125,44 +125,48 @@ Device Update uses groups to organize devices. Device Update automatically sorts
125
125
126
126
## Import the update
127
127
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.
129
131
130
132
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.
131
133
1. On the **Updates** page, select**Import a new update**.
132
134
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, selectan existing storage account or create a new account by selecting**+ Storage account**.
136
+
1. On the **Containers** page, selectan existing container to use for staging the update files for import, or create a new container by selecting**+ Container**and thenselectit.
135
137
136
138
:::image type="content" source="media/import-update/storage-account-ppr.png" alt-text="Screenshot that shows Storage accounts and Containers.":::
137
139
138
140
> [!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.
140
142
141
143
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.
142
144
143
145
1. Review and select the files to import, and then select **Select**.
144
146
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.":::
146
148
147
149
1. On the **Import update** screen, select **Import update**.
148
150
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.":::
150
152
151
153
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).
152
154
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.":::
154
156
155
157
## Deploy the update
156
158
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.
158
160
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).
160
162
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.
162
164
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.
164
166
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:
166
170
167
171
1. Select the **Current deployment** tab on the **Group details** page, and thenselect**Deploy** next to the desired update in the **Available updates** section. The best available update for the group is denoted with a **Best** highlight.
168
172
@@ -175,18 +179,17 @@ To initiate the deployment:
175
179
> [!TIP]
176
180
> By default, the **Start** date and time is 24 hours from your current time. Be sure to selecta different date and timeif you want the deployment to begin sooner.
177
181
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)**.
179
183
180
184
:::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":::
181
185
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.
183
187
184
188
:::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":::
185
189
190
+
<a name="monitor-the-update-deployment"></a>
186
191
## View update deployment history
187
192
188
-
To view deployment history:
189
-
190
193
1. Select the **Deployment history** tab at the top of the **Group details** page, and selectthe**details** link next to the deployment you created.
191
194
192
195
:::image type="content" source="media/deploy-update/deployments-history.png" alt-text="Screenshot that shows Deployment history." lightbox="media/deploy-update/deployments-history.png":::
0 commit comments