最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How can I overwrite the current image in Azure Container App with a new one while preserving environment variables? - Stack Over

programmeradmin3浏览0评论

Situation: I have a set of Bicep templates that successfully create an Azure Container Registry (ACR) and an Azure Container App (ACA), including identities, roles, cache, etc. However, I haven’t been able to create an ACA without specifying an initial image (currently using the MS Quickstart image).

The ACA also contains secrets and environment variables, and these are triggered by a single bash script.

What I’m asking: Is it possible to create both the ACR and ACA using Bicep without specifying an initial image? If not, what’s the recommended solution?

What I’ve tried: One approach that worked was to first build the ACR, push tagged images to it, and then create the ACA. But this feels a bit clunky, especially as the 'name' values are generated by the deployment, which adds cognitive effort to track them. My expectation was to run the Bicep templates, push the images, and finally pull the new image into ACA using the Azure CLI.

Any suggestions on how to streamline this process or improve the workflow?

Situation: I have a set of Bicep templates that successfully create an Azure Container Registry (ACR) and an Azure Container App (ACA), including identities, roles, cache, etc. However, I haven’t been able to create an ACA without specifying an initial image (currently using the MS Quickstart image).

The ACA also contains secrets and environment variables, and these are triggered by a single bash script.

What I’m asking: Is it possible to create both the ACR and ACA using Bicep without specifying an initial image? If not, what’s the recommended solution?

What I’ve tried: One approach that worked was to first build the ACR, push tagged images to it, and then create the ACA. But this feels a bit clunky, especially as the 'name' values are generated by the deployment, which adds cognitive effort to track them. My expectation was to run the Bicep templates, push the images, and finally pull the new image into ACA using the Azure CLI.

Any suggestions on how to streamline this process or improve the workflow?

Share Improve this question asked Jan 18 at 11:38 user3067684user3067684 1,2581 gold badge12 silver badges25 bronze badges 4
  • 1 Seems like an image is required for aca: github/microsoft/azure-container-apps/issues/353 – qkfang Commented Jan 19 at 5:06
  • 1 you could deploy acr and the container app envrionment in one pipelie as an infra pipeline. then you build/deploy pipeline would involve: building an image / push to acr then create/update the container app. the container app env is your managed aks and the container app itlseft is just a kube deployment into your managed aks. – Thomas Commented Jan 20 at 0:16
  • 1 wonder if we normally consider aca as a part of infra or a part of code deployment? by looks of it, aca can't exist without a image, so it has to be with code deployment. – qkfang Commented Jan 20 at 10:25
  • What I am going for is a 'one click' roll out, it is mostly there. I think i'll take the advice of keeping the quick start image and secret refs in the infra deployment. Then use the Aure CLI to build, push and pull images. The DevOps pipeline I can see no way of automating the creation and update of the actual pipeline so will need to work on meaningful deployment outputs. – user3067684 Commented Jan 20 at 17:09
Add a comment  | 

1 Answer 1

Reset to default 0

What I am going for is a 'one click' roll out, it is mostly there.

I think i'll take the advice of keeping the quick start image and secret refs in the infra deployment.

Then use the Aure CLI to build, push and pull images.

The DevOps pipeline I can see no way of automating the creation and update of the actual pipeline so will need to work on meaningful deployment outputs.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论