Skip to content

Commit e270950

Browse files
authored
Merge pull request #281344 from mimckitt/updates-1
Add MaxSurge page
2 parents 84de63b + e724e50 commit e270950

File tree

7 files changed

+143
-1
lines changed

7 files changed

+143
-1
lines changed

articles/virtual-machine-scale-sets/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@
151151
href: virtual-machine-scale-sets-change-upgrade-policy.md
152152
- name: Configure rolling upgrade policy
153153
href: virtual-machine-scale-sets-configure-rolling-upgrades.md
154+
- name: Rolling upgrades with MaxSurge
155+
href: virtual-machine-scale-sets-maxsurge.md
154156
- name: Performing manual upgrades
155157
href: virtual-machine-scale-sets-perform-manual-upgrades.md
156158
- name: Reimage a virtual machine
25.7 KB
Loading
19.2 KB
Loading
62.8 KB
Loading
46.9 KB
Loading
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---
2+
title: Rolling upgrades with MaxSurge for Virtual Machine Scale Sets (preview)
3+
description: Learn about how to utilize rolling upgrades with MaxSurge on Virtual Machine Scale Sets.
4+
author: mimckitt
5+
ms.author: mimckitt
6+
ms.topic: overview
7+
ms.service: virtual-machine-scale-sets
8+
ms.date: 7/19/2024
9+
ms.reviewer: ju-shim
10+
ms.custom: upgradepolicy
11+
---
12+
# Rolling upgrades with MaxSurge on Virtual Machine Scale Sets (Preview)
13+
14+
> [!NOTE]
15+
> Rolling upgrades with MaxSurge for Virtual Machine Scale Sets with Uniform Orchestration is in general availability (GA).
16+
>
17+
> **Rolling upgrades with MaxSurge for Virtual Machine Scale Sets with Flexible Orchestration is currently in preview.**
18+
>
19+
> Previews are made available to you on the condition that you agree to the [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). Some aspects of these features may change prior to general availability (GA).
20+
21+
Rolling upgrades with MaxSurge can help improve service uptime during upgrade events.
22+
23+
With MaxSurge enabled, new instances are created in batches using the latest scale model. When the batch of new instances are fully created and healthy, they begin taking traffic. The scale set then deletes instances in batches matching the old scale set model. The process continues until all instances are brought up-to-date.
24+
25+
26+
## How it works
27+
28+
Rolling upgrades with MaxSurge creates new instances with the latest scale set model to replace instances running with the old model. By creating new instances, you can ensure that your scale set capacity doesn't drop below the set instance count during the duration of the upgrade process.
29+
30+
:::image type="content" source="./media/upgrade-policy/maxsurge-upgrade.png" alt-text="Diagram that shows the process of performing a rolling upgrade with MaxSurge.":::
31+
32+
33+
## Configure rolling upgrades with MaxSurge
34+
Enabling or disabling MaxSurge can be done at any point in time. This includes during or after scale set provisioning. When using a rolling upgrade policy, the scale set must also use the [Application Health Extension](virtual-machine-scale-sets-health-extension.md) have a [health probe](../load-balancer/load-balancer-custom-probe-overview.md). It's suggested to create the scale set with a manual upgrade policy and update the policy to rolling after successfully confirming the application health is being properly reported.
35+
36+
37+
### [Portal](#tab/portal)
38+
39+
Select the Virtual Machine Scale Set you want to change the upgrade policy for. In the menu under **Settings**, select **Upgrade Policy** and from the drop-down menu, select **Rolling - Upgrades roll out in batches with optional pause**.
40+
41+
:::image type="content" source="../virtual-machine-scale-sets/media/upgrade-policy/rolling-upgrade-policy-portal.png" alt-text="Screenshot showing updating the upgrade policy and enabling MaxSurge in the Azure portal.":::
42+
43+
### [CLI](#tab/cli)
44+
Update an existing Virtual Machine Scale Set using [az vmss update](/cli/azure/vmss#az-vmss-update).
45+
46+
```azurecli-interactive
47+
az vmss update \
48+
--name myScaleSet \
49+
--resource-group myResourceGroup \
50+
--set upgradePolicy.mode=Rolling \
51+
--max-batch-instance-percent 10 \
52+
--max-unhealthy-instance-percent 20 \
53+
--max-unhealthy-upgraded-instance-percent 20 \
54+
--prioritize-unhealthy-instances true \
55+
--pause-time-between-batches PT2S \
56+
--max-surge true
57+
58+
```
59+
60+
### [PowerShell](#tab/powershell)
61+
Update an existing Virtual Machine Scale Set using [Update-AzVmss](/powershell/module/az.compute/update-azvmss).
62+
63+
```azurepowershell-interactive
64+
$vmss = Get-AzVmss -ResourceGroupName "myResourceGroup" -VMScaleSetName "myScaleSet"
65+
66+
Set-AzVmssRollingUpgradePolicy `
67+
-VirtualMachineScaleSet $VMSS `
68+
-MaxBatchInstancePercent 20 `
69+
-MaxUnhealthyInstancePercent 20 `
70+
-MaxUnhealthyUpgradedInstancePercent 20 `
71+
-PauseTimeBetweenBatches "PT30S" `
72+
-EnableCrossZoneUpgrade True `
73+
-PrioritizeUnhealthyInstance True `
74+
-MaxSurge True
75+
76+
Update-Azvmss -ResourceGroupName "myResourceGroup" `
77+
-Name "myScaleSet" `
78+
-UpgradePolicyMode "Rolling" `
79+
-VirtualMachineScaleSet $vmss
80+
```
81+
82+
### [ARM Template](#tab/template)
83+
84+
Update the properties section of your ARM template and set the upgrade policy to rolling and various rolling upgrade options.
85+
86+
87+
``` ARM Template
88+
"properties": {
89+
"singlePlacementGroup": false,
90+
"upgradePolicy": {
91+
"mode": "Rolling",
92+
"rollingUpgradePolicy": {
93+
"maxBatchInstancePercent": 20,
94+
"maxUnhealthyInstancePercent": 20,
95+
"maxUnhealthyUpgradedInstancePercent": 20,
96+
"pauseTimeBetweenBatches": "PT2S",
97+
"MaxSurge": "true"
98+
}
99+
}
100+
}
101+
```
102+
---
103+
## Frequently asked questions
104+
105+
### Is MaxSurge generally available for Virtual Machine Scale Sets with Uniform Orchestration?
106+
Yes. All upgrade policies including rolling upgrades with MaxSurge are generally available for Virtual Machine Scale Sets with Uniform Orchestration.
107+
108+
109+
### Is MaxSurge generally available for Virtual Machine Scale Sets with Flexible Orchestration?
110+
No. All upgrade policies including rolling upgrades with MaxSurge are in Public Preview for Virtual Machine Scale Sets with Flexible Orchestration.
111+
112+
### Do MaxSurge upgrades require more quota?
113+
Yes. When using rolling upgrades with MaxSurge, new virtual machines are created using the latest scale set model to replace virtual machines using the old scale set model. These newly created virtual machines counts towards your overall core quota.
114+
115+
### Do MaxSurge upgrades require additional IP addresses?
116+
Yes. These newly created virtual machines have new IP addresses and count towards your total allowed IP addresses available per your subscription.
117+
118+
### Do MaxSurge upgrades require additional subnet space?
119+
Yes. These newly created virtual machines have new IP addresses and there needs to be enough space available in the specified subnet to be added.
120+
121+
### What triggers a MaxSurge upgrade?
122+
Any changes that result in an update to the scale set model result in a MaxSurge upgrade. This includes upgrades that generally don't require a restart such as adding Data Disks.
123+
124+
### Can I cancel a MaxSurge upgrade?
125+
Yes. The process of canceling a MaxSurge upgrade is the same as canceling an in place rolling upgrade. You can stop the upgrade from the Azure portal, CLI, PowerShell, or any other SDK.
126+
127+
### What happens if the newly created virtual machine enters a failed state during a MaxSurge upgrade?
128+
During a MaxSurge upgrade, new virtual machines are created to replace virtual machines running the old model. If the newly created virtual machine fails to enter a healthy state, that virtual machine is deleted and the rolling upgrade is canceled.
129+
130+
131+
132+
## Next steps
133+
Learn how to [set the upgrade policy](virtual-machine-scale-sets-set-upgrade-policy.md) of your Virtual Machine Scale Set.
134+

articles/virtual-machine-scale-sets/virtual-machine-scale-sets-upgrade-policy.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Upgrade policies for Virtual Machine Scale Sets (Preview)
2+
title: Upgrade policies for Virtual Machine Scale Sets (preview)
33
description: Learn about the different upgrade policies available for Virtual Machine Scale Sets.
44
author: mimckitt
55
ms.author: mimckitt
@@ -29,6 +29,8 @@ Additionally, there can be situations where you might want specific instances in
2929

3030
With an automatic upgrade policy, the scale set makes no guarantees about the order of virtual machines being brought down. The scale set might take down all virtual machines at the same time to perform upgrades.
3131

32+
:::image type="content" source="./media/upgrade-policy/automatic-upgrade.png" alt-text="Diagram that shows a high level diagram of what happens when using an automatic upgrade policy.":::
33+
3234
Automatic upgrade policy is best suited for DevTest scenarios where you aren't concerned about the uptime of your instances while making changes to configurations and settings.
3335

3436
If your scale set is part of a Service Fabric cluster, *Automatic* mode is the only available mode. For more information, see [Service Fabric application upgrades](../service-fabric/service-fabric-application-upgrade.md).
@@ -37,13 +39,17 @@ If your scale set is part of a Service Fabric cluster, *Automatic* mode is the o
3739

3840
With a manual upgrade policy, you choose when to update the scale set instances. Nothing happens automatically to the existing virtual machines when changes occur to the scale set model. New instances added to the scale set use the most update-to-date model available.
3941

42+
:::image type="content" source="./media/upgrade-policy/manual-upgrade.png" alt-text="Diagram that shows a high level diagram of what happens when using a manual upgrade policy.":::
43+
4044
Manual upgrade policy is best suited for workloads where you require more control over when and how instances are updated.
4145

4246
### Rolling upgrade policy
4347

4448

4549
With a rolling upgrade policy, the scale set performs updates in batches. You also get more control over the upgrades with settings like batch size, max healthy percentage, prioritizing unhealthy instances and enabling upgrades across availability zones.
4650

51+
:::image type="content" source="./media/upgrade-policy/rolling-upgrade.png" alt-text="Diagram that shows a high level diagram of what happens when using a rolling upgrade policy.":::
52+
4753
Rolling upgrade policy is best suited for production workloads that require a set number of instances always be available. Rolling upgrades is safest way to upgrade instances to the latest model without compromising availability and uptime.
4854

4955
When using a rolling upgrade policy on Virtual Machine Scale Sets with Flexible Orchestration, the scale set must also use the [Application Health Extension](virtual-machine-scale-sets-health-extension.md) to monitor application health.

0 commit comments

Comments
 (0)