Skip to content

Commit 7a175df

Browse files
Merge pull request #245121 from tomvcassidy/publicPrChanges
Pulling in changes from stale public PR
2 parents 73a020e + b347f5f commit 7a175df

File tree

1 file changed

+36
-16
lines changed

1 file changed

+36
-16
lines changed

articles/service-fabric/service-fabric-scale-up-primary-node-type.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: Scale up an Azure Service Fabric primary node type
33
description: Vertically scale your Service Fabric cluster by adding a new node type and removing the previous one.
44
ms.topic: how-to
5-
ms.author: chrpap
6-
author: chrpap
5+
ms.author: tomcassidy
6+
author: tomvcassidy
77
ms.service: service-fabric
88
ms.custom: devx-track-azurepowershell
99
services: service-fabric
@@ -12,7 +12,7 @@ ms.date: 09/20/2022
1212

1313
# Scale up a Service Fabric cluster primary node type
1414

15-
This article describes how to scale up a Service Fabric cluster primary node type with minimal downtime. In-place SKU upgrades are not supported on Service Fabric cluster nodes, as such operations potentially involve data and availability loss. The safest, most reliable, and recommended method for scaling up a Service Fabric node type is to:
15+
This article describes how to scale up a Service Fabric cluster primary node type with minimal downtime. In-place SKU upgrades aren't supported on Service Fabric cluster nodes, as such operations potentially involve data and availability loss. The safest, most reliable, and recommended method for scaling up a Service Fabric node type is to:
1616

1717
1. Add a new node type to your Service Fabric cluster, backed by your upgraded (or modified) virtual machine scale set SKU and configuration. This step also involves setting up a new load balancer, subnet, and public IP for the scale set.
1818

@@ -49,7 +49,7 @@ The following commands will guide you through generating a new self-signed certi
4949

5050
### Generate a self-signed certificate and deploy the cluster
5151

52-
First, assign the variables you'll need for Service Fabric cluster deployment. Adjust the values for `resourceGroupName`, `certSubjectName`, `parameterFilePath`, and `templateFilePath` for your specific account and environment:
52+
First, assign the variables you need for Service Fabric cluster deployment. Adjust the values for `resourceGroupName`, `certSubjectName`, `parameterFilePath`, and `templateFilePath` for your specific account and environment:
5353

5454
```powershell
5555
# Assign deployment variables
@@ -89,11 +89,11 @@ Import-PfxCertificate `
8989
-Password (ConvertTo-SecureString Password!1 -AsPlainText -Force)
9090
```
9191

92-
The operation will return the certificate thumbprint, which you can now use to [connect to the new cluster](#connect-to-the-new-cluster-and-check-health-status) and check its health status. (Skip the following section, which is an alternate approach to cluster deployment.)
92+
The operation returns the certificate thumbprint, which you can now use to [connect to the new cluster](#connect-to-the-new-cluster-and-check-health-status) and check its health status. (Skip the following section, which is an alternate approach to cluster deployment.)
9393

9494
### Use an existing certificate to deploy the cluster
9595

96-
Alternately, you can use an existing Azure Key Vault certificate to deploy the test cluster. To do this, you'll need to [obtain references to your Key Vault](#obtain-your-key-vault-references) and certificate thumbprint.
96+
Alternately, you can use an existing Azure Key Vault certificate to deploy the test cluster. To do this, you need to [obtain references to your Key Vault](#obtain-your-key-vault-references) and certificate thumbprint.
9797

9898
```powershell
9999
# Key Vault variables
@@ -150,11 +150,11 @@ Connect-ServiceFabricCluster `
150150
Get-ServiceFabricClusterHealth
151151
```
152152

153-
With that, we're ready to begin the upgrade procedure.
153+
Now, we're ready to begin the upgrade procedure.
154154

155155
## Deploy a new primary node type with upgraded scale set
156156

