Skip to content

Commit 92e2c79

Browse files
authored
Merge pull request #247248 from craigshoemaker/aca/workload-profiles-ga
[Container Apps] Workload Profiles GA
2 parents 7fb24f6 + dd412d2 commit 92e2c79

21 files changed

+304
-241
lines changed

articles/container-apps/containers.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: container-apps
55
author: craigshoemaker
66
ms.service: container-apps
77
ms.topic: conceptual
8-
ms.date: 5/4/2023
8+
ms.date: 08/29/2023
99
ms.author: cshoe
1010
ms.custom: ignite-fall-2021, event-tier1-build-2022
1111
---
@@ -22,7 +22,7 @@ Azure Container Apps supports:
2222
- Containers from any public or private container registry
2323
- [Sidecar](#sidecar-containers) and [init](#init-containers) containers
2424

25-
Container apps features include:
25+
Features also include:
2626

2727
- Changes to the `template` configuration section trigger a new [container app revision](application-lifecycle-management.md).
2828
- If a container crashes, it automatically restarts.
@@ -131,19 +131,19 @@ The following code is an example of the `containers` array in the [`properties.t
131131

132132
| Setting | Description | Remarks |
133133
|---|---|---|
134-
| `image` | The container image name for your container app. | This value takes the form of `repository/image-name:tag`. |
134+
| `image` | The container image name for your container app. | This value takes the form of `repository/<IMAGE_NAME>:<TAG>`. |
135135
| `name` | Friendly name of the container. | Used for reporting and identification. |
136136
| `command` | The container's startup command. | Equivalent to Docker's [entrypoint](https://docs.docker.com/engine/reference/builder/) field. |
137137
| `args` | Start up command arguments. | Entries in the array are joined together to create a parameter list to pass to the startup command. |
138138
| `env` | An array of key/value pairs that define environment variables. | Use `secretRef` instead of the `value` field to refer to a secret. |
139-
| `resources.cpu` | The number of CPUs allocated to the container. | With the Consumption plan, values must adhere to the following rules:<br><br>• greater than zero<br>• less than or equal to 2<br>• can be any decimal number (with a max of two decimal places)<br><br> For example, `1.25` is valid, but `1.555` is invalid.<br> The default is 0.25 CPU per container.<br><br>When you use the Consumption workload profile in the Consumption + Dedicated plan structure, the same rules apply, except CPU must be less than or equal to 4.<br><br>When you use a Dedicated workload profile in the Consumption + Dedicated plan structure, the maximum CPU must be less than or equal to the number of cores available in the profile. |
140-
| `resources.memory` | The amount of RAM allocated to the container. | With the Consumption plan, values must adhere to the following rules:<br><br>• greater than zero<br>• less than or equal to `4Gi`<br>• can be any decimal number (with a max of two decimal places)<br><br>For example, `1.25Gi` is valid, but `1.555Gi` is invalid.<br>The default is `0.5Gi` per container.<br><br>When you use the Consumption workload profile in the Consumption + Dedicated plan structure, the same rules apply except memory must be less than or equal to `8Gi`.<br><br>When you use a dedicated workload profile in the Consumption + Dedicated plan structure, the maximum memory must be less than or equal to the amount of memory available in the profile. |
139+
| `resources.cpu` | The number of CPUs allocated to the container. | With the [Consumption plan](plans.md), values must adhere to the following rules:<br><br>• greater than zero<br>• less than or equal to 2<br>• can be any decimal number (with a max of two decimal places)<br><br> For example, `1.25` is valid, but `1.555` is invalid.<br> The default is 0.25 CPUs per container.<br><br>When you use the Consumption workload profile on the Dedicated plan, the same rules apply, except CPUs must be less than or equal to 4.<br><br>When you use the [Dedicated plan](plans.md), the maximum CPUs must be less than or equal to the number of cores available in the profile where the container app is running. |
140+
| `resources.memory` | The amount of RAM allocated to the container. | With the [Consumption plan](plans.md), values must adhere to the following rules:<br><br>• greater than zero<br>• less than or equal to `4Gi`<br>• can be any decimal number (with a max of two decimal places)<br><br>For example, `1.25Gi` is valid, but `1.555Gi` is invalid.<br>The default is `0.5Gi` per container.<br><br>When you use the the Consumption workload on the [Dedicated plan](plans.md), the same rules apply except memory must be less than or equal to `8Gi`.<br><br>When you use the Dedicated plan, the maximum memory must be less than or equal to the amount of memory available in the profile where the container app is running. |
141141
| `volumeMounts` | An array of volume mount definitions. | You can define a temporary volume or multiple permanent storage volumes for your container. For more information about storage volumes, see [Use storage mounts in Azure Container Apps](storage-mounts.md).|
142142
| `probes`| An array of health probes enabled in the container. | This feature is based on Kubernetes health probes. For more information about probes settings, see [Health probes in Azure Container Apps](health-probes.md).|
143143

144144
<a id="allocations"></a>
145145

146-
In the Consumption plan and the Consumption workload profile in the [Consumption + Dedicated plan structure](plans.md#consumption-dedicated), the total CPU and memory allocations requested for all the containers in a container app must add up to one of the following combinations.
146+
When you use either the Consumption plan or a Consumption workload on the Dedicated plan, the total CPU and memory allocations requested for all the containers in a container app must add up to one of the following combinations.
147147

148148
| vCPUs (cores) | Memory | Consumption plan | Consumption workload profile |
149149
|---|---|---|---|
@@ -165,31 +165,40 @@ In the Consumption plan and the Consumption workload profile in the [Consumption
165165
| `4.0` | `8.0Gi` | ||
166166

167167
- The total of the CPU requests in all of your containers must match one of the values in the *vCPUs* column.
168+
168169
- The total of the memory requests in all your containers must match the memory value in the memory column in the same row of the CPU column.
169170

170-
When you use a Dedicated workload profile in the Consumption + Dedicated plan structure, the total CPU and memory allocations requested for all the containers in a container app must be less than or equal to the cores and memory available in the profile.
171+
When you use the Consumption profile on the Dedicated plan, the total CPU and memory allocations requested for all the containers in a container app must be less than or equal to the cores and memory available in the profile.
171172

172173
## Multiple containers
173174

174-
In advanced scenarios, you can run multiple containers in a single container app. The containers share hard disk and network resources and experience the same [application lifecycle](./application-lifecycle-management.md). There are two ways to run multiple containers in a container app: [sidecar containers](#sidecar-containers) and [init containers](#init-containers).
175+
In advanced scenarios, you can run multiple containers in a single container app. Use this pattern only in specific instances where your containers are tightly coupled.
176+
177+
For most microservice scenarios, the best practice is to deploy each service as a separate container app.
178+
179+
The multiple containers in the same container app share hard disk and network resources and experience the same [application lifecycle](./application-lifecycle-management.md).
180+
181+
There are two ways to run multiple containers in a container app: [sidecar containers](#sidecar-containers) and [init containers](#init-containers).
175182

176183
### Sidecar containers
177184

178-
You can define multiple containers in a single container app to implement the [sidecar pattern](/azure/architecture/patterns/sidecar). Examples of sidecar containers include:
185+
You can define multiple containers in a single container app to implement the [sidecar pattern](/azure/architecture/patterns/sidecar).
186+
187+
Examples of sidecar containers include:
179188

180189
- An agent that reads logs from the primary app container on a [shared volume](storage-mounts.md?pivots=aca-cli#temporary-storage) and forwards them to a logging service.
190+
181191
- A background process that refreshes a cache used by the primary app container in a shared volume.
182192

183-
> [!NOTE]
184-
> Running multiple containers in a single container app is an advanced use case. You should use this pattern only in specific instances in which your containers are tightly coupled. In most situations where you want to run multiple containers, such as when implementing a microservice architecture, deploy each service as a separate container app.
193+
These scenarios are examples, and don't represent the only ways you can implement a sidecar.
185194

186195
To run multiple containers in a container app, add more than one container in the `containers` array of the container app template.
187196

188197
### <a name="init-containers"></a>Init containers
189198

190-
You can define one or more [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) in a container app. Init containers run before the primary app container and can be used to perform initialization tasks such as downloading data or preparing the environment.
199+
You can define one or more [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) in a container app. Init containers run before the primary app container and are used to perform initialization tasks such as downloading data or preparing the environment.
191200

192-
Init containers are defined in the `initContainers` array of the container app template. The containers run in the order they are defined in the array and must complete successfully before the primary app container starts.
201+
Init containers are defined in the `initContainers` array of the container app template. The containers run in the order they're defined in the array and must complete successfully before the primary app container starts.
193202

194203
> [!NOTE]
195204
> Init containers support [image pulls using managed identities](#managed-identity-with-azure-container-registry), but processes running in init containers don't have access to managed identities.
@@ -211,7 +220,7 @@ To use a container registry, you define the required fields in `registries` arra
211220
}
212221
```
213222

214-
With the registry information added, the saved credentials can be used to pull a container image from the private registry when your app is deployed.
223+
Saved credentials are used to pull a container image from the private registry as your app is deployed.
215224

216225
The following example shows how to configure Azure Container Registry credentials in a container app.
217226

@@ -238,13 +247,13 @@ The following example shows how to configure Azure Container Registry credential
238247
```
239248

240249
> [!NOTE]
241-
> Docker Hub [limits](https://docs.docker.com/docker-hub/download-rate-limit/) the number of Docker image downloads. When the limit is reached, containers in your app will fail to start. You're recommended to use a registry with sufficient limits, such as [Azure Container Registry](../container-registry/container-registry-intro.md).
250+
> Docker Hub [limits](https://docs.docker.com/docker-hub/download-rate-limit/) the number of Docker image downloads. When the limit is reached, containers in your app will fail to start. Use a registry with sufficient limits, such as [Azure Container Registry](../container-registry/container-registry-intro.md) to avoid this problem.
242251
243252
### Managed identity with Azure Container Registry
244253

245254
You can use an Azure managed identity to authenticate with Azure Container Registry instead of using a username and password. For more information, see [Managed identities in Azure Container Apps](managed-identity.md).
246255

247-
When assigning a managed identity to a registry, use the managed identity resource ID for a user-assigned identity, or "system" for the system-assigned identity.
256+
When assigning a managed identity to a registry, use the managed identity resource ID for a user-assigned identity, or `system` for the system-assigned identity.
248257

249258
```json
250259
{

articles/container-apps/environment.md

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,52 @@ services: container-apps
55
author: craigshoemaker
66
ms.service: container-apps
77
ms.topic: conceptual
8-
ms.date: 03/13/2023
8+
ms.date: 08/29/2023
99
ms.author: cshoe
1010
ms.custom: ignite-fall-2021, event-tier1-build-2022, build-2023
1111
---
1212

1313
# Azure Container Apps environments
1414

15-
A Container Apps environment is a secure boundary around groups of container apps and jobs that share the same virtual network and write logs to the same logging destination.
15+
A Container Apps environment is a secure boundary around one or more container apps and jobs. The Container Apps runtime manages each environment by handling OS upgrades, scale operations, failover procedures, and resource balancing.
1616

17-
Container Apps environments are fully managed where Azure handles OS upgrades, scale operations, failover procedures, and resource balancing.
17+
Environments include the following features:
18+
19+
| Feature | Description |
20+
|---|---|
21+
| Type | There are [two different types](#types) of Container Apps environments: Workload profiles environments and Consumption only environments. Workload profiles environments support both the Consumption and Dedicated [plans](plans.md) whereas Consumption only environments support only the Consumption [plan](plans.md). |
22+
| Virtual network | A virtual network supports each environment, which enforces the environment's secure boundaries. As you create an environment, a virtual network that has [limited network capabilities](networking.md) is created for you, or you can provide your own. Adding an [existing virtual network](vnet-custom.md) gives you fine-grained control over your network. |
23+
| Multiple container apps | When multiple container apps are in the same environment, they share the same virtual network and write logs to the same logging destination. |
24+
| Multi-service integration | You can add [Azure Functions](https://aka.ms/functionsonaca) and [Azure Spring Apps](https://aka.ms/asaonaca) to your Azure Container Apps environment. |
1825

1926
:::image type="content" source="media/environments/azure-container-apps-environments.png" alt-text="Azure Container Apps environments.":::
2027

21-
Reasons to deploy container apps and jobs to the same environment include situations when you need to:
28+
Depending on your needs, you may want to use one or more Container Apps environments. Use the following criteria to help you decide if you should use a single or multiple environments.
29+
30+
### Single environment
31+
32+
Use a single environment when you want to:
2233

2334
- Manage related services
2435
- Deploy different applications to the same virtual network
2536
- Instrument Dapr applications that communicate via the Dapr service invocation API
26-
- Have applications to share the same Dapr configuration
27-
- Have applications share the same log analytics workspace
37+
- Have applications share the same Dapr configuration
38+
- Have applications share the same log destination
2839

29-
Also, you may provide an [existing virtual network](vnet-custom.md) when you create an environment.
40+
### Multiple environments
3041

31-
Reasons to deploy container apps to different environments include situations when you want to ensure:
42+
Use more than one environment when you want two or more applications to:
3243

33-
- Two applications never share the same compute resources
34-
- Two Dapr applications can't communicate via the Dapr service invocation API
44+
- Never share the same compute resources
45+
- Not communicate via the Dapr service invocation API
46+
- Be isolated due to team or environment usage (for example, test vs. production)
3547

36-
You can add [**Azure Functions**](https://aka.ms/functionsonaca) and [**Azure Spring Apps**](https://aka.ms/asaonaca) to your Azure Container Apps environment.
48+
## Types
49+
50+
| Type | Description | Plan | Billing considerations |
51+
|--|--|--|--|
52+
| Workload profile | Run serverless apps with support for scale-to-zero and pay only for resources your apps use with the consumption profile. You can also run apps with customized hardware and increased cost predictability using dedicated workload profiles. | Consumption and Dedicated | You can choose to run apps under either or both plans using seperate workload profiles. The Dedicated plan has a fixed cost for the entire environment regardless of how many workload profiles you're using. |
53+
| Consumption only | Run serverless apps with support for scale-to-zero and pay only for resources your apps use. | Consumption only | Billed only for individual container apps and their resource usage. There's no cost associated with the Container Apps environment. |
3754

3855
## Logs
3956

@@ -44,13 +61,6 @@ Settings relevant to the Azure Container Apps environment API resource.
4461
| `properties.appLogsConfiguration` | Used for configuring the Log Analytics workspace where logs for all apps in the environment are published. |
4562
| `properties.containerAppsConfiguration.daprAIInstrumentationKey` | App Insights instrumentation key provided to Dapr for tracing |
4663

47-
## Billing
48-
49-
Azure Container Apps has two different pricing structures.
50-
51-
- If you're using the Consumption only plan, or only the Consumption workload profile in the Consumption + Dedicated plan structure then billing is relevant only to individual container apps and their resource usage. There's no cost associated with the Container Apps environment.
52-
- If you're using any Dedicated workload profiles in the Consumption + Dedicated plan structure, there's a fixed cost for the Dedicated plan management. This cost is for the entire environment regardless of how many Dedicated workload profiles you're using.
53-
5464
## Next steps
5565

5666
> [!div class="nextstepaction"]

articles/container-apps/firewall-integration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: CaryChai
66
ms.service: container-apps
77
ms.custom: event-tier1-build-2022
88
ms.topic: reference
9-
ms.date: 03/29/2023
9+
ms.date: 08/29/2023
1010
ms.author: cachai
1111
---
1212

@@ -16,7 +16,7 @@ Network Security Groups (NSGs) needed to configure virtual networks closely rese
1616

1717
You can lock down a network via NSGs with more restrictive rules than the default NSG rules to control all inbound and outbound traffic for the Container Apps environment at the subscription level.
1818

19-
In the workload profiles environment, user-defined routes (UDRs) and securing outbound traffic with a firewall are supported. Learn more in the [networking concepts document](./networking.md#user-defined-routes-udr---preview).
19+
In the workload profiles environment, user-defined routes (UDRs) and securing outbound traffic with a firewall are supported. Learn more in the [networking concepts document](./networking.md#user-defined-routes-udr).
2020

2121
In the Consumption only environment, custom user-defined routes (UDRs) and ExpressRoutes aren't supported.
2222

0 commit comments

Comments
 (0)