Skip to content

Commit e5f6c35

Browse files
authored
Merge pull request #42499 from v-rachiw/update_sf_vmss_sku_cli
updated cli commands in update vmss sku document
2 parents df7d991 + 4f41e42 commit e5f6c35

File tree

1 file changed

+71
-24
lines changed

1 file changed

+71
-24
lines changed

articles/service-fabric/service-fabric-update-vmss-sku.md

Lines changed: 71 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ author: v-rachiw
77
manager: navya
88
editor: ''
99

10-
ms.assetid: 5441e7e0-d842-4398-b060-8c9d34b07c48
1110
ms.service: service-fabric
1211
ms.devlang: dotnet
1312
ms.topic: article
@@ -17,20 +16,28 @@ ms.date: 05/08/2018
1716
ms.author: v-rachiw
1817

1918
---
20-
2119
# Upgrade/migrate the SKU for Primary Node Type to higher SKU
2220

2321
This article describes how to upgrade/migrate the SKU of Primary Node Type of service fabric cluster to higher SKU using Azure PowerShell
2422

25-
## Add a new virtual machine scale set
23+
## Add a new virtual machine scale set
24+
25+
Deploy a new virtual machine scale set and Load Balancer. The Service Fabric extension configuration (especially the node type) of new virtual machine scale set should be same as the old scale set you're trying to upgrade. Verify in the Service Fabric explorer that your new nodes are available
2626

27-
Deploy a new virtual machine scale set and Load Balancer. The Service Fabric extension configuration (especially the node type) of new virtual machine scale set should be same as the old scale set you're trying to upgrade. Verify in the SF explorer that your new nodes are available.
27+
#### Azure PowerShell
2828

29-
### Azure PowerShell
3029
The following example uses Azure PowerShell to deploy updated Resource Manager template *template.json* using the resource group named *myResourceGroup*:
3130

3231
```powershell
33-
New-AzureRmResourceGroupDeployment -ResourceGroupName myResourceGroup -TemplateFile \template\template.json
32+
New-AzureRmResourceGroupDeployment -ResourceGroupName myResourceGroup -TemplateFile template.json -TemplateParameterFile parameters.json
33+
```
34+
35+
#### Azure CLI
36+
37+
The following command uses Azure Service Fabric CLI to deploy updated Resource Manager template *template.json* using the resource group named *myResourceGroup*:
38+
39+
```CLI
40+
az group deployment create --resource-group myResourceGroup --template-file template.json --parameters parameters.json
3441
```
3542

