You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machine-scale-sets/tutorial-install-apps-cli.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ az vmss extension set \
88
88
> [!CAUTION]
89
89
> File names are case sensitive. Use the exact file name stated in these instructions to avoid failure.
90
90
91
-
## Update your scale set instances
91
+
## Apply the extension to the existing scale set instances
92
92
Upgrade all the instances to apply the custom script. The upgrade may take a couple of minutes.
93
93
94
94
```azurecli-interactive
@@ -120,6 +120,17 @@ Enter the public IP address of the load balancer in to a web browser. The load b
120
120
121
121
Leave the web browser open so that you can see an updated version in the next step.
122
122
123
+
## Change the upgrade policy
124
+
In the previous section, in order to apply the updated application to all the scale set instances, a manual upgrade was needed. To enable updates to be applied automatically to all existing scale set instances, update the upgrade policy from manual to automatic. For more information on upgrade policies, see [Upgrade policies for Virtual Machine Scale Sets](virtual-machine-scale-sets-upgrade-policy.md).
125
+
126
+
```azurecli-interactive
127
+
az vmss update \
128
+
--name myScaleSet \
129
+
--resource-group myResourceGroup \
130
+
--set upgradePolicy.mode=automatic
131
+
```
132
+
133
+
123
134
## Update app deployment
124
135
In your current shell, create a file named *customConfigv2.json* and paste the following configuration. This definition runs an updated *v2* version of the application install script:
125
136
@@ -142,14 +153,7 @@ az vmss extension set \
142
153
--settings @customConfigv2.json
143
154
```
144
155
145
-
## Apply the updates
146
-
Again, upgrade all the instances to apply the custom script. The upgrade may take a couple of minutes.
147
-
148
-
```azurecli-interactive
149
-
az vmss update-instances --resource-group myResourceGroup --name myScaleSet --instance-ids "*"
150
-
```
151
-
152
-
Refresh your web browser to see the updated application.
156
+
Because the scale set is now using an automatic upgrade policy, the updated application will automatically be applied to existing scale set instances. Refresh your web browser to see the updated application.
153
157
154
158

Copy file name to clipboardExpand all lines: articles/virtual-machine-scale-sets/tutorial-install-apps-powershell.md
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ Update-AzVmss `
90
90
91
91
```
92
92
93
-
## Update the scale set instances
93
+
## Add the extension to the existing scale set instances
94
94
Perform a manual upgrade to apply the updated extension to all the existing scale set instances. The update may take a couple of minutes to complete.
95
95
96
96
```azurepowershell-interactive
@@ -150,6 +150,19 @@ Enter the public IP address of the load balancer in to a web browser. The load b
150
150
151
151
Leave the web browser open so that you can see an updated version in the next step.
152
152
153
+
## Change the update policy
154
+
In the previous section, in order to apply the updated application to all the scale set instances, a manual upgrade was needed. To enable updates to be applied automatically to all existing scale set instances, update the upgrade policy from manual to automatic. For more information on upgrade policies, see [Upgrade policies for Virtual Machine Scale Sets](virtual-machine-scale-sets-upgrade-policy.md).
Throughout the lifecycle of a scale set, you may need to deploy an updated version of your application. With the Custom Script Extension, you can reference an updated deploy script and then reapply the extension to your scale set.
All VM instances in the scale set are updated with the latest version of the sample web page. To see the updated version, refresh the web site in your browser:
193
+
Because the scale set is now using an automatic upgrade policy, the updated application will automatically be applied to existing scale set instances. Refresh your web browser to see the updated application. To see the updated version, refresh the web site in your browser:
189
194
190
195

0 commit comments