Skip to content

Commit 1ee776c

Browse files
committed
Fix screenshots
1 parent 1f51bc1 commit 1ee776c

File tree

4 files changed

+54
-20
lines changed

4 files changed

+54
-20
lines changed

articles/iot-central/core/howto-migrate-to-iot-hub.md

Lines changed: 54 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Migrate devices from Azure IoT Central to Azure IoT Hub | Microsoft Docs
33
description: Describes how to use the migration tool to migrate devices that currently connect to an Azure IoT Central application to an Azure IoT hub.
44
author: dominicbetts
55
ms.author: dobett
6-
ms.date: 07/26/2022
6+
ms.date: 09/12/2022
77
ms.topic: how-to
88
ms.service: iot-central
99
---
@@ -22,6 +22,9 @@ The tool requires your connected devices to implement a **DeviceMove** command t
2222
- Provision itself with DPS by using the new ID scope in the command payload.
2323
- Use the provisioning result to connect to the destination IoT hub and start sending telemetry again.
2424

25+
> [!TIP]
26+
> You can also use the migrator tool to migrate devices between IoT Cental applications, or from an IoT hub to an IoT Central application.
27+
2528
## Prerequisites
2629

2730
You need the following prerequisites to complete the device migration steps:
@@ -32,7 +35,7 @@ You need the following prerequisites to complete the device migration steps:
3235

3336
## Device requirements
3437

