Create a CI/CD pipeline for your Azure IoT Edge solution with Azure Pipelines

Zhiqing Qiu

Zhiqing

Modern software moves quickly and demands more from developers than ever. New CI/CD tools can help developers deliver value faster and more transparently, but the need for customized scripts that address different kinds of edge solutions still presents a challenge for some CI/CD pipelines. Now, with the Azure IoT Edge task in Azure Pipelines, developers have an easier way to build and push the modules in different platforms and deliver to a set of Azure IoT Edge devices continuously in the cloud.

Azure IoT Edge is a fully managed service that delivers cloud intelligence locally by deploying and running AI, Azure services, and custom logic directly on cross-platform IoT devices. An Edge solution contains one or more modules, which are hosted as docker images and run in docker container on Edge device. In order for an Edge solution to be applied to target Edge device(s), a deployment needs to be created in Azure IoT Hub. To try this out, visit our Quick Start documentation.

The Azure IoT Edge task in Azure Pipelines provides Build module images and Push module images task for continuous integration and Deploy to IoT Edge devices task for continuous delivery.

  • For Build module images and Push module images, you can specify which modules to build and the target container registry for the docker images
  • For Deploy to IoT Edge devices, you will set Azure IoT Hub as the target of deployment and configure other parameters (priority, target condition).

You can combine the above tasks freely. If you have different container registries for modules, you can add several Push module images tasks. If you only need to verify the success of docker build, you can use Build module images task. If your Edge solution is targeted on different platforms (amd64/windows-amd64/arm32v7), you can create multiple set of CI/CD pipelines with build agents in different platforms.

In continuous delivery, you can use the powerful stages management in Azure release pipeline. It provides convenience for you to manage different environments in deployment (QA/Production/… as the below image describes).

Visit our Quick Start documentation today to get started with creating Azure Pipelines with Azure IoT Edge task! We would love to know your suggestions for this task, feel free to provide your feedback via the Stackoverflow

Zhiqing Qiu
Zhiqing Qiu

Software Engineer

Follow Zhiqing   

Avatar
Stoimen Stoimenov 2019-02-25 02:59:44

What are the rules for "Deploy to IoT Edge devices" action to report success? Does it just create a deployment in IoT edge or it also monitores for successful deployments to the devices?