Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Azure/iotc-migrator
A Companion Experience that enables you to move devices between Azure IoT Central applications or move devices from an Azure IoT Central application to an Azure IoT Hub
https://github.com/Azure/iotc-migrator
iot iot-central
Last synced: 3 months ago
JSON representation
A Companion Experience that enables you to move devices between Azure IoT Central applications or move devices from an Azure IoT Central application to an Azure IoT Hub
- Host: GitHub
- URL: https://github.com/Azure/iotc-migrator
- Owner: Azure
- License: mit
- Created: 2021-04-05T18:37:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-28T08:39:52.000Z (7 months ago)
- Last Synced: 2024-07-28T23:26:51.177Z (3 months ago)
- Topics: iot, iot-central
- Language: TypeScript
- Homepage:
- Size: 5.64 MB
- Stars: 4
- Watchers: 12
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-iotcentral - iotc-migrator - companion experience for moving device between IoT Central applications or to a pure PaaS solution (companion experiences)
README
# Azure IoT Central device migration tool
A companion experience that enables you to move devices between IoT Central applications and from/to Azure IoT Hub.## Requirements
- An IoT Central application (or two if moving between applications)
> Go to [IoT Central](https://apps.azureiotcentral.com/home) to create one.
- An Azure Active Directory Application (AAD)
> Follow instructions [here](./docs/appregistration.md).
- An IoT Hub instance (if migrating from/to Azure IoT Hub)
> Go to [Azure Portal > IoT Hub](https://portal.azure.com/#create/Microsoft.IotHub) to create one IoT Hub.
- An Azure IoT Hub Device Provisioning Services (DPS) associated to the IoT Hub instance.
> Go to [Azure Portal > DPS](https://portal.azure.com/#create/Microsoft.IoTDeviceProvisioning) to create one DPS.## Setup
Create a file called _.env_ in project root with following content after completed AAD creation steps above.```ini
PORT=3002
REACT_APP_AAD_APP_CLIENT_ID=
REACT_APP_AAD_APP_TENANT_ID=
REACT_APP_AAD_APP_REDIRECT_URI=http://localhost:3002
```> Make sure that the REACT_APP_AAD_APP_REDIRECT_URI in the config file and the Redirect URIs specified in your AAD Application are the same.
### Model requirements
To successfully perform a migration from an IoT Central application, the template for the devices to be migrated must comply to a specific configuration. The easiest and quickest way to define required capabilities is to import the _DeviceMigration_ component into the template.You can find the json file [here](./assets/deviceMigrationComponent.json).
Follow instructions on [IoT Central official documentation](https://docs.microsoft.com/en-us/azure/iot-central/core/howto-set-up-template#interfaces-and-components).
>This repository contains few [code samples](./device_samples) showing how to handle the migration process from device side.
## Run
You can run the tool in development mode using:
```sh
npm start
```
- Open in the browser the AADRedirectURI url previously defined in your _.env_ (by default is http://localhost:3002) to view it in the browser.- Authenticate the user.
### Options
1. __IoT Central -> IoT Hub__Pick the needed values from source and target forms. Provide a name and click on _Migrate_ button.
Follow instructions on the page to create a new enrollment group in the DPS instance then click on _Start migration_.
2. __IoT Central -> IoT Central__
Pick the needed values from source and target forms.
Optionally specify a target template to automatically assign migrating devices to a particular template in the application.
Provide a name and click on _Migrate_ button.
Wait for the migration job to be configured. After that the job will automatically start and you can follow the progress in the _Migration status_ page.3. __IoT Hub -> IoT Central__
Select the hubs from which migrating devices, provide a name and click on _Migrate_ button. The job has been configured and available in the _Migration status_ page. Once there click on "Run" and provide the required keys following instructions.
Wait for the job to complete.
### Codebase
_iotc-migrator_ is a React SPA application written in Typescript that runs 100% in the browser. It was bootstrapped with Create React App.The project consume public Azure APIs on the latest stable versions.
The Authentication is performed using Microsoft Authentication Library (MSAL).