Skip to content

Commit fcbafac

Browse files
authored
Merge pull request #182568 from craftyhouse/micraft-sfmc-quickfixes
Update how-to-managed-cluster-modify-node-type.md
2 parents 213caa9 + 919ec2f commit fcbafac

File tree

3 files changed

+116
-38
lines changed

3 files changed

+116
-38
lines changed

articles/service-fabric/how-to-managed-cluster-autoscale.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Some things to consider:
213213
Suppose you set a rule to scale out when average CPU is greater than 50% over five minutes, and to scale in when average CPU is less than 50%. This setting would cause a "flapping" problem when CPU usage is close to the threshold, with scale actions constantly increasing and decreasing the size of the set. Because of this setting, the autoscale service tries to prevent "flapping", which can manifest as not scaling. Therefore, be sure your scale-out and scale-in thresholds are sufficiently different to allow some space in between scaling.
214214

215215
* Can you scale in or out a node type?
216-
Adjust the count of nodes at the node type level and make sure it completes successfully. [How to scale a node type on a managed cluster](./how-to-managed-cluster-modify-node-type.md#scale-a-node-type-manually-with-a-template)
216+
Adjust the count of nodes at the node type level and make sure it completes successfully. [How to scale a node type on a managed cluster](how-to-managed-cluster-modify-node-type.md#scale-a-node-type)
217217

218218
* Check your Microsoft.ServiceFabric/managedclusters/nodetypes, and Microsoft.Insights resources in the Azure Resource Explorer
219219

articles/service-fabric/how-to-managed-cluster-configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ In addition to selecting the [Service Fabric managed cluster SKU](overview-manag
1515
* Configuring [managed identity](how-to-managed-identity-managed-cluster-virtual-machine-scale-sets.md) on cluster node types
1616
* Enabling [OS and data disk encryption](how-to-managed-cluster-enable-disk-encryption.md) on cluster nodes
1717
* Configure [autoscaling](how-to-managed-cluster-autoscale.md) on a secondary node type
18-
* [Manually scale a node type](how-to-managed-cluster-modify-node-type.md#scale-a-node-type-manually-with-portal)
18+
* [Scale a node type](how-to-managed-cluster-modify-node-type.md#scale-a-node-type)
1919
* Enable [automatic OS image upgrades](how-to-managed-cluster-modify-node-type.md#enable-automatic-os-image-upgrades) on cluster node types
20-
* Modify the [OS image](how-to-managed-cluster-modify-node-type.md#modify-the-os-image-for-a-node-type-with-portal) used for a node type
21-
* Configure [placement properties](how-to-managed-cluster-modify-node-type.md#configure-placement-properties-for-a-node-type-with-portal) for a node type
20+
* Modify the [OS image](how-to-managed-cluster-modify-node-type.md#modify-the-os-sku-for-a-node-type) used for a node type
21+
* Configure [placement properties](how-to-managed-cluster-modify-node-type.md#configure-placement-properties-for-a-node-type) for a node type
2222
* Selecting the cluster [managed disk type](how-to-managed-cluster-managed-disk.md) SKU
2323
* Configuring cluster [upgrade options](how-to-managed-cluster-upgrades.md) for the runtime updates
2424

articles/service-fabric/how-to-managed-cluster-modify-node-type.md

Lines changed: 112 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Configure or modify a Service Fabric managed cluster node type
33
description: This article walks through how to modify a managed cluster node type
44
ms.topic: how-to
5-
ms.date: 10/25/2021
5+
ms.date: 12/10/2021
66
---
77

88
# Service Fabric managed cluster node types
@@ -15,11 +15,13 @@ The rest of this document will cover how to adjust various settings from creatin
1515
> You will not be able to modify the node type while a change is in progress. It is recommended to let any requested change complete before doing another.
1616
1717

18-
## Add or remove a node type with portal
18+
## Add a node type
19+
You can add a node type to a Service Fabric managed cluster through Portal, an Azure Resource Manager template, or PowerShell.
1920

20-
In this walkthrough, you will learn how to add or remove a node type using portal.
21+
### Add with portal
22+
> [!NOTE]
23+
> You can only add secondary node types using Portal
2124
22-
**To add a node type:**
2325
1) Log in to [Azure portal](https://portal.azure.com/)
2426

2527
2) Navigate to your cluster resource Overview page.
@@ -30,29 +32,14 @@ In this walkthrough, you will learn how to add or remove a node type using porta
3032

3133
4) Click `Add` at the top, fill in the required information, then click Add at the bottom, that's it!
3234

35+
5) Wait for the new node type addition to be completed
3336

34-
**To remove a node type:**
35-
1) Log in to [Azure portal](https://portal.azure.com/)
36-
37-
2) Navigate to your cluster resource Overview page.
38-
![Sample Overview page][overview]
39-
40-
3) Select `Node types` under the `Settings` section
41-
![Node Types view][addremove]
42-
43-
4) Select the `Node Type` you want to remove and click `Delete` at the top.
44-
45-
> [!NOTE]
46-
> It is not possible to remove a primary node type if it is the only primary node type in the cluster.
47-
48-
49-
## Add a node type with a template
50-
51-
**To add a node type using an ARM Template**
37+
### Add with an ARM template
5238

5339
Add another resource type `Microsoft.ServiceFabric/managedclusters/nodetypes` with the required values and do a cluster deployment for the setting to take effect.
5440

5541
* The Service Fabric managed cluster resource apiVersion should be **2021-05-01** or later.
42+
* Make sure to set `isPrimary` to `true` if you are intending to replace an existing primary node type.
5643

5744
```json
5845
{
@@ -77,8 +64,70 @@ Add another resource type `Microsoft.ServiceFabric/managedclusters/nodetypes` wi
7764
```
7865
For an example two node type configuration, see our [sample two node type ARM Template](https://github.com/Azure-Samples/service-fabric-cluster-templates/blob/master/SF-Managed-Standard-SKU-2-NT)
7966

67+
### Add with PowerShell
68+
69+
To create a new node type, you'll need to define these properties:
70+
* **Resource Group**: Resource group the cluster is in
71+
* **Cluster Name**: Name of the managed cluster
72+
* **Node Type Name**: Name that is unique from any existing node types in the cluster.
73+
* **Instance Count**: Initial number of nodes of the new node type.
74+
* **VM Size**: VM SKU for the nodes. If not specified, the default value *Standard_D2* is used.
75+
76+
> [!NOTE]
77+
> If adding a primary node type, the `-Primary` property must be used.
78+
79+
```powershell
80+
$resourceGroup = "myResourceGroup"
81+
$clusterName = "mysfcluster"
82+
$nodeTypeName = "nt2"
83+
$vmSize = "Standard_D2_v2"
84+
85+
New-AzServiceFabricManagedNodeType -ResourceGroupName $resourceGroup -ClusterName $clusterName -Name $nodeTypeName -InstanceCount 3 -vmSize $vmSize
86+
```
87+
88+
89+
## Remove a node type
90+
You can remove a Service Fabric managed cluster node type using Portal or PowerShell.
91+
92+
> [!NOTE]
93+
> To remove a primary node type from a Service Fabric managed cluster, you must use PowerShell and there must be more then one primary node type available.
94+
95+
### Remove with portal
96+
1) Log in to [Azure portal](https://portal.azure.com/)
97+
98+
2) Navigate to your cluster resource Overview page.
99+
![Sample Overview page][overview]
100+
101+
3) Select `Node types` under the `Settings` section
102+
![Node Types view][addremove]
103+
104+
4) Select the `Node Type` you want to remove and click `Delete` at the top.
105+
106+
### Remove with PowerShell
107+
> [!NOTE]
108+
> If removing a primary node type for scenarios such as upgrading the SKU it will take multiple hours and progress can be monitored by using SFX. Seed nodes will migrate one node per upgrade domain(UD) walk at a time.
80109

81-
## Scale a node type manually with portal
110+
To remove a node type, you'll need to define these properties:
111+
* **Resource Group**: Resource group the cluster is in
112+
* **Cluster Name**: Name of the managed cluster
113+
* **Node Type Name**: Name that is unique from any existing node types in the cluster.
114+
115+
```powershell
116+
$resourceGroup = "myResourceGroup"
117+
$clusterName = "myCluster"
118+
$nodeTypeName = "nt2"
119+
120+
Remove-AzServiceFabricManagedNodeType -ResourceGroupName $resourceGroup -ClusterName $clusterName -Name $nodeTypeName
121+
```
122+
123+
124+
## Scale a node type
125+
You can scale a Service Fabric managed cluster node type with portal, ARM template, or PowerShell. You can also [configure autoscale for a secondary node type](how-to-managed-cluster-autoscale.md) if you want a fully automated solution.
126+
127+
> [!NOTE]
128+
> For the Primary node type, you will not be able to go below 3 nodes for a Basic SKU cluster, and 5 nodes for a Standard SKU cluster.
129+
130+
### Scale using portal
82131

83132
In this walkthrough, you will learn how to modify the node count for a node type using portal.
84133

@@ -98,9 +147,9 @@ In this walkthrough, you will learn how to modify the node count for a node type
98147
![Sample showing a node type updating][node-type-updating]
99148

100149

101-
## Scale a node type manually with a template
150+
### Scale a node type with a template
102151

103-
To adjust the node count for a node type using an ARM Template, adjust the `vmInstanceCount` property with the new value and do a cluster deployment for the setting to take effect.
152+
To adjust the node count for a node type using an ARM Template, adjust the `vmInstanceCount` property with the new value and do a cluster deployment for the setting to take effect. The cluster will begin upgrading automatically you will see the additional nodes when complete.
104153

105154
* The Service Fabric managed cluster resource apiVersion should be **2021-05-01** or later.
106155

@@ -122,6 +171,21 @@ To adjust the node count for a node type using an ARM Template, adjust the `vmIn
122171
}
123172
```
124173

174+
### Scale a node type with PowerShell
175+
Change the instance count to increase or decrease the number of nodes on the node type that you would like to scale. You can find node type names in the Azure Resource Manager template (ARM template) from your cluster deployment, or in the Service Fabric Explorer.
176+
177+
```powershell
178+
$resourceGroup = "myResourceGroup"
179+
$clusterName = "mysfcluster"
180+
$nodeTypeName = "FE"
181+
$instanceCount = "7"
182+
183+
Set-AzServiceFabricManagedNodeType -ResourceGroupName $resourceGroup -ClusterName $clusterName -name $nodeTypeName -InstanceCount $instanceCount -Verbose
184+
```
185+
186+
The cluster will begin upgrading automatically you will see the additional nodes when complete.
187+
188+
125189
## Enable automatic OS image upgrades
126190

127191
You can choose to enable automatic OS image upgrades to the virtual machines running your managed cluster nodes. Although the virtual machine scale set resources are managed on your behalf with Service Fabric managed clusters, it's your choice to enable automatic OS image upgrades for your cluster nodes. As with [classic Service Fabric](service-fabric-best-practices-infrastructure-as-code.md#virtual-machine-os-automatic-upgrade-configuration) clusters, managed cluster nodes are not upgraded by default, in order to prevent unintended disruptions to your cluster.
@@ -164,7 +228,10 @@ If an upgrade fails, Service Fabric will retry after 24 hours, for a maximum of
164228

165229
For more on image upgrades, see [Automatic OS image upgrades with Azure virtual machine scale sets](../virtual-machine-scale-sets/virtual-machine-scale-sets-automatic-upgrade.md).
166230

167-
## Modify the OS image for a node type with portal
231+
## Modify the OS SKU for a node type
232+
Service Fabric managed clusters enables you to modify the OS SKU for a node type in place. This is helpful for scenarios such as migrating from Windows 2019 to Windows 2022 or if you want to switch to a Server (Core) SKU vs Server with Desktop Experience SKU.
233+
234+
### Modify OS SKU with portal
168235

169236
In this walkthrough, you will learn how to modify the OS image for a node type using portal.
170237

@@ -184,7 +251,7 @@ In this walkthrough, you will learn how to modify the OS image for a node type u
184251
![Sample showing a node type updating][node-type-updating]
185252

186253

187-
## Modify the OS image for a node type with a template
254+
### Modify OS SKU with a template
188255

189256
To modify the OS image used for a node type using an ARM Template, adjust the `vmImageSku` property with the new value and do a cluster deployment for the setting to take effect. The managed cluster provider will reimage each instance by upgrade domain.
190257

@@ -208,7 +275,10 @@ To modify the OS image used for a node type using an ARM Template, adjust the `v
208275
}
209276
```
210277

211-
## Configure placement properties for a node type with portal
278+
## Configure placement properties for a node type
279+
[Placement properties](service-fabric-cluster-resource-manager-cluster-description.md#node-properties-and-placement-constraints) are used to ensure that certain workloads run only on certain node types in the cluster. Service Fabric managed clusters support configuring these properties via portal, ARM template, or PowerShell.
280+
281+
### Configure placement properties with portal
212282

213283
In this walkthrough, you will learn how to modify a placement property for a node type using portal.
214284

@@ -227,9 +297,8 @@ In this walkthrough, you will learn how to modify a placement property for a nod
227297
6) The `Provisioning state` will now show a status of `Updating` until complete. When complete, it will show `Succeeded` again.
228298
![Sample showing a node type updating][node-type-updating]
229299

230-
You can now use that [placement property to ensure that certain workloads run only on certain types of nodes in the cluster](./service-fabric-cluster-resource-manager-cluster-description.md#node-properties-and-placement-constraints).
231300

232-
## Configure placement properties for a node type with a template
301+
### Configure placement properties with a template
233302

234303
To adjust the placement properties for a node type using an ARM Template, adjust the `placementProperties` property with the new value(s) and do a cluster deployment for the setting to take effect. The below sample shows three values being set for a node type.
235304

@@ -250,15 +319,24 @@ To adjust the placement properties for a node type using an ARM Template, adjust
250319
}
251320
}
252321
```
253-
You can now use that [placement property to ensure that certain workloads run only on certain types of nodes in the cluster](./service-fabric-cluster-resource-manager-cluster-description.md#node-properties-and-placement-constraints).
322+
323+
### Configure placement properties with PowerShell
324+
325+
The following example will update and overwrite any existing placement properties for a given node type.
326+
327+
```PowerShell
328+
$rgName = "testRG"
329+
$clusterName = "testCluster"
330+
$NodeTypeName = "nt1"
331+
Set-AzServiceFabricManagedNodeType -ResourceGroupName $rgName -ClusterName $clusterName -name $NodeTypeName -PlacementProperty @{NodeColor="Red";SomeProperty="6";} -Verbose
332+
```
254333

255334
## Modify the VM SKU for a node type
256335

257336
Service Fabric managed cluster does not support in-place modification of the VM SKU, but is simpler then classic. In order to accomplish this you'll need to do the following:
258-
* [Create a new node type](how-to-managed-cluster-modify-node-type.md#add-or-remove-a-node-type-with-portal) with the required VM SKU.
337+
* [Create a new node type via portal, ARM template, or PowerShell](how-to-managed-cluster-modify-node-type.md#add-a-node-type) with the required VM SKU. You'll need to use a template or PowerShell for adding a primary or stateless node type.
259338
* Migrate your workload over. One way is to use a [placement property to ensure that certain workloads run only on certain types of nodes in the cluster](./service-fabric-cluster-resource-manager-cluster-description.md#node-properties-and-placement-constraints).
260-
* [Delete old node type](how-to-managed-cluster-modify-node-type.md#add-or-remove-a-node-type-with-portal)
261-
339+
* [Delete old node type via portal or PowerShell](how-to-managed-cluster-modify-node-type.md#remove-a-node-type). To remove a primary node type you will have to use PowerShell.
262340

263341

264342
## Configure multiple managed disks (preview)

0 commit comments

Comments
 (0)