Skip to content

Commit 60f8de4

Browse files
Update device-update-ubuntu-agent.md
Updating from 18.04 to 22.04 and update payload
1 parent d70b023 commit 60f8de4

File tree

1 file changed

+16
-51
lines changed

1 file changed

+16
-51
lines changed

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

Lines changed: 16 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
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
77
ms.topic: tutorial
88
ms.service: iot-hub-device-update
99
---
1010

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
1212

1313
Device Update for Azure IoT Hub supports image-based, package-based, and script-based updates.
1414

1515
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.
1616

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.
1818

1919
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.
2020

@@ -39,29 +39,24 @@ In this tutorial, you'll learn how to:
3939

4040
## Prepare a device
4141

42-
Prepare a device automatically or manually.
43-
4442
### Use the automated Deploy to Azure button
4543

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.
4745

4846
1. To begin, select the button:
4947

50-
[![Screenshot showing the Deploy to Azure button for iotedge-vm-deploy](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fazure%2Fiotedge-vm-deploy%2Fdevice-update-tutorial%2FedgeDeploy.json).
48+
[![Screenshot showing the Deploy to Azure button for iotedge-vm-deploy](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fazure%2Fiotedge-vm-deploy%2Fmain%2FedgeDeploy.json).
5149

5250
1. Fill in the available text boxes:
5351

54-
> [!div class="mx-imgBorder"]
55-
> [![Screenshot showing the iotedge-vm-deploy template.](../iot-edge/media/how-to-install-iot-edge-ubuntuvm/iotedge-vm-deploy.png)](../iot-edge/media/how-to-install-iot-edge-ubuntuvm/iotedge-vm-deploy.png)
56-
5752
* **Subscription**: The active Azure subscription to deploy the virtual machine into.
5853
* **Resource group**: An existing or newly created resource group to contain the virtual machine and its associated resources.
5954
* **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.
6055
* **DNS Label Prefix**: A required value of your choosing that's used to prefix the hostname of the virtual machine.
6156
* **Admin Username**: A username, which is provided root privileges on deployment.
6257
* **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).
6358
* **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.
6560
* **Authentication Type**: Choose **sshPublicKey** or **password** based on your preference.
6661
* **Admin Password or Key**: The value of the SSH Public Key or the value of the password based on the choice of authentication type.
6762

@@ -80,46 +75,16 @@ For convenience, this tutorial uses a [cloud-init](/azure/virtual-machines/linux
8075
> To SSH into this VM after setup, use the associated **DNS name** with the following command:
8176
`ssh <adminUsername>@<DNS_Name>`.
8277
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.
8479

8580
```bash
86-
sudo nano /etc/adu/du-config.json
81+
sudo apt-get install deviceupdate-agent
8782
```
8883

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).
9085

9186
```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)
98-
* [Delivery optimization client license](https://github.com/microsoft/do-client/blob/main/LICENSE)
99-
100-
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
12388
```
12489

12590
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
154119

155120
## Import the update
156121

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).
158123
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**.
159124
1. Select the **Updates** tab.
160125
1. Select **+ Import New Update**.
@@ -240,7 +205,7 @@ For more information about tags and groups, see [Manage device groups](create-up
240205

241206
1. Select **Refresh** to view the latest status details.
242207

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.
244209

245210
## Clean up resources
246211

0 commit comments

Comments
 (0)