Skip to content

Commit 8fce398

Browse files
authored
Update device-update-agent-provisioning.md
1 parent c09773e commit 8fce398

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

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

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,65 +13,65 @@ The Device Update Module agent can run alongside other system processes and [IoT
1313
Module Identity vs Device Identity: In IoT Hub, under each device identity, you can create up to 50 module identities. Each module identity implicitly generates a module twin. On the device side, the IoT Hub device SDKs enable you to create modules where each one opens an independent connection to IoT Hub. Module identity and module twin provide the similar capabilities as device identity and device twin but at a finer granularity. [Learn more about Module Identities in IoT Hub](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-module-twins)
1414

1515
Currently supported IoT device types with Device Update:
16-
1. Linux devices (IoT Edge and Non-IoT Edge devices):
17-
* Image A/B update:
16+
* Linux devices (IoT Edge and Non-IoT Edge devices):
17+
+ Image A/B update:
1818
- Yocto - ARM64 (reference image), extensible via open source to [build you own images](device-update-agent-provisioning.md#how-to-build-and-run-device-update-agent) for other architecture as needed.
1919
- Ubuntu 18.04 simulator
20-
* Package Agent supported builds for the following platforms/architectures.
20+
+ Package Agent supported builds for the following platforms/architectures.
2121
- Ubuntu Server 18.04 x64 Package Agent
2222
- Debian 9
23-
2. Constrained devices:
24-
* AzureRTOS Device Update agent samples: [Device Update for Azure IoT Hub tutorial for Azure-Real-Time-Operating-System](device-update-azure-real-time-operating-system.md)
25-
3. Disconnected devices:
26-
* [Understand support for disconnected device update](connected-cache-disconnected-device-update.md)
23+
* Constrained devices:
24+
+ AzureRTOS Device Update agent samples: [Device Update for Azure IoT Hub tutorial for Azure-Real-Time-Operating-System](device-update-azure-real-time-operating-system.md)
25+
* Disconnected devices:
26+
+ [Understand support for disconnected device update](connected-cache-disconnected-device-update.md)
2727

2828
## Pre-Requisite
2929
If you are setting up the IoT device/IoT Edge device for [package based updates](https://docs.microsoft.com/azure/iot-hub-device-update/understand-device-update#support-for-a-wide-range-of-update-artifacts), add packages.microsoft.com to your machine’s repositories by following the steps below:
3030
1. Log onto the machine or IoT device on which you intend to install the Device Update agent.
3131
2. Open a Terminal window.
3232
3. Install the repository configuration that matches your device’s operating system.
33-
```shell
34-
curl https://packages.microsoft.com/config/ubuntu/18.04/multiarch/prod.list > ./microsoft-prod.list
35-
```
33+
```shell
34+
curl https://packages.microsoft.com/config/ubuntu/18.04/multiarch/prod.list > ./microsoft-prod.list
35+
```
3636
4. Copy the generated list to the sources.list.d directory.
37-
```shell
38-
sudo cp ./microsoft-prod.list /etc/apt/sources.list.d/
39-
```
37+
```shell
38+
sudo cp ./microsoft-prod.list /etc/apt/sources.list.d/
39+
```
4040
5. Install the Microsoft GPG public key.
41-
```shell
42-
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
43-
```
44-
```shell
45-
sudo cp ./microsoft.gpg /etc/apt/trusted.gpg.d/
46-
```
41+
```shell
42+
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
43+
```
44+
```shell
45+
sudo cp ./microsoft.gpg /etc/apt/trusted.gpg.d/
46+
```
4747

4848
## How to provision the Device Update agent as a Module Identity
49-
This section describes how to provision the Device Update agent as a module identity.
49+
This section describes how to provision the Device Update agent as a module identity on IoT Edge enabled devices, non-Edge IoT devices, and other IoT devices.
5050

51-
### 1. On IoT Edge enabled devices
51+
### On IoT Edge enabled devices
5252
Follow these instructions to provision the Device Update agent on [IoT Edge enabled devices](https://docs.microsoft.com/azure/iot-edge).
5353
1. Follow the instructions to [Install and provision the Azure IoT Edge runtime](https://docs.microsoft.com/azure/iot-edge/how-to-install-iot-edge?view=iotedge-2020-11&preserve-view=true).
5454
2. Then install the Device Update agent from [Artifacts](https://github.com/Azure/iot-hub-device-update/releases) and you are now ready to start the Device Update agent on your IoT Edge device.
5555

56-
### 2. On non-Edge IoT Linux devices
56+
### On non-Edge IoT Linux devices
5757
Follow these instructions to provision the Device Update agent on your IoT Linux devices.
5858
1. Install the IoT Identity Service and add the latest version to your IoT device.
5959
* Log onto the machine or IoT device.
6060
* Open a terminal window.
6161
* Install the latest [IoT Identity Service](https://github.com/Azure/iot-identity-service/blob/main/docs/packaging.md#installing-and-configuring-the-package) on your IoT device using the command below.
62-
```shell
63-
sudo apt-get install aziot-identity-service
64-
```
62+
```shell
63+
sudo apt-get install aziot-identity-service
64+
```
6565
2. Provisioning IoT Identity service to get the IoT device information.
6666
* Create a custom copy of the configuration template so we can add the provisioning information. In a terminal, enter the below command.
67-
```shell
68-
sudo cp /etc/aziot/config.toml.template /etc/aziot/config.toml
69-
```
67+
```shell
68+
sudo cp /etc/aziot/config.toml.template /etc/aziot/config.toml
69+
```
7070

7171
3. Next edit the configuration file to include the connection string of the device you wish to act as the provisioner for this device or machine. In a terminal, enter the below command.
72-
```shell
73-
sudo nano /etc/aziot/config.toml
74-
```
72+
```shell
73+
sudo nano /etc/aziot/config.toml
74+
```
7575

7676
4. You should be greeted with a view like below:
7777
:::image type="content" source="media/understand-device-update/config.png" alt-text="Diagram of IoT Identity Service config file." lightbox="media/understand-device-update/config.png":::
@@ -82,12 +82,12 @@ Follow these instructions to provision the Device Update agent on your IoT Linux
8282
* In the window, delete the string within the quotes to the right of 'connection_string' and then add your connection string there
8383
* Save your changes to the file with 'Ctrl+X' and then 'Y' and hit the 'enter' key to save your changes.
8484
5. Now apply and restart the IoT Identity service with the command below. You should now see a “Done!” printout that means you have successfully configured the IoT Identity Service. Note: The IoT Identity service registers module identities with IoT Hub using symmetric keys currently.
85-
```shell
86-
sudo aziotctl config apply
87-
```
85+
```shell
86+
sudo aziotctl config apply
87+
```
8888
6. Finally install the Device Update agent from [Artifacts](https://github.com/Azure/iot-hub-device-update/releases) and you are now ready to start the Device Update agent on your IoT Edge device.
8989

90-
### 3. Other IoT devices
90+
### Other IoT devices
9191
The Device Update agent can also be configured without the IoT Identity service for testing or on constrained devices. Follow the below steps to provision the Device Update agent using a connection string (from the Module or Device).
9292
1. Install Device Update agent from [Artifacts](https://github.com/Azure/iot-hub-device-update/releases).
9393
2. Log onto the machine or IoT Edge device/IoT device.
@@ -106,13 +106,13 @@ The Device Update agent can also be configured without the IoT Identity service
106106
This section describes how to start and verify the Device Update agent as a module identity running successfully on your IoT device.
107107
1. Log into the machine or device that has the Device Update agent installed.
108108
2. Open a Terminal window, and enter the command below.
109-
```shell
110-
sudo systemctl restart adu-agent
111-
```
109+
```shell
110+
sudo systemctl restart adu-agent
111+
```
112112
3. You can check the status of the agent using the command below. If you see any issues, refer to this [troubleshooting guide](troubleshoot-device-update.md).
113-
```shell
114-
sudo systemctl status adu-agent
115-
```
113+
```shell
114+
sudo systemctl status adu-agent
115+
```
116116
4. You should see status OK.
117117
5. On the IoT Hub portal, go to IoT device or IoT Edge devices to find the device that you configured with Device Update agent. There you will see the Device Update agent running as a module, For example:
118118
:::image type="content" source="media/understand-device-update/device-update-module.png " alt-text="Diagram of Device Update module name." lightbox="media/understand-device-update/device-update-module.png":::

0 commit comments

Comments
 (0)