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
+16-51Lines changed: 16 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
1
---
2
-
title: Device Update for Azure IoT Hub tutorial using the Ubuntu Server 18.04 x64 package agent | Microsoft Docs
3
-
description: Get started with Device Update for Azure IoT Hub by using the Ubuntu Server 18.04 x64 package agent.
4
-
author: vimeht
5
-
ms.author: vimeht
6
-
ms.date: 1/26/2022
2
+
title: Device Update for Azure IoT Hub tutorial using the Ubuntu Server 22.04 x64 package agent | Microsoft Docs
3
+
description: Get started with Device Update for Azure IoT Hub by using the Ubuntu Server 22.04 x64 package agent.
4
+
author: eshashah
5
+
ms.author: eshashah
6
+
ms.date: 10/2/2024
7
7
ms.topic: tutorial
8
8
ms.service: iot-hub-device-update
9
9
---
10
10
11
-
# Tutorial: Device Update for Azure IoT Hub using the package agent on Ubuntu Server 18.04 x64
11
+
# Tutorial: Device Update for Azure IoT Hub using the package agent on Ubuntu Server 22.04 x64
12
12
13
13
Device Update for Azure IoT Hub supports image-based, package-based, and script-based updates.
14
14
15
15
Package-based updates are targeted updates that alter only a specific component or application on the device. They lead to lower consumption of bandwidth and help reduce the time to download and install the update. Package-based updates also typically allow for less downtime of devices when you apply an update and avoid the overhead of creating images. They use an [APT manifest](device-update-apt-manifest.md), which provides the Device Update agent with the information it needs to download and install the packages specified in the APT manifest file (and their dependencies) from a designated repository.
16
16
17
-
This tutorial walks you through updating Azure IoT Edge on Ubuntu Server 18.04 x64 by using the Device Update package agent. Although the tutorial demonstrates updating IoT Edge, by using similar steps you could update other packages, such as the container engine it uses.
17
+
This tutorial walks you through updating Azure IoT Edge on Ubuntu Server 22.04 x64 by using the Device Update package agent. Although the tutorial demonstrates installing the Microsoft Defender for IoT, by using similar steps you could update other packages, such as the ioT Edge ieself or the container engine it uses.
18
18
19
19
The tools and concepts in this tutorial still apply even if you plan to use a different OS platform configuration. Finish this introduction to an end-to-end update process. Then choose your preferred form of updating an OS platform to dive into the details.
20
20
@@ -39,29 +39,24 @@ In this tutorial, you'll learn how to:
39
39
40
40
## Prepare a device
41
41
42
-
Prepare a device automatically or manually.
43
-
44
42
### Use the automated Deploy to Azure button
45
43
46
-
For convenience, this tutorial uses a [cloud-init](/azure/virtual-machines/linux/using-cloud-init)-based [Azure Resource Manager template](../azure-resource-manager/templates/overview.md) to help you quickly set up an Ubuntu 18.04 LTS virtual machine. It installs both the Azure IoT Edge runtime and the Device Update package agent. Then it automatically configures the device with provisioning information by using the device connection string for an IoT Edge device (prerequisite) that you supply. The Resource Manager template also avoids the need to start an SSH session to complete setup.
44
+
For convenience, this tutorial uses a [cloud-init](/azure/virtual-machines/linux/using-cloud-init)-based [Azure Resource Manager template](../azure-resource-manager/templates/overview.md) to help you quickly set up an Ubuntu 22.04 LTS virtual machine. It installs both the Azure IoT Edge runtime and the Device Update package agent. Then it automatically configures the device with provisioning information by using the device connection string for an IoT Edge device (prerequisite) that you supply. The Resource Manager template also avoids the need to start an SSH session to complete setup.
47
45
48
46
1. To begin, select the button:
49
47
50
-
[](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fazure%2Fiotedge-vm-deploy%2Fdevice-update-tutorial%2FedgeDeploy.json).
48
+
[](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fazure%2Fiotedge-vm-deploy%2Fmain%2FedgeDeploy.json).
51
49
52
50
1. Fill in the available text boxes:
53
51
54
-
> [!div class="mx-imgBorder"]
55
-
> [](../iot-edge/media/how-to-install-iot-edge-ubuntuvm/iotedge-vm-deploy.png)
56
-
57
52
***Subscription**: The active Azure subscription to deploy the virtual machine into.
58
53
***Resource group**: An existing or newly created resource group to contain the virtual machine and its associated resources.
59
54
***Region**: The [geographic region](https://azure.microsoft.com/global-infrastructure/locations/) to deploy the virtual machine into. This value defaults to the location of the selected resource group.
60
55
***DNS Label Prefix**: A required value of your choosing that's used to prefix the hostname of the virtual machine.
61
56
***Admin Username**: A username, which is provided root privileges on deployment.
62
57
***Device Connection String**: A [device connection string](../iot-edge/how-to-provision-single-device-linux-symmetric.md#view-registered-devices-and-retrieve-provisioning-information) for a device that was created within your intended [IoT hub](../iot-hub/about-iot-hub.md).
63
58
***VM Size**: The [size](../cloud-services/cloud-services-sizes-specs.md) of the virtual machine to be deployed.
64
-
***Ubuntu OS Version**: The version of the Ubuntu OS to be installed on the base virtual machine. Leave the default value unchanged because it will be set to Ubuntu 18.04-LTS already.
59
+
***Ubuntu OS Version**: The version of the Ubuntu OS to be installed on the base virtual machine. Leave the default value unchanged because it will be set to Ubuntu 22.04-LTS already.
65
60
***Authentication Type**: Choose **sshPublicKey** or **password** based on your preference.
66
61
***Admin Password or Key**: The value of the SSH Public Key or the value of the password based on the choice of authentication type.
67
62
@@ -80,46 +75,16 @@ For convenience, this tutorial uses a [cloud-init](/azure/virtual-machines/linux
80
75
> To SSH into this VM after setup, use the associated **DNS name** with the following command:
81
76
`ssh <adminUsername>@<DNS_Name>`.
82
77
83
-
1.Open the configuration details (See how to [set up configuration file here](device-update-configuration-file.md) with the command below. Set your connectionType as 'AIS' and connectionData as empty string. Please note that all values with the 'Place value here' tag must be set. See [Configuring a DU agent](./device-update-configuration-file.md#example-du-configjson-file-contents).
78
+
1.Install the Device update agent on the VM.
84
79
85
80
```bash
86
-
sudo nano /etc/adu/du-config.json
81
+
sudo apt-get install deviceupdate-agent
87
82
```
88
83
89
-
1. Restart the Device Update agent.
84
+
2. Open the configuration details (See how to [set up configuration file here](device-update-configuration-file.md) with the command below. Set your connectionType as 'AIS' and connectionData as empty string. Please note that all values with the 'Place value here' tag must be set. See [Configuring a DU agent](./device-update-configuration-file.md#example-du-configjson-file-contents).
90
85
91
86
```bash
92
-
sudo systemctl restart deviceupdate-agent
93
-
```
94
-
95
-
Device Update for Azure IoT Hub software packages are subject to the following license terms:
96
-
97
-
*[Device update for IoT Hub license](https://github.com/Azure/iot-hub-device-update/blob/main/LICENSE)
Read the license terms before you use a package. Your installation and use of a package constitutes your acceptance of these terms. If you don't agree with the license terms, don't use that package.
101
-
102
-
### Manually prepare a device
103
-
104
-
Similar to the steps automated by the [cloud-init script](https://github.com/Azure/iotedge-vm-deploy/blob/1.2.0-rc4/cloud-init.txt), the following manual steps are used to install and configure a device. Use these steps to prepare a physical device.
105
-
106
-
1. Follow the instructions to [install the Azure IoT Edge runtime](../iot-edge/how-to-provision-single-device-linux-symmetric.md?view=iotedge-2020-11&preserve-view=true).
107
-
108
-
> [!NOTE]
109
-
> The Device Update agent doesn't depend on IoT Edge. But it does rely on the IoT Identity Service daemon that's installed with IoT Edge (1.2.0 and higher) to obtain an identity and connect to IoT Hub.
110
-
>
111
-
> Although not covered in this tutorial, the [IoT Identity Service daemon can be installed standalone on Linux-based IoT devices](https://azure.github.io/iot-identity-service/installation.html). The sequence of installation matters. The Device Update package agent must be installed _after_ the IoT Identity Service. Otherwise, the package agent won't be registered as an authorized component to establish a connection to IoT Hub.
112
-
113
-
1. Install the Device Update agent .deb packages:
114
-
115
-
```bash
116
-
sudo apt-get install deviceupdate-agent
117
-
```
118
-
119
-
1. Enter your IoT device's module (or device, depending on how you [provisioned the device with Device Update](device-update-agent-provisioning.md)) primary connection string in the configuration file. Please note that all values with the 'Place value here' tag must be set. See [Configuring a DU agent](./device-update-configuration-file.md#example-du-configjson-file-contents).
120
-
121
-
```bash
122
-
sudo /etc/adu/du-config.json
87
+
sudo nano /etc/adu/du-config.json
123
88
```
124
89
125
90
1. Restart the Device Update agent.
@@ -154,7 +119,7 @@ Read the license terms before you use a package. Your installation and use of a
154
119
155
120
## Import the update
156
121
157
-
1. Go to [Device Update releases](https://github.com/Azure/iot-hub-device-update/releases) in GitHub and select the **Assets** dropdown list. Download `Tutorial_IoTEdge_PackageUpdate.zip` by selecting it. Extract the contents of the folder to discover a sample APT manifest (sample-1.0.2-aziot-edge-apt-manifest.json) and its corresponding import manifest (sample-1.0.2-aziot-edge-importManifest.json).
122
+
1. Go to [Device Update releases](https://github.com/Azure/iot-hub-device-update/releases) in GitHub and select the **Assets** dropdown list. Download `Tutorial_IoTEdge_PackageUpdate.zip` by selecting it. Extract the contents of the folder to discover a sample APT manifest (sample-defender-iot-apt-manifest.json) and its corresponding import manifest (sample-defender-iot--importManifest.json).
158
123
1. Sign in to the [Azure portal](https://portal.azure.com/) and go to your IoT hub with Device Update. On the left pane, under **Automatic Device Management**, select **Updates**.
159
124
1. Select the **Updates** tab.
160
125
1. Select **+ Import New Update**.
@@ -240,7 +205,7 @@ For more information about tags and groups, see [Manage device groups](create-up
240
205
241
206
1. Select **Refresh** to view the latest status details.
242
207
243
-
You've now completed a successful end-to-end package update by using Device Update for IoT Hub on an Ubuntu Server 18.04 x64 device.
208
+
You've now completed a successful end-to-end package update by using Device Update for IoT Hub on an Ubuntu Server 22.04 x64 device.
0 commit comments