3643
Refer following example to modify json template to add new virtual machine scale set resource with Primary node type in existing cluster
@@ -211,43 +218,58 @@ Refer following example to modify json template to add new virtual machine scale
211218
},
212219
```
213220

214-
215221
## Remove old virtual machine scale set
216222

217-
Disable VM instances of old virtual machine scale set with intent to remove node. This operation may take a long time to complete. You can disable all at once and they'll be queued. Wait until all nodes are disabled.
218-
219-
### Azure PowerShell
223+
1. Disable VM instances of old virtual machine scale set with intent to remove node. This operation may take a long time to complete. You can disable all at once and they'll be queued. Wait until all nodes are disabled.
224+
#### Azure PowerShell
220225
The following example uses Azure Service Fabric PowerShell to disable node instance named *NTvm1_0* from old virtual machine scale set named *NTvm1*:
221-
222226
```powershell
223-
Disable-ServiceFabricNode -NodeName NTvm1_0 -Intent RemoveNode
227+
Disable-ServiceFabricNode -NodeName NTvm1_0 -Intent RemoveNode
224228
```
225-
226-
Remove the complete scale set. Wait until scale set Provisioning state is succeeded
227-
228-
### Azure PowerShell
229+
#### Azure CLI
230+
The following command uses Azure Service Fabric CLI to disable node instance named *NTvm1_0* from old virtual machine scale set named *NTvm1*:
231+
```CLI
232+
sfctl node disable --node-name "_NTvm1_0" --deactivation-intent RemoveNode
233+
```
234+
2. Remove the complete scale set. Wait until scale set Provisioning state is succeeded
235+
#### Azure PowerShell
229236
The following example uses Azure PowerShell to remove the complete scale set named *NTvm1* from resource group named *myResourceGroup*:
230-
231237
```powershell
232238
Remove-AzureRmVmss -ResourceGroupName myResourceGroup -VMScaleSetName NTvm1
233239
```
240+
#### Azure CLI
241+
The following command uses Azure Service Fabric CLI to remove the complete scale set named *NTvm1* from resource group named *myResourceGroup*:
242+
243+
```CLI
244+
az vmss delete --name NTvm1 --resource-group myResourceGroup
245+
```
234246

235247
## Remove Load Balancer related to old scale set
236248

237249
Remove Load Balancer related to old scale set. This step will cause a brief period of downtime for the cluster
238250

239-
### Azure PowerShell
251+
#### Azure PowerShell
252+
240253
The following example uses Azure PowerShell to remove Load balancer named *LB-myCluster-NTvm1* related to old scale set from resource group named *myResourceGroup*:
241254

242255
```powershell
243256
Remove-AzureRmLoadBalancer -Name LB-myCluster-NTvm1 -ResourceGroupName myResourceGroup
244257
```
245258

259+
#### Azure CLI
260+
261+
The following command uses Azure Service Fabric CLI to remove Load balancer named *LB-myCluster-NTvm1* related to old scale set from resource group named *myResourceGroup*:
262+
263+
```CLI
264+
az network lb delete --name LB-myCluster-NTvm1 --resource-group myResourceGroup
265+
```
266+
246267
## Remove Public IP related to old scale set
247268

248269
Store DNS settings of Public IP address related to old scale set into variable, then remove the Public IP address
249270

250-
### Azure PowerShell
271+
#### Azure PowerShell
272+
251273
The following example uses Azure PowerShell to store DNS settings of Public IP address named *LBIP-myCluster-NTvm1* into variable and remove the IP address:
252274

253275
```powershell
@@ -257,28 +279,53 @@ $primaryDNSFqdn = $oldprimaryPublicIP.DnsSettings.Fqdn
257279
Remove-AzureRmPublicIpAddress -Name LBIP-myCluster-NTvm1 -ResourceGroupName myResourceGroup
258280
```
259281

282+
#### Azure CLI
283+
284+
The following command uses Azure Service Fabric CLI to get DNS settings of Public IP address named *LBIP-myCluster-NTvm1* and remove the IP address:
285+
286+
```CLI
287+
az network public-ip show --name LBIP-myCluster-NTvm1 --resource-group myResourceGroup
288+
az network public-ip delete --name LBIP-myCluster-NTvm1 --resource-group myResourceGroup
289+
```
290+
260291
## Update public IP address related to new scale set
261292

262293
Update DNS settings of Public IP address related to new scale set with DNS settings of Public IP address related to old scale set
263294

264-
### Azure PowerShell
295+
#### Azure PowerShell
265296
The following example uses Azure PowerShell to update DNS settings of public IP address named *LBIP-myCluster-NTvm3* with DNS settings stored in variables in earlier step:
266297

267298
```powershell
268-
$PublicIP = Get-AzureRmPublicIpAddress -Name LBIP-myCluster-NTvm1 -ResourceGroupName myResourceGroup
299+
$PublicIP = Get-AzureRmPublicIpAddress -Name LBIP-myCluster-NTvm3 -ResourceGroupName myResourceGroup
269300
$PublicIP.DnsSettings.DomainNameLabel = $primaryDNSName
270301
$PublicIP.DnsSettings.Fqdn = $primaryDNSFqdn
271-
Set-AzureRmPublicIpAddress -PublicIpAddress $PublicIP
302+
Set-AzureRmPublicIpAddress -PublicIpAddress $PublicIP
303+
```
304+
305+
#### Azure CLI
306+
307+
The following command uses Azure Service Fabric CLI to update DNS settings of public IP address named *LBIP-myCluster-NTvm3* with DNS settings of old public IP gathered in earlier step:
308+
309+
```CLI
310+
az network public-ip update --name LBIP-myCluster-NTvm3 --resource-group myResourceGroup --dns-name myCluster
272311
```
273312

274313
## Remove knowledge of service fabric node from FM
275314

276315
Notify Service Fabric that the nodes, which are down have been removed from the cluster. (Run this command for all VM instances of old virtual machine scale set)
277316
(If the Durability level of the old virtual machine scale set was silver or gold, this step may not be needed. Since that step is done by the system automatically.)
278317

279-
### Azure PowerShell
318+
#### Azure PowerShell
280319
The following example uses Azure Service Fabric PowerShell to notify service fabric that the node named *NTvm1_0* has been removed:
281320

282321
```powershell
283322
Remove-ServiceFabricNodeState -NodeName NTvm1_0
284-
```
323+
```
324+
325+
#### Azure CLI
326+
327+
The following command uses Azure Service Fabric CLI to notify service fabric that the node named *NTvm1_0* has been removed:
328+
329+
```CLI
330+
sfctl node remove-state --node-name _NTvm1_0
331+
```

0 commit comments

Comments
 (0)