Skip to content

Commit ffdf316

Browse files
authored
Merge pull request #216648 from kgremban/du-releasereview
DU GA release review -- overview, tutorials, toc
2 parents 65a3a62 + 12d6953 commit ffdf316

File tree

6 files changed

+289
-310
lines changed

6 files changed

+289
-310
lines changed

articles/iot-hub-device-update/device-update-howto-proxy-updates.md

Lines changed: 71 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ This tutorial uses an Ubuntu Server 18.04 LTS virtual machine (VM) as an example
2020

2121
1. Register *packages.microsoft.com* in an APT package repository:
2222

23-
```sh
24-
sudo apt-get update
23+
```sh
24+
sudo apt-get update
2525

26-
sudo apt install curl
26+
sudo apt install curl
2727

28-
curl https://packages.microsoft.com/config/ubuntu/18.04/multiarch/prod.list > ~/microsoft-prod.list
28+
curl https://packages.microsoft.com/config/ubuntu/18.04/multiarch/prod.list > ~/microsoft-prod.list
2929

30-
sudo cp ~/microsoft-prod.list /etc/apt/sources.list.d/
30+
sudo cp ~/microsoft-prod.list /etc/apt/sources.list.d/
3131

32-
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > ~/microsoft.gpg
32+
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > ~/microsoft.gpg
3333

34-
sudo cp ~/microsoft.gpg /etc/apt/trusted.gpg.d/
34+
sudo cp ~/microsoft.gpg /etc/apt/trusted.gpg.d/
3535

36-
sudo apt-get update
37-
```
36+
sudo apt-get update
37+
```
3838

3939
2. Install the **deviceupdate-agent** on the IoT device. Download the latest Device Update Debian file from *packages.microsoft.com*:
4040

@@ -44,31 +44,31 @@ This tutorial uses an Ubuntu Server 18.04 LTS virtual machine (VM) as an example
4444

4545
Alternatively, copy the downloaded Debian file to the test VM. If you're using PowerShell on your computer, run the following shell command:
4646

47-
```sh
48-
scp <path to the .deb file> tester@<your vm's ip address>:~
47+
```sh
48+
scp <path to the .deb file> tester@<your vm's ip address>:~
4949
```
5050
5151
Then remote into your VM and run the following shell command in the *home* folder:
5252
5353
```sh
54-
#go to home folder
55-
cd ~
56-
#install latest Device Update agent
57-
sudo apt-get install ./<debian file name from the previous step>
54+
#go to home folder
55+
cd ~
56+
#install latest Device Update agent
57+
sudo apt-get install ./<debian file name from the previous step>
5858
```
59-
59+
6060
3. Go to Azure IoT Hub and copy the primary connection string for your IoT device's Device Update module. Replace any default value for the `connectionData` field with the primary connection string in the *du-config.json* file:
6161

6262
```sh
63-
sudo nano /etc/adu/du-config.json
63+
sudo nano /etc/adu/du-config.json
6464
```
65-
65+
6666
> [!NOTE]
67-
> You can copy the primary connection string for the device instead, but we recommend that you use the string for the Device Update module. For information about setting up the module, see [Device Update Agent provisioning](device-update-agent-provisioning.md).
68-
69-
4. Ensure that */etc/adu/du-diagnostics-config.json* contains the correct settings for log collection. For example:
67+
> You can copy the primary connection string for the device instead, but we recommend that you use the string for the Device Update module. For information about setting up the module, see [Device Update Agent provisioning](device-update-agent-provisioning.md).
7068

71-
```sh
69+
4. Ensure that */etc/adu/du-diagnostics-config.json* contains the correct settings for log collection. For example:
70+
71+
```json
7272
{
7373
"logComponents":[
7474
{
@@ -94,55 +94,56 @@ This tutorial uses an Ubuntu Server 18.04 LTS virtual machine (VM) as an example
9494

9595
For testing and demonstration purposes, we'll create the following mock components on the device:
9696
97-
- Three motors
98-
- Two cameras
99-
- "hostfs"
100-
- "rootfs"
97+
* Three motors
98+
* Two cameras
99+
* "hostfs"
100+
* "rootfs"
101101
102102
> [!IMPORTANT]
103103
> The preceding component configuration is based on the implementation of an example component enumerator extension called *libcontoso-component-enumerator.so*. It also requires this mock component inventory data file: */usr/local/contoso-devices/components-inventory.json*.
104104
105105
1. Copy the [demo](https://github.com/Azure/iot-hub-device-update/tree/main/src/extensions/component-enumerators/examples/contoso-component-enumerator/demo) folder to your home directory on the test VM. Then, run the following command to copy required files to the right locations:
106106
107-
```markup
107+
```sh
108108
`~/demo/tools/reset-demo-components.sh`
109109
```
110110
111-
The `reset-demo-components.sh` command takes the following steps on your behalf:
111+
The `reset-demo-components.sh` command takes the following steps on your behalf:
112112
113-
1. It copies [components-inventory.json](https://github.com/Azure/iot-hub-device-update/tree/main/src/extensions/component-enumerators/examples/contoso-component-enumerator/demo/demo-devices/contoso-devices/components-inventory.json) and adds it to the */usr/local/contoso-devices* folder.
113+
* It copies [components-inventory.json](https://github.com/Azure/iot-hub-device-update/tree/main/src/extensions/component-enumerators/examples/contoso-component-enumerator/demo/demo-devices/contoso-devices/components-inventory.json) and adds it to the */usr/local/contoso-devices* folder.
114114
115-
2. It copies the Contoso component enumerator extension (*libcontoso-component-enumerator.so*) from the [Assets folder](https://github.com/Azure/iot-hub-device-update/releases) and adds it to the */var/lib/adu/extensions/sources* folder.
116-
117-
3. It registers the extension:
115+
* It copies the Contoso component enumerator extension (*libcontoso-component-enumerator.so*) from the [Assets folder](https://github.com/Azure/iot-hub-device-update/releases) and adds it to the */var/lib/adu/extensions/sources* folder.
118116
119-
```sh
120-
sudo /usr/bin/AducIotAgent -E /var/lib/adu/extensions/sources/libcontoso-component-enumerator.so
121-
```
117+
* It registers the extension:
118+
119+
```sh
120+
sudo /usr/bin/AducIotAgent -E /var/lib/adu/extensions/sources/libcontoso-component-enumerator.so
121+
```
122122
123123
2. View and record the current components' software version by using the following command to set up the VM to support proxy updates:
124124

125-
```markup
125+
```sh
126126
~/demo/show-demo-components.sh
127127
```
128128

129129
## Import an example update
130130

131131
If you haven't already done so, create a [Device Update account and instance](create-device-update-account.md), including configuring an IoT hub. Then start the following procedure.
132132
133-
1. From the [latest Device Update release](https://github.com/Azure/iot-hub-device-update/releases), under **Assets**, download the import manifests and images for proxy updates.
133+
1. From the [latest Device Update release](https://github.com/Azure/iot-hub-device-update/releases), under **Assets**, download the import manifests and images for proxy updates.
134134
2. Sign in to the [Azure portal](https://portal.azure.com/) and go to your IoT hub with Device Update. On the left pane, select **Device Management** > **Updates**.
135135
3. Select the **Updates** tab.
136-
4. Select **+ Import New Update**.
137-
5. Select **+ Select from storage container**, and then choose your storage account and container.
136+
4. Select **+ Import New Update**.
137+
5. Select **+ Select from storage container**, and then choose your storage account and container.
138138
139139
:::image type="content" source="media/understand-device-update/one-import.png" alt-text="Screenshot that shows the button for selecting to import from a storage container." lightbox="media/understand-device-update/one-import.png":::
140+
140141
6. Select **Upload** to add the files that you downloaded in step 1.
141-
7. Upload the parent import manifest, child import manifest, and payload files to your container.
142+
7. Upload the parent import manifest, child import manifest, and payload files to your container.
143+
144+
The following example shows sample files uploaded to update cameras connected to a smart vacuum cleaner device. It also includes a pre-installation script to turn off the cameras before the over-the-air update.
142145
143-
The following example shows sample files uploaded to update cameras connected to a smart vacuum cleaner device. It also includes a pre-installation script to turn off the cameras before the over-the-air update.
144-
145-
In the example, the parent import manifest is *contoso.Virtual-Vacuum-virtual-camera.1.4.importmanifest.json*. The child import manifest with details for updating the camera is *Contoso.Virtual-Vacuum.3.3.importmanifest.json*. Note that both manifest file names follow the required format and end with *.importmanifest.json*.
146+
In the example, the parent import manifest is *contoso.Virtual-Vacuum-virtual-camera.1.4.importmanifest.json*. The child import manifest with details for updating the camera is *Contoso.Virtual-Vacuum.3.3.importmanifest.json*. Both manifest file names follow the required format and end with *.importmanifest.json*.
146147
147148
:::image type="content" source="media/understand-device-update/two-containers.png" alt-text="Screenshot that shows sample files uploaded to update cameras connected to a smart vacuum cleaner device." lightbox="media/understand-device-update/two-containers.png":::
148149
@@ -152,54 +153,54 @@ If you haven't already done so, create a [Device Update account and instance](cr
152153
:::image type="content" source="media/understand-device-update/three-confirm-import.png" alt-text="Screenshot that shows listed files and the button for importing an update." lightbox="media/understand-device-update/three-confirm-import.png":::
153154
154155
10. The import process begins, and the screen changes to the **Import History** section. Select **Refresh** to view progress until the import process finishes. Depending on the size of the update, the import might finish in a few minutes or take longer.
156+
155157
11. When the **Status** column indicates that the import has succeeded, select the **Available Updates** tab. You should see your imported update in the list now.
156158
157159
:::image type="content" source="media/understand-device-update/four-update-added.png" alt-text="Screenshot that shows the imported update added to the list." lightbox="media/understand-device-update/four-update-added.png":::
158160
159-
[Learn more](import-update.md) about importing updates.
161+
For more information about the import process, see [Import an update to Device Update](import-update.md).
160162
161-
## Create update group
163+
## View device groups
162164
163-
1. Go to the Groups and Deployments tab at the top of the page.
164-
:::image type="content" source="media/create-update-group/ungrouped-devices.png" alt-text="Screenshot of ungrouped devices." lightbox="media/create-update-group/ungrouped-devices.png":::
165+
Device Update uses groups to organize devices. Device Update automatically sorts devices into groups based on their assigned tags and compatibility properties. Each device belongs to only one group, but groups can have multiple subgroups to sort different device classes.
165166
166-
2. Select the "Add group" button to create a new group.
167-
:::image type="content" source="media/create-update-group/add-group.png" alt-text="Screenshot of device group addition." lightbox="media/create-update-group/add-group.png":::
167+
1. Go to the **Groups and Deployments** tab at the top of the page.
168168
169-
3. Select an IoT Hub tag and Device Class from the list and then select Create group.
170-
:::image type="content" source="media/create-update-group/select-tag.png" alt-text="Screenshot of tag selection." lightbox="media/create-update-group/select-tag.png":::
169+
:::image type="content" source="media/create-update-group/ungrouped-devices.png" alt-text="Screenshot that shows ungrouped devices." lightbox="media/create-update-group/ungrouped-devices.png":::
171170
172-
4. Once the group is created, you will see that the update compliance chart and groups list are updated. Update compliance chart shows the count of devices in various states of compliance: On latest update, New updates available, and Updates in Progress. [Learn about update compliance.](device-update-compliance.md)
173-
:::image type="content" source="media/create-update-group/updated-view.png" alt-text="Screenshot of update compliance view." lightbox="media/create-update-group/updated-view.png":::
171+
1. 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**. [Learn about update compliance](device-update-compliance.md).
174172
175-
5. You should see your newly created group and any available updates for the devices in the new group. If there are devices that don't meet the device class requirements of the group, they will show up in a corresponding invalid group. You can deploy the best available update to the new user-defined group from this view by clicking on the "Deploy" button next to the group.
173+
:::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":::
176174
177-
[Learn more](create-update-group.md) about adding tags and creating update groups
175+
1. You should see a device group that contains the simulated device you set up in this tutorial along with any available updates for the devices in the new group. If there are devices that don't meet the device class requirements of the group, they'll show up in a corresponding invalid group. To deploy the best available update to the new user-defined group from this view, select **Deploy** next to the group.
178176
177+
For more information about tags and groups, see [Manage device groups](create-update-group.md).
179178
180179
## Deploy update
181180
182-
1. Once the group is created, you should see a new update available for your device group, with a link to the update under Best Update (you may need to Refresh once). [Learn More about update compliance.](device-update-compliance.md)
181+
1. Once the group is created, you should see a new update available for your device group, with a link to the update under Best Update (you may need to Refresh once).
182+
183+
For more information about compliance, see [Device Update compliance](device-update-compliance.md).
183184
184-
2. Select the target group by clicking on the group name. You will be directed to the group details under Group basics.
185+
1. Select the target group by clicking on the group name. You'll be directed to the group details under Group basics.
185186

186-
:::image type="content" source="media/deploy-update/group-basics.png" alt-text="Group details" lightbox="media/deploy-update/group-basics.png":::
187+
:::image type="content" source="media/deploy-update/group-basics.png" alt-text="Group details" lightbox="media/deploy-update/group-basics.png":::
187188

188-
3. To initiate the deployment, go to the Current deployment tab. Click the deploy link next to the desired update from the Available updates section. The best, available update for a given group will be denoted with a "Best" highlight.
189+
1. To initiate the deployment, go to the Current deployment tab. Select the deploy link next to the desired update from the Available updates section. The best, available update for a given group will be denoted with a "Best" highlight.
189190

190-
:::image type="content" source="media/deploy-update/select-update.png" alt-text="Select update" lightbox="media/deploy-update/select-update.png":::
191+
:::image type="content" source="media/deploy-update/select-update.png" alt-text="Select update" lightbox="media/deploy-update/select-update.png":::
191192

192-
4. Schedule your deployment to start immediately or in the future, then select Create.
193+
1. Schedule your deployment to start immediately or in the future, then select Create.
193194

194-
:::image type="content" source="media/deploy-update/create-deployment.png" alt-text="Create deployment" lightbox="media/deploy-update/create-deployment.png":::
195+
:::image type="content" source="media/deploy-update/create-deployment.png" alt-text="Create deployment" lightbox="media/deploy-update/create-deployment.png":::
195196

196-
5. The Status under Deployment details should turn to Active, and the deployed update should be marked with "(deploying)".
197+
1. The Status under Deployment details should turn to Active, and the deployed update should be marked with "(deploying)".
197198

198-
:::image type="content" source="media/deploy-update/deployment-active.png" alt-text="Deployment active" lightbox="media/deploy-update/deployment-active.png":::
199+
:::image type="content" source="media/deploy-update/deployment-active.png" alt-text="Deployment active" lightbox="media/deploy-update/deployment-active.png":::
199200

200-
6. View the compliance chart. You should see the update is now in progress.
201+
1. View the compliance chart. You should see the update is now in progress.
201202

202-
7. After your device is successfully updated, you should see your compliance chart and deployment details update to reflect the same.
203+
1. After your device is successfully updated, you should see your compliance chart and deployment details are updated to reflect the same.
203204

204205
:::image type="content" source="media/deploy-update/update-succeeded.png" alt-text="Update succeeded" lightbox="media/deploy-update/update-succeeded.png":::
205206

@@ -215,20 +216,13 @@ If you haven't already done so, create a [Device Update account and instance](cr
215216

216217
3. Select Refresh to view the latest status details.
217218

218-
You've now completed a successful end-to-end proxy update by using Device Update for IoT Hub.
219+
You've now completed a successful end-to-end proxy update by using Device Update for IoT Hub.
219220
220221
## Clean up resources
221222
222-
When you no longer need them, clean up your Device Update account, instance, IoT hub, and IoT device.
223+
When you no longer need them, clean up your Device Update account, instance, IoT hub, and IoT device.
223224
224225
## Next steps
225226
226-
You can use the following tutorials for a simple demonstration of Device Update for IoT Hub:
227-
228-
- [Device Update for Azure IoT Hub tutorial using the Raspberry Pi 3 B+ reference image](device-update-raspberry-pi.md) (extensible via open source to build your own images for other architectures as needed)
229-
230-
- [Device Update for Azure IoT Hub tutorial using the package agent on Ubuntu Server 18.04 x64](device-update-ubuntu-agent.md)
231-
232-
- [Device Update for Azure IoT Hub tutorial using the Ubuntu (18.04 x64) Simulator Reference Agent](device-update-simulator.md)
233-
234-
- [Device Update for Azure IoT Hub tutorial using the Azure real-time operating system](device-update-azure-real-time-operating-system.md)
227+
> [!div class="nextstepaction"]
228+
> [Learn more about proxy updates and multi-component updating](device-update-proxy-updates.md)

0 commit comments

Comments
 (0)