Skip to content

Commit 57cf985

Browse files
authored
Merge pull request #206119 from madsd/asev3maintenance
App Service Environment Upgrade Preference
2 parents 99236a5 + 0399893 commit 57cf985

File tree

6 files changed

+140
-0
lines changed

6 files changed

+140
-0
lines changed
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
title: Configure upgrade preference for App Service Environment
3+
description: Configure the upgrade preference for the Azure App Service Environment.
4+
author: madsd
5+
ms.topic: tutorial
6+
ms.date: 01/08/2022
7+
zone_pivot_groups: app-service-cli-portal
8+
---
9+
10+
# Upgrade preference for App Service Environments
11+
12+
Azure App Service is regularly updated to provide new features, new runtime versions, performance improvements, and bug fixes. The upgrade happens automatically. The upgrades are applied progressively through the regions following [Azure Safe Deployment Practices](https://azure.microsoft.com/blog/advancing-safe-deployment-practices/). An App Service Environment is an Azure App Service feature that provides a fully isolated and dedicated environment for running App Service apps securely at high scale. Because of the isolated nature of App Service Environment, you have an opportunity to influence the upgrade process.
13+
14+
If you don't have an App Service Environment, see [How to Create an App Service Environment v3](./creation.md).
15+
16+
> [!NOTE]
17+
> This article covers the features, benefits, and use cases of App Service Environment v3, which is used with App Service Isolated v2 plans.
18+
>
19+
20+
With App Service Environment v3, you can specify your preference for when and how the upgrade is applied. The upgrade can be applied automatically or manually. Even with your preference set to automatic, you have some options to influence the timing.
21+
22+
## Automatic upgrade preference
23+
24+
When you use an automatic upgrade preference, the platform will upgrade your App Service Environment instance when the upgrade is available in the region in which the instance is deployed. You can choose from one of these options:
25+
26+
* *None* is the default option. This option will automatically apply the upgrade during the upgrade process for that region.
27+
* *Early* will apply the upgrade automatically, but will prioritize it as one of the first instances in the region to be upgraded.
28+
* *Late* will apply the upgrade automatically, but the instance will be one of the last in the region to be upgraded.
29+
30+
In smaller regions, Early and Late upgrade preferences might be very close to each other.
31+
32+
## Manual upgrade preference
33+
34+
Manual upgrade preference will give you the option to receive a notification when an upgrade is available. The availability will also be visible in the Azure portal. After the upgrade is available, you'll have 15 days to start the upgrade process. If you don't start the upgrade within the 15 days, the upgrade will be processed with the remaining automatic upgrades in the region.
35+
36+
> [!NOTE]
37+
> In rare cases the upgrade availability might be impacted by a security hotfix superseding the planned upgrade, or a regression found in the planned upgrade before it has been applied to your instance. In these rare cases, the available upgrade will be removed and will transition to automatic upgrade.
38+
>
39+
40+
## Configure notifications
41+
42+
When an upgrade is available, Azure will add a planned maintenance event in the Service Health dashboard of Azure Monitor. To see past notifications in the [Azure portal](https://portal.azure.com), navigate to **Home > Monitor > Service Health > Planned maintenance**. To make it easy to find the relevant events, select the **Service** box and check only the App Service type. You can also filter by subscription and region.
43+
44+
:::image type="content" source="./media/upgrade-preference/service-health-dashboard.png" alt-text="Screenshot of the Service Health dashboard in the Azure portal.":::
45+
46+
You can configure alerts to send a message to your email address and/or SMS phone number when an event is generated in Azure Monitor. You can also set up a trigger for your custom Azure Function or Logic App, which allows you to automatically take action on your resources. This action could be to automatically divert the traffic from your App Service Environment in one region that will be upgraded to an App Service Environment in another region. Then, you can automatically change the traffic back to normal when an upgrade completes.
47+
48+
To configure alerts for upgrade notifications, select the **Add service health alert** at the top of the dashboard. Learn more about [Azure Monitor Alerts](../../azure-monitor/alerts/alerts-overview.md). This how-to article will guide you through [configuring alerts for service health events](../../service-health/alerts-activity-log-service-notifications-portal.md). Finally, you can follow this how-to guide to learn [how to create actions groups](../../azure-monitor/alerts/action-groups.md) that will trigger based on the alert.
49+
50+
### Send test notifications
51+
52+
As you build your automation and notification logic, you may want to test it before the actual upgrade is available as this upgrade could be more than a month out. The Azure portal has the ability to send a special test upgrade available notification, which you can use to verify your automation logic. The message will be similar to the real notification, but the title will be prefixed with "[Test]" and the description will be different. You can send test notifications after you've configured your upgrade preference to Manual.
53+
54+
To send a test notification, navigate to the **Configuration** page for your App Service Environment and select the **Send test notification** link. The test notifications are sent in batches every 15 minutes.
55+
56+
:::image type="content" source="./media/upgrade-preference/send-test-notification.png" alt-text="Screenshot of a configuration pane to send test notifications for the App Service Environment.":::
57+
58+
::: zone pivot="experience-azp"
59+
60+
## Use the Azure portal to configure upgrade preference
61+
62+
1. From the [Azure portal](https://portal.azure.com), navigate to the **Configuration** page for your App Service Environment.
63+
1. Select an upgrade preference.
64+
:::image type="content" source="./media/upgrade-preference/configure-upgrade-preference.png" alt-text="Screenshot of a configuration pane to select and update the upgrade preference for the App Service Environment.":::
65+
1. Select "Save" at the top of the page.
66+
67+
::: zone-end
68+
69+
::: zone pivot="experience-azcli"
70+
71+
## Use Azure CLI to configure upgrade preference
72+
73+
The recommended experience for the upgrade is to use the [Azure portal](how-to-upgrade-preference.md?pivots=experience-azp). If you decide to use the Azure CLI to configure and carry out the upgrade, you should follow the steps described here in order. You can run the commands locally after [installing the Azure CLI](/cli/azure/install-azure-cli) or use the [Azure Cloud Shell](https://shell.azure.com/).
74+
75+
Replace the placeholders for name and resource group with your values for the App Service Environment you want to configure. To see the current upgrade preference:
76+
77+
```azurecli
78+
ASE_NAME=<Your-App-Service-Environment-name>
79+
ASE_RG=<Your-Resource-Group>
80+
az resource show --name $ASE_NAME -g $ASE_RG --resource-type "Microsoft.Web/hostingEnvironments" --query properties.upgradePreference
81+
```
82+
83+
To update the upgrade preference to **Manual**:
84+
85+
```azurecli
86+
ASE_NAME=<Your-App-Service-Environment-name>
87+
ASE_RG=<Your-Resource-Group>
88+
az resource update --name $ASE_NAME -g $ASE_RG --resource-type "Microsoft.Web/hostingEnvironments" --set properties.upgradePreference=Manual
89+
```
90+
91+
::: zone-end
92+
93+
::: zone pivot="experience-azp"
94+
95+
## Use the Azure portal to upgrade the App Service Environment
96+
97+
When an upgrade is available, a banner is shown in the Azure portal. Follow these steps to start the upgrade:
98+
99+
1. From the [Azure portal](https://portal.azure.com), navigate to the **Configuration** page for your App Service Environment.
100+
1. Select the **Upgrade now** button.
101+
:::image type="content" source="./media/upgrade-preference/upgrade-now.png" alt-text="Screenshot of a configuration pane to start the upgrade for the App Service Environment.":::
102+
1. A confirmation banner will appear. Select **Start upgrade** to start the upgrade process. You'll receive notifications during the upgrade if you've configured them. For more information, see [Configure notifications](#configure-notifications).
103+
104+
::: zone-end
105+
106+
::: zone pivot="experience-azcli"
107+
108+
## Use Azure CLI to upgrade the App Service Environment
109+
110+
Run these commands to get your App Service Environment ID and store it as an environment variable. Replace the placeholders for name and resource group with your values for the App Service Environment you want to migrate.
111+
112+
```azurecli
113+
ASE_NAME=<Your-App-Service-Environment-name>
114+
ASE_RG=<Your-Resource-Group>
115+
ASE_ID=$(az appservice ase show --name $ASE_NAME --resource-group $ASE_RG --query id --output tsv)
116+
```
117+
118+
Run this command to send a test upgrade notification:
119+
120+
```azurecli
121+
az rest --method POST --uri "${ASE_ID}/testUpgradeAvailableNotification?api-version=2022-03-01"
122+
```
123+
124+
Run this command to start the upgrade process:
125+
126+
```azurecli
127+
az rest --method POST --uri "${ASE_ID}/upgrade?api-version=2022-03-01"
128+
```
129+
130+
::: zone-end
131+
132+
## Next steps
133+
134+
> [!div class="nextstepaction"]
135+
> [Using an App Service Environment v3](using.md)
136+
137+
> [!div class="nextstepaction"]
138+
> [App Service Environment v3 Networking](networking.md)
37.4 KB
Loading
33 KB
Loading
76.5 KB
Loading
130 KB
Loading

articles/app-service/environment/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
href: configure-network-settings.md
4242
- name: Custom domain suffix
4343
href: how-to-custom-domain-suffix.md
44+
- name: Upgrade preference
45+
href: how-to-upgrade-preference.md
4446
- name: Migrate to App Service Environment v3
4547
href: migration-alternatives.md
4648
- name: Use the migration feature

0 commit comments

Comments
 (0)