Skip to content

Commit 9d59ee8

Browse files
authored
Merge pull request #178215 from kgremban/nov1-tomincludes
Clean up create-device docs with includes
2 parents 876bcc6 + 2e15ea4 commit 9d59ee8

File tree

42 files changed

+1312
-3661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1312
-3661
lines changed

articles/iot-edge/how-to-provision-devices-at-scale-linux-on-windows-symmetric.md

Lines changed: 20 additions & 337 deletions
Large diffs are not rendered by default.

articles/iot-edge/how-to-provision-devices-at-scale-linux-on-windows-tpm.md

Lines changed: 12 additions & 240 deletions
Large diffs are not rendered by default.

articles/iot-edge/how-to-provision-devices-at-scale-linux-on-windows-x509.md

Lines changed: 19 additions & 352 deletions
Large diffs are not rendered by default.

articles/iot-edge/how-to-provision-devices-at-scale-linux-symmetric.md

Lines changed: 21 additions & 258 deletions
Large diffs are not rendered by default.

articles/iot-edge/how-to-provision-devices-at-scale-linux-tpm.md

Lines changed: 17 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Provision devices with a virtual TPM on Linux - Azure IoT Edge
2+
title: Create and provision devices with a virtual TPM on Linux - Azure IoT Edge
33
description: Use a simulated TPM on a Linux device to test the Azure IoT Hub device provisioning service for Azure IoT Edge.
4-
author: v-tcassi
5-
manager: philmea
6-
ms.author: v-tcassi
7-
ms.date: 07/09/2021
4+
author: kgremban
5+
manager: lizross
6+
ms.author: kgremban
7+
ms.date: 10/28/2021
88
ms.topic: conceptual
99
ms.service: iot-edge
1010
services: iot-edge
@@ -43,23 +43,17 @@ The tasks are as follows:
4343

4444
## Prerequisites
4545

46+
<!-- Cloud resources prerequisites H3 and content -->
47+
[!INCLUDE [iot-edge-prerequisites-at-scale-cloud-resources.md](../../includes/iot-edge-prerequisites-at-scale-cloud-resources.md)]
48+
49+
### IoT Edge installation
50+
4651
# [Physical device](#tab/physical-device)
4752

48-
* An active IoT hub.
49-
* An instance of the IoT Hub device provisioning service in Azure linked to your IoT hub.
50-
* If you don't have a device provisioning service instance, follow the instructions found in two sections of the IoT Hub device provisioning service quickstart:
51-
- [Create a new IoT Hub device provisioning service](../iot-dps/quick-setup-auto-provision.md#create-a-new-iot-hub-device-provisioning-service)
52-
- [Link the IoT hub and your device provisioning service](../iot-dps/quick-setup-auto-provision.md#link-the-iot-hub-and-your-device-provisioning-service)
53-
* After you have the device provisioning service running, copy the value of **ID Scope** from the overview page. You use this value when you configure the IoT Edge runtime.
53+
A physical Linux device to be the IoT Edge device.
5454

5555
# [Virtual machine](#tab/virtual-machine)
5656

57-
* An active IoT hub.
58-
* An instance of the IoT Hub device provisioning service in Azure linked to your IoT hub.
59-
* If you don't have a device provisioning service instance, follow the instructions in two sections of the IoT Hub device provisioning service quickstart:
60-
- [Create a new IoT Hub device provisioning service](../iot-dps/quick-setup-auto-provision.md#create-a-new-iot-hub-device-provisioning-service)
61-
- [Link the IoT hub and your device provisioning service](../iot-dps/quick-setup-auto-provision.md#link-the-iot-hub-and-your-device-provisioning-service)
62-
* After you have the device provisioning service running, copy the value of **ID Scope** from the overview page. You use this value when you configure the IoT Edge runtime.
6357
* A Windows development machine with [Hyper-V enabled](/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v). This article uses Windows 10 running an Ubuntu Server VM.
6458

6559
---
@@ -168,164 +162,13 @@ In this section, you build a tool that you can use to retrieve the registration
168162
169163
After you have your registration ID and endorsement key, you're ready to continue.
170164

171-
## Create a device provisioning service enrollment
172-
173-
Retrieve the provisioning information from your TPM, and use that information to create an individual enrollment in the device provisioning service.
174-
175-
When you create an enrollment in the device provisioning service, you have the opportunity to declare an **Initial Device Twin State**. In the device twin, you can set tags to group devices by any metric used in your solution, like region, environment, location, or device type. These tags are used to create [automatic deployments](how-to-deploy-at-scale.md).
176-
177-
> [!TIP]
178-
> The steps in this article are for the Azure portal, but you can also create individual enrollments by using the Azure CLI. For more information, see [az iot dps enrollment](/cli/azure/iot/dps/enrollment). As part of the CLI command, use the **edge-enabled** flag to specify that the enrollment is for an IoT Edge device.
179-
180-
1. In the [Azure portal](https://portal.azure.com), go to your instance of the IoT Hub device provisioning service.
181-
182-
1. Under **Settings**, select **Manage enrollments**.
183-
184-
1. Select **Add individual enrollment**, and then complete the following steps to configure the enrollment:
185-
186-
1. For **Mechanism**, select **TPM**.
187-
188-
1. Provide the **Endorsement key** and **Registration ID** that you copied from your VM or physical device.
189-
190-
1. Provide an ID for your device if you want. If you don't provide a device ID, the registration ID is used.
191-
192-
1. Select **True** to declare that your VM or physical device is an IoT Edge device.
193-
194-
1. Choose the linked IoT hub that you want to connect your device to, or select **Link to new IoT Hub**. You can choose multiple hubs, and the device will be assigned to one of them according to the selected assignment policy.
195-
196-
1. Add a tag value to the **Initial Device Twin State** if you want. You can use tags to target groups of devices for module deployment. For more information, see [Deploy IoT Edge modules at scale](how-to-deploy-at-scale.md).
197-
198-
1. Select **Save**.
199-
200-
Now that an enrollment exists for this device, the IoT Edge runtime can automatically provision the device during installation.
201-
202-
## Install the IoT Edge runtime
203-
204-
In this section, you prepare your Linux VM or physical device for IoT Edge. Then, you'll install IoT Edge.
205-
206-
You need to complete two steps on your device before it's ready to install the IoT Edge runtime. Your device needs access to the Microsoft installation packages, and it needs a container engine installed.
207-
208-
### Access the Microsoft installation packages
209-
210-
Your device must have access to the Microsoft installation packages.
211-
212-
1. Install the repository configuration that matches your device's operating system.
213-
214-
* **Ubuntu Server 18.04**:
215-
216-
```bash
217-
curl https://packages.microsoft.com/config/ubuntu/18.04/multiarch/prod.list > ./microsoft-prod.list
218-
```
219-
220-
* **Raspberry Pi OS Stretch**:
221-
222-
```bash
223-
curl https://packages.microsoft.com/config/debian/stretch/multiarch/prod.list > ./microsoft-prod.list
224-
```
225-
226-
1. Copy the generated list to the sources.list.d directory.
227-
228-
```bash
229-
sudo cp ./microsoft-prod.list /etc/apt/sources.list.d/
230-
```
231-
232-
1. Install the Microsoft GPG public key.
233-
234-
```bash
235-
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
236-
sudo cp ./microsoft.gpg /etc/apt/trust.gpg.d/
237-
```
238-
239-
> [!NOTE]
240-
> Azure IoT Edge software packages are subject to the license terms located in each package (`usr/share/doc/{package-name}` or the `LICENSE` directory). Read the license terms prior to using 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.
241-
242-
### Install a container engine
243-
244-
IoT Edge relies on an OCI-compatible container runtime. For production scenarios, we recommend that you use the Moby engine. The Moby engine is the only container engine officially supported with IoT Edge. Docker CE/EE container images are compatible with the Moby runtime.
245-
246-
1. Update package lists on your device.
247-
248-
```bash
249-
sudo apt-get update
250-
```
251-
252-
1. Install the Moby engine.
165+
<!-- Create an enrollment for your device using TPM provisioning information H2 and content -->
166+
[!INCLUDE [tpm-create-a-device-provision-service-enrollment.md](../../includes/tpm-create-a-device-provision-service-enrollment.md)]
253167

254-
```bash
255-
sudo apt-get install moby-engine
256-
```
257-
258-
> [!TIP]
259-
> If you get errors when you install the Moby container engine, verify your Linux kernel for Moby compatibility. Some embedded device manufacturers ship device images that contain custom Linux kernels without the features required for container engine compatibility. Run the following command, which uses the [check-config script](https://github.com/moby/moby/blob/master/contrib/check-config.sh) provided by Moby, to check your kernel configuration:
260-
>
261-
> ```bash
262-
> curl -ssl https://raw.githubusercontent.com/moby/moby/master/contrib/check-config.sh -o check-config.sh
263-
> chmod +x check-config.sh
264-
> ./check-config.sh
265-
> ```
266-
>
267-
> In the output of the script, check that all items under `Generally Necessary` and `Network Drivers` are enabled. If you're missing features, enable them by rebuilding your kernel from source and selecting the associated modules for inclusion in the appropriate kernel .config. Similarly, if you're using a kernel configuration generator like `defconfig` or `menuconfig`, find and enable the respective features and rebuild your kernel accordingly. After you've deployed your newly modified kernel, run the check-config script again to verify that all the required features were successfully enabled.
268-
269-
### Install IoT Edge
270-
271-
<!-- 1.1 -->
272-
:::moniker range="iotedge-2018-06"
273-
274-
The IoT Edge security daemon provides and maintains security standards on the IoT Edge device. The daemon starts on every boot and bootstraps the device by starting the rest of the IoT Edge runtime.
275-
276-
The steps in this section represent the typical process to install the latest version on a device that has internet connectivity. If you need to install a specific version, like a prerelease version, or need to install while offline, follow the Offline or specific version installation steps.
277-
278-
1. Update package lists on your device.
279-
280-
```bash
281-
sudo apt-get update
282-
```
283-
284-
1. Install IoT Edge version 1.1* along with the **libiothsm-std** package.
285-
286-
```bash
287-
sudo apt-get install iotedge
288-
```
289-
290-
> [!NOTE]
291-
> *IoT Edge version 1.1 is the long-term support branch of IoT Edge. If you're running an older version, we recommend that you install or update to the latest patch because older versions are no longer supported.
292-
293-
:::moniker-end
294-
<!-- end 1.1 -->
295-
296-
<!-- 1.2 -->
297-
:::moniker range=">=iotedge-2020-11"
298-
299-
The IoT Edge service provides and maintains security standards on the IoT Edge device. The service starts on every boot and bootstraps the device by starting the rest of the IoT Edge runtime.
300-
301-
The IoT identity service was introduced along with version 1.2 of IoT Edge. This service handles the identity provisioning and management for IoT Edge and other device components that need to communicate with IoT Hub.
302-
303-
The steps in this section represent the typical process to install the latest version on a device that has internet connection. If you need to install a specific version, like a prerelease version, or need to install while offline, follow the Offline or specific version installation steps.
304-
305-
Update package lists on your device.
306-
307-
```bash
308-
sudo apt-get update
309-
```
310-
311-
Check to see which versions of IoT Edge and the IoT identity service are available.
312-
313-
```bash
314-
apt list -a aziot-edge aziot-identity-service
315-
```
316-
317-
To install the latest version of IoT Edge and the IoT identity service package, use the following command:
318-
319-
```bash
320-
sudo apt-get install aziot-edge
321-
```
322-
323-
Or, if you choose to install a different version of IoT Edge than the latest, be sure to install the same version for both the `aziot-edge` and the `aziot-identity-service` services.
324-
325-
:::moniker-end
326-
<!-- end 1.2 -->
168+
<!-- Install IoT Edge on Linux H2 and content -->
169+
[!INCLUDE [install-iot-edge-linux.md](../../includes/iot-edge-install-linux.md)]
327170

328-
## Configure the device with provisioning information
171+
## Provision the device with its cloud identity
329172

330173
After the runtime is installed on your device, configure the device with the information it uses to connect to the device provisioning service and IoT Hub.
331174

@@ -399,7 +242,7 @@ After the runtime is installed on your device, configure the device with the inf
399242

400243
1. Update the values of `id_scope` and `registration_id` with your device provisioning service and device information. The `scope_id` value is the **ID Scope** from your device provisioning service instance's overview page.
401244

402-
1. Optionally, find the autoreprovisioning mode section of the file. Use the `auto_reprovisioning_mode` parameter to configure your device's reprovisioning behavior to either `Dynamic`, `AlwaysOnStartup`, or `OnErrorOnly`. For more information, see [IoT Hub device reprovisioning concepts](../iot-dps/concepts-device-reprovision.md).
245+
1. Optionally, find the auto reprovisioning mode section of the file. Use the `auto_reprovisioning_mode` parameter to configure your device's reprovisioning behavior to either `Dynamic`, `AlwaysOnStartup`, or `OnErrorOnly`. For more information, see [IoT Hub device reprovisioning concepts](../iot-dps/concepts-device-reprovision.md).
403246

404247
1. Save and close the file.
405248

0 commit comments

Comments
 (0)