Description
openedon Jul 8, 2020
Hi, we use layered deployments and are wondering how to best handle the replacement of a deployment.
Context:
- we build images from Azure DevOps, and set a tag with the build number. We have to do that because when using 'latest', the edge agent doesn't detect the update unless we do a manual 'docker pull' on the device;
- we put the build number in the layered deployment manifest;
- we then deploy using 'az iot edge deployment create' (the DevOps template that uses iotedgedev doesn't support layered deployments);
This works fine the first time, then the next, we have an error stating that the ID is already used. So we ended up deleting the deployment with this ID, and we create a new one just after.
Problem is, the deletion triggers a deactivation of the module on the device, then the creation triggers a download of the updated image. Thus for a few minutes, the module has "disappeared"... This is a different behaviour than the one we have with a full deployment, where the module is only replaced after being successfully downloaded by the edge agent.
It would make our life easier if there was an "overwrite existing" option to the create deployment command, or if the update command could accept a new deployment manifest. Deployments are stated as immutable in the doc, could you add more info why this is so?
Unless we do not do things properly? Would you recommend doing otherwise? What are the best practices for such case?
Thanks a lot!
Cheers
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: bbcd4f3e-cbf7-49a6-55f4-8f1aa4bb9995
- Version Independent ID: 4ebb9187-5e18-49b5-85eb-1e9d7a6e57cc
- Content: az iot edge deployment
- Content Source: latest/docs-ref-autogen/ext/azure-cli-iot-ext/iot/edge/deployment.yml
- Service: iot-hub
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw