问题
I deployed a Service Fabric Cluster running with a single application and 3 Node Types of 5 machines, each with its own placement constraint.
I need to add other 2 Node types (Virtual Machine Scale sets), how can I do that from the azure portal?
回答1:
The Add-AzureRmServiceFabricNodeType command can add a new node type to an existing Service Fabric cluster.
Note that the process can take roughly an hour to complete, since it creates one resource at a time starting with the cluster. It will create a new load balancer, public IP address, storage accounts, and virtual machine scale set.
$password = ConvertTo-SecureString -String 'Password$123456' -AsPlainText -Force
Add-AzureRmServiceFabricNodeType `
-ResourceGroupName "resource-group" `
-Name "cluster-name" `
-NodeType "nodetype2" `
-Capacity 2 `
-VmUserName "user" `
-VmPassword $password
Things to consider:
- Check your quotas beforehand to ensure you can create the new virtual machine scale set instances or you will get an error and the whole process will roll back
- Node type names have a limit of nine characters when creating a cluster via portal blade; this same restriction may apply using the PowerShell command
- The command was introduced as part of v4.2.0 of the AzureRM PowerShell module, so you may need to update your module
You can also add a new node type by creating a new cluster using the Azure portal wizard and updating your DNS records, or by modifying the ARM template, but the PowerShell command is obviously the best option.
回答2:
Another option is to use New-AzureRmResourceGroupDeployment with an updated ARM template that includes all the resources for your new node types, as well as the new node types.
What's nice about using the PS command is that it takes care of any manual work that you may need to do for creating and associating resources to the new node types.
来源:https://stackoverflow.com/questions/44323742/how-to-add-new-node-type-to-deployed-service-fabric-cluster