Skip to content

Commit 49bea19

Browse files
author
Jill Grant
authored
Merge pull request #290068 from craigshoemaker/aca/ignite-planned-maintenance
[Container Apps] 🔥Ignite: New: Planned maintenance
2 parents e324353 + 9bdd175 commit 49bea19

File tree

3 files changed

+128
-0
lines changed

3 files changed

+128
-0
lines changed

articles/container-apps/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
href: sessions-custom-container.md
6868
- name: Microservices
6969
href: microservices.md
70+
- name: Planned maintenance
71+
href: planned-maintenance.md
7072
- name: Build and deliver apps with Container Apps (video)
7173
href: https://www.youtube.com/watch?v=b3dopSTnSRg
7274
- name: Develop & deploy
15.8 KB
Loading
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
title: Azure Container Apps planned maintenance (preview)
3+
description: Configure system-level planned maintenance in Azure Container Apps
4+
services: container-apps
5+
author: craigshoemaker
6+
ms.service: azure-container-apps
7+
ms.topic: how-to
8+
ms.date: 11/05/2024
9+
ms.author: cshoe
10+
---
11+
12+
# Azure Container Apps planned maintenance (preview)
13+
14+
Azure Container Apps is a fully managed service where platform and infrastructure updates are regularly and automatically applied to both components and environments. The Container Apps update system is designed to minimize the effect on performance of your apps during updates. By defining maintenance windows, you can designate the most advantageous times for your application.
15+
16+
Defining a maintenance window allows you to decide the range of time when noncritical updates are applied to your Container Apps environment.
17+
18+
The following table describes the difference between the timing in how *critical* and *noncritical* updates are applied to your environment.
19+
20+
| Update type | Description | Timing |
21+
|---|---|---|
22+
| Critical | Urgent fixes that include updates essential to the security and stability of your app. | Anytime |
23+
| Noncritical | Routine security patches, bug fixes, and the introduction of new features. | If a planned maintenance window is defined, then updates only happen during that time span.<br><br>If a maintenance window isn't configured, then updates can be applied at any time. |
24+
25+
## How maintenance windows work
26+
27+
To control the timing for noncritical updates, you can define a weekly time range for when updates are applied to your environment. When you define a maintenance window, you specify a day of the week, a start time in the UTC format, and a duration.
28+
29+
Keep in mind the following considerations:
30+
31+
* You can only have one maintenance window per environment.
32+
33+
* The minimum duration for a maintenance window is 8 hours.
34+
35+
* Planned maintenance is a best-effort feature. When there are critical updates, Container Apps can apply these updates outside of the maintenance window to ensure the security and reliability of the platform and your applications.
36+
37+
* Support for maintenance windows is supported in all container apps and jobs, except when they run on consumption workload profiles.
38+
39+
## Minimize impact to your applications
40+
41+
In many cases, you can minimize the impact of platform updates on your applications by following these practices:
42+
43+
* **Timing**: Create a maintenance window that aligns with your organization's off-peak hours.
44+
45+
* **Design**: To minimize downtime, follow the guidance for building [reliable Container Apps](/azure/reliability/reliability-azure-container-apps?tabs=azure-cli), including the use of availability zones and multiple replicas.
46+
47+
* **Data management**: Configure your apps and jobs to be stateless so that they restart without data loss.
48+
49+
* **Reliability**: When building microservice applications, use the [Retry](/azure/architecture/patterns/retry) and [Circuit Breaker](/azure/architecture/patterns/circuit-breaker) patterns to handle transient failures.
50+
51+
## Add a window
52+
53+
You can add a maintenance window to an environment with the `maintenance-config add` command.
54+
55+
Before running this command, make sure to replace the placeholders surrounded by `<>` with your own values.
56+
57+
```azurecli
58+
az containerapp env maintenance-config add \
59+
--resource-group <RESOURCE_GROUP> \
60+
--environment <ENVIRONMENT_NAME> \
61+
--weekday Monday \
62+
--start-hour-utc 1 \
63+
--duration 8
64+
```
65+
66+
Times in UTC format are expressed using the 24-hour time format. For instance, if you want your start hour to be 1:00 pm, then the `start-hour-utc` value is `13`.
67+
68+
## Update a window
69+
70+
You can update the maintenance window for an environment with the `maintenance-config update` command.
71+
72+
Before running this command, make sure to replace the placeholders surrounded by `<>` with your own values.
73+
74+
```azurecli
75+
az containerapp env maintenance-config update \
76+
--resource-group <RESOURCE_GROUP> \
77+
--environment <ENVIRONMENT_NAME> \
78+
--weekday Monday \
79+
--start-hour-utc 1 \
80+
--duration 9
81+
```
82+
83+
Times in UTC format are expressed using the 24-hour time format. For instance, if you want your start hour to be 1:00 pm, then the `start-hour-utc` value is `13`.
84+
85+
## View the window configuration
86+
87+
You can view an environment's maintenance window with the `maintenance-config show` command.
88+
89+
```azurecli
90+
az containerapp env maintenance-config show \
91+
--resource-group <RESOURCE_GROUP> \
92+
--environment <ENVIRONMENT_NAME>
93+
```
94+
95+
## Remove a window
96+
97+
To remove an environment's maintenance window, use the `maintenance-config remove` command.
98+
99+
```azurecli
100+
az containerapp env maintenance-config remove \
101+
--resource-group <RESOURCE_GROUP> \
102+
--environment <ENVIRONMENT_NAME>
103+
```
104+
105+
## View maintenance history
106+
107+
If you have a maintenance window configured, you can see the maintenance actions against your environment within the last 30 days.
108+
109+
Use the following steps to review the maintenance history in the Azure portal.
110+
111+
1. Open your Container Apps environment in the Azure portal.
112+
113+
1. Select **Diagnose and solve problems**.
114+
115+
In the *Diagnose and solve problems* window, you can view the configured maintenance window and upgrade events that occurred in the last month. As you hover your mouse over the bars in the chart, you can see the start time for each upgrade event.
116+
117+
:::image type="content" source="media/planned-maintenance/azure-container-apps-planned-maintenance-upgrade-events.png" alt-text="Screenshot of an Azure Container Apps planned maintenance event history graph." lightbox="media/planned-maintenance/azure-container-apps-planned-maintenance-upgrade-events.png":::
118+
119+
## Considerations
120+
121+
Planned maintenance is free during preview.
122+
123+
## Next steps
124+
125+
> [!div class="nextstepaction"]
126+
> [Observability overview](./observability.md)

0 commit comments

Comments
 (0)