Integration with Azure IoT

Introduction

Azure IoT Edge is a fully managed service built on Azure IoT Hub. Deploy your cloud workloads and third-party services, or your own business logic to run on Internet of Things (IoT) edge devices via standard containers and monitor it all from the cloud. If you want to reduce bandwidth costs and avoid transferring terabytes of raw data, you can clean and aggregate the data locally then only send the insights to the cloud for analysis. Azure IoT is focused on container management (applications must self-heal or the user must follow optional steps for adding Kubernetes) and creating a secure channel to the cloud but not system provisioning, management, and security - this is the user’s responsibility.

NVIDIA Fleet Command is a hybrid-cloud platform for securely and remotely deploying, managing, and scaling AI across dozens or up to thousands of servers or edge devices. Instead of spending weeks planning and executing deployments, in minutes, administrators can scale AI to retail stores, warehouses, hospitals, or city street intersections. With the capability of an entire IT division in a single control plane, administrators can manage the lifecycle of AI applications, update system software over the air, and remotely monitor and access systems.

Azure IoT Edge supports devices on-premises and in the cloud. However, the devices require provisioning steps to be performed by the customer, such as installing the runtime and connecting the devices to Azure. NVIDIA Fleet Command can integrate with Azure IoT and provide some of the benefits built into NVIDIA’s platform, such as one-touch provisioning and fleet management, as well as end-to-end security. Azure IoT-enabled applications can be deployed with Fleet Command and still leverage the rest of the Azure cloud service - ultimately completing the solution by adding system management with Fleet Command, a complementary not competitive solution.

Deployment Methods

This document provides two main methods of integrating Fleet Command with Azure IoT Edge:

../_images/edge-ai-azure-fleet-command-integration-diagram.jpg
  1. Deploying applications integrated with Azure IoT on Fleet Command.

  2. Deploying Azure IoT and managing Azure IoT Edge node from Fleet Command.

Additional information, example applications and Helm charts are available in the NVIDIA GitHub repo.

Prerequisites

The following are prerequisites for integration:

  • Access to Azure Account with permissions to create Azure IoT Hub resources.

  • Access to an NGC organization that is enabled for Fleet Command.

  • A location and system created in Fleet Command. Consult the Fleet Command User Guide for additional information.

Deploying Applications integrated with Azure IoT on Fleet Command

For the first method of integration, applications can be enabled for Azure IoT and then deployed on Fleet Command. Users will use Fleet Command for provisioning and deploying applications, but then benefit from the constructs in Azure IoT Hub for receiving telemetry and building web applications. This section explains how to do that.

Azure IoT Preparation

  1. Create an Azure IoT Hub resource on Azure. For more information refer to create an IoT Hub.

  2. Create an Azure IoT device on IoT Hub to send and receive messages from Fleet Command edge devices. For more information refer to register new device on Azure IoT Hub.

  3. Obtain a Primary Connection String to communicate with the IoT Hub from Fleet Command edge devices. Refer to device authentication to get a Primary Connection String.

Once the above steps are completed successfully, please proceed further.

Application Preparation

To create an Azure IoT application that will send telemetry to Azure IoT Hub, you need to integrate Azure IoT SDKs with your application. For more information refer to the links below.

Refer to this sample python application, to help you integrate Azure IoT SDK into your application.

Once you integrate Azure SDK into your application, make sure to create a Helm chart to deploy on the Fleet Command system. Refer to the Fleet Command Application Development Guide for more information.

It’s recommended to configure the Azure IoT Primary Connection String as a configurable option in the Helm chart. Refer to the Example Application section below.

Example Application

An example application Helm chart is provided in the NVIDIA GitHub repo, that integrates NVIDIA’s IVA demo application with Azure IoT. The goal of this integrated application is to send the DeepStream container logs to Azure IoT as telemetry data.

To deploy this application, first upload this Helm chart to your NGC Private Registry following the instructions here. Then follow the instructions in the Fleet Command User Guide to add the application to Fleet Command.

You will also want to create an IoT Device instance in Azure IoT corresponding to the application to receive the telemetry data. Make a note of the primary connection string for this device since you’ll reference this later.

Once the application is added, create a deployment in Fleet Command with a Location and System you have already provisioned, selecting your application that you have added to Fleet Command. Provide the Azure IoT Primary connection string in the Application Configuration field for the Deployment, then deploy the application.

iotdevice-connection-string: "HostName=egx-iot.azure-devices.net;DeviceId=egx-iot-device;SharedAccessKey=F1/EOVGtm2b3fFzXXxxXXaaXXXxXaaaXaXxxAxAa"

Note

This sample application includes a sample script to read the telemetry data from Azure IoT on your local machine. Refer to Azure documentation on how to view telemetry data within Azure IoT.

Deploying Azure IoT and managing Azure IoT Edge node from Fleet Command

The second method of integration will use Fleet Command for provisioning and managing the Azure IoT Edge node, but then benefit from the constructs in the Azure IoT Hub for managing the application life cycle. This allows users to continue to use their existing Azure resources and applications but simplify management of systems at the Edge using Fleet Command.

This section will discuss how to create a Helm chart for deploying the Azure IoT Edge Runtime on Fleet Command systems, connecting these systems to Azure, and deploying an application from Azure.

Azure IoT Edge Preparation

  1. Create an Azure IoT Hub resource on Azure. For more information, refer to create an IoT Hub.

  2. Create an Azure IoT edge device on IoT Hub to manage the application lifecycle from Fleet Command edge devices. For more information, refer to register new device on Azure IoT Hub.

  3. Obtain a Primary Connection String to communicate with IoT Hub from Fleet Command edge devices. Refer to device authentication to get a Primary Connection String.

Once the above steps are completed successfully, please proceed further.

Deploy Azure Runtime on Fleet Command

Once you have a Fleet Command system up and running, follow the steps below.

To add the Azure IoT runtime Helm chart to Fleet Command, first, upload this Helm chart to your NGC Private Registry following the instructions here, then follow the instructions in the User Fleet Command User Guide to add the application to Fleet Command.

Next, follow the Creating a Deployment steps to deploy the Azure IoT Runtime on the Fleet Command system. This will create an Azure IoT Edge node using the Fleet Command system.

Note

During the creation of the deployment you need to provide an Azure IoT Primary Connection string in the Application Configuration field of the Deployment, in order to connect the runtime to Azure IoT Edge.

provisioning:
deviceConnectionString: "HostName=egx-iot.azure-devices.net;DeviceId=fc-node;SharedAccessKey=EOVGtm2b3fFzXXxxXXaaXXXxXaaaXaXxxAxAa="

Once Azure IoT Runtime is deployed on Fleet Command, wait at least five minutes to see the below status in Azure IoT.

../_images/azure-deployment-status.png

Deploy and Manage Azure IoT Application

Now you can deploy an Azure IoT application/module from Azure on the Fleet Command system and manage its lifecycle in Azure IoT. For more information about deploying Azure IoT Applications, refer to Deploy Azure IoT Edge Modules.