3

I've followed this guide to deploy my custom image but now I'm stuck on how do I deploy vNext of my container image?

Skimming this YouTube video, it seems revisions are the way but how using the Azure CLI?

There's also an interesting concepts page on application lifecycle management but no guides/tutorials on this topic of revisions, only the api guide pages.

spottedmahn
  • 14,823
  • 13
  • 108
  • 178

2 Answers2

4
  1. You need to update the app for a new image. This action will create a new revision behind the scenes.
az containerapp update `
  --name <APPLICATION_NAME> `
  --resource-group <RESOURCE_GROUP_NAME> `
  --image mcr.microsoft.com/azuredocs/containerapps-helloworld
  1. Depending on your activeRevisionsMode property:
    a. if single then revision should automatically get activates.
    b. if mulitple then activate and configure traffic-splitting
spottedmahn
  • 14,823
  • 13
  • 108
  • 178
JJ.
  • 879
  • 7
  • 10
  • I don't directly create the new revision if using [update app](https://learn.microsoft.com/en-us/azure/container-apps/revisions-manage?tabs=bash#update), right? it does that for me, right? – spottedmahn Jun 02 '22 at 17:46
  • 1
    Correct, revision is created implicitly. – JJ. Jun 02 '22 at 22:18
0

create a revision copy pointing to the new image:

$RESOURCE_GROUP="my-resource-group"
$CONTAINER_APP_NAME="my-image"
$NEW_IMAGE="myregistry.azurecr.io/smile:vNext"

az containerapp revision copy --resource-group $RESOURCE_GROUP `
   --name $CONTAINER_APP_NAME `
   --image $NEW_IMAGE
spottedmahn
  • 14,823
  • 13
  • 108
  • 178