-
Notifications
You must be signed in to change notification settings - Fork 7
/
azuredeploy.json
618 lines (617 loc) · 24.6 KB
/
azuredeploy.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUsername": {
"type": "string",
"metadata": {
"description": "The name of the administrator account of nested VMs and domain"
}
},
"adminPassword": {
"type": "securestring",
"metadata": {
"description": "The password for the administrator account of nested VMs and domain"
}
},
"domainName": {
"type": "string",
"defaultValue": "corp.contoso.com",
"metadata": {
"description": "The FQDN of the Active Directory Domain to be created"
}
},
"dnsPrefix": {
"type": "string",
"metadata": {
"description": "The DNS prefix for the public IP address used by the Load Balancer"
}
},
"vmSize": {
"type": "string",
"defaultValue": "Standard_E16s_v4",
"allowedValues": [
"Standard_E8s_v4",
"Standard_E8ds_v4",
"Standard_E16s_v4",
"Standard_E16ds_v4",
"Standard_E20s_v4",
"Standard_E20ds_v4",
"Standard_E32s_v4",
"Standard_E32ds_v4",
"Standard_E48s_v4",
"Standard_E48ds_v4",
"Standard_E64s_v4",
"Standard_E64ds_v4",
"Standard_E8s_v3",
"Standard_E16s_v3",
"Standard_E20s_v3",
"Standard_E32s_v3",
"Standard_E48s_v3",
"Standard_E64s_v3",
"Standard_D16s_v4",
"Standard_D16ds_v4",
"Standard_D32s_v4",
"Standard_D32ds_v4",
"Standard_D48s_v4",
"Standard_D48ds_v4",
"Standard_D64s_v4",
"Standard_D64ds_v4",
"Standard_D16s_v3",
"Standard_D32s_v3",
"Standard_D48s_v3",
"Standard_D64s_v3"
],
"metadata": {
"description": "Size of the VM that supports Nested virtualization"
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Location for all resources."
}
},
"virtualMachineName": {
"type": "string",
"defaultValue": "dcVM",
"metadata": {
"description": "Virtual machine name."
}
},
"privateIPAddress": {
"type": "string",
"defaultValue": "10.0.0.4",
"metadata": {
"description": "Private IP address for Azure VM, will be used as DNS address for vNet."
}
},
"virtualNetworkAddressRange": {
"type": "string",
"defaultValue": "10.0.0.0/16",
"metadata": {
"description": "Virtual network address range."
}
},
"subnetRange": {
"type": "string",
"defaultValue": "10.0.0.0/24",
"metadata": {
"description": "Subnet IP range."
}
},
"vmStoreDiskSize": {
"type": "int",
"defaultValue": 512,
"metadata": {
"description": "Azure VM additional disk size for hosting Azure Stack HCI VMs amount in GB"
}
},
"aksHciScenario": {
"type": "string",
"defaultValue": "onAzureVMDirectly",
"allowedValues": [
"onAzureVMDirectly",
"onNestedAzureStackHciClusteronAzureVM"
],
"metadata": {
"description": "Select the scenario if Aks Hci will be deployed on a nested cluster or on top of Azure VM"
}
},
"azsHCIHostCount": {
"type": "int",
"defaultValue": 3,
"metadata": {
"description": "How many Azure Stack HCI nested hosts to be created within the Azure VM."
}
},
"azsHCIHostMemory": {
"type": "int",
"defaultValue": 32,
"metadata": {
"description": "Azure Stack HCI memory amount in GB"
}
},
"autoShutdown": {
"type": "string",
"defaultValue": "Enabled",
"allowedValues": [
"Enabled",
"Disabled"
],
"metadata": {
"description": "Configure Auto shutdown state"
}
},
"autoShutdownTime": {
"type": "string",
"defaultValue": "0200",
"minLength": 4,
"maxLength": 4,
"metadata": {
"description": "The time at which VMs will be automatically shutdown (24h HHmm format)."
}
},
"autoShutdownTimeZone": {
"type": "string",
"defaultValue": "UTC",
"allowedValues": [
"Dateline Standard Time",
"UTC-11",
"Aleutian Standard Time",
"Hawaiian Standard Time",
"Marquesas Standard Time",
"Alaskan Standard Time",
"UTC-09",
"Pacific Standard Time (Mexico)",
"UTC-08",
"Pacific Standard Time",
"US Mountain Standard Time",
"Mountain Standard Time (Mexico)",
"Mountain Standard Time",
"Central America Standard Time",
"Central Standard Time",
"Easter Island Standard Time",
"Central Standard Time (Mexico)",
"Canada Central Standard Time",
"SA Pacific Standard Time",
"Eastern Standard Time (Mexico)",
"Eastern Standard Time",
"Haiti Standard Time",
"Cuba Standard Time",
"US Eastern Standard Time",
"Turks And Caicos Standard Time",
"Paraguay Standard Time",
"Atlantic Standard Time",
"Venezuela Standard Time",
"Central Brazilian Standard Time",
"SA Western Standard Time",
"Pacific SA Standard Time",
"Newfoundland Standard Time",
"Tocantins Standard Time",
"E. South America Standard Time",
"SA Eastern Standard Time",
"Argentina Standard Time",
"Greenland Standard Time",
"Montevideo Standard Time",
"Magallanes Standard Time",
"Saint Pierre Standard Time",
"Bahia Standard Time",
"UTC-02",
"Mid-Atlantic Standard Time",
"Azores Standard Time",
"Cape Verde Standard Time",
"UTC",
"GMT Standard Time",
"Greenwich Standard Time",
"Sao Tome Standard Time",
"Morocco Standard Time",
"W. Europe Standard Time",
"Central Europe Standard Time",
"Romance Standard Time",
"Central European Standard Time",
"W. Central Africa Standard Time",
"Jordan Standard Time",
"GTB Standard Time",
"Middle East Standard Time",
"Egypt Standard Time",
"E. Europe Standard Time",
"Syria Standard Time",
"West Bank Standard Time",
"South Africa Standard Time",
"FLE Standard Time",
"Israel Standard Time",
"Kaliningrad Standard Time",
"Sudan Standard Time",
"Libya Standard Time",
"Namibia Standard Time",
"Arabic Standard Time",
"Turkey Standard Time",
"Arab Standard Time",
"Belarus Standard Time",
"Russian Standard Time",
"E. Africa Standard Time",
"Iran Standard Time",
"Arabian Standard Time",
"Astrakhan Standard Time",
"Azerbaijan Standard Time",
"Russia Time Zone 3",
"Mauritius Standard Time",
"Saratov Standard Time",
"Georgian Standard Time",
"Volgograd Standard Time",
"Caucasus Standard Time",
"Afghanistan Standard Time",
"West Asia Standard Time",
"Ekaterinburg Standard Time",
"Pakistan Standard Time",
"Qyzylorda Standard Time",
"India Standard Time",
"Sri Lanka Standard Time",
"Nepal Standard Time",
"Central Asia Standard Time",
"Bangladesh Standard Time",
"Omsk Standard Time",
"Myanmar Standard Time",
"SE Asia Standard Time",
"Altai Standard Time",
"W. Mongolia Standard Time",
"North Asia Standard Time",
"N. Central Asia Standard Time",
"Tomsk Standard Time",
"China Standard Time",
"North Asia East Standard Time",
"Singapore Standard Time",
"W. Australia Standard Time",
"Taipei Standard Time",
"Ulaanbaatar Standard Time",
"Aus Central W. Standard Time",
"Transbaikal Standard Time",
"Tokyo Standard Time",
"North Korea Standard Time",
"Korea Standard Time",
"Yakutsk Standard Time",
"Cen. Australia Standard Time",
"AUS Central Standard Time",
"E. Australia Standard Time",
"AUS Eastern Standard Time",
"West Pacific Standard Time",
"Tasmania Standard Time",
"Vladivostok Standard Time",
"Lord Howe Standard Time",
"Bougainville Standard Time",
"Russia Time Zone 10",
"Magadan Standard Time",
"Norfolk Standard Time",
"Sakhalin Standard Time",
"Central Pacific Standard Time",
"Russia Time Zone 11",
"New Zealand Standard Time",
"UTC+12",
"Fiji Standard Time",
"Kamchatka Standard Time",
"Chatham Islands Standard Time",
"UTC+13",
"Tonga Standard Time",
"Samoa Standard Time",
"Line Islands Standard Time"
],
"minLength": 2,
"metadata": {
"description": "Time zone of the virtual machines. Type \"[TimeZoneInfo]::GetSystemTimeZones().Id\" in PowerShell to get the list."
}
},
"enableHybridBenefitServerLicenses": {
"type": "string",
"allowedValues": [
"Yes",
"No"
],
"defaultValue": "No",
"metadata": {
"description": "Enable Azure Hybrid Benefit to use your on-premises Windows Server licenses and reduce cost. See https://docs.microsoft.com/en-us/azure/virtual-machines/windows/hybrid-use-benefit-licensing for more information."
}
},
"branch": {
"type": "string",
"defaultValue": "master",
"metadata": {
"description": "for branch selection leave master if you are not the contributor and developing the ARM template"
}
}
},
"variables": {
"dscUri": "[concat('https://github.com/Azure/AksHcionAzureVM/raw/', parameters('branch'), '/DSC/AzureStackHCIHost.zip')]",
"_artifactsLocation": "[concat('https://raw.githubusercontent.com/', 'Azure/AksHcionAzureVM/', parameters('branch'), '/')]",
"networkSecurityGroupName": "[concat(parameters('virtualMachineName'),'-nsg')]",
"publicIpAddressName": "[concat(parameters('virtualMachineName'),'-pip')]",
"virtualNetworkName": "[concat(parameters('virtualMachineName'),'-vnet')]",
"networkInterfaceName": "[concat(parameters('virtualMachineName'),'-nic')]",
"subnetName": "[concat(parameters('virtualMachineName'),'-subnet')]"
},
"resources": [
{
"type": "Microsoft.Network/publicIPAddresses",
"apiVersion": "2020-05-01",
"name": "[variables('publicIPAddressName')]",
"location": "[parameters('location')]",
"properties": {
"publicIPAllocationMethod": "Dynamic",
"dnsSettings": {
"domainNameLabel": "[parameters('dnsPrefix')]"
}
}
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-06-01",
"name": "VNet",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/vnet.json'))]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"virtualNetworkName": {
"value": "[variables('virtualNetworkName')]"
},
"virtualNetworkAddressRange": {
"value": "[parameters('virtualNetworkAddressRange')]"
},
"subnetName": {
"value": "[variables('subnetName')]"
},
"subnetRange": {
"value": "[parameters('subnetRange')]"
},
"location": {
"value": "[parameters('location')]"
}
}
}
},
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2020-05-01",
"name": "[variables('networkInterfaceName')]",
"location": "[parameters('location')]",
"dependsOn": [
"VNet",
"[concat('Microsoft.Network/publicIpAddresses/', variables('publicIpAddressName'))]",
"[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]"
],
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Static",
"privateIPAddress": "[parameters('privateIPAddress')]",
"subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]"
},
"publicIPAddress": {
"id": "[resourceId(resourceGroup().name,'Microsoft.Network/publicIpAddresses', variables('publicIpAddressName'))]"
}
}
}
],
"networkSecurityGroup": {
"id": "[resourceId(resourceGroup().name, 'Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
}
}
},
{
"type": "Microsoft.Network/networkSecurityGroups",
"name": "[variables('networkSecurityGroupName')]",
"apiVersion": "2020-05-01",
"location": "[parameters('location')]",
"properties": {
"securityRules": [
{
"name": "default-allow-rdp",
"properties": {
"priority": 1000,
"sourceAddressPrefix": "*",
"protocol": "Tcp",
"destinationPortRange": "3389",
"access": "Allow",
"direction": "Inbound",
"sourcePortRange": "*",
"destinationAddressPrefix": "*"
}
}
]
}
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2020-06-01",
"name": "[parameters('virtualMachineName')]",
"location": "[parameters('location')]",
"dependsOn": [
"[variables('networkInterfaceName')]"
],
"properties": {
"licenseType": "[if(equals(parameters('enableHybridBenefitServerLicenses'), 'Yes'), 'Windows_Server', json('null'))]",
"hardwareProfile": {
"vmSize": "[parameters('vmSize')]"
},
"osProfile": {
"computerName": "[parameters('virtualMachineName')]",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-Datacenter",
"version": "latest"
},
"osDisk": {
"name": "[concat(parameters('virtualMachineName'),'-OSDisk')]",
"caching": "ReadOnly",
"createOption": "FromImage",
"managedDisk": {
"storageAccountType": "Standard_LRS"
}
},
"dataDisks": [
{
"name": "[concat(parameters('virtualMachineName'), '-DataDisk1')]",
"caching": "ReadWrite",
"createOption": "Empty",
"diskSizeGB": 20,
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"lun": 0
},
{
"name": "[concat(parameters('virtualMachineName'), '-DataDisk2')]",
"caching": "ReadWrite",
"createOption": "Empty",
"diskSizeGB": "[parameters('vmStoreDiskSize')]",
"managedDisk": {
"storageAccountType": "Premium_LRS"
},
"lun": 1
}
]
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]"
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true
}
}
},
"resources": [
{
"name": "AzureStackHCIHost",
"type": "extensions",
"apiVersion": "2019-07-01",
"location": "[parameters('location')]",
"dependsOn": [
"[parameters('virtualMachineName')]"
],
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.19",
"autoUpgradeMinorVersion": true,
"settings": {
"ModulesUrl": "[variables('dscUri')]",
"ConfigurationFunction": "AzureStackHCIHost.ps1\\AzureStackHCIHost",
"Properties": {
"DomainName": "[parameters('domainName')]",
"AdminCreds": {
"UserName": "[parameters('adminUsername')]",
"Password": "PrivateSettingsRef:AdminPassword"
},
"azsHostCount": "[parameters('azsHCIHostCount')]",
"azsHCIHostMemory": "[parameters('azsHCIHostMemory')]",
"branch": "[parameters('branch')]",
"aksHciScenario": "[parameters('aksHciScenario')]"
}
},
"protectedSettings": {
"Items": {
"AdminPassword": "[parameters('adminPassword')]"
}
}
}
}
]
},
{
"condition": "[equals(parameters('autoShutdown'), 'Enabled')]",
"name": "autoshutdown",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-06-01",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('virtualMachineName'), 'AzureStackHCIHost')]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[uri(variables('_artifactsLocation'), 'nestedtemplates/autoshutdown.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"location": {
"value": "[parameters('location')]"
},
"virtualMachineName": {
"value": "[parameters('virtualMachineName')]"
},
"autoShutdown": {
"value": "[parameters('autoShutdown')]"
},
"autoShutdownTime": {
"value": "[parameters('autoShutdownTime')]"
},
"autoShutdownTimeZone": {
"value": "[parameters('autoShutdownTimeZone')]"
}
}
}
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-06-01",
"name": "UpdateVNetDNS",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('virtualMachineName'), 'AzureStackHCIHost')]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/vnet-with-dns-server.json'))]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"virtualNetworkName": {
"value": "[variables('virtualNetworkName')]"
},
"virtualNetworkAddressRange": {
"value": "[parameters('virtualNetworkAddressRange')]"
},
"subnetName": {
"value": "[variables('subnetName')]"
},
"subnetRange": {
"value": "[parameters('subnetRange')]"
},
"DNSServerAddress": {
"value": [
"[parameters('privateIPAddress')]"
]
},
"location": {
"value": "[parameters('location')]"
}
}
}
}
],
"outputs": {
"dscUri": {
"type": "string",
"value": "[variables('dscUri')]"
},
"branch": {
"type": "string",
"value": "[parameters('branch')]"
}
}
}