Skip to content

Commit 621c3b9

Browse files
Merge pull request #197059 from cebundy/revisions
Container App: Update Revisions article
2 parents 03a0303 + b64008b commit 621c3b9

File tree

5 files changed

+111
-26
lines changed

5 files changed

+111
-26
lines changed
-1.35 KB
Loading
-4.67 KB
Loading
52.2 KB
Loading
46.8 KB
Loading

articles/container-apps/revisions.md

Lines changed: 111 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,156 @@
11
---
22
title: Revisions in Azure Container Apps Preview
3-
description: Learn how revisions are created in Azure Container Apps
3+
description: Learn about revisions in Azure Container Apps
44
services: container-apps
55
author: craigshoemaker
66
ms.service: container-apps
77
ms.topic: conceptual
8-
ms.date: 11/02/2021
8+
ms.date: 05/11/2022
99
ms.author: cshoe
1010
ms.custom: ignite-fall-2021
1111
---
1212

1313
# Revisions in Azure Container Apps Preview
1414

15-
A revision is an immutable snapshot of a container app.
15+
Azure Container Apps implements container app versioning by creating revisions. A revision is an immutable snapshot of a container app version.
1616

1717
- The first revision is automatically created when you deploy your container app.
18-
- New revisions are automatically created when a container app's `template` configuration changes.
19-
- While revisions are immutable, they're affected by changes to global configuration values, which apply to all revisions.
18+
- New revisions are automatically created when you make a [*revision-scope*](#revision-scope-changes) change to your container app.
19+
- While revisions are immutable, they're affected by [*application-scope*](#application-scope-changes) changes, which apply to all revisions.
20+
- You can retain up to 100 revisions, giving you a historical record of your container app updates.
21+
- You can run multiple revisions concurrently.
22+
- You can split external HTTP traffic between active revisions.
2023

2124
:::image type="content" source="media/revisions/azure-container-apps-revisions.png" alt-text="Azure Container Apps: Containers":::
2225

23-
Revisions are most useful when you enable [ingress](ingress.md) to make your container app accessible via HTTP. Revisions are often used when you want to direct traffic from one snapshot of your container app to the next. Typical traffic direction strategies include [A/B testing](https://wikipedia.org/wiki/A/B_testing) and [BlueGreen deployment](https://martinfowler.com/bliki/BlueGreenDeployment.html).
26+
27+
## Use cases
28+
29+
Container Apps revisions help you manage the release of updates to your container app by creating a new revision each time you make a *revision-scope* change to your app. You can control which revisions are active, and the external traffic that is routed to each active revision.
30+
31+
You can use revisions to:
32+
33+
- Release a new version of your app.
34+
- Quickly revert to an earlier version of your app.
35+
- Split traffic between revisions for [A/B testing](https://wikipedia.org/wiki/A/B_testing).
36+
- Gradually phase in a new revision in blue-green deployments. For more information about blue-green deployment, see [BlueGreenDeployment](https://martinfowler.com/bliki/BlueGreenDeployment.html).
2437

2538
The following diagram shows a container app with two revisions.
2639

2740
:::image type="content" source="media/revisions/azure-container-apps-revisions-traffic-split.png" alt-text="Azure Container Apps: Traffic splitting among revisions":::
2841

29-
The scenario shown above presumes the container app is in following state:
42+
The scenario shown above presumes the container app is in the following state:
3043

31-
- [Ingress](ingress.md) is enabled, which makes the container app available via HTTP.
32-
- The first revision is deployed as _Revision 1_.
44+
- [Ingress](ingress.md) is enabled, making the container app available via HTTP.
45+
- The first revision was deployed as _Revision 1_.
3346
- After the container was updated, a new revision was activated as _Revision 2_.
34-
- [Traffic splitting](revisions-manage.md#traffic-splitting) rules are configured so that _Revision 1_ receives 80% of the requests, while _Revision 2_ receives the remaining 20%.
47+
- [Traffic splitting](revisions-manage.md#traffic-splitting) rules are configured so that _Revision 1_ receives 80% of the requests, and _Revision 2_ receives the remaining 20%.
48+
49+
## Revision name suffix
50+
51+
Revision names are used to identify a revision, and in the revision's URL. You can customize the revision name by setting the revision suffix.
52+
53+
The format of a revision name is:
54+
55+
```text
56+
<container app name>--<revision suffix>
57+
```
58+
59+
By default, Container Apps creates a unique revision name with a suffix consisting of a semi-random string of alphanumeric characters. You can customize the name by setting a unique custom revision suffix.
60+
61+
For example, for a container app named *album-api*, setting the revision suffix name to *1st-revision* would create a revision with the name *album-api--1st-revision*.
62+
63+
You can set the revision suffix in the [ARM template](azure-resource-manager-api-spec.md#propertiestemplate), through the Azure CLI `az containerapp create` and `az containerapp update` commands, or when creating a revision via the Azure portal.
3564

3665
## Change types
3766

38-
Changes made to a container app fall under one of two categories: *revision-scope* and *application-scope* changes. Revision-scope changes are any change that triggers a new revision, while application-scope changes don't create revisions.
67+
Changes to a container app fall under two categories: *revision-scope* or *application-scope* changes. *Revision-scope* changes trigger a new revision when you deploy your app, while *application-scope* changes don't.
3968

4069
### Revision-scope changes
4170

42-
The following types of changes create a new revision:
71+
A new revision is created when a container app is updated with *revision-scope* changes. The changes are limited to the revision in which they're deployed, and don't affect other revisions.
72+
73+
A *revision-scope* change is any change to the parameters in the [`properties.template`](azure-resource-manager-api-spec.md#propertiestemplate) section of the container app resource template.
4374

44-
- Changes to containers
45-
- Add or update scaling rules
46-
- Changes to Dapr settings
47-
- Any change that affects the `template` section of the configuration
75+
These parameters include:
76+
77+
- [Revision suffix](#revision-name-suffix)
78+
- Container configuration and images
79+
- Scale rules for the container application
4880

4981
### Application-scope changes
5082

51-
The following types of changes do not create a new revision:
83+
When you deploy a container app with *application-scope* changes:
84+
85+
- The changes are globally applied to all revisions.
86+
- A new revision isn't created.
87+
88+
*Application-scope* changes are defined as any change to the parameters in the [`properties.configuration`](azure-resource-manager-api-spec.md#propertiesconfiguration) section of the container app resource template.
89+
90+
These parameters include:
91+
92+
- [Secret values](manage-secrets.md) (revisions must be restarted before a container recognizes new secret values)
93+
- [Revision mode](#revision-modes)
94+
- Ingress configuration including:
95+
- Turning [ingress](ingress.md) on or off
96+
- [Traffic splitting rules](revisions-manage.md#traffic-splitting)
97+
- Labels
98+
- Credentials for private container registries
99+
- Dapr settings
100+
52101

53-
- Changes to [traffic splitting rules](revisions-manage.md#traffic-splitting)
54-
- Turning [ingress](ingress.md) on or off
55-
- Changes to [secret values](manage-secrets.md)
56-
- Any change outside the `template` section of the configuration
102+
## Revision modes
57103

58-
While changes to secrets are an application-scope change, revisions must be [restarted](revisions.md) before a container recognizes new secret values.
104+
The revision mode controls whether only a single revision or multiple revisions of your container app can be simultaneously active. You can set your app's revision mode from your container app's **Revision management** page in the Azure portal, using Azure CLI commands, or in the ARM template.
105+
106+
### Single revision mode
107+
108+
By default, a container app is in *single revision mode*. In this mode, only one revision is active at a time. When a new revision is created, the latest revision replaces the active revision.
109+
110+
### Multiple revision mode
111+
112+
Set the revision mode to *multiple revision mode*, to run multiple revisions of your app simultaneously. While in this mode, new revisions are activated alongside current active revisions.
113+
114+
For an app implementing external HTTP ingress, you can control the percentage of traffic going to each active revision from your container app's **Revision management** page in the Azure portal, using Azure CLI commands, or in an ARM template. For more information, see [Traffic splitting](revisions-manage.md#traffic-splitting).
115+
116+
## Revision Labels
117+
118+
For container apps with external HTTP traffic, labels are a portable means to direct traffic to specific revisions. A label provides a unique URL that you can use to route traffic to the revision that the label is assigned. To switch traffic between revisions, you can move the label from one revision to another.
119+
120+
- Labels keep the same URL when moved from one revision to another.
121+
- A label can be applied to only one revision at a time.
122+
- Allocation for traffic splitting isn't required for revisions with labels.
123+
- Labels are most useful when the app is in *multiple revision mode*.
124+
- You can enable labels, traffic splitting or both.
125+
126+
Labels are useful for testing new revisions. For example, when you want to give access to a set of test users, you can give them the label's URL. Then when you want to move your users to a different revision, you can move the label to that revision.
127+
128+
Labels work independently of traffic splitting. Traffic splitting distributes traffic going to the container app's application URL to revisions based on the percentage of traffic. When traffic is directed to a label's URL, the traffic is routed to one specific revision.
129+
130+
A label name must:
131+
132+
- consist of lower case alphanumeric characters or dashes ('-')
133+
- start with an alphabetic character
134+
- end with an alphanumeric character
135+
- not have two consecutive dashes (--)
136+
- not be more than 64 characters
137+
138+
You can manage labels from your container app's **Revision management** page in the Azure portal.
139+
140+
:::image type="content" source="media/revisions/screen-shot-revision-mgmt-labels.png" alt-text="Screenshot of Container Apps revision management.":::
141+
142+
You can find the label URL in the revision details pane.
143+
144+
:::image type="content" source="media/revisions/screen-shot-revision-mgmt-revision-details.png" alt-text="Screenshot of Container Apps revision details.":::
59145

60146
## Activation state
61147

62-
New revisions remain active until you deactivate them, or you set your container app to automatically deactivate old revisions.
148+
In *multiple revision mode*, revisions remain active until you deactivate them. You can activate and deactivate revisions from your container app's **Revision management** page in the Azure portal or from the Azure CLI.
63149

64-
- Inactive revisions remain as a snapshot record of your container app in a certain state.
65-
- You are not charged for inactive revisions.
66-
- Up to 100 revisions remain available before being purged.
150+
You aren't charged for the inactive revisions. You can have a maximum of 100 revisions, after which the oldest revision is purged.
67151

68152
## Next steps
69153

70154
> [!div class="nextstepaction"]
71155
> [Application lifecycle management](application-lifecycle-management.md)
156+

0 commit comments

Comments
 (0)