157-
In order to upgrade (vertically scale) a node type, we'll first need to deploy a new node type backed by a new scale set and supporting resources. The new scale set will be marked as primary (`isPrimary: true`), just like the original scale set. If you want to scale up a non-primary node type, see [Scale up a Service Fabric cluster non-primary node type](service-fabric-scale-up-non-primary-node-type.md). The resources created in the following section will ultimately become the new primary node type in your cluster, and the original primary node type resources will be deleted.
157+
In order to upgrade (vertically scale) a node type, we'll first need to deploy a new node type backed by a new scale set and supporting resources. The new scale set will be marked as primary (`isPrimary: true`), just like the original scale set. If you want to scale up a non-primary node type, see [Scale up a Service Fabric cluster non-primary node type](service-fabric-scale-up-non-primary-node-type.md). The resources created in the following section will ultimately become the new primary node type in your cluster, and the original primary node type resources are deleted.
158158

159159
### Update the cluster template with the upgraded scale set
160160

@@ -163,7 +163,7 @@ Here are the section-by-section modifications of the original cluster deployment
163163
The required changes for this step have already been made for you in the [*Step1-AddPrimaryNodeType.json*](https://github.com/microsoft/service-fabric-scripts-and-templates/tree/master/templates/nodetype-upgrade/Step1-AddPrimaryNodeType.json) template file, and the following will explain these changes in detail. If you prefer, you can skip the explanation and continue to [obtain your Key Vault references](#obtain-your-key-vault-references) and [deploy the updated template](#deploy-the-updated-template) that adds a new primary node type to your cluster.
164164

165165
> [!Note]
166-
> Ensure that you use names that are unique from the original node type, scale set, load balancer, public IP, and subnet of the original primary node type, as these resources will be deleted at a later step in the process.
166+
> Ensure that you use names that are unique from the original node type, scale set, load balancer, public IP, and subnet of the original primary node type, as these resources are deleted at a later step in the process.
167167
168168
#### Create a new subnet in the existing virtual network
169169

@@ -234,6 +234,26 @@ OS SKU
234234
}
235235
```
236236

237+
### If you're changing OS SKU in a Linux Cluster
238+
239+
In Windows cluster, the value for property vmImage is ‘Windows’ while the value of the same property for Linux cluster is name of the OS image used. For e.g. - Ubuntu20_04(use the latest vm image name).
240+
241+
So, if you're changing the VM image (OS SKU) in a Linux cluster, then update the vmImage setting on the Service Fabric cluster resource as well.
242+
243+
```json
244+
#Update the property vmImage with the required OS name in your ARM template
245+
{
246+
"vmImage": "[parameter(newVmImageName]”
247+
}
248+
```
249+
Note: Example of newVmImageName: Ubuntu20_04
250+
251+
You can also update the cluster resource by using the following PowerShell command:
252+
```powershell
253+
# Update cluster vmImage to target OS. This registers the SF runtime package type that is supplied for upgrades.
254+
Update-AzServiceFabricVmImage -ResourceGroupName $resourceGroup -ClusterName $clusterName -VmImage Ubuntu20_04
255+
```
256+
237257
Also, ensure you include any additional extensions that are required for your workload.
238258

239259
#### Add a new primary node type to the cluster
@@ -262,15 +282,15 @@ Once you've implemented all the changes in your template and parameters files, p
262282

263283
### Obtain your Key Vault references
264284

265-
To deploy the updated configuration, you'll need several references to the cluster certificate stored in your Key Vault. The easiest way to find these values is through Azure portal. You'll need:
285+
To deploy the updated configuration, you need several references to the cluster certificate stored in your Key Vault. The easiest way to find these values is through Azure portal. You need:
266286

267287
* **The Key Vault URL of your cluster certificate.** From your Key Vault in Azure portal, select **Certificates** > *Your desired certificate* > **Secret Identifier**:
268288

269289
```powershell
270290
$certUrlValue="https://sftestupgradegroup.vault.azure.net/secrets/sftestupgradegroup20200309235308/dac0e7b7f9d4414984ccaa72bfb2ea39"
271291
```
272292
273-
* **The thumbprint of your cluster certificate.** (You probably already have this if you [connected to the initial cluster](#connect-to-the-new-cluster-and-check-health-status) to check its health status.) From the same certificate blade (**Certificates** > *Your desired certificate*) in Azure portal, copy **X.509 SHA-1 Thumbprint (in hex)**:
293+
* **The thumbprint of your cluster certificate.** (You probably already have the certificate if you [connected to the initial cluster](#connect-to-the-new-cluster-and-check-health-status) to check its health status.) From the same certificate blade (**Certificates** > *Your desired certificate*) in Azure portal, copy **X.509 SHA-1 Thumbprint (in hex)**:
274294
275295
```powershell
276296
$thumb = "BB796AA33BD9767E7DA27FE5182CF8FDEE714A70"
@@ -320,7 +340,7 @@ First remove the `isPrimary` designation in the template from the original node
320340
}
321341
```
322342

323-
Then deploy the template with the update. This will initiate the migration of seed nodes to the new scale set.
343+
Then deploy the template with the update. This deployment initiates the migration of seed nodes to the new scale set.
324344

325345
```powershell
326346
$templateFilePath = "C:\Step2-UnmarkOriginalPrimaryNodeType.json"
@@ -338,7 +358,7 @@ New-AzResourceGroupDeployment `
338358
> [!Note]
339359
> It will take some time to complete the seed node migration to the new scale set. To guarantee data consistency, only one seed node can change at a time. Each seed node change requires a cluster update; thus replacing a seed node requires two cluster upgrades (one each for node addition and removal). Upgrading the five seed nodes in this sample scenario will result in ten cluster upgrades.
340360
341-
Use Service Fabric Explorer to monitor the migration of seed nodes to the new scale set. The nodes of the original node type (nt0vm) should all be *false* in the **Is Seed Node** column, and those of the new node type (nt1vm) will be *true*.
361+
Use Service Fabric Explorer to monitor the migration of seed nodes to the new scale set. The nodes of the original node type (nt0vm) should all be *false* in the **Is Seed Node** column, and those of the new node type (nt1vm) should be *true*.
342362

343363
### Disable the nodes in the original node type scale set
344364

@@ -365,7 +385,7 @@ Use Service Fabric Explorer to monitor the progression of nodes in the original
365385

366386
:::image type="content" source="./media/scale-up-primary-node-type/service-fabric-explorer-node-status.png" alt-text="Service Fabric Explorer showing status of disabled nodes":::
367387

368-
For Silver and Gold durability, some nodes will go into Disabled state, while others might remain in a *Disabling* state. In Service Fabric Explorer, check the **Details** tab of nodes in Disabling state. If they show a *Pending Safety Check* of Kind *EnsurePartitionQuorem* (ensuring quorum for infrastructure service partitions), then it is safe to continue.
388+
For Silver and Gold durability, some nodes will go into Disabled state, while others might remain in a *Disabling* state. In Service Fabric Explorer, check the **Details** tab of nodes in Disabling state. If they show a *Pending Safety Check* of Kind *EnsurePartitionQuorem* (ensuring quorum for infrastructure service partitions), then it's safe to continue.
369389

370390
:::image type="content" source="./media/scale-up-primary-node-type/service-fabric-explorer-node-status-disabling.png" alt-text="You can proceed with stopping data and removing nodes stuck in 'Disabling' status if they show a pending safety check of kind 'EnsurePartitionQuorum'.":::
371391

@@ -405,7 +425,7 @@ Remove-AzResource -ResourceName $scaleSetName -ResourceType $scaleSetResourceTyp
405425

406426
### Delete the original IP and load balancer resources
407427

408-
You can now delete the original IP, and load balancer resources. In this step you will also update the DNS name.
428+
You can now delete the original IP, and load balancer resources. In this step you'll also update the DNS name.
409429

410430
> [!Note]
411431
> This step is optional if you're already using a *Standard* SKU public IP and load balancer. In this case you could have multiple scale sets / node types under the same load balancer.
@@ -571,7 +591,7 @@ The upgrade will change settings to the *InfrastructureService*; therefore, a no
571591

572592
Once the deployment has completed, verify in Azure portal that the Service Fabric resource Status is *Ready*. Verify you can reach the new Service Fabric Explorer endpoint, the **Cluster Health State** is *OK*, and any deployed applications function properly.
573593

574-
With that, you've vertically scaled a cluster primary node type!
594+
Now, you've vertically scaled a cluster primary node type!
575595

576596
## Next steps
577597

0 commit comments

Comments
 (0)