Azure / azure-cli-extensions

Public Repository for Extensions of Azure CLI.
https://docs.microsoft.com/en-us/cli/azure
MIT License
381 stars 1.2k forks source link

How can we replace a deployment? #1988

Open FMauroy opened 4 years ago

FMauroy commented 4 years ago

Hi, we use layered deployments and are wondering how to best handle the replacement of a deployment.

Context:

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.

yonzhan commented 4 years ago

iot

ghost commented 4 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @rkmanda, @chieftn.

yiyiguo commented 3 years ago

@Azure/azure-iot-cli-triage

yiyiguo commented 3 years ago

@gxyjenny FYI

emulic commented 2 years ago

We have the same issue and questions for our IoT project. Can someone provide some answers?