Skip to content

How can we replace a deployment? #1988

Open

Description

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    IotHubService AttentionThis issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.extension/iot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions