Add or remove a node from an existing environment
This article explains how to add or remove a node in your existing Microsoft Dynamics 365 Finance + Operations (on-premises) environment. It describes the generic procedures that can be used for any node type. Specific node types might require further steps. In this case, refer to the documentation for the node type or the service.
Add a node
To add one or more nodes to your existing environment, follow these steps.
Ensure that you download the latest infrastructure scripts. Learn more in Update the infrastructure scripts. To complete this procedure, you must have version 2.23.1 or later of the scripts.
Update the ConfigTemplate.xml file with the new node information.
Run the following command to ensure that your cluster has all the node types defined in the ConfigTemplate.xml file.
.\Update-SFClusterConfig.ps1 -ConfigurationFilePath .\ConfigTemplate.xml -AddNodeTypes
If the previous command generates a configuration file and doesn't state that all node types already exist in the cluster, you must update the Azure Service Fabric cluster with the new configuration file. Learn more in Update the Service Fabric cluster configuration.
Run the following commands to generate the prerequisites for the new node.
.\Export-Certificates.ps1 -ConfigurationFilePath .\ConfigTemplate.xml .\Export-Scripts.ps1 -ConfigurationFilePath .\ConfigTemplate.xml -D365FOVersion <version of fno currently installed>
Run the following command to update the group managed service account (gMSA) account so that the new node can use it.
.\Create-GMSAAccounts.ps1 -ConfigurationFilePath .\ConfigTemplate.xml -Update
Run the following command to ensure that the Service Fabric diagnostic store can be accessed by the new node.
.\Configure-FileShares.ps1 -ConfigurationFilePath .\ConfigTemplate.xml -FileShareReference "sfDiagnostics"
Run the following commands to ensure that all prerequisites are installed for the new node.
.\Configure-PreReqs-AllVMs.ps1 -ConfigurationFilePath .\ConfigTemplate.xml -MSIFilePath <file-path> -ForcePushLBDScripts .\Complete-PreReqs-AllVMs.ps1 -ConfigurationFilePath .\ConfigTemplate.xml
Run the following command to validate that the new node meets all prerequisites.
.\Test-D365FOConfiguration-AllVMs.ps1 -ConfigurationFilePath .\ConfigTemplate.xml
Run the following command to add the new node to the Service Fabric cluster. This command should be run from an existing node in the cluster.
Note
Run this command once for each new node that you want to add to the cluster.
.\Add-ServiceFabricNode.ps1 -ConfigurationFilePath .\ConfigTemplate.xml -VMName <vm name>
Wait until all the new nodes are added to the cluster and any services are deployed to them.
Run the following command to generate an updated cluster configuration file.
.\Update-SFClusterConfig.ps1 -ConfigurationFilePath .\ConfigTemplate.xml -UpdateServiceFabricSettings
Update the Service Fabric cluster with the new configuration file. Learn more in Update the Service Fabric cluster configuration.
Remove a node
To remove one or more nodes from your existing environment, follow these steps.
Run the following command to generate an updated configuration file that instructs Service Fabric to remove the nodes. This command should be run from an existing node in the cluster.
Note
This command is case-sensitive.
.\Update-SFClusterConfig.ps1 -ConfigurationFilePath .\ConfigTemplate.xml -RemoveNode -NodeNames @("node1", "node2")
Update the Service Fabric cluster with the new configuration file. Learn more in Update the Service Fabric cluster configuration.
After the Service Fabric cluster configuration is updated, you must run the following command to clean up the nodes from the cluster configuration.
.\Update-SFClusterConfig.ps1 -ConfigurationFilePath .\ConfigTemplate.xml -CleanupRemoveNode
Update the Service Fabric cluster with the new configuration file. Learn more in Update the Service Fabric cluster configuration.