Skip to content

Commit c589ae9

Browse files
authored
Merge pull request #287874 from eshashah-msft/patch-4
Update device-update-ubuntu-agent.md
2 parents 53fac12 + 68a7676 commit c589ae9

File tree

2 files changed

+22
-57
lines changed

2 files changed

+22
-57
lines changed

articles/iot-hub-device-update/device-update-configure-repo.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ Following this document, learn how to configure a package repository using [OSCo
1919

2020
## Prerequisites
2121

22-
You need an Azure account with an [IoT Hub](../iot-hub/iot-concepts-and-iot-hub.md) and Microsoft Azure Portal or Azure CLI to interact with devices via your IoT Hub. Follow the next steps to get started:
22+
You need an Azure account with an [IoT Hub](../iot-hub/iot-concepts-and-iot-hub.md) and Microsoft Azure portal or Azure CLI to interact with devices via your IoT Hub. Follow the next steps to get started:
2323
- Create a Device Update account and instance in your IoT Hub. See [how to create it](create-device-update-account.md).
2424
- Install the [IoT Hub Identity Service](https://azure.github.io/iot-identity-service/installation.html) (or skip if [IoT Edge 1.2](../iot-edge/how-to-provision-single-device-linux-symmetric.md?preserve-view=true&tabs=azure-portal%2cubuntu&view=iotedge-2020-11#install-iot-edge) or higher is already installed on the device).
25-
- Install the Device Update agent on the device. See [how to](device-update-ubuntu-agent.md#manually-prepare-a-device).
25+
- Install the Device Update agent on the device. See [how to](device-update-agent-provisioning.md#on-iot-edge-enabled-devices).
2626
- Install the OSConfig agent on the device. See [how to](/azure/osconfig/howto-install?tabs=package#step-11-connect-a-device-to-packagesmicrosoftcom).
2727
- Now that both the agent and IoT Hub Identity Service are present on the device, the next step is to configure the device with an identity so it can connect to Azure. See example [here](/azure/osconfig/howto-install?tabs=package#job-2--connect-to-azure)
2828

2929
## How to configure package repository for package updates
30-
Follow the below steps to update Azure IoT Edge on Ubuntu Server 18.04 x64 by configuring a source repository. The tools and concepts in this tutorial still apply even if you plan to use a different OS platform configuration.
30+
Follow the below steps to update Azure IoT Edge on Ubuntu Server 22.04 x64 by configuring a source repository. The tools and concepts in this tutorial still apply even if you plan to use a different OS platform configuration.
3131

3232
1. Configure the package repository of your choice with the OSConfig’s configure package repo module. See [how to](/azure/osconfig/howto-pmc?tabs=portal%2Csingle#example-1--specify-desired-package-sources). This repository should be the location where you wish to store packages to be downloaded to the device.
3333
2. Upload your packages to the above configured repository.
3434
3. Create an [APT manifest](device-update-apt-manifest.md) to provide the Device Update agent with the information it needs to download and install the packages (and their dependencies) from the repository.
3535
4. Follow steps from [here](device-update-ubuntu-agent.md#prerequisites) to do a package update with Device Update. Device Update is used to deploy package updates to a large number of devices and at scale.
36-
5. Monitor results of the package update by following these [steps](device-update-ubuntu-agent.md#monitor-the-update-deployment).
36+
5. Monitor results of the package update by following these [steps](device-update-ubuntu-agent.md#monitor-the-update-deployment).

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

Lines changed: 18 additions & 53 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 itself 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,37 +39,32 @@ 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 VM(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 is 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

6863
After all the boxes are filled in, select the checkbox at the bottom of the page to accept the terms. Select **Purchase** to begin the deployment.
6964

70-
1. Verify that the deployment has completed successfully. Allow a few minutes after deployment completes for the post-installation and configuration to finish installing IoT Edge and the device package update agent.
65+
1. Verify that the deployment is completed successfully. Allow a few minutes after deployment completes for the post-installation and configuration to finish installing IoT Edge and the device package update agent.
7166

72-
A virtual machine resource should have been deployed into the selected resource group. Note the machine name, which is in the format `vm-0000000000000`. Also note the associated **DNS name**, which is in the format `<dnsLabelPrefix>`.`<location>`.cloudapp.azure.com.
67+
A virtual machine resource should be deployed into the selected resource group. Note the machine name, which is in the format `vm-0000000000000`. Also note the associated **DNS name**, which is in the format `<dnsLabelPrefix>`.`<location>`.cloudapp.azure.com.
7368

7469
You can obtain the **DNS name** from the **Overview** section of the newly deployed virtual machine in the Azure portal.
7570

@@ -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. Note that all values with the 'Place value here' tag must be set. See [Configuring a Device Update 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)