@@ -8,12 +8,14 @@ schema: 2.0.0
8
8
# New-AzServiceFabricCluster
9
9
10
10
## SYNOPSIS
11
- This command uses certificates that you provide or system generated self-signed certificates to set up a new service fabric cluster. It can use a default template or a custom template that you provide. You have the option of specifying a folder to export the self-signed certificates to or fetching them later from the key vault.
11
+
12
+ This command uses certificates that you provide or system generated self-signed certificates to set up a new service fabric cluster. It can use a default template or a custom template that you provide. You have the option of specifying a folder to export the self-signed certificates to or fetching them later from the key vault.
12
13
13
14
## SYNTAX
14
15
15
16
### ByDefaultArmTemplate (Default)
16
- ```
17
+
18
+ ``` powershell
17
19
New-AzServiceFabricCluster [-ResourceGroupName] <String> [-CertificateOutputFolder <String>]
18
20
[-CertificatePassword <SecureString>] [-KeyVaultResourceGroupName <String>] [-KeyVaultName <String>]
19
21
-Location <String> [-Name <String>] [-VmUserName <String>] [-ClusterSize <Int32>]
@@ -22,15 +24,17 @@ New-AzServiceFabricCluster [-ResourceGroupName] <String> [-CertificateOutputFold
22
24
```
23
25
24
26
### ByExistingKeyVault
25
- ```
27
+
28
+ ``` powershell
26
29
New-AzServiceFabricCluster [-ResourceGroupName] <String> -TemplateFile <String> -ParameterFile <String>
27
30
[-CertificateCommonName <String>] [-CertificateIssuerThumbprint <String>] [-VmPassword <SecureString>]
28
31
-SecretIdentifier <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
29
32
[<CommonParameters>]
30
33
```
31
34
32
35
### ByNewPfxAndVaultName
33
- ```
36
+
37
+ ``` powershell
34
38
New-AzServiceFabricCluster [-ResourceGroupName] <String> -TemplateFile <String> -ParameterFile <String>
35
39
[-CertificateOutputFolder <String>] [-CertificatePassword <SecureString>]
36
40
[-KeyVaultResourceGroupName <String>] [-KeyVaultName <String>] [-CertificateSubjectName <String>]
@@ -39,7 +43,8 @@ New-AzServiceFabricCluster [-ResourceGroupName] <String> -TemplateFile <String>
39
43
```
40
44
41
45
### ByExistingPfxAndVaultName
42
- ```
46
+
47
+ ``` powershell
43
48
New-AzServiceFabricCluster [-ResourceGroupName] <String> -TemplateFile <String> -ParameterFile <String>
44
49
-CertificateFile <String> [-CertificatePassword <SecureString>] [-SecondaryCertificateFile <String>]
45
50
[-SecondaryCertificatePassword <SecureString>] [-KeyVaultResourceGroupName <String>] [-KeyVaultName <String>]
@@ -48,74 +53,80 @@ New-AzServiceFabricCluster [-ResourceGroupName] <String> -TemplateFile <String>
48
53
```
49
54
50
55
## DESCRIPTION
56
+
51
57
The ** New-AzServiceFabricCluster** command uses certificates that you provide or system generated self-signed certificates to set up a new service fabric cluster. The template used can be a default template or a custom template that you provide. You have the option of specifying a folder to export the self-signed certificates or fetching them later from the key vault.
52
58
If you are specifying a custom template and parameter file, you don't need to provide the certificate information in the parameter file, the system will populate these parameters.
53
59
The four options are detailed below. Scroll down for explanations of each of the parameters.
54
60
55
61
## EXAMPLES
56
62
57
- ### Example 1: Specify only the cluster size, the cert subject name, and the OS to deploy a cluster.
58
- ```
59
- $pass="Password#1234" | ConvertTo-SecureString -AsPlainText -Force
60
- $RGname="test01"
61
- $clusterloc="SouthCentralUS"
62
- $subname="{0}.{1}.cloudapp.azure.com" -f $RGname, $clusterloc
63
- $pfxfolder="c:\certs"
63
+ ### Example 1: Specify only the cluster size, the cert subject name, and the OS to deploy a cluster
64
64
65
- Write-Output "Create cluster in '$clusterloc' with cert subject name '$subname' and cert output path '$pfxfolder'"
65
+ ``` powershell
66
+ $password = "Password#1234" | ConvertTo-SecureString -AsPlainText -Force
67
+ $resourceGroupName = "quickstart-sf-group"
68
+ $azureRegion = "southcentralus"
69
+ $clusterDnsName = "{0}.{1}.cloudapp.azure.com" -f $resourceGroupName, $azureRegion
70
+ $localCertificateFolder = "c:\certs"
66
71
67
- New-AzServiceFabricCluster -ResourceGroupName $RGname -Location $clusterloc -ClusterSize 5 -VmPassword $pass -CertificateSubjectName $subname -CertificateOutputFolder $pfxfolder -CertificatePassword $pass -OS WindowsServer2016Datacenter
72
+ Write-Output "Create cluster in '$azureRegion' with cert subject name '$clusterDnsName' and cert output path '$localCertificateFolder'"
73
+
74
+ New-AzServiceFabricCluster -ResourceGroupName $resourceGroupName -Location $azureRegion -ClusterSize 5 -VmPassword $password -CertificateSubjectName $clusterDnsName -CertificateOutputFolder $localCertificateFolder -CertificatePassword $pass -OS WindowsServer2016Datacenter
68
75
```
69
76
70
77
This command specifies only the cluster size, the cert subject name, and the OS to deploy a cluster.
71
78
72
79
### Example 2: Specify an existing Certificate resource in a key vault and a custom template to deploy a cluster
73
- ```
74
- $RGname="test20"
75
- $templateParmfile="C:\service-fabric-secure-nsg-cluster-65-node-3-nodetype\azuredeploytest.parameters.json"
76
- $templateFile="C:\azure-quickstart-templates\service-fabric-secure-nsg-cluster-65-node-3-nodetype\azuredeploy.json"
77
- $secretId="https://test1.vault.azure.net:443/secrets/testcertificate4/56ec774dc61a462bbc645ffc9b4b225f"
78
80
79
- New-AzServiceFabricCluster -ResourceGroupName $RGname -TemplateFile $templateFile -ParameterFile $templateParmfile -SecretIdentifier $secretId
81
+ ``` powershell
82
+ $resourceGroupName = "test20"
83
+ $templateParameterFile = "C:\service-fabric-secure-nsg-cluster-65-node-3-nodetype\azuredeploytest.parameters.json"
84
+ $templateFile = "C:\azure-quickstart-templates\service-fabric-secure-nsg-cluster-65-node-3-nodetype\azuredeploy.json"
85
+ $secretId = "https://test1.vault.azure.net:443/secrets/testcertificate4/56ec774dc61a462bbc645ffc9b4b225f"
86
+
87
+ New-AzServiceFabricCluster -ResourceGroupName $resourceGroupName -TemplateFile $templateFile -ParameterFile $templateParameterFile -SecretIdentifier $secretId
80
88
```
81
89
82
90
This command specifies an existing Certificate resource in a key vault and a custom template to deploy a cluster.
83
91
84
92
### Example 3: Create a new cluster using a custom template. Specify a different resource group name for the key vault and have the system upload a new certificate to it
85
- ```
86
- $pass="Password#1234" | ConvertTo-SecureString -AsPlainText -Force
87
- $RGname="test20"
88
- $keyVaultRG="test20kvrg"
89
- $keyVault="test20kv"
90
- $clusterloc="SouthCentralUS"
91
- $subname="{0}.{1}.$clusterloc.cloudapp.azure.com" -f $RGName, $clusterloc
92
- $pfxfolder="~\Documents"
93
- $templateParmfile="C:\service-fabric-secure-nsg-cluster-65-node-3-nodetype\azuredeploytest.parameters.json"
94
- $templateFile="C:\service-fabric-secure-nsg-cluster-65-node-3-nodetype\azuredeploy.json"
95
93
96
- New-AzServiceFabricCluster -ResourceGroupName $RGname -TemplateFile $templateFile -ParameterFile $templateParmfile -CertificateOutputFolder $pfxfolder -CertificatePassword $pass -KeyVaultResourceGroupName $keyVaultRG -KeyVaultName $keyVault -CertificateSubjectName $subname
94
+ ``` powershell
95
+ $password = "Password#1234" | ConvertTo-SecureString -AsPlainText -Force
96
+ $resourceGroupName = "quickstart-sf-group"
97
+ $keyVaultResourceGroupName = " quickstart-kv-group"
98
+ $keyVaultName = "quickstart-kv"
99
+ $azureRegion = "southcentralus"
100
+ $clusterDnsName = "{0}.{1}.cloudapp.azure.com" -F $resourceGroupName, $azureRegion
101
+ $localCertificateFolder = "~\Documents"
102
+ $templateParameterFile = "C:\service-fabric-secure-nsg-cluster-65-node-3-nodetype\azuredeploytest.parameters.json"
103
+ $templateFile = "C:\service-fabric-secure-nsg-cluster-65-node-3-nodetype\azuredeploy.json"
104
+
105
+ New-AzServiceFabricCluster -ResourceGroupName $resourceGroupName -TemplateFile $templateFile -ParameterFile $templateParameterFile -CertificateOutputFolder $localCertificateFolder -CertificatePassword $password -KeyVaultResourceGroupName $keyVaultResourceGroupName -KeyVaultName $keyVaultName -CertificateSubjectName $clusterDnsName
97
106
```
98
107
99
108
This command creates a new cluster using a custom template. Specify a different resource group name for the key vault and have the system upload a new certificate to it
100
109
101
110
### Example 4: Bring your own Certificate and custom template and create a new cluster
102
- ```
103
- $pass="Password#1234" | ConvertTo-SecureString -AsPlainText -Force
104
- $RGname="test20"
105
- $keyVaultRG="test20kvrg"
106
- $keyVault="test20kv"
107
- $pfxsourcefile="c:\Mycertificates\my2017Prodcert.pfx"
108
- $templateParmfile="~\Documents\GitHub\azure-quickstart-templates-parms\service-fabric-secure-nsg-cluster-65-node-3-nodetype\azuredeploytest.parameters.json"
109
- $templateFile="~\GitHub\azure-quickstart-templates\service-fabric-secure-nsg-cluster-65-node-3-nodetype\azuredeploy.json"
110
111
111
- New-AzServiceFabricCluster -ResourceGroupName $RGname -TemplateFile $templateFile -ParameterFile $templateParmfile -CertificateFile $pfxsourcefile -CertificatePassword $pass -KeyVaultResourceGroupName $keyVaultRG -KeyVaultName $keyVault
112
+ ``` powershell
113
+ $password = "Password#1234" | ConvertTo-SecureString -AsPlainText -Force
114
+ $resourceGroupName = "test20"
115
+ $keyVaultResourceGroupName = "test20kvrg"
116
+ $keyVaultName = "test20kv"
117
+ $localCertificateFile = "c:\Mycertificates\my2017Prodcert.pfx"
118
+ $templateParameterFile = "~\Documents\GitHub\azure-quickstart-templates-parms\service-fabric-secure-nsg-cluster-65-node-3-nodetype\azuredeploytest.parameters.json"
119
+ $templateFile = "~\GitHub\azure-quickstart-templates\service-fabric-secure-nsg-cluster-65-node-3-nodetype\azuredeploy.json"
120
+
121
+ New-AzServiceFabricCluster -ResourceGroupName $resourceGroupName -TemplateFile $templateFile -ParameterFile $templateParameterFile -CertificateFile $localCertificateFile -CertificatePassword $password -KeyVaultResourceGroupName $keyVaultResourceGroupName -KeyVaultName $keyVaultName
112
122
```
113
123
114
124
This command will let you bring your own Certificate and custom template and create a new cluster.
115
125
116
126
## PARAMETERS
117
127
118
128
### -CertificateCommonName
129
+
119
130
Certificate common name
120
131
121
132
``` yaml
@@ -131,6 +142,7 @@ Accept wildcard characters: False
131
142
` ` `
132
143
133
144
### -CertificateFile
145
+
134
146
The existing certificate file path for the primary cluster certificate
135
147
136
148
` ` ` yaml
@@ -146,6 +158,7 @@ Accept wildcard characters: False
146
158
` ` `
147
159
148
160
### -CertificateIssuerThumbprint
161
+
149
162
Certificate issuer thumbprint, separated by commas if more than one
150
163
151
164
` ` ` yaml
@@ -161,6 +174,7 @@ Accept wildcard characters: False
161
174
` ` `
162
175
163
176
### -CertificateOutputFolder
177
+
164
178
The folder of the new certificate file to be created
165
179
166
180
` ` ` yaml
@@ -176,6 +190,7 @@ Accept wildcard characters: False
176
190
` ` `
177
191
178
192
### -CertificatePassword
193
+
179
194
The password of the certificate file
180
195
181
196
` ` ` yaml
@@ -191,6 +206,7 @@ Accept wildcard characters: False
191
206
` ` `
192
207
193
208
### -CertificateSubjectName
209
+
194
210
The subject name of the certificate to be created
195
211
196
212
` ` ` yaml
@@ -206,6 +222,7 @@ Accept wildcard characters: False
206
222
` ` `
207
223
208
224
### -ClusterSize
225
+
209
226
The number of nodes in the cluster.
210
227
Default are 5 nodes
211
228
@@ -222,6 +239,7 @@ Accept wildcard characters: False
222
239
` ` `
223
240
224
241
### -DefaultProfile
242
+
225
243
The credentials, account, tenant, and subscription used for communication with Azure.
226
244
227
245
` ` ` yaml
@@ -237,6 +255,7 @@ Accept wildcard characters: False
237
255
` ` `
238
256
239
257
### -KeyVaultName
258
+
240
259
Azure key vault name, if not given it will be defaulted to the resource group name
241
260
242
261
` ` ` yaml
@@ -252,6 +271,7 @@ Accept wildcard characters: False
252
271
` ` `
253
272
254
273
### -KeyVaultResourceGroupName
274
+
255
275
Azure key vault resource group name, if not given it will be defaulted to resource group name
256
276
257
277
` ` ` yaml
@@ -267,6 +287,7 @@ Accept wildcard characters: False
267
287
` ` `
268
288
269
289
### -Location
290
+
270
291
The resource group location
271
292
272
293
` ` ` yaml
@@ -282,6 +303,7 @@ Accept wildcard characters: False
282
303
` ` `
283
304
284
305
### -Name
306
+
285
307
Specify the name of the cluster, if not given it will be same as resource group name
286
308
287
309
` ` ` yaml
@@ -297,6 +319,7 @@ Accept wildcard characters: False
297
319
` ` `
298
320
299
321
### -OS
322
+
300
323
The Operating System of the VMs that make up the cluster.
301
324
302
325
` ` ` yaml
@@ -313,6 +336,7 @@ Accept wildcard characters: False
313
336
` ` `
314
337
315
338
### -ParameterFile
339
+
316
340
The path to the template parameter file.
317
341
318
342
` ` ` yaml
@@ -328,6 +352,7 @@ Accept wildcard characters: False
328
352
` ` `
329
353
330
354
### -ResourceGroupName
355
+
331
356
Specify the name of the resource group.
332
357
333
358
` ` ` yaml
@@ -343,6 +368,7 @@ Accept wildcard characters: False
343
368
` ` `
344
369
345
370
### -SecondaryCertificateFile
371
+
346
372
The existing certificate file path for the secondary cluster certificate
347
373
348
374
` ` ` yaml
@@ -358,6 +384,7 @@ Accept wildcard characters: False
358
384
` ` `
359
385
360
386
### -SecondaryCertificatePassword
387
+
361
388
The password of the certificate file
362
389
363
390
` ` ` yaml
@@ -373,6 +400,7 @@ Accept wildcard characters: False
373
400
` ` `
374
401
375
402
### -SecretIdentifier
403
+
376
404
The existing Azure key vault secret URL, for example 'https://mykv.vault.azure.net:443/secrets/mysecrets/55ec7c4dc61a462bbc645ffc9b4b225f'
377
405
378
406
` ` ` yaml
@@ -388,6 +416,7 @@ Accept wildcard characters: False
388
416
` ` `
389
417
390
418
### -TemplateFile
419
+
391
420
The path to the template file.
392
421
393
422
` ` ` yaml
@@ -403,6 +432,7 @@ Accept wildcard characters: False
403
432
` ` `
404
433
405
434
### -VmPassword
435
+
406
436
The password of the Vm.
407
437
408
438
` ` ` yaml
@@ -430,6 +460,7 @@ Accept wildcard characters: False
430
460
` ` `
431
461
432
462
### -VmSku
463
+
433
464
The Vm Sku
434
465
435
466
` ` ` yaml
@@ -445,6 +476,7 @@ Accept wildcard characters: False
445
476
` ` `
446
477
447
478
### -VmUserName
479
+
448
480
The user name for logging to Vm
449
481
450
482
` ` ` yaml
@@ -460,6 +492,7 @@ Accept wildcard characters: False
460
492
` ` `
461
493
462
494
### -Confirm
495
+
463
496
Prompts you for confirmation before running the cmdlet.
464
497
465
498
` ` ` yaml
@@ -475,6 +508,7 @@ Accept wildcard characters: False
475
508
` ` `
476
509
477
510
### -WhatIf
511
+
478
512
Shows what would happen if the cmdlet runs.
479
513
The cmdlet is not run.
480
514
@@ -491,7 +525,8 @@ Accept wildcard characters: False
491
525
` ` `
492
526
493
527
### CommonParameters
494
- This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
528
+
529
+ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
495
530
496
531
## INPUTS
497
532
0 commit comments