Share via


New-ServiceFabricNodeConfiguration

Configures a node to join a Service Fabric cluster. Works for development clusters and Azure clusters.

Syntax

Default (Default)

New-ServiceFabricNodeConfiguration
    [-ClusterManifestPath] <String>
    [-InfrastructureManifestPath <String>]
    [-FabricDataRoot <String>]
    [-FabricLogRoot <String>]
    [-FabricHostCredential <PSCredential>]
    [-RunFabricHostServiceAsManual]
    [-RemoveExistingConfiguration]
    [-BootstrapMSIPath <String>]
    [-UsingFabricPackage]
    [-FabricPackageRoot <String>]
    [-MachineName <String>]
    [<CommonParameters>]

Description

The New-ServiceFabricNodeConfiguration cmdlet configures a node to be able to be added to a Service Fabric cluster. This involves installing Service Fabric if required, and then using configuration information taken from the cluster manifest and then creates the settings required for the node to join the cluster.

The node will join the cluster as soon as the Service Fabric Host Service is started on the host machine.

To manage Service Fabric clusters make sure you start your Windows PowerShell session by using the Run as administrator option.

This command will have different usages of parameters depending on the type of cluster this operation is applied to. In all cases, this command is used to add a node to a cluster. If using a standalone cluster, please refer to the AddNode command.

Examples

Example 1: Configure a five-node development cluster

PS C:\> New-ServiceFabricNodeConfiguration -ClusterManifestPath "<samples>\\ConfigStore\Management\Deployment\ClusterManifest\Server\DevEnv-FiveNodes.xml"

This command configures a development cluster by using the DevEnv-FiveNodes.xml manifest from the Service Fabric samples. That manifest configures a Service Fabric cluster of five nodes on your development computer.

Parameters

-BootstrapMSIPath

Specifies the path of the bootstrap .msi file. This is the Service Fabric SDK downloaded from the Service Fabric website. If you use this parameter, a self-baseline upgrade automatically occurs, when either an upgrade is configured or fabric is upgraded. If -UsingFabricPackage is set, this should point to the Service Fabric CAB file rather than the .msi file. The Service Fabric CAB file is available for download here.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ClusterManifestPath

Specifies the path of a Service Fabric cluster manifest, which is an XML file. Samples of this file can be seen in Service Fabric samples under "PublishProfiles". The cmdlet creates a cluster configuration based on the specified manifest.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FabricDataRoot

Specifies the path where the Service Fabric runtime stores the internal data needed to operate a cluster.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FabricHostCredential

Specifies a PSCredential object for the Service Fabric Host Service. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential.

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FabricLogRoot

Specifies the path for the Service Fabric trace logs.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FabricPackageRoot

This parameter is reserved for future use.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InfrastructureManifestPath

Specifies the path of the infrastructure manifest. This manifest is used to give each node an overview of the cluster. For example, the total amount of nodes on the cluster. In Azure, this is the path to the .csdef and .cscfg files.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MachineName

Specifies the computer that will host the configuration. You can use either the computer name or the computer IP address. For example:

-MachineName "192.168.1.1"

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RemoveExistingConfiguration

Indicates that this cmdlet removes any existing configurations. These configurations consist of data found in the folders pointed by FabricDataRoot and FabricLogRoot.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunFabricHostServiceAsManual

Indicates that the Fabric Host service must be started manually.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UsingFabricPackage

Indicates that node configurations should use the xcopy/CAB runtime package. This can be downloaded from the Service Fabric website. This is used when MSI is not installed and we are using a client package to execute the cmdlet. The path to the xcopy/CAB package should be set in the parameter -BootstrapMSIPath.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

System.Object