Azure IoT Edge is based on the concept of modules. A module is a container holding some logic executed on the edge device. These containers are actual Docker containers.
These can both be generic containers like a NodeJS that you have produced yourself, an open-source container, or a commercial container. In can also be a container supporting Azure IoT Edge module twins and the routing between modules using one of the Azure IoT Edge SDKs.
Anyway, the modules have to be deployed at one point in time.
By default, Azure IoT Edge devices are constructed with two basic modules registered, the edgeAgent (which is responsible for life-and-death of other modules) and the edgeHub (for enabling message routing between modules and the local gateway towards the cloud):
With life-or-death of other modules I mean the EdgeAgent is responsible for keeping the module configuration on the Azure IoT Edge device in sync with the registration and configuration in the IoT Hub device registration.
For this purpose, the Edge Agent is keen on receiving the so-called ‘deployment manifest‘.
Each time the configuration of an edge device registration in the IoT Hub changes, a new version of the deployment manifest is offered to the Edge Agent. It contains both the module descriptions and their configuration and a description of the message routing on the edge.
The Edge Agent then picks up the deployment manifest and checks for changes with the last manifest it received. If there are any configuration changes, or modules added or modules deleted, the edgeAgent will start the process of synchronizing the deployment.
If you check the documentation, three ways of altering the IoT Edge configuration (and thus deploying a new deployment manifest) are documented:
Notice these deployments are effectuated by hand.
For those seeking a CI/CD solution two other ways are offered:
These are advised if you want to automate the deployment in a CI/CD pipeline.
If you prefer to do everything by programming source code, you can deploy your manifest using REST calls.
Let’s see how that is done.Doorgaan met het lezen van “Deploy Azure IoT Edge deployment manifest programmatically”