Modifier

Partager via


New-AzServiceFabricManagedNodeType

Create new node type resource.

Syntax

New-AzServiceFabricManagedNodeType
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-Name] <String>
   -InstanceCount <Int32>
   [-Primary]
   [-DiskSize <Int32>]
   [-DiskType <PSDiskType>]
   [-ApplicationStartPort <Int32>]
   [-ApplicationEndPort <Int32>]
   [-EphemeralStartPort <Int32>]
   [-EphemeralEndPort <Int32>]
   [-VmSize <String>]
   [-VmImagePublisher <String>]
   [-VmImageOffer <String>]
   [-VmImageSku <String>]
   [-VmImageVersion <String>]
   [-Capacity <Hashtable>]
   [-PlacementProperty <Hashtable>]
   [-VmUserAssignedIdentity <String[]>]
   [-IsStateless]
   [-MultiplePlacementGroup]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Create new node type resource for an specific cluster.

Examples

Example 1

$rgName = "testRG"
$clusterName = "testCluster"
$NodeTypeName = "nt1"
New-AzServiceFabricManagedNodeType -ResourceGroupName $rgName -ClusterName $clusterName -Name $NodeTypeName -Primary -InstanceCount 3

Create primary node type with 3 nodes.

Example 2

$rgName = "testRG"
$clusterName = "testCluster"
$NodeTypeName = "nt1"
New-AzServiceFabricManagedNodeType -ResourceGroupName $rgName -ClusterName $clusterName -Name $NodeTypeName -InstanceCount 5 -Primary -PlacementProperty @{NodeColor="Green";SomeProperty="5";} -Capacity @{ClientConnections="65536";} -ApplicationStartPort 20575 -ApplicationEndPort 20605 -EphemeralStartPort 20606 -EphemeralEndPort 20861

Create primary node type with 5 nodes and specifying placement properties, capacities, application and ephemeral ports.

Example 3

$rgName = "testRG"
$clusterName = "testCluster"
$NodeTypeName = "nt2"
New-AzServiceFabricManagedNodeType -ResourceGroupName $rgName -ClusterName $clusterName -Name $NodeTypeName -InstanceCount 10 -DiskType Premium_LRS -VmSize "Standard_DS2" -MultiplePlacementGroup

Create non primary node type with 10 nodes, premium disk type and multiple placement groups.

Example 4

$rgName = "testRG"
$clusterName = "testCluster"
$NodeTypeName = "nt2"
$identityId = "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/testRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testIdentity"
New-AzServiceFabricManagedNodeType -ResourceGroupName $rgName -ClusterName $clusterName -Name $NodeTypeName -InstanceCount 5 -VmUserAssignedIdentity $identityId -IsStateless

Create node type with user assigned identity and marked to host stateless workload.

Parameters

-ApplicationEndPort

Application End port of a range of ports.

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ApplicationStartPort

Application start port of a range of ports.

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AsJob

Run cmdlet in the background and return a Job to track progress.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Capacity

Capacity tags applied to the nodes in the node type as key/value pairs, the cluster resource manager uses these tags to understand how much resource a node has. Updating this will override the current values.

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ClusterName

Specify the name of the cluster.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DiskSize

Disk size for each vm in the node type in GBs. Default 100.

Type:Int32
Aliases:DataDiskSize
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DiskType

Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://learn.microsoft.com/en-us/azure/virtual-machines/disks-types. Default StandardSSD_LRS

Type:PSDiskType
Aliases:DataDiskType
Accepted values:Standard_LRS, StandardSSD_LRS, Premium_LRS
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EphemeralEndPort

Ephemeral end port of a range of ports.

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EphemeralStartPort

Ephemeral start port of a range of ports.

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InstanceCount

The number of nodes in the node type.

Type:Int32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-IsStateless

Indicates if the node type can only host Stateless workloads.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MultiplePlacementGroup

Indicates if scale set associated with the node type can be composed of multiple placement groups.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specify the name of the node type.

Type:String
Aliases:NodeTypeName
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PlacementProperty

Placement tags applied to nodes in the node type as key/value pairs, which can be used to indicate where certain services (workload) should run. Updating this will override the current values.

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Primary

Specify if the node type is primary. On this node type will run system services. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Specify the name of the resource group.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VmImageOffer

The offer type of the Azure Virtual Machines Marketplace image. Default: WindowsServer.

Type:String
Position:Named
Default value:"WindowsServer"
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VmImagePublisher

The publisher of the Azure Virtual Machines Marketplace image. Default: MicrosoftWindowsServer.

Type:String
Position:Named
Default value:"MicrosoftWindowsServer"
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VmImageSku

The SKU of the Azure Virtual Machines Marketplace image. Default: 2019-Datacenter.

Type:String
Position:Named
Default value:"2019-Datacenter"
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VmImageVersion

The version of the Azure Virtual Machines Marketplace image. Default: latest.

Type:String
Position:Named
Default value:"latest"
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VmSize

The size of virtual machines in the pool. All virtual machines in a pool are the same size. Default: Standard_D2.

Type:String
Position:Named
Default value:"Standard_D2"
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VmUserAssignedIdentity

The list of user assigend identities associated with the virtual machine scale set under the node type. Each entry will be an ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. Follow steps to create the identity and add the role assignment with Service Fabric Resource Provider beforehand here: https://learn.microsoft.com/en-us/azure/service-fabric/how-to-managed-identity-managed-cluster-virtual-machine-scale-sets

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

PSManagedNodeType