35-
The devices that you want to migrate must implement the **DeviceMove** command. The command payload contains the *ID scope* of the destination DPS instance. The migrator tool repository includes an example [DTDL component model](https://raw.githubusercontent.com/Azure/iotc-migrator/main/assets/deviceMigrationComponent.json) that that defines the **DeviceMove** command. You can add this component to your existing device templates.
38+
The devices that you want to migrate must implement the **DeviceMove** command in a component called **migration**. The command payload contains the *ID scope* of the destination DPS instance. The migrator tool repository includes an example [DTDL component model](https://raw.githubusercontent.com/Azure/iotc-migrator/main/assets/deviceMigrationComponent.json) that that defines the **DeviceMove** command. You can add this component to your existing device templates.
3639

3740
The tool repository also includes [sample code](https://github.com/Azure/iotc-migrator/tree/main/device_samples) that shows you how a device should implement the **DeviceMove** command.
3841

@@ -50,18 +53,54 @@ The migrator tool requires an Azure Active Directory application registration to
5053

5154
1. Enter a name such as "IoTC Migrator app".
5255

53-
1. Select **Accounts in this organizational directory only ({your directory} only - Single tenant)**.
56+
1. Select **Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)**.
5457

5558
1. Select **Single page application (SPA)**.
5659

57-
1. Enter `http://localhost:3000` as the redirect URI.
60+
1. Enter `http://localhost:3000` as the redirect URI. You add this value to the migrator app configuration later.
5861

5962
1. Select **Register**.
6063

6164
1. Make a note of the **Application (client) ID** and **Directory (tenant) ID** values. You use these values later to configure the migrator app:
6265

6366
:::image type="content" source="media/howto-migrate-to-iot-hub/azure-active-directory-app.png" alt-text="Screenshot that shows the Azure Active Directory application in the Azure portal." lightbox="media/howto-migrate-to-iot-hub/azure-active-directory-app.png":::
6467

68+
1. Navigate to the **Manifest** page in the registration and replace the contents of the `requiredResourceAccess` with the following configuration:
69+
70+
```json
71+
[
72+
{
73+
"resourceAppId": "9edfcdd9-0bc5-4bd4-b287-c3afc716aac7",
74+
"resourceAccess": [
75+
{
76+
"id": "73792908-5709-46da-9a68-098589599db6",
77+
"type": "Scope"
78+
}
79+
]
80+
},
81+
{
82+
"resourceAppId": "797f4846-ba00-4fd7-ba43-dac1f8f63013",
83+
"resourceAccess": [
84+
{
85+
"id": "41094075-9dad-400e-a0bd-54e686782033",
86+
"type": "Scope"
87+
}
88+
]
89+
},
90+
{
91+
"resourceAppId": "00000003-0000-0000-c000-000000000000",
92+
"resourceAccess": [
93+
{
94+
"id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
95+
"type": "Scope"
96+
}
97+
]
98+
}
99+
]
100+
```
101+
102+
1. Save the changes.
103+
65104
### Add the device keys to DPS
66105

67106
Add the shared access signature keys or X.509 certificates from your IoT Central application to your DPS allocation group.
@@ -93,20 +132,17 @@ Download or clone a copy of the migrator tool to your local machine:
93132
git clone https://github.com/Azure/iotc-migrator.git
94133
```
95134

96-
Open the *config.ts* file in a text editor. Update the `AADClientID` and `AADDIrectoryID` with the values from the Azure Active Directory application registration you created previously. Update the `applicationHost` to match the URL of your IoT Central application. Then save the changes:
135+
In the root of the downloaded repository, create a *.env* file. Update the `REACT_APP_AAD_APP_CLIENT_ID`, `REACT_APP_AAD_APP_TENANT_ID`, and `REACT_APP_AAD_APP_REDIRECT_URI` values with the values from the Azure Active Directory application registration you created previously. Then save the changes:
97136

98-
```typescript
99-
{
100-
AADLoginServer: 'https://login.microsoftonline.com',
101-
AADClientID: '<your-AAD-Application-(client)-ID>',
102-
AADDirectoryID: '<your-AAD-Directory-(tenant)-ID>',
103-
AADRedirectURI: 'http://localhost:3000',
104-
applicationHost: '<your-iot-central-app>.azureiotcentral.com'
105-
}
137+
```txt
138+
PORT=3000
139+
REACT_APP_AAD_APP_CLIENT_ID=<your-AAD-Application-(client)-ID>
140+
REACT_APP_AAD_APP_TENANT_ID=<your-AAD-Directory-(tenant)-ID>
141+
REACT_APP_AAD_APP_REDIRECT_URI=http://localhost:3000
106142
```
107143

108144
> [!TIP]
109-
> Make sure the `AADRedirectURI` matches the redirect URI you used in your Azure Active Directory application registration.
145+
> Make sure the `REACT_APP_AAD_APP_REDIRECT_URI` matches the redirect URI you used in your Azure Active Directory application registration.
110146
111147
In your command-line environment, navigate to the root of the `iotc-migrator` repository. Then run the following commands to install the required node.js packages and then run the tool:
112148

@@ -115,7 +151,7 @@ npm install
115151
npm start
116152
```
117153

118-
After the migrator app starts, navigate to `http://localhost:3000` to view the tool.
154+
After the migrator app starts, navigate to `http://localhost:3000` to view the tool. Sign in when you're prompted.
119155

120156
## Migrate devices
121157

@@ -126,19 +162,17 @@ Use the tool to migrate your devices in batches. Enter the migration details on
126162
1. Select a device template that includes the **DeviceMove** command definition.
127163
1. Select **Move to your own Azure IoT Hub**.
128164
1. Select the DPS instance linked to your target IoT hub.
129-
1. Select **Migrate**.
165+
1. Select **Migrate**. The tool prompts you to copy the keys from your IoT Central application to the DPS enrollment group. You previously completed this step in the [Add the device keys to DPS](#add-the-device-keys-to-dps) step.
130166

131167
:::image type="content" source="media/howto-migrate-to-iot-hub/migrator-tool.png" alt-text="Screenshot of migration tool." lightbox="media/howto-migrate-to-iot-hub/migrator-tool.png":::
132168

133169
The tool now registers all the connected devices that matched the target device filter in the destination IoT hub. The tool then creates a job in your IoT Central application to call the **DeviceMove** method on all those devices. The command payload contains the ID scope of the destination DPS instance.
134170

135171
## Verify migration
136172

137-
The **Migration status** page in the tool shows you when the migration is complete:
138-
139-
:::image type="content" source="media/howto-migrate-to-iot-hub/migration-complete.png" alt-text="Screenshot showing completed migration status in tool." lightbox="media/howto-migrate-to-iot-hub/migration-complete.png":::
173+
Use the **Migration status** page in the migrator tool to monitor the progress.
140174

141-
Select a job on this page to view the [job status](howto-manage-devices-in-bulk.md#view-job-status) in your IoT Central application. Use this page to view the status of the individual devices in the job:
175+
Select a job on the **Migration status** page to view the [job status](howto-manage-devices-in-bulk.md#view-job-status) in your IoT Central application. Use this page to view the status of the individual devices in the job:
142176

143177
:::image type="content" source="media/howto-migrate-to-iot-hub/job-status.png" alt-text="Screenshot showing completed migration status for IoT Central job." lightbox="media/howto-migrate-to-iot-hub/job-status.png":::
144178

-3.93 KB
Loading
Binary file not shown.
-17.8 KB
Loading

0 commit comments

Comments
 (0)