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-dps/how-to-legacy-device-symm-key.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ If you can easily install a [hardware security module (HSM)](concepts-service.md
20
20
21
21
This tutorial also assumes that the device update takes place in a secure environment to prevent unauthorized access to the master group key or the derived device key.
22
22
23
-
This tutorial is oriented toward a Windows-based workstation. However, you can perform the procedures on Linux. For a Linux example, see [How to provision for multitenancy](how-to-provision-multitenant.md).
23
+
This tutorial is oriented toward a Windows-based workstation. However, you can perform the procedures on Linux. For a Linux example, see [Tutorial: Provision for geolatency](how-to-provision-multitenant.md).
24
24
25
25
> [!NOTE]
26
26
> The sample used in this tutorial is written in C. There is also a [C# device provisioning symmetric key sample](https://github.com/Azure-Samples/azure-iot-samples-csharp/tree/main/provisioning/Samples/device/SymmetricKeySample) available. To use this sample, download or clone the [azure-iot-samples-csharp](https://github.com/Azure-Samples/azure-iot-samples-csharp) repository and follow the in-line instructions in the sample code. You can follow the instructions in this tutorial to create a symmetric key enrollment group using the portal and to find the ID Scope and enrollment group primary and secondary keys needed to run the sample. You can also create individual enrollments using the sample.
Copy file name to clipboardExpand all lines: articles/iot-dps/how-to-provision-multitenant.md
+19-23Lines changed: 19 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,28 @@
1
1
---
2
-
title: Tutorial - Provision devices for multitenancy in Azure IoT Hub Device Provisioning Service
3
-
description: This tutorial shows how to provision devices for multitenancy with your Device Provisioning Service (DPS) instance
2
+
title: Tutorial - Provision devices for geolatency in Azure IoT Hub Device Provisioning Service
3
+
description: This tutorial shows how to provision devices for geolocation/geolatency with your Device Provisioning Service (DPS) instance
4
4
author: kgremban
5
5
ms.author: kgremban
6
6
ms.topic: tutorial
7
-
ms.date: 08/19/2022
7
+
ms.date: 08/24/2022
8
8
ms.service: iot-dps
9
9
services: iot-dps
10
10
---
11
11
12
-
# Tutorial: Provision for multitenancy
12
+
# Tutorial: Provision for geolatency
13
13
14
-
This tutorial shows how to securely provision multiple simulated symmetric key devices to a group of IoT Hubs using an [allocation policy](concepts-service.md#allocation-policy). Allocation policies that are defined by the provisioning service support a variety of allocation scenarios. Two common scenarios are:
14
+
This tutorial shows how to securely provision multiple simulated symmetric key devices to a group of IoT Hubs using an [allocation policy](concepts-service.md#allocation-policy). IoT Hub Device Provisioning Service (DPS) supports a variety of allocation scenarios through its built-in allocation policies and its support for custom allocation policies.
15
15
16
-
***Geolocation/ GeoLatency**: As a device moves between locations, network latency is improved by having the device provisioned to the IoT hub that's closest to each location. In this scenario, a group of IoT hubs, which span across regions, are selected for enrollments. The **Lowest latency** allocation policy is selected for these enrollments. This policy causes the Device Provisioning Service to evaluate device latency and determine the closet IoT hub out of the group of IoT hubs.
16
+
Provisioning for **Geolocation/ GeoLatency** is a common allocation scenario. As a device moves between locations, network latency is improved by having the device provisioned to the IoT hub that's closest to each location. In this scenario, a group of IoT hubs, which span across regions, are selected for enrollments. The built-in**Lowest latency** allocation policy is selected for these enrollments. This policy causes the Device Provisioning Service to evaluate device latency and determine the closet IoT hub out of the group of IoT hubs.
17
17
18
-
***Multi-tenancy**: Devices used within an IoT solution may need to be assigned to a specific IoT hub or group of IoT hubs. The solution may require all devices for a particular tenant to communicate with a specific group of IoT hubs. In some cases, a tenant may own IoT hubs and require devices to be assigned to their IoT hubs.
19
-
20
-
It's common to combine these two scenarios. For example, a multitenant IoT solution commonly assigns tenant devices using a group of IoT hubs that are scattered across different regions. These tenant devices can be assigned to the IoT hub in the group that has the lowest latency based on geographic location.
21
-
22
-
This tutorial uses a simulated device sample from the [Azure IoT C SDK](https://github.com/Azure/azure-iot-sdk-c) to demonstrate how to provision devices in a multitenant scenario across regions. You will perform the following steps in this tutorial:
18
+
This tutorial uses a simulated device sample from the [Azure IoT C SDK](https://github.com/Azure/azure-iot-sdk-c) to demonstrate how to provision devices across regions. You'll perform the following steps in this tutorial:
23
19
24
20
> [!div class="checklist"]
25
21
> * Use the Azure CLI to create two regional IoT hubs (**West US 2** and **East US**)
26
-
> * Create a multitenant enrollment
22
+
> * Create an enrollment that provisions devices based on geolocation (lowest latency)
27
23
> * Use the Azure CLI to create two regional Linux VMs to act as devices in the same regions (**West US 2** and **East US**)
28
24
> * Set up the development environment for the Azure IoT C SDK on both Linux VMs
29
-
> * Simulate the devices to see that they are provisioned for the same tenant in the closest region.
25
+
> * Simulate the devices and verify that they're provisioned to the IoT hub in the closest region.
30
26
31
27
>[!IMPORTANT]
32
28
> Some regions may, from time to time, enforce restrictions on the creation of Virtual Machines. At the time of writing this guide, the *westus2* and *eastus* regions permitted the creation of VMs. If you're unable to create in either one of those regions, you can try a different region. To learn more about choosing Azure geographical regions when creating VMs, see [Regions for virtual machines in Azure](../virtual-machines/regions.md)
@@ -41,10 +37,10 @@ This tutorial uses a simulated device sample from the [Azure IoT C SDK](https://
41
37
42
38
## Create two regional IoT hubs
43
39
44
-
In this section, you'll create an Azure resource group, and two new regional IoT hub resources for a tenant. One IoT hub will be for the **West US 2** region and the other will be for the **East US** region.
40
+
In this section, you'll create an Azure resource group, and two new regional IoT hub resources. One IoT hub will be for the **West US 2** region and the other will be for the **East US** region.
45
41
46
42
>[!IMPORTANT]
47
-
>It's recommended that you use the same resource group for all resources created in this tutorial. This will make clean up easier after you are finished.
43
+
>It's recommended that you use the same resource group for all resources created in this tutorial. This will make clean up easier after you're finished.
48
44
49
45
1. In the Azure Cloud Shell, create a resource group with the following [az group create](/cli/azure/group#az-group-create) command:
50
46
@@ -68,9 +64,9 @@ In this section, you'll create an Azure resource group, and two new regional IoT
68
64
69
65
This command may take a few minutes to complete.
70
66
71
-
## Create the multitenant enrollment
67
+
## Create an enrollment for geolatency
72
68
73
-
In this section, you'll create a new enrollment group for the tenant devices.
69
+
In this section, you'll create a new enrollment group for the your devices.
74
70
75
71
For simplicity, this tutorial uses [Symmetric key attestation](concepts-symmetric-key-attestation.md) with the enrollment. For a more secure solution, consider using [X.509 certificate attestation](concepts-x509-attestation.md) with a chain of trust.
76
72
@@ -92,7 +88,7 @@ For simplicity, this tutorial uses [Symmetric key attestation](concepts-symmetri
92
88
93
89
5. Select **Link a new IoT Hub**
94
90
95
-
:::image type="content" source="./media/how-to-provision-multitenant/create-multitenant-enrollment.png" alt-text="Add multitenant enrollment group for symmetric key attestation.":::
91
+
:::image type="content" source="./media/how-to-provision-multitenant/create-multitenant-enrollment.png" alt-text="Add enrollment group for symmetric key attestation and lowest latency.":::
96
92
97
93
6. On the **Add link to IoT hub** page, enter the following information:
98
94
@@ -122,7 +118,7 @@ For simplicity, this tutorial uses [Symmetric key attestation](concepts-symmetri
122
118
123
119
## Create regional Linux VMs
124
120
125
-
In this section, you'll create two regional Linux virtual machines (VMs). These VMs will run a device simulation sample from each region to demonstrate device provisioning for tenant devices from both regions.
121
+
In this section, you'll create two regional Linux virtual machines (VMs). These VMs will run a device simulation sample from each region to demonstrate device provisioning for devices from both regions.
126
122
127
123
To make clean-up easier, these VMs will be added to the same resource group that contains the IoT hubs that were created, *contoso-us-resource-group*. However, the VMs will run in separate regions (**West US 2** and **East US**).
128
124
@@ -194,7 +190,7 @@ To make clean-up easier, these VMs will be added to the same resource group that
194
190
195
191
## Prepare the Azure IoT C SDK development environment
196
192
197
-
In this section, you'll clone the Azure IoT C SDK on each VM. The SDK contains a sample that simulates a tenant's device provisioning from each region.
193
+
In this section, you'll clone the Azure IoT C SDK on each VM. The SDK contains a sample that simulates a device provisioning from each region.
198
194
199
195
For each VM:
200
196
@@ -279,7 +275,7 @@ For **both** *eastus* and *westus 2* devices:
279
275
p3w2DQr9WqEGBLUSlFi1jPQ7UWQL4siAGy75HFTFbf8=
280
276
```
281
277
282
-
3. Now each tenant device has their own derived device key and unique registration ID to perform symmetric key attestation with the enrollment group during the provisioning process.
278
+
3. Now each device has its own derived device key and unique registration ID to perform symmetric key attestation with the enrollment group during the provisioning process.
283
279
284
280
## Simulate the devices from each region
285
281
@@ -344,7 +340,7 @@ The sample code simulates a device boot sequence that sends the provisioning req
8. Once the build succeeds, run **prov\_dev\_client\_sample.exe** on both VMs to simulate a tenant device from each region. Notice that each device is allocated to the tenant IoT hub closest to the simulated device's regions.
343
+
8. Once the build succeeds, run **prov\_dev\_client\_sample.exe** on both VMs to simulate a device from each region. Notice that each device is allocated to the IoT hub closest to the simulated device's region.
348
344
349
345
Run the simulation:
350
346
```bash
@@ -390,7 +386,7 @@ If you plan to continue working with resources created in this tutorial, you can
390
386
The steps here assume that you created all resources in this tutorial as instructed in the same resource group named **contoso-us-resource-group**.
391
387
392
388
> [!IMPORTANT]
393
-
> Deleting a resource group is irreversible. The resource group and all the resources contained in it are permanently deleted. Make sure that you do not accidentally delete the wrong resource group or resources. If you created the IoT Hub inside an existing resource group that contains resources you want to keep, only delete the IoT Hub resource itself instead of deleting the resource group.
389
+
> Deleting a resource group is irreversible. The resource group and all the resources contained in it are permanently deleted. Make sure that you don't accidentally delete the wrong resource group or resources. If you created the IoT Hub inside an existing resource group that contains resources you want to keep, only delete the IoT Hub resource itself instead of deleting the resource group.
Copy file name to clipboardExpand all lines: articles/iot-dps/how-to-use-custom-allocation-policies.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -407,7 +407,7 @@ The simulated devices will use the derived device keys with each registration ID
407
407
408
408
In this section, you prepare the development environment used to build the [Azure IoT C SDK](https://github.com/Azure/azure-iot-sdk-c). The SDK includes the sample code for the simulated device. This simulated device will attempt provisioning during the device's boot sequence.
409
409
410
-
This section is oriented toward a Windows-based workstation. For a Linux example, see the set-up of the VMs in [How to provision for multitenancy](how-to-provision-multitenant.md).
410
+
This section is oriented toward a Windows-based workstation. For a Linux example, see the set-up of the VMs in [Tutorial: Provision for geolatency](how-to-provision-multitenant.md).
411
411
412
412
1. Download the [CMake build system](https://cmake.org/download/).
Copy file name to clipboardExpand all lines: articles/iot-dps/quick-create-simulated-device-symm-key.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ In this quickstart, you'll create a simulated device on your Windows machine. Th
19
19
20
20
If you're unfamiliar with the process of provisioning, review the [provisioning](about-iot-dps.md#provisioning-process) overview.
21
21
22
-
This quickstart demonstrates a solution for a Windows-based workstation. However, you can also perform the procedures on Linux. For a Linux example, see [How to provision for multitenancy](how-to-provision-multitenant.md).
22
+
This quickstart demonstrates a solution for a Windows-based workstation. However, you can also perform the procedures on Linux. For a Linux example, see [Tutorial: provision for geolatency](how-to-provision-multitenant.md).
Copy file name to clipboardExpand all lines: articles/iot-dps/quick-create-simulated-device-x509.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ In this quickstart, you'll create a simulated device on your Windows machine. Th
19
19
20
20
If you're unfamiliar with the process of provisioning, review the [provisioning](about-iot-dps.md#provisioning-process) overview. Also make sure you've completed the steps in [Set up IoT Hub Device Provisioning Service with the Azure portal](./quick-setup-auto-provision.md) before continuing.
21
21
22
-
This quickstart demonstrates a solution for a Windows-based workstation. However, you can also perform the procedures on Linux. For a Linux example, see [How to provision for multitenancy](how-to-provision-multitenant.md).
22
+
This quickstart demonstrates a solution for a Windows-based workstation. However, you can also perform the procedures on Linux. For a Linux example, see [Tutorial: Provision for geolatency](how-to-provision-multitenant.md).
Inthissection, youpreparethedevelopmentenvironmentusedtobuildthe [AzureIoTCSDK](https://github.com/Azure/azure-iot-sdk-c). The SDK includes the sample code for the simulated device. This simulated device will attempt provisioning during the device's boot sequence.
0 commit comments