├── newcluster-templates
├── shared-resources
│ ├── CreateADPDC.ps1.zip
│ ├── JoinADDomain.ps1.zip
│ ├── ConfigHpcNode.ps1.zip
│ ├── InstallHpcNode.ps1.zip
│ ├── ConfigHpcNodeNoAD.ps1.zip
│ ├── ConfigSQLServer.ps1.zip
│ ├── ConfigDBPermissions.ps1.zip
│ ├── InstallHpcHeadNode.ps1.zip
│ ├── InstallHpcSingleHeadNode.ps1.zip
│ ├── publicip-existing.json
│ ├── publicip-new.json
│ ├── dsc-extension.json
│ ├── vnet-with-dns-server.json
│ ├── windowsvm.json
│ ├── linux-node.json
│ ├── hpc-domain-controller.json
│ ├── windowsvm-rdma.json
│ ├── domain-joined-vm.json
│ ├── windowsvm-dsc.json
│ ├── domain-joined-vm-rdma.json
│ └── windowsvm-dsc-rdma.json
├── single-hn-wincn-noad.json
├── single-hn-lnxcn.json
├── three-hns-wincn-noad.json
├── three-hns-lnxcn.json
└── three-hns-wincn-ad.json
└── README.md
/newcluster-templates/shared-resources/CreateADPDC.ps1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/options/HPCPack2016/master/newcluster-templates/shared-resources/CreateADPDC.ps1.zip
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/JoinADDomain.ps1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/options/HPCPack2016/master/newcluster-templates/shared-resources/JoinADDomain.ps1.zip
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/ConfigHpcNode.ps1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/options/HPCPack2016/master/newcluster-templates/shared-resources/ConfigHpcNode.ps1.zip
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/InstallHpcNode.ps1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/options/HPCPack2016/master/newcluster-templates/shared-resources/InstallHpcNode.ps1.zip
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/ConfigHpcNodeNoAD.ps1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/options/HPCPack2016/master/newcluster-templates/shared-resources/ConfigHpcNodeNoAD.ps1.zip
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/ConfigSQLServer.ps1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/options/HPCPack2016/master/newcluster-templates/shared-resources/ConfigSQLServer.ps1.zip
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/ConfigDBPermissions.ps1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/options/HPCPack2016/master/newcluster-templates/shared-resources/ConfigDBPermissions.ps1.zip
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/InstallHpcHeadNode.ps1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/options/HPCPack2016/master/newcluster-templates/shared-resources/InstallHpcHeadNode.ps1.zip
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/InstallHpcSingleHeadNode.ps1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/options/HPCPack2016/master/newcluster-templates/shared-resources/InstallHpcSingleHeadNode.ps1.zip
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/publicip-existing.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "apiVersion": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The API version"
9 | }
10 | },
11 | "publicIPAddressName": {
12 | "type": "string"
13 | },
14 | "publicIPAddressType": {
15 | "type": "string"
16 | },
17 | "domainNameLabel": {
18 | "type": "string"
19 | },
20 | "publicIpRGName": {
21 | "type": "string"
22 | }
23 | },
24 | "variables": {
25 | "publicIpId": "[resourceId(parameters('publicIpRGName'), 'Microsoft.Network/publicIPAddresses', parameters('publicIPAddressName'))]"
26 | },
27 | "resources": [ ],
28 | "outputs": {
29 | "resourceId": {
30 | "type": "string",
31 | "value": "[variables('publicIpId')]"
32 | },
33 | "fqdn": {
34 | "value": "[reference(variables('publicIpId'),providers('Microsoft.Network', 'publicIPAddresses').apiVersions[0]).dnsSettings.fqdn]",
35 | "type": "string"
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/publicip-new.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "apiVersion": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The API version"
9 | }
10 | },
11 | "publicIPAddressName": {
12 | "type": "string"
13 | },
14 | "publicIPAddressType": {
15 | "type": "string"
16 | },
17 | "domainNameLabel": {
18 | "type": "string"
19 | },
20 | "publicIpRGName": {
21 | "type": "string"
22 | }
23 | },
24 | "variables": {
25 | "publicIpId": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('publicIPAddressName'))]"
26 | },
27 | "resources": [
28 | {
29 | "apiVersion": "[parameters('apiVersion')]",
30 | "type": "Microsoft.Network/publicIPAddresses",
31 | "name": "[parameters('publicIPAddressName')]",
32 | "location": "[resourceGroup().location]",
33 | "properties": {
34 | "publicIPAllocationMethod": "[parameters('publicIPAddressType')]",
35 | "dnsSettings": {
36 | "domainNameLabel": "[parameters('domainNameLabel')]"
37 | }
38 | }
39 | }
40 | ],
41 | "outputs": {
42 | "resourceId": {
43 | "type": "string",
44 | "value": "[variables('publicIpId')]"
45 | },
46 | "fqdn": {
47 | "value": "[reference(variables('publicIpId'),providers('Microsoft.Network', 'publicIPAddresses').apiVersions[0]).dnsSettings.fqdn]",
48 | "type": "string"
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/dsc-extension.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "apiVersion": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The API version"
9 | }
10 | },
11 | "vmName": {
12 | "type": "string",
13 | "metadata": {
14 | "description": "The VM name"
15 | }
16 | },
17 | "dscExtensionName": {
18 | "type": "string",
19 | "defaultValue": "configNodeWithDsc",
20 | "metadata": {
21 | "description": "The name of the Dsc extension"
22 | }
23 | },
24 | "dscSettings": {
25 | "type": "object",
26 | "metadata": {
27 | "description": "The DSC public settings"
28 | }
29 | },
30 | "dscProtectedSettings": {
31 | "type": "secureObject",
32 | "defaultValue": {
33 | },
34 | "metadata": {
35 | "description": "The DSC protected settings"
36 | }
37 | }
38 | },
39 | "variables": {
40 | },
41 | "resources": [
42 | {
43 | "apiVersion": "[parameters('apiVersion')]",
44 | "type": "Microsoft.Compute/virtualMachines/extensions",
45 | "name": "[concat(parameters('vmName'), '/', parameters('dscExtensionName'))]",
46 | "location": "[resourceGroup().location]",
47 | "properties": {
48 | "publisher": "Microsoft.Powershell",
49 | "type": "DSC",
50 | "typeHandlerVersion": "2.20",
51 | "autoUpgradeMinorVersion": true,
52 | "settings": "[parameters('dscSettings')]",
53 | "protectedSettings": "[parameters('dscProtectedSettings')]"
54 | }
55 | }
56 | ]
57 | }
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/vnet-with-dns-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "apiVersion": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The API version"
9 | }
10 | },
11 | "virtualNetworkName": {
12 | "type": "string",
13 | "metadata": {
14 | "description": "The name of the Virtual Network to Create"
15 | }
16 | },
17 | "virtualNetworkAddressRange": {
18 | "type": "string",
19 | "metadata": {
20 | "description": "The address range of the new VNET in CIDR format"
21 | },
22 | "defaultValue": "10.0.0.0/16"
23 | },
24 | "subnetName": {
25 | "type": "string",
26 | "metadata": {
27 | "description": "The name of the subnet created in the new VNET"
28 | }
29 | },
30 | "subnetRange": {
31 | "type": "string",
32 | "metadata": {
33 | "description": "The address range of the subnet created in the new VNET"
34 | },
35 | "defaultValue": "10.0.0.0/24"
36 | },
37 | "DNSServerAddress": {
38 | "type": "array",
39 | "metadata": {
40 | "description": "The DNS address(es) of the DNS Server(s) used by the VNET"
41 | }
42 | }
43 | },
44 | "resources": [
45 | {
46 | "apiVersion": "[parameters('apiVersion')]",
47 | "name": "[parameters('virtualNetworkName')]",
48 | "type": "Microsoft.Network/virtualNetworks",
49 | "location": "[resourceGroup().location]",
50 | "properties": {
51 | "addressSpace": {
52 | "addressPrefixes": [
53 | "[parameters('virtualNetworkAddressRange')]"
54 | ]
55 | },
56 | "dhcpOptions": {
57 | "dnsServers": "[parameters('DNSServerAddress')]"
58 | },
59 | "subnets": [
60 | {
61 | "name": "[parameters('subnetName')]",
62 | "properties": {
63 | "addressPrefix": "[parameters('subnetRange')]"
64 | }
65 | }
66 | ]
67 | }
68 | }
69 | ]
70 | }
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/windowsvm.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "apiVersion": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The API version"
9 | }
10 | },
11 | "subnetId": {
12 | "type": "string",
13 | "metadata": {
14 | "description": "The Id of the subnet in which the node is created"
15 | }
16 | },
17 | "nicName": {
18 | "type": "string",
19 | "metadata": {
20 | "description": "The network interface name"
21 | }
22 | },
23 | "vmName": {
24 | "type": "string",
25 | "metadata": {
26 | "description": "The VM name"
27 | }
28 | },
29 | "vmSize": {
30 | "type": "string",
31 | "metadata": {
32 | "description": "The VM role size"
33 | }
34 | },
35 | "storageAccountName": {
36 | "type": "string",
37 | "metadata": {
38 | "description": "The storage account name to store the VHD of the VM"
39 | }
40 | },
41 | "imageReference": {
42 | "type": "object",
43 | "metadata": {
44 | "description": "The image reference"
45 | }
46 | },
47 | "adminUsername": {
48 | "type": "string",
49 | "metadata": {
50 | "description": "The user name of the administrator"
51 | }
52 | },
53 | "adminPassword": {
54 | "type": "securestring",
55 | "metadata": {
56 | "description": "The password of the administrator"
57 | }
58 | },
59 | "availabilitySetName": {
60 | "type": "string",
61 | "metadata": {
62 | "description": "The availability set name"
63 | }
64 | },
65 | "dataDiskSizeInGB": {
66 | "type": "int",
67 | "defaultValue": 0,
68 | "allowedValues": [ 0, 200, 500, 1000 ],
69 | "metadata": {
70 | "description": "The data disk size in GB, 0 means no data disk"
71 | }
72 | },
73 | "customData": {
74 | "type": "string",
75 | "defaultValue": "[base64('None')]",
76 | "metadata": {
77 | "description": "The custom data in base64 format"
78 | }
79 | },
80 | "enableAutomaticUpdates": {
81 | "type": "bool",
82 | "defaultValue": false,
83 | "metadata": {
84 | "description": "Specify whether the VM is enabled for automatic updates"
85 | }
86 | },
87 | "secrets": {
88 | "type": "array",
89 | "defaultValue": [ ],
90 | "metadata": {
91 | "description": "The property 'osProfile/secrets', specify the set of certificates that shall be installed on the VM"
92 | }
93 | }
94 | },
95 | "variables": {
96 | "osDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-os-', uniqueString(parameters('subnetId')), '.vhd')]",
97 | "dataDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-data-', uniqueString(parameters('subnetId')), '.vhd')]",
98 | "needDataDiskJumpBox": {
99 | "0": "no",
100 | "200": "yes",
101 | "500": "yes",
102 | "1000": "yes"
103 | },
104 | "needDataDisk": "[variables('needDataDiskJumpBox')[string(parameters('dataDiskSizeInGB'))]]",
105 | "dataDisksJumpBox": {
106 | "no": [ ],
107 | "yes": [
108 | {
109 | "name": "datadisk",
110 | "vhd": {
111 | "uri": "[variables('dataDiskUri')]"
112 | },
113 | "caching": "None",
114 | "createOption": "Empty",
115 | "diskSizeGB": "[parameters('dataDiskSizeInGB')]",
116 | "lun": 0
117 | }
118 | ]
119 | },
120 | "dataDisks": "[variables('dataDisksJumpBox')[variables('needDataDisk')]]"
121 | },
122 | "resources": [
123 | {
124 | "apiVersion": "[parameters('apiVersion')]",
125 | "type": "Microsoft.Compute/virtualMachines",
126 | "name": "[parameters('vmName')]",
127 | "location": "[resourceGroup().location]",
128 | "properties": {
129 | "availabilitySet": {
130 | "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('availabilitySetName'))]"
131 | },
132 | "hardwareProfile": {
133 | "vmSize": "[parameters('vmSize')]"
134 | },
135 | "osProfile": {
136 | "computerName": "[parameters('vmName')]",
137 | "adminUsername": "[parameters('adminUsername')]",
138 | "adminPassword": "[parameters('adminPassword')]",
139 | "customData": "[parameters('customData')]",
140 | "windowsConfiguration": {
141 | "enableAutomaticUpdates": "[parameters('enableAutomaticUpdates')]"
142 | },
143 | "secrets": "[parameters('secrets')]"
144 | },
145 | "storageProfile": {
146 | "imageReference": "[parameters('imageReference')]",
147 | "osDisk": {
148 | "name": "osdisk",
149 | "vhd": {
150 | "uri": "[variables('osDiskUri')]"
151 | },
152 | "caching": "ReadOnly",
153 | "createOption": "FromImage"
154 | },
155 | "dataDisks": "[variables('dataDisks')]"
156 | },
157 | "networkProfile": {
158 | "networkInterfaces": [
159 | {
160 | "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('nicName'))]"
161 | }
162 | ]
163 | }
164 | }
165 | }
166 | ]
167 | }
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/linux-node.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "apiVersion": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The API version"
9 | }
10 | },
11 | "subnetId": {
12 | "type": "string",
13 | "metadata": {
14 | "description": "The Id of the subnet in which the node is created"
15 | }
16 | },
17 | "vmName": {
18 | "type": "string",
19 | "metadata": {
20 | "description": "The VM name"
21 | }
22 | },
23 | "vmSize": {
24 | "type": "string",
25 | "metadata": {
26 | "description": "The VM role size"
27 | }
28 | },
29 | "storageAccountName": {
30 | "type": "string",
31 | "metadata": {
32 | "description": "The storage account name to store the VHD of the VM"
33 | }
34 | },
35 | "imageReference": {
36 | "type": "object",
37 | "metadata": {
38 | "description": "The image reference"
39 | }
40 | },
41 | "adminUsername": {
42 | "type": "string",
43 | "metadata": {
44 | "description": "The user name of the administrator"
45 | }
46 | },
47 | "adminPassword": {
48 | "type": "securestring",
49 | "metadata": {
50 | "description": "The password of the administrator"
51 | }
52 | },
53 | "availabilitySetName": {
54 | "type": "string",
55 | "metadata": {
56 | "description": "The availability set name"
57 | }
58 | },
59 | "customData": {
60 | "type": "string",
61 | "defaultValue": "[base64('None')]",
62 | "metadata": {
63 | "description": "The custom data in base64 format"
64 | }
65 | },
66 | "secrets": {
67 | "type": "array",
68 | "defaultValue": [ ],
69 | "metadata": {
70 | "description": "The property 'osProfile/secrets', specify the set of certificates that shall be installed on the VM"
71 | }
72 | },
73 | "headNodeList": {
74 | "type": "string",
75 | "metadata": {
76 | "description": "The head node list"
77 | }
78 | }
79 | },
80 | "variables":{
81 | "nicName": "[concat(parameters('vmName'), '-nic-', uniqueString(parameters('subnetId')))]",
82 | "osDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-os-', uniqueString(parameters('subnetId')), '.vhd')]"
83 | },
84 | "resources": [
85 | {
86 | "apiVersion": "[parameters('apiVersion')]",
87 | "type": "Microsoft.Network/networkInterfaces",
88 | "name": "[variables('nicName')]",
89 | "location": "[resourceGroup().location]",
90 | "properties": {
91 | "ipConfigurations": [
92 | {
93 | "name": "IPConfig",
94 | "properties": {
95 | "privateIPAllocationMethod": "Dynamic",
96 | "subnet": {
97 | "id": "[parameters('subnetId')]"
98 | }
99 | }
100 | }
101 | ]
102 | }
103 | },
104 | {
105 | "apiVersion": "[parameters('apiVersion')]",
106 | "type": "Microsoft.Compute/virtualMachines",
107 | "name": "[parameters('vmName')]",
108 | "location": "[resourceGroup().location]",
109 | "dependsOn": [
110 | "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
111 | ],
112 | "properties": {
113 | "availabilitySet": {
114 | "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('availabilitySetName'))]"
115 | },
116 | "hardwareProfile": {
117 | "vmSize": "[parameters('vmSize')]"
118 | },
119 | "osProfile": {
120 | "computerName": "[parameters('vmName')]",
121 | "adminUsername": "[parameters('adminUsername')]",
122 | "adminPassword": "[parameters('adminPassword')]",
123 | "customData": "[parameters('customData')]",
124 | "linuxConfiguration": {
125 | "disablePasswordAuthentication": "false"
126 | },
127 | "secrets": "[parameters('secrets')]"
128 | },
129 | "storageProfile": {
130 | "imageReference": "[parameters('imageReference')]",
131 | "osDisk": {
132 | "name": "osdisk",
133 | "vhd": {
134 | "uri": "[variables('osDiskUri')]"
135 | },
136 | "caching": "ReadOnly",
137 | "createOption": "FromImage"
138 | }
139 | },
140 | "networkProfile": {
141 | "networkInterfaces": [
142 | {
143 | "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
144 | }
145 | ]
146 | }
147 | },
148 | "resources": [
149 | {
150 | "apiVersion": "[parameters('apiVersion')]",
151 | "type": "Microsoft.Compute/virtualMachines/extensions",
152 | "name": "[concat(parameters('vmName'), '/installHPCNodeAgent')]",
153 | "location": "[resourceGroup().location]",
154 | "dependsOn": [
155 | "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
156 | ],
157 | "properties": {
158 | "publisher": "Microsoft.HpcPack",
159 | "type": "LinuxNodeAgent",
160 | "typeHandlerVersion": "2.1",
161 | "autoUpgradeMinorVersion": true,
162 | "settings": {
163 | "ClusterConnectionString": "[parameters('headNodeList')]"
164 | }
165 | }
166 | }
167 | ]
168 | }
169 | ]
170 | }
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/hpc-domain-controller.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "apiVersion": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The API version"
9 | }
10 | },
11 | "vmName": {
12 | "type": "string",
13 | "metadata": {
14 | "description": "The VM name"
15 | }
16 | },
17 | "vmSize": {
18 | "type": "string",
19 | "metadata": {
20 | "description": "The VM role size"
21 | }
22 | },
23 | "storageAccountName": {
24 | "type": "string",
25 | "metadata": {
26 | "description": "The storage account name to store the VHD of the VM"
27 | }
28 | },
29 | "nicName": {
30 | "type": "string",
31 | "metadata": {
32 | "description": "The network interface name"
33 | }
34 | },
35 | "adminUsername": {
36 | "type": "string",
37 | "metadata": {
38 | "description": "The user name of the administrator"
39 | }
40 | },
41 | "adminPassword": {
42 | "type": "securestring",
43 | "metadata": {
44 | "description": "The password of the administrator"
45 | }
46 | },
47 | "dataDiskSizeInGB": {
48 | "type": "int",
49 | "metadata": {
50 | "description": "The data disk size in GB"
51 | }
52 | },
53 | "imageReference": {
54 | "type": "object",
55 | "metadata": {
56 | "description": "The image reference"
57 | }
58 | },
59 | "subnetId": {
60 | "type": "string",
61 | "metadata": {
62 | "description": "The Id of the subnet in which the node is created"
63 | }
64 | },
65 | "privateDomainName": {
66 | "type": "string",
67 | "metadata": {
68 | "description": "The fully qualified domain name (FQDN) for the private domain forest which will be created by this template, for example 'hpc.local'."
69 | }
70 | },
71 | "scriptBaseUri": {
72 | "type": "string",
73 | "metadata": {
74 | "description": "The base URI of the script"
75 | }
76 | }
77 | },
78 | "variables": {
79 | "osDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-os-', uniqueString(parameters('subnetId')), '.vhd')]",
80 | "dataDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-data-', uniqueString(parameters('subnetId')), '.vhd')]"
81 | },
82 | "resources": [
83 | {
84 | "apiVersion": "[parameters('apiVersion')]",
85 | "type": "Microsoft.Compute/virtualMachines",
86 | "name": "[parameters('vmName')]",
87 | "location": "[resourceGroup().location]",
88 | "properties": {
89 | "hardwareProfile": {
90 | "vmSize": "[parameters('vmSize')]"
91 | },
92 | "osProfile": {
93 | "computerName": "[parameters('vmName')]",
94 | "adminUsername": "[parameters('adminUsername')]",
95 | "adminPassword": "[parameters('adminPassword')]"
96 | },
97 | "storageProfile": {
98 | "imageReference": "[parameters('imageReference')]",
99 | "osDisk": {
100 | "name": "osdisk",
101 | "vhd": {
102 | "uri": "[variables('osDiskUri')]"
103 | },
104 | "caching": "ReadOnly",
105 | "createOption": "FromImage"
106 | },
107 | "dataDisks": [
108 | {
109 | "name": "datadisk",
110 | "vhd": {
111 | "uri": "[variables('dataDiskUri')]"
112 | },
113 | "caching": "None",
114 | "createOption": "Empty",
115 | "diskSizeGB": "[parameters('dataDiskSizeInGB')]",
116 | "lun": 0
117 | }
118 | ]
119 | },
120 | "networkProfile": {
121 | "networkInterfaces": [
122 | {
123 | "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('nicName'))]"
124 | }
125 | ]
126 | }
127 | },
128 | "resources": [
129 | {
130 | "apiVersion": "[parameters('apiVersion')]",
131 | "type": "Microsoft.Compute/virtualMachines/extensions",
132 | "name": "[concat(parameters('vmName'),'/promoteDomainController')]",
133 | "location": "[resourceGroup().location]",
134 | "dependsOn": [
135 | "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
136 | ],
137 | "properties": {
138 | "publisher": "Microsoft.Powershell",
139 | "type": "DSC",
140 | "typeHandlerVersion": "2.20",
141 | "autoUpgradeMinorVersion": true,
142 | "settings": {
143 | "wmfVersion": "4.0",
144 | "configuration": {
145 | "url": "[concat(parameters('scriptBaseUri'),'/CreateADPDC.ps1.zip')]",
146 | "script": "CreateADPDC.ps1",
147 | "function": "CreateADPDC"
148 | },
149 | "configurationArguments": {
150 | "DomainName": "[parameters('privateDomainName')]"
151 | }
152 | },
153 | "protectedSettings": {
154 | "configurationArguments": {
155 | "AdminCreds": {
156 | "UserName": "[parameters('adminUsername')]",
157 | "Password": "[parameters('adminPassword')]"
158 | }
159 | }
160 | }
161 | }
162 | }
163 | ]
164 | }
165 | ]
166 | }
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/windowsvm-rdma.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "apiVersion": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The API version"
9 | }
10 | },
11 | "subnetId": {
12 | "type": "string",
13 | "metadata": {
14 | "description": "The Id of the subnet in which the node is created"
15 | }
16 | },
17 | "nicName": {
18 | "type": "string",
19 | "metadata": {
20 | "description": "The network interface name"
21 | }
22 | },
23 | "vmName": {
24 | "type": "string",
25 | "metadata": {
26 | "description": "The VM name"
27 | }
28 | },
29 | "vmSize": {
30 | "type": "string",
31 | "metadata": {
32 | "description": "The VM role size"
33 | }
34 | },
35 | "storageAccountName": {
36 | "type": "string",
37 | "metadata": {
38 | "description": "The storage account name to store the VHD of the VM"
39 | }
40 | },
41 | "imageReference": {
42 | "type": "object",
43 | "metadata": {
44 | "description": "The image reference"
45 | }
46 | },
47 | "adminUsername": {
48 | "type": "string",
49 | "metadata": {
50 | "description": "The user name of the administrator"
51 | }
52 | },
53 | "adminPassword": {
54 | "type": "securestring",
55 | "metadata": {
56 | "description": "The password of the administrator"
57 | }
58 | },
59 | "availabilitySetName": {
60 | "type": "string",
61 | "metadata": {
62 | "description": "The availability set name"
63 | }
64 | },
65 | "dataDiskSizeInGB": {
66 | "type": "int",
67 | "defaultValue": 0,
68 | "allowedValues": [ 0, 200, 500, 1000 ],
69 | "metadata": {
70 | "description": "The data disk size in GB, 0 means no data disk"
71 | }
72 | },
73 | "customData": {
74 | "type": "string",
75 | "defaultValue": "[base64('None')]",
76 | "metadata": {
77 | "description": "The custom data in base64 format"
78 | }
79 | },
80 | "enableAutomaticUpdates": {
81 | "type": "bool",
82 | "defaultValue": false,
83 | "metadata": {
84 | "description": "Specify whether the VM is enabled for automatic updates"
85 | }
86 | },
87 | "secrets": {
88 | "type": "array",
89 | "defaultValue": [ ],
90 | "metadata": {
91 | "description": "The property 'osProfile/secrets', specify the set of certificates that shall be installed on the VM"
92 | }
93 | }
94 | },
95 | "variables": {
96 | "osDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-os-', uniqueString(parameters('subnetId')), '.vhd')]",
97 | "dataDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-data-', uniqueString(parameters('subnetId')), '.vhd')]",
98 | "needDataDiskJumpBox": {
99 | "0": "no",
100 | "200": "yes",
101 | "500": "yes",
102 | "1000": "yes"
103 | },
104 | "needDataDisk": "[variables('needDataDiskJumpBox')[string(parameters('dataDiskSizeInGB'))]]",
105 | "dataDisksJumpBox": {
106 | "no": [ ],
107 | "yes": [
108 | {
109 | "name": "datadisk",
110 | "vhd": {
111 | "uri": "[variables('dataDiskUri')]"
112 | },
113 | "caching": "None",
114 | "createOption": "Empty",
115 | "diskSizeGB": "[parameters('dataDiskSizeInGB')]",
116 | "lun": 0
117 | }
118 | ]
119 | },
120 | "dataDisks": "[variables('dataDisksJumpBox')[variables('needDataDisk')]]"
121 | },
122 | "resources": [
123 | {
124 | "apiVersion": "[parameters('apiVersion')]",
125 | "type": "Microsoft.Compute/virtualMachines",
126 | "name": "[parameters('vmName')]",
127 | "location": "[resourceGroup().location]",
128 | "properties": {
129 | "availabilitySet": {
130 | "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('availabilitySetName'))]"
131 | },
132 | "hardwareProfile": {
133 | "vmSize": "[parameters('vmSize')]"
134 | },
135 | "osProfile": {
136 | "computerName": "[parameters('vmName')]",
137 | "adminUsername": "[parameters('adminUsername')]",
138 | "adminPassword": "[parameters('adminPassword')]",
139 | "customData": "[parameters('customData')]",
140 | "windowsConfiguration": {
141 | "enableAutomaticUpdates": "[parameters('enableAutomaticUpdates')]"
142 | },
143 | "secrets": "[parameters('secrets')]"
144 | },
145 | "storageProfile": {
146 | "imageReference": "[parameters('imageReference')]",
147 | "osDisk": {
148 | "name": "osdisk",
149 | "vhd": {
150 | "uri": "[variables('osDiskUri')]"
151 | },
152 | "caching": "ReadOnly",
153 | "createOption": "FromImage"
154 | },
155 | "dataDisks": "[variables('dataDisks')]"
156 | },
157 | "networkProfile": {
158 | "networkInterfaces": [
159 | {
160 | "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('nicName'))]"
161 | }
162 | ]
163 | }
164 | },
165 | "resources": [
166 | {
167 | "type": "Microsoft.Compute/virtualMachines/extensions",
168 | "name": "[concat(parameters('vmName'),'/installRDMADriver')]",
169 | "apiVersion": "[parameters('apiVersion')]",
170 | "location": "[resourceGroup().location]",
171 | "dependsOn": [
172 | "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
173 | ],
174 | "properties": {
175 | "publisher": "Microsoft.HpcCompute",
176 | "type": "HpcVmDrivers",
177 | "typeHandlerVersion": "1.1"
178 | }
179 | }
180 | ]
181 | }
182 | ]
183 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Deploy Microsoft HPC Pack 2016 cluster in Azure
2 |
3 | ### **Note:** see [Pre-Requisites](#prerequisites) section on this page before starting your deployment.
4 |
5 | You can now deploy a Microsoft HPC Pack 2016 cluster in Azure. Choose one from the following templates and click "Deploy to Azure" button to deploy.
6 |
7 | ### Template 1: High-availability cluster for Windows workloads with Active Directory Domain
8 | This template deploys an HPC Pack cluster with high availability for Windows HPC workloads in Active Directory Domain forest. The cluster includes one domain controller, **three** head nodes, one Database Server with SQL Server 2016 Standard version, and a configurable number of **Windows** compute nodes.
9 |
10 |
11 |
12 |
13 |
14 | ### Template 2: High-availability cluster for Windows workloads
15 | This template deploys an HPC Pack cluster with high availability for Windows HPC workloads. The cluster includes **three** head nodes, one Database Server with SQL Server 2016 Standard version, and a configurable number of **Windows** compute nodes.
16 |
17 |
18 |
19 |
20 |
21 | ### Template 3: High-availability cluster for Linux workloads
22 | This template deploys an HPC Pack cluster with high availability for Windows HPC workloads. The cluster includes **three** head nodes, one Database Server with SQL Server 2016 Standard version, and a configurable number of **Linux** compute nodes.
23 |
24 |
25 |
26 |
27 |
28 | ### Template 4: Single head node cluster for Windows workloads
29 |
30 | This template deploys an HPC Pack cluster with one **single** head node and a configurable number of **Windows** compute nodes. The head node is with local databases (SQL server 2016 Express version).
31 |
32 |
33 |
34 |
35 |
36 | ### Template 5: Single head node cluster for Linux workloads
37 |
38 | This template deploys an HPC Pack cluster with one **single** head node and a configurable number of **Linux** compute nodes. The head node is with local databases (SQL server 2016 Express version).
39 |
40 |
41 |
42 |
43 |
44 |
45 | ## Pre-Requisites:
46 |
47 | Microsoft HPC Pack 2016 cluster requires a Personal Information Exchange (PFX) certificate to secure the communication between the HPC nodes. The certificate must meet the following requirements: 3.Have a private key capable of **key exchange**; 2.Key usage includes **Digital Signature** and **Key Encipherment**; 3.Enhanced key usage includes **Client Authentication** and **Server Authentication**.You can run the following PowerShell command to generate a self-signed certificate which meets the requirements and export it as a PFX certificate.
48 |
49 | **Note**: The command is supported **from Windows 10 or Windows Server 2016 on.**
50 |
51 | New-SelfSignedCertificate -Subject "CN=HPC Pack 2016 Communication" -KeySpec KeyExchange -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.1,1.3.6.1.5.5.7.3.2") -CertStoreLocation cert:\LocalMachine\My -KeyExportPolicy Exportable
52 |
53 | Before deploying the HPC cluster, you shall upload the certificate to an Azure Key Vault as a secret, and remember the following information which will be used in deployment: key vault name, resource group name, secret Id, and certificate thumbprint. More details about uploading certificate to Azure Key Vault please see [description of vaultCertificates.certificateUrl]( https://msdn.microsoft.com/en-us/library/mt163591.aspx#bk_vaultcert), or you can refer to the PowerShell script as below.
54 |
55 | #Give the following values
56 | $VaultName = "mytestvault"
57 | $SecretName = "hpcpfxcert"
58 | $VaultRG = "myresourcegroup"
59 | $location = "westus"
60 | $PfxFile = "c:\Temp\mytest.pfx"
61 | $Password = "yourpfxkeyprotectionpassword"
62 | #Validate the pfx file
63 | try {
64 | $pfxCert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 -ArgumentList $PfxFile, $Password
65 | }
66 | catch [System.Management.Automation.MethodInvocationException]
67 | {
68 | throw $_.Exception.InnerException
69 | }
70 | $thumbprint = $pfxCert.Thumbprint
71 | $pfxCert.Dispose()
72 | # Create and encode the JSON object
73 | $pfxContentBytes = Get-Content $PfxFile -Encoding Byte
74 | $pfxContentEncoded = [System.Convert]::ToBase64String($pfxContentBytes)
75 | $jsonObject = @"
76 | {
77 | "data": "$pfxContentEncoded",
78 | "dataType": "pfx",
79 | "password": "$Password"
80 | }
81 | "@
82 | $jsonObjectBytes = [System.Text.Encoding]::UTF8.GetBytes($jsonObject)
83 | $jsonEncoded = [System.Convert]::ToBase64String($jsonObjectBytes)
84 | #Create an Azure key vault and upload the certificate as a secret
85 | $secret = ConvertTo-SecureString -String $jsonEncoded -AsPlainText -Force
86 | $rg = Get-AzureRmResourceGroup -Name $VaultRG -Location $location -ErrorAction SilentlyContinue
87 | if($null -eq $rg)
88 | {
89 | $rg = New-AzureRmResourceGroup -Name $VaultRG -Location $location
90 | }
91 | $hpcKeyVault = New-AzureRmKeyVault -VaultName $VaultName -ResourceGroupName $VaultRG -Location $location -EnabledForDeployment -EnabledForTemplateDeployment
92 | $hpcSecret = Set-AzureKeyVaultSecret -VaultName $VaultName -Name $SecretName -SecretValue $secret
93 | "The following Information will be used in the deployment template"
94 | "Vault Name : $VaultName"
95 | "Vault Resource Group : $VaultRG"
96 | "Certificate URL : $($hpcSecret.Id)"
97 | "Certificate Thumbprint : $thumbprint"
98 |
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/domain-joined-vm.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "apiVersion": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The API version"
9 | }
10 | },
11 | "subnetId": {
12 | "type": "string",
13 | "metadata": {
14 | "description": "The Id of the subnet in which the node is created"
15 | }
16 | },
17 | "nicName": {
18 | "type": "string",
19 | "metadata": {
20 | "description": "The network interface name"
21 | }
22 | },
23 | "vmName": {
24 | "type": "string",
25 | "metadata": {
26 | "description": "The VM name"
27 | }
28 | },
29 | "vmSize": {
30 | "type": "string",
31 | "metadata": {
32 | "description": "The VM role size"
33 | }
34 | },
35 | "storageAccountName": {
36 | "type": "string",
37 | "metadata": {
38 | "description": "The storage account name to store the VHD of the VM"
39 | }
40 | },
41 | "imageReference": {
42 | "type": "object",
43 | "metadata": {
44 | "description": "The image reference"
45 | }
46 | },
47 | "adminUsername": {
48 | "type": "string",
49 | "metadata": {
50 | "description": "The user name of the administrator"
51 | }
52 | },
53 | "adminPassword": {
54 | "type": "securestring",
55 | "metadata": {
56 | "description": "The password of the administrator"
57 | }
58 | },
59 | "availabilitySetName": {
60 | "type": "string",
61 | "metadata": {
62 | "description": "The availability set name"
63 | }
64 | },
65 | "dataDiskSizeInGB": {
66 | "type": "int",
67 | "defaultValue": 0,
68 | "allowedValues": [ 0, 200, 500, 1000 ],
69 | "metadata": {
70 | "description": "The data disk size in GB, 0 means no data disk"
71 | }
72 | },
73 | "customData": {
74 | "type": "string",
75 | "defaultValue": "[base64('None')]",
76 | "metadata": {
77 | "description": "The custom data in base64 format"
78 | }
79 | },
80 | "enableAutomaticUpdates": {
81 | "type": "bool",
82 | "defaultValue": false,
83 | "metadata": {
84 | "description": "Specify whether the VM is enabled for automatic updates"
85 | }
86 | },
87 | "secrets": {
88 | "type": "array",
89 | "defaultValue": [ ],
90 | "metadata": {
91 | "description": "The property 'osProfile/secrets', specify the set of certificates that shall be installed on the VM"
92 | }
93 | },
94 | "domainName": {
95 | "type": "string",
96 | "metadata": {
97 | "description": "The fully qualified domain name (FQDN) for the private domain forest which will be created by this template, for example 'hpc.local'."
98 | }
99 | }
100 | },
101 | "variables": {
102 | "osDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-os-', uniqueString(parameters('subnetId')), '.vhd')]",
103 | "dataDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-data-', uniqueString(parameters('subnetId')), '.vhd')]",
104 | "needDataDiskJumpBox": {
105 | "0": "no",
106 | "200": "yes",
107 | "500": "yes",
108 | "1000": "yes"
109 | },
110 | "needDataDisk": "[variables('needDataDiskJumpBox')[string(parameters('dataDiskSizeInGB'))]]",
111 | "dataDisksJumpBox": {
112 | "no": [ ],
113 | "yes": [
114 | {
115 | "name": "datadisk",
116 | "vhd": {
117 | "uri": "[variables('dataDiskUri')]"
118 | },
119 | "caching": "None",
120 | "createOption": "Empty",
121 | "diskSizeGB": "[parameters('dataDiskSizeInGB')]",
122 | "lun": 0
123 | }
124 | ]
125 | },
126 | "dataDisks": "[variables('dataDisksJumpBox')[variables('needDataDisk')]]"
127 | },
128 | "resources": [
129 | {
130 | "apiVersion": "[parameters('apiVersion')]",
131 | "type": "Microsoft.Compute/virtualMachines",
132 | "name": "[parameters('vmName')]",
133 | "location": "[resourceGroup().location]",
134 | "properties": {
135 | "availabilitySet": {
136 | "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('availabilitySetName'))]"
137 | },
138 | "hardwareProfile": {
139 | "vmSize": "[parameters('vmSize')]"
140 | },
141 | "osProfile": {
142 | "computerName": "[parameters('vmName')]",
143 | "adminUsername": "[parameters('adminUsername')]",
144 | "adminPassword": "[parameters('adminPassword')]",
145 | "customData": "[parameters('customData')]",
146 | "windowsConfiguration": {
147 | "enableAutomaticUpdates": "[parameters('enableAutomaticUpdates')]"
148 | },
149 | "secrets": "[parameters('secrets')]"
150 | },
151 | "storageProfile": {
152 | "imageReference": "[parameters('imageReference')]",
153 | "osDisk": {
154 | "name": "osdisk",
155 | "vhd": {
156 | "uri": "[variables('osDiskUri')]"
157 | },
158 | "caching": "ReadOnly",
159 | "createOption": "FromImage"
160 | },
161 | "dataDisks": "[variables('dataDisks')]"
162 | },
163 | "networkProfile": {
164 | "networkInterfaces": [
165 | {
166 | "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('nicName'))]"
167 | }
168 | ]
169 | }
170 | },
171 | "resources": [
172 | {
173 | "apiVersion": "[parameters('apiVersion')]",
174 | "type": "Microsoft.Compute/virtualMachines/extensions",
175 | "name": "[concat(parameters('vmName'), '/joinDomain')]",
176 | "location": "[resourceGroup().location]",
177 | "dependsOn": [
178 | "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
179 | ],
180 | "properties": {
181 | "publisher": "Microsoft.Compute",
182 | "type": "JsonADDomainExtension",
183 | "typeHandlerVersion": "1.3",
184 | "autoUpgradeMinorVersion": true,
185 | "settings": {
186 | "Name": "[parameters('domainName')]",
187 | "User": "[concat(parameters('domainName'), '\\', parameters('adminUsername'))]",
188 | "NumberOfRetries": "50",
189 | "RetryIntervalInMilliseconds": "10000",
190 | "Restart": "true",
191 | "Options": "3"
192 | },
193 | "protectedSettings": {
194 | "Password": "[parameters('adminPassword')]"
195 | }
196 | }
197 | }
198 | ]
199 | }
200 | ]
201 | }
202 |
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/windowsvm-dsc.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "apiVersion": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The API version"
9 | }
10 | },
11 | "subnetId": {
12 | "type": "string",
13 | "metadata": {
14 | "description": "The Id of the subnet in which the node is created"
15 | }
16 | },
17 | "vmName": {
18 | "type": "string",
19 | "metadata": {
20 | "description": "The VM name"
21 | }
22 | },
23 | "vmSize": {
24 | "type": "string",
25 | "metadata": {
26 | "description": "The VM role size"
27 | }
28 | },
29 | "storageAccountName": {
30 | "type": "string",
31 | "metadata": {
32 | "description": "The storage account name to store the VHD of the VM"
33 | }
34 | },
35 | "imageReference": {
36 | "type": "object",
37 | "metadata": {
38 | "description": "The image reference"
39 | }
40 | },
41 | "adminUsername": {
42 | "type": "string",
43 | "metadata": {
44 | "description": "The user name of the administrator"
45 | }
46 | },
47 | "adminPassword": {
48 | "type": "securestring",
49 | "metadata": {
50 | "description": "The password of the administrator"
51 | }
52 | },
53 | "availabilitySetName": {
54 | "type": "string",
55 | "metadata": {
56 | "description": "The availability set name"
57 | }
58 | },
59 | "dataDiskSizeInGB": {
60 | "type": "int",
61 | "defaultValue": 0,
62 | "allowedValues": [ 0, 200, 500, 1000 ],
63 | "metadata": {
64 | "description": "The data disk size in GB, 0 means no data disk"
65 | }
66 | },
67 | "customData": {
68 | "type": "string",
69 | "defaultValue": "[base64('None')]",
70 | "metadata": {
71 | "description": "The custom data in base64 format"
72 | }
73 | },
74 | "enableAutomaticUpdates": {
75 | "type": "bool",
76 | "defaultValue": false,
77 | "metadata": {
78 | "description": "Specify whether the VM is enabled for automatic updates"
79 | }
80 | },
81 | "secrets": {
82 | "type": "array",
83 | "defaultValue": [ ],
84 | "metadata": {
85 | "description": "The property 'osProfile/secrets', specify the set of certificates that shall be installed on the VM"
86 | }
87 | },
88 | "dscExtensionName": {
89 | "type": "string",
90 | "defaultValue": "configNodeWithDsc",
91 | "metadata": {
92 | "description": "The name of the Dsc extension"
93 | }
94 | },
95 | "dscSettings": {
96 | "type": "object",
97 | "metadata": {
98 | "description": "The DSC public settings"
99 | }
100 | },
101 | "dscProtectedSettings": {
102 | "type": "secureObject",
103 | "defaultValue": {
104 | },
105 | "metadata": {
106 | "description": "The DSC protected settings"
107 | }
108 | }
109 | },
110 | "variables": {
111 | "nicName": "[concat(parameters('vmName'), '-nic-', uniqueString(parameters('subnetId')))]",
112 | "osDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-os-', uniqueString(parameters('subnetId')), '.vhd')]",
113 | "dataDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-data-', uniqueString(parameters('subnetId')), '.vhd')]",
114 | "needDataDiskJumpBox": {
115 | "0": "no",
116 | "200": "yes",
117 | "500": "yes",
118 | "1000": "yes"
119 | },
120 | "needDataDisk": "[variables('needDataDiskJumpBox')[string(parameters('dataDiskSizeInGB'))]]",
121 | "dataDisksJumpBox": {
122 | "no": [ ],
123 | "yes": [
124 | {
125 | "name": "datadisk",
126 | "vhd": {
127 | "uri": "[variables('dataDiskUri')]"
128 | },
129 | "caching": "None",
130 | "createOption": "Empty",
131 | "diskSizeGB": "[parameters('dataDiskSizeInGB')]",
132 | "lun": 0
133 | }
134 | ]
135 | },
136 | "dataDisks": "[variables('dataDisksJumpBox')[variables('needDataDisk')]]"
137 | },
138 | "resources": [
139 | {
140 | "apiVersion": "[parameters('apiVersion')]",
141 | "type": "Microsoft.Network/networkInterfaces",
142 | "name": "[variables('nicName')]",
143 | "location": "[resourceGroup().location]",
144 | "properties": {
145 | "ipConfigurations": [
146 | {
147 | "name": "IPConfig",
148 | "properties": {
149 | "privateIPAllocationMethod": "Dynamic",
150 | "subnet": {
151 | "id": "[parameters('subnetId')]"
152 | }
153 | }
154 | }
155 | ]
156 | }
157 | },
158 | {
159 | "apiVersion": "[parameters('apiVersion')]",
160 | "type": "Microsoft.Compute/virtualMachines",
161 | "name": "[parameters('vmName')]",
162 | "location": "[resourceGroup().location]",
163 | "dependsOn": [
164 | "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
165 | ],
166 | "properties": {
167 | "availabilitySet": {
168 | "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('availabilitySetName'))]"
169 | },
170 | "hardwareProfile": {
171 | "vmSize": "[parameters('vmSize')]"
172 | },
173 | "osProfile": {
174 | "computerName": "[parameters('vmName')]",
175 | "adminUsername": "[parameters('adminUsername')]",
176 | "adminPassword": "[parameters('adminPassword')]",
177 | "customData": "[parameters('customData')]",
178 | "windowsConfiguration": {
179 | "enableAutomaticUpdates": "[parameters('enableAutomaticUpdates')]"
180 | },
181 | "secrets": "[parameters('secrets')]"
182 | },
183 | "storageProfile": {
184 | "imageReference": "[parameters('imageReference')]",
185 | "osDisk": {
186 | "name": "osdisk",
187 | "vhd": {
188 | "uri": "[variables('osDiskUri')]"
189 | },
190 | "caching": "ReadOnly",
191 | "createOption": "FromImage"
192 | },
193 | "dataDisks": "[variables('dataDisks')]"
194 | },
195 | "networkProfile": {
196 | "networkInterfaces": [
197 | {
198 | "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
199 | }
200 | ]
201 | }
202 | },
203 | "resources": [
204 | {
205 | "apiVersion": "[parameters('apiVersion')]",
206 | "type": "Microsoft.Compute/virtualMachines/extensions",
207 | "name": "[concat(parameters('vmName'), '/', parameters('dscExtensionName'))]",
208 | "location": "[resourceGroup().location]",
209 | "dependsOn": [
210 | "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
211 | ],
212 | "properties": {
213 | "publisher": "Microsoft.Powershell",
214 | "type": "DSC",
215 | "typeHandlerVersion": "2.20",
216 | "autoUpgradeMinorVersion": true,
217 | "settings": "[parameters('dscSettings')]",
218 | "protectedSettings": "[parameters('dscProtectedSettings')]"
219 | }
220 | }
221 | ]
222 | }
223 | ]
224 | }
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/domain-joined-vm-rdma.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "apiVersion": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The API version"
9 | }
10 | },
11 | "subnetId": {
12 | "type": "string",
13 | "metadata": {
14 | "description": "The Id of the subnet in which the node is created"
15 | }
16 | },
17 | "nicName": {
18 | "type": "string",
19 | "metadata": {
20 | "description": "The network interface name"
21 | }
22 | },
23 | "vmName": {
24 | "type": "string",
25 | "metadata": {
26 | "description": "The VM name"
27 | }
28 | },
29 | "vmSize": {
30 | "type": "string",
31 | "metadata": {
32 | "description": "The VM role size"
33 | }
34 | },
35 | "storageAccountName": {
36 | "type": "string",
37 | "metadata": {
38 | "description": "The storage account name to store the VHD of the VM"
39 | }
40 | },
41 | "imageReference": {
42 | "type": "object",
43 | "metadata": {
44 | "description": "The image reference"
45 | }
46 | },
47 | "adminUsername": {
48 | "type": "string",
49 | "metadata": {
50 | "description": "The user name of the administrator"
51 | }
52 | },
53 | "adminPassword": {
54 | "type": "securestring",
55 | "metadata": {
56 | "description": "The password of the administrator"
57 | }
58 | },
59 | "availabilitySetName": {
60 | "type": "string",
61 | "metadata": {
62 | "description": "The availability set name"
63 | }
64 | },
65 | "dataDiskSizeInGB": {
66 | "type": "int",
67 | "defaultValue": 0,
68 | "allowedValues": [ 0, 200, 500, 1000 ],
69 | "metadata": {
70 | "description": "The data disk size in GB, 0 means no data disk"
71 | }
72 | },
73 | "customData": {
74 | "type": "string",
75 | "defaultValue": "[base64('None')]",
76 | "metadata": {
77 | "description": "The custom data in base64 format"
78 | }
79 | },
80 | "enableAutomaticUpdates": {
81 | "type": "bool",
82 | "defaultValue": false,
83 | "metadata": {
84 | "description": "Specify whether the VM is enabled for automatic updates"
85 | }
86 | },
87 | "secrets": {
88 | "type": "array",
89 | "defaultValue": [ ],
90 | "metadata": {
91 | "description": "The property 'osProfile/secrets', specify the set of certificates that shall be installed on the VM"
92 | }
93 | },
94 | "domainName": {
95 | "type": "string",
96 | "metadata": {
97 | "description": "The fully qualified domain name (FQDN) for the private domain forest which will be created by this template, for example 'hpc.local'."
98 | }
99 | }
100 | },
101 | "variables": {
102 | "osDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-os-', uniqueString(parameters('subnetId')), '.vhd')]",
103 | "dataDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-data-', uniqueString(parameters('subnetId')), '.vhd')]",
104 | "needDataDiskJumpBox": {
105 | "0": "no",
106 | "200": "yes",
107 | "500": "yes",
108 | "1000": "yes"
109 | },
110 | "needDataDisk": "[variables('needDataDiskJumpBox')[string(parameters('dataDiskSizeInGB'))]]",
111 | "dataDisksJumpBox": {
112 | "no": [ ],
113 | "yes": [
114 | {
115 | "name": "datadisk",
116 | "vhd": {
117 | "uri": "[variables('dataDiskUri')]"
118 | },
119 | "caching": "None",
120 | "createOption": "Empty",
121 | "diskSizeGB": "[parameters('dataDiskSizeInGB')]",
122 | "lun": 0
123 | }
124 | ]
125 | },
126 | "dataDisks": "[variables('dataDisksJumpBox')[variables('needDataDisk')]]"
127 | },
128 | "resources": [
129 | {
130 | "apiVersion": "[parameters('apiVersion')]",
131 | "type": "Microsoft.Compute/virtualMachines",
132 | "name": "[parameters('vmName')]",
133 | "location": "[resourceGroup().location]",
134 | "properties": {
135 | "availabilitySet": {
136 | "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('availabilitySetName'))]"
137 | },
138 | "hardwareProfile": {
139 | "vmSize": "[parameters('vmSize')]"
140 | },
141 | "osProfile": {
142 | "computerName": "[parameters('vmName')]",
143 | "adminUsername": "[parameters('adminUsername')]",
144 | "adminPassword": "[parameters('adminPassword')]",
145 | "customData": "[parameters('customData')]",
146 | "windowsConfiguration": {
147 | "enableAutomaticUpdates": "[parameters('enableAutomaticUpdates')]"
148 | },
149 | "secrets": "[parameters('secrets')]"
150 | },
151 | "storageProfile": {
152 | "imageReference": "[parameters('imageReference')]",
153 | "osDisk": {
154 | "name": "osdisk",
155 | "vhd": {
156 | "uri": "[variables('osDiskUri')]"
157 | },
158 | "caching": "ReadOnly",
159 | "createOption": "FromImage"
160 | },
161 | "dataDisks": "[variables('dataDisks')]"
162 | },
163 | "networkProfile": {
164 | "networkInterfaces": [
165 | {
166 | "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('nicName'))]"
167 | }
168 | ]
169 | }
170 | },
171 | "resources": [
172 | {
173 | "type": "Microsoft.Compute/virtualMachines/extensions",
174 | "name": "[concat(parameters('vmName'),'/installRDMADriver')]",
175 | "apiVersion": "[parameters('apiVersion')]",
176 | "location": "[resourceGroup().location]",
177 | "dependsOn": [
178 | "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
179 | ],
180 | "properties": {
181 | "publisher": "Microsoft.HpcCompute",
182 | "type": "HpcVmDrivers",
183 | "typeHandlerVersion": "1.1"
184 | }
185 | },
186 | {
187 | "apiVersion": "[parameters('apiVersion')]",
188 | "type": "Microsoft.Compute/virtualMachines/extensions",
189 | "name": "[concat(parameters('vmName'), '/joinDomain')]",
190 | "location": "[resourceGroup().location]",
191 | "dependsOn": [
192 | "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]",
193 | "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'),'/extensions/installRDMADriver')]"
194 | ],
195 | "properties": {
196 | "publisher": "Microsoft.Compute",
197 | "type": "JsonADDomainExtension",
198 | "typeHandlerVersion": "1.3",
199 | "autoUpgradeMinorVersion": true,
200 | "settings": {
201 | "Name": "[parameters('domainName')]",
202 | "User": "[concat(parameters('domainName'), '\\', parameters('adminUsername'))]",
203 | "NumberOfRetries": "50",
204 | "RetryIntervalInMilliseconds": "10000",
205 | "Restart": "true",
206 | "Options": "3"
207 | },
208 | "protectedSettings": {
209 | "Password": "[parameters('adminPassword')]"
210 | }
211 | }
212 | }
213 | ]
214 | }
215 | ]
216 | }
217 |
--------------------------------------------------------------------------------
/newcluster-templates/shared-resources/windowsvm-dsc-rdma.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "apiVersion": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The API version"
9 | }
10 | },
11 | "subnetId": {
12 | "type": "string",
13 | "metadata": {
14 | "description": "The Id of the subnet in which the node is created"
15 | }
16 | },
17 | "vmName": {
18 | "type": "string",
19 | "metadata": {
20 | "description": "The VM name"
21 | }
22 | },
23 | "vmSize": {
24 | "type": "string",
25 | "metadata": {
26 | "description": "The VM role size"
27 | }
28 | },
29 | "storageAccountName": {
30 | "type": "string",
31 | "metadata": {
32 | "description": "The storage account name to store the VHD of the VM"
33 | }
34 | },
35 | "imageReference": {
36 | "type": "object",
37 | "metadata": {
38 | "description": "The image reference"
39 | }
40 | },
41 | "adminUsername": {
42 | "type": "string",
43 | "metadata": {
44 | "description": "The user name of the administrator"
45 | }
46 | },
47 | "adminPassword": {
48 | "type": "securestring",
49 | "metadata": {
50 | "description": "The password of the administrator"
51 | }
52 | },
53 | "availabilitySetName": {
54 | "type": "string",
55 | "metadata": {
56 | "description": "The availability set name"
57 | }
58 | },
59 | "dataDiskSizeInGB": {
60 | "type": "int",
61 | "defaultValue": 0,
62 | "allowedValues": [ 0, 200, 500, 1000 ],
63 | "metadata": {
64 | "description": "The data disk size in GB, 0 means no data disk"
65 | }
66 | },
67 | "customData": {
68 | "type": "string",
69 | "defaultValue": "[base64('None')]",
70 | "metadata": {
71 | "description": "The custom data in base64 format"
72 | }
73 | },
74 | "enableAutomaticUpdates": {
75 | "type": "bool",
76 | "defaultValue": false,
77 | "metadata": {
78 | "description": "Specify whether the VM is enabled for automatic updates"
79 | }
80 | },
81 | "secrets": {
82 | "type": "array",
83 | "defaultValue": [ ],
84 | "metadata": {
85 | "description": "The property 'osProfile/secrets', specify the set of certificates that shall be installed on the VM"
86 | }
87 | },
88 | "dscExtensionName": {
89 | "type": "string",
90 | "defaultValue": "configNodeWithDsc",
91 | "metadata": {
92 | "description": "The name of the Dsc extension"
93 | }
94 | },
95 | "dscSettings": {
96 | "type": "object",
97 | "metadata": {
98 | "description": "The DSC public settings"
99 | }
100 | },
101 | "dscProtectedSettings": {
102 | "type": "object",
103 | "metadata": {
104 | "description": "The DSC protected settings"
105 | }
106 | }
107 | },
108 | "variables": {
109 | "nicName": "[concat(parameters('vmName'), '-nic-', uniqueString(parameters('subnetId')))]",
110 | "osDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-os-', uniqueString(parameters('subnetId')), '.vhd')]",
111 | "dataDiskUri": "[concat('http://', parameters('storageAccountName'),'.blob.core.windows.net/vhds/', toLower(parameters('vmName')), '-data-', uniqueString(parameters('subnetId')), '.vhd')]",
112 | "needDataDiskJumpBox": {
113 | "0": "no",
114 | "200": "yes",
115 | "500": "yes",
116 | "1000": "yes"
117 | },
118 | "needDataDisk": "[variables('needDataDiskJumpBox')[string(parameters('dataDiskSizeInGB'))]]",
119 | "dataDisksJumpBox": {
120 | "no": [ ],
121 | "yes": [
122 | {
123 | "name": "datadisk",
124 | "vhd": {
125 | "uri": "[variables('dataDiskUri')]"
126 | },
127 | "caching": "None",
128 | "createOption": "Empty",
129 | "diskSizeGB": "[parameters('dataDiskSizeInGB')]",
130 | "lun": 0
131 | }
132 | ]
133 | },
134 | "dataDisks": "[variables('dataDisksJumpBox')[variables('needDataDisk')]]"
135 | },
136 | "resources": [
137 | {
138 | "apiVersion": "[parameters('apiVersion')]",
139 | "type": "Microsoft.Network/networkInterfaces",
140 | "name": "[variables('nicName')]",
141 | "location": "[resourceGroup().location]",
142 | "properties": {
143 | "ipConfigurations": [
144 | {
145 | "name": "IPConfig",
146 | "properties": {
147 | "privateIPAllocationMethod": "Dynamic",
148 | "subnet": {
149 | "id": "[parameters('subnetId')]"
150 | }
151 | }
152 | }
153 | ]
154 | }
155 | },
156 | {
157 | "apiVersion": "[parameters('apiVersion')]",
158 | "type": "Microsoft.Compute/virtualMachines",
159 | "name": "[parameters('vmName')]",
160 | "location": "[resourceGroup().location]",
161 | "dependsOn": [
162 | "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
163 | ],
164 | "properties": {
165 | "availabilitySet": {
166 | "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('availabilitySetName'))]"
167 | },
168 | "hardwareProfile": {
169 | "vmSize": "[parameters('vmSize')]"
170 | },
171 | "osProfile": {
172 | "computerName": "[parameters('vmName')]",
173 | "adminUsername": "[parameters('adminUsername')]",
174 | "adminPassword": "[parameters('adminPassword')]",
175 | "customData": "[parameters('customData')]",
176 | "windowsConfiguration": {
177 | "enableAutomaticUpdates": "[parameters('enableAutomaticUpdates')]"
178 | },
179 | "secrets": "[parameters('secrets')]"
180 | },
181 | "storageProfile": {
182 | "imageReference": "[parameters('imageReference')]",
183 | "osDisk": {
184 | "name": "osdisk",
185 | "vhd": {
186 | "uri": "[variables('osDiskUri')]"
187 | },
188 | "caching": "ReadOnly",
189 | "createOption": "FromImage"
190 | },
191 | "dataDisks": "[variables('dataDisks')]"
192 | },
193 | "networkProfile": {
194 | "networkInterfaces": [
195 | {
196 | "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
197 | }
198 | ]
199 | }
200 | },
201 | "resources": [
202 | {
203 | "type": "Microsoft.Compute/virtualMachines/extensions",
204 | "name": "[concat(parameters('vmName'),'/installRDMADriver')]",
205 | "apiVersion": "[parameters('apiVersion')]",
206 | "location": "[resourceGroup().location]",
207 | "dependsOn": [
208 | "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
209 | ],
210 | "properties": {
211 | "publisher": "Microsoft.HpcCompute",
212 | "type": "HpcVmDrivers",
213 | "typeHandlerVersion": "1.1"
214 | }
215 | },
216 | {
217 | "apiVersion": "[parameters('apiVersion')]",
218 | "type": "Microsoft.Compute/virtualMachines/extensions",
219 | "name": "[concat(parameters('vmName'), '/', parameters('dscExtensionName'))]",
220 | "location": "[resourceGroup().location]",
221 | "dependsOn": [
222 | "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]",
223 | "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'),'/extensions/installRDMADriver')]"
224 | ],
225 | "properties": {
226 | "publisher": "Microsoft.Powershell",
227 | "type": "DSC",
228 | "typeHandlerVersion": "2.20",
229 | "autoUpgradeMinorVersion": true,
230 | "settings": "[parameters('dscSettings')]",
231 | "protectedSettings": "[parameters('dscProtectedSettings')]"
232 | }
233 | }
234 | ]
235 | }
236 | ]
237 | }
--------------------------------------------------------------------------------
/newcluster-templates/single-hn-wincn-noad.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "clusterName": {
6 | "type": "string",
7 | "minLength": 3,
8 | "maxLength": 15,
9 | "metadata": {
10 | "description": "The name of the HPC cluster, also used as the head node name. It must contain between 3 and 15 characters with lowercase letters and numbers, and must start with a letter."
11 | }
12 | },
13 | "headNodeVMSize": {
14 | "type": "string",
15 | "defaultValue": "Standard_A4",
16 | "metadata": {
17 | "description": "The VM size for the head node, all available VM sizes in Azure can be found at https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes."
18 | }
19 | },
20 | "computeNodeNamePrefix": {
21 | "type": "string",
22 | "defaultValue": "IaaSCN",
23 | "metadata": {
24 | "description": "The name prefix of the compute nodes. It must be no more than 12 characters, begin with a letter, and contain only letters, numbers and hyphens. For example, if 'IaaSCN' is specified, the compute node names will be 'IaaSCN000', 'IaaSCN001', ..."
25 | }
26 | },
27 | "computeNodeNumber": {
28 | "type": "int",
29 | "defaultValue": 10,
30 | "metadata": {
31 | "description": "The number of the compute nodes."
32 | }
33 | },
34 | "computeNodeVMSize": {
35 | "type": "string",
36 | "defaultValue": "Standard_A3",
37 | "metadata": {
38 | "description": "The VM size for the compute nodes, all available VM sizes in Azure can be found at https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes."
39 | }
40 | },
41 | "adminUsername": {
42 | "type": "string",
43 | "defaultValue": "hpcadmin",
44 | "metadata": {
45 | "description": "Administrator user name for the virtual machines."
46 | }
47 | },
48 | "adminPassword": {
49 | "type": "securestring",
50 | "metadata": {
51 | "description": "Administrator password for the virtual machines."
52 | }
53 | },
54 | "hpcPackVersion": {
55 | "type": "string",
56 | "defaultValue": "latest",
57 | "metadata": {
58 | "description": "The version for HPC Pack 2016. It is strongly recommended to specify as 'latest'. The deployment will fail if an incorrect version is specified."
59 | }
60 | },
61 | "vaultName": {
62 | "type": "string",
63 | "metadata": {
64 | "description": "Name of the KeyVault in which the certificate is stored."
65 | }
66 | },
67 | "vaultResourceGroup": {
68 | "type": "string",
69 | "metadata": {
70 | "description": "Resource Group of the KeyVault in which the certificate is stored."
71 | }
72 | },
73 | "certificateUrl": {
74 | "type": "string",
75 | "metadata": {
76 | "description": "Url of the certificate with version in KeyVault e.g. https://testault.vault.azure.net/secrets/testcert/b621es1db241e56a72d037479xab1r7."
77 | }
78 | },
79 | "certThumbprint": {
80 | "type": "string",
81 | "metadata": {
82 | "description": "Thumbprint of the certificate."
83 | }
84 | }
85 | },
86 | "variables": {
87 | "apiVersion": "2015-06-15",
88 | "storageAccountType": "Standard_LRS",
89 | "storageAccountNameHN": "[concat('hpc', uniqueString(resourceGroup().id, parameters('clusterName')))]",
90 | "storageAccountIdHN": "[resourceId('Microsoft.Storage/storageAccounts',variables('storageAccountNameHN'))]",
91 | "cnStorageAccountNamePrefix": "[concat('hpc', uniqueString(resourceGroup().id, parameters('computeNodeNamePrefix')))]",
92 | "nbrCNPerStorageAccount": 30,
93 | "cnStorageAccountNumber": "[add(div(sub(parameters('computeNodeNumber'), 1), variables('nbrCNPerStorageAccount')), 1)]",
94 | "addressPrefix": "10.0.0.0/16",
95 | "subnet1Name": "Subnet-1",
96 | "subnet1Prefix": "10.0.0.0/22",
97 | "virtualNetworkName": "[concat(parameters('clusterName'),'vnet')]",
98 | "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
99 | "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]",
100 | "publicIPName": "[concat(parameters('clusterName'),'publicip')]",
101 | "publicIPDNSNameLabel": "[concat(toLower(parameters('clusterName')), uniqueString(resourceGroup().id))]",
102 | "publicIPAddressType": "Dynamic",
103 | "availabilitySetNameHN": "[concat(parameters('clusterName'), '-avset')]",
104 | "cnAvailabilitySetNamePrefix": "[concat(parameters('computeNodeNamePrefix'), 'avset')]",
105 | "nbrVMPerAvailabilitySet": 80,
106 | "cnAvailabilitySetNumber": "[add(div(parameters('computeNodeNumber'), variables('nbrVMPerAvailabilitySet')), 1)]",
107 | "uniqueSuffix": "[uniqueString(variables('subnetRef'))]",
108 | "uniqueNicSuffix": "[concat('-nic-', variables('uniqueSuffix'))]",
109 | "nicNameHN": "[concat(parameters('clusterName'), variables('uniqueNicSuffix'))]",
110 | "vmSizeSuffix": "[uniqueString(resourceGroup().id)]",
111 | "suffixA8Size": "[concat('Standard_A8', variables('vmSizeSuffix'))]",
112 | "suffixA9Size": "[concat('Standard_A9', variables('vmSizeSuffix'))]",
113 | "suffixHNSize": "[concat(parameters('headNodeVMSize'), variables('vmSizeSuffix'))]",
114 | "suffixCNSize": "[concat(parameters('computeNodeVMSize'), variables('vmSizeSuffix'))]",
115 | "cnRDMASuffix": "[replace(replace(replace(variables('suffixCNSize'), variables('suffixA8Size'),'-rdma'), variables('suffixA9Size'),'-rdma'),variables('suffixCNSize'), '')]",
116 | "hnRDMASuffix": "[replace(replace(replace(variables('suffixHNSize'), variables('suffixA8Size'),'-rdma'), variables('suffixA9Size'),'-rdma'),variables('suffixHNSize'), '')]",
117 | "certSecrets": [
118 | {
119 | "sourceVault": {
120 | "id": "[resourceId(parameters('vaultResourceGroup'), 'Microsoft.KeyVault/vaults', parameters('vaultName'))]"
121 | },
122 | "vaultCertificates": [
123 | {
124 | "certificateUrl": "[parameters('certificateUrl')]",
125 | "certificateStore": "My"
126 | }
127 | ]
128 | }
129 | ],
130 | "sharedResxBaseUrl": "https://raw.githubusercontent.com/MsHpcPack/HPCPack2016/master/newcluster-templates/shared-resources"
131 | },
132 | "resources": [
133 | {
134 | "type": "Microsoft.Storage/storageAccounts",
135 | "name": "[variables('storageAccountNameHN')]",
136 | "apiVersion": "[variables('apiVersion')]",
137 | "location": "[resourceGroup().location]",
138 | "properties": {
139 | "accountType": "[variables('storageAccountType')]"
140 | }
141 | },
142 | {
143 | "apiVersion": "[variables('apiVersion')]",
144 | "type": "Microsoft.Network/virtualNetworks",
145 | "name": "[variables('virtualNetworkName')]",
146 | "location": "[resourceGroup().location]",
147 | "properties": {
148 | "addressSpace": {
149 | "addressPrefixes": [
150 | "[variables('addressPrefix')]"
151 | ]
152 | },
153 | "subnets": [
154 | {
155 | "name": "[variables('subnet1Name')]",
156 | "properties": {
157 | "addressPrefix": "[variables('subnet1Prefix')]"
158 | }
159 | }
160 | ]
161 | }
162 | },
163 | {
164 | "name": "setupClusterPublicIP",
165 | "type": "Microsoft.Resources/deployments",
166 | "apiVersion": "2015-01-01",
167 | "properties": {
168 | "mode": "Incremental",
169 | "templateLink": {
170 | "uri": "[concat(variables('sharedResxBaseUrl'), '/publicip-new.json')]",
171 | "contentVersion": "1.0.0.0"
172 | },
173 | "parameters": {
174 | "apiVersion": {
175 | "value": "[variables('apiVersion')]"
176 | },
177 | "publicIPAddressName": {
178 | "value": "[variables('publicIPName')]"
179 | },
180 | "publicIPAddressType": {
181 | "value": "[variables('publicIPAddressType')]"
182 | },
183 | "domainNameLabel": {
184 | "value": "[variables('publicIPDNSNameLabel')]"
185 | },
186 | "publicIPRGName": {
187 | "value": "[resourceGroup().name]"
188 | }
189 | }
190 | }
191 | },
192 | {
193 | "apiVersion": "[variables('apiVersion')]",
194 | "type": "Microsoft.Network/networkInterfaces",
195 | "name": "[variables('nicNameHN')]",
196 | "location": "[resourceGroup().location]",
197 | "dependsOn": [
198 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
199 | "Microsoft.Resources/deployments/setupClusterPublicIP"
200 | ],
201 | "properties": {
202 | "ipConfigurations": [
203 | {
204 | "name": "IPConfig",
205 | "properties": {
206 | "privateIPAllocationMethod": "Dynamic",
207 | "publicIPAddress": {
208 | "id": "[reference('setupClusterPublicIP').outputs.resourceId.value]"
209 | },
210 | "subnet": {
211 | "id": "[variables('subnetRef')]"
212 | }
213 | }
214 | }
215 | ]
216 | }
217 | },
218 | {
219 | "apiVersion": "[variables('apiVersion')]",
220 | "type": "Microsoft.Compute/virtualMachines",
221 | "name": "[parameters('clusterName')]",
222 | "location": "[resourceGroup().location]",
223 | "dependsOn": [
224 | "[concat('Microsoft.Network/networkInterfaces/', variables('nicNameHN'))]",
225 | "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountNameHN'))]"
226 | ],
227 | "properties": {
228 | "hardwareProfile": {
229 | "vmSize": "[parameters('headNodeVMSize')]"
230 | },
231 | "osProfile": {
232 | "computerName": "[parameters('clusterName')]",
233 | "adminUsername": "[parameters('adminUsername')]",
234 | "adminPassword": "[parameters('adminPassword')]",
235 | "windowsConfiguration": {
236 | "enableAutomaticUpdates": false
237 | },
238 | "secrets": "[variables('certSecrets')]"
239 | },
240 | "storageProfile": {
241 | "imageReference": {
242 | "publisher": "MicrosoftWindowsServerHPCPack",
243 | "offer": "WindowsServerHPCPack",
244 | "sku": "2016",
245 | "version": "[parameters('hpcPackVersion')]"
246 | },
247 | "osDisk": {
248 | "name": "osdisk",
249 | "vhd": {
250 | "uri": "[concat('http://', variables('storageAccountNameHN'),'.blob.core.windows.net/vhds/', toLower(parameters('clusterName')), '-os-', uniqueString(variables('subnetRef')), '.vhd')]"
251 | },
252 | "caching": "ReadOnly",
253 | "createOption": "FromImage"
254 | }
255 | },
256 | "networkProfile": {
257 | "networkInterfaces": [
258 | {
259 | "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('clusterName'), variables('uniqueNicSuffix')))]"
260 | }
261 | ]
262 | }
263 | }
264 | },
265 | {
266 | "type": "Microsoft.Compute/virtualMachines/extensions",
267 | "name": "[concat(parameters('clusterName'),'/installSingleHeadNode')]",
268 | "apiVersion": "[variables('apiVersion')]",
269 | "location": "[resourceGroup().location]",
270 | "dependsOn": [
271 | "[concat('Microsoft.Compute/virtualMachines/', parameters('clusterName'))]"
272 | ],
273 | "properties": {
274 | "publisher": "Microsoft.Powershell",
275 | "type": "DSC",
276 | "typeHandlerVersion": "2.20",
277 | "autoUpgradeMinorVersion": true,
278 | "settings": {
279 | "configuration": {
280 | "url": "[concat(variables('sharedResxBaseUrl'),'/InstallHpcSingleHeadNode.ps1.zip')]",
281 | "script": "InstallHpcSingleHeadNode.ps1",
282 | "function": "InstallHpcSingleHeadNode"
283 | },
284 | "configurationArguments": {
285 | "SSLThumbprint": "[parameters('certThumbprint')]",
286 | "LinuxCommOverHttp": true,
287 | "CNSize": "[parameters('computeNodeVMSize')]",
288 | "SubscriptionId": "[subscription().subscriptionId]",
289 | "VNet": "[variables('virtualNetworkName')]",
290 | "Subnet": "[variables('subnet1Name')]",
291 | "Location": "[resourceGroup().location]",
292 | "ResourceGroup": "[resourceGroup().name]"
293 | }
294 | },
295 | "protectedSettings": {
296 | "configurationArguments": {
297 | "SetupUserCredential": {
298 | "UserName": "[parameters('adminUsername')]",
299 | "Password": "[parameters('adminPassword')]"
300 | },
301 | "AzureStorageConnString": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountNameHN'), ';AccountKey=', listKeys(variables('storageAccountIdHN'),variables('apiVersion')).key1)]"
302 | }
303 | }
304 | }
305 | },
306 | {
307 | "type": "Microsoft.Compute/availabilitySets",
308 | "name": "[concat(variables('cnAvailabilitySetNamePrefix'), padLeft(string(copyIndex()), 2, '0'))]",
309 | "apiVersion": "[variables('apiVersion')]",
310 | "location": "[resourceGroup().location]",
311 | "copy": {
312 | "name": "cnAvailabilitySetCopy",
313 | "count": "[variables('cnAvailabilitySetNumber')]"
314 | }
315 | },
316 | {
317 | "type": "Microsoft.Storage/storageAccounts",
318 | "name": "[concat(variables('cnStorageAccountNamePrefix'), padLeft(string(copyIndex()), 2, '0'))]",
319 | "apiVersion": "[variables('apiVersion')]",
320 | "location": "[resourceGroup().location]",
321 | "copy": {
322 | "name": "cnStorageAccountCopy",
323 | "count": "[variables('cnStorageAccountNumber')]"
324 | },
325 | "properties": {
326 | "accountType": "[variables('storageAccountType')]"
327 | }
328 | },
329 | {
330 | "apiVersion": "2015-01-01",
331 | "type": "Microsoft.Resources/deployments",
332 | "name": "[concat('create', parameters('computeNodeNamePrefix'), padLeft(string(copyIndex()), 3, '0'))]",
333 | "dependsOn": [
334 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
335 | "[concat('Microsoft.Compute/availabilitySets/', variables('cnAvailabilitySetNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrVMPerAvailabilitySet'))), 2, '0'))]",
336 | "[concat('Microsoft.Storage/storageAccounts/', variables('cnStorageAccountNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrCNPerStorageAccount'))), 2, '0'))]"
337 | ],
338 | "copy": {
339 | "name": "CN",
340 | "count": "[parameters('computeNodeNumber')]"
341 | },
342 | "properties": {
343 | "mode": "Incremental",
344 | "templateLink": {
345 | "uri": "[concat(variables('sharedResxBaseUrl'),'/windowsvm-dsc', variables('cnRDMASuffix'), '.json')]",
346 | "contentVersion": "1.0.0.0"
347 | },
348 | "parameters": {
349 | "apiVersion": {
350 | "value": "[variables('apiVersion')]"
351 | },
352 | "subnetId": {
353 | "value": "[variables('subnetRef')]"
354 | },
355 | "vmName": {
356 | "value": "[concat(parameters('computeNodeNamePrefix'), padLeft(string(copyIndex()), 3, '0'))]"
357 | },
358 | "vmSize": {
359 | "value": "[parameters('computeNodeVMSize')]"
360 | },
361 | "storageAccountName": {
362 | "value": "[concat(variables('cnStorageAccountNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrCNPerStorageAccount'))), 2, '0'))]"
363 | },
364 | "imageReference": {
365 | "value": {
366 | "publisher": "MicrosoftWindowsServerHPCPack",
367 | "offer": "WindowsServerHPCPack",
368 | "sku": "2016CN",
369 | "version": "[parameters('hpcPackVersion')]"
370 | }
371 | },
372 | "adminUsername": {
373 | "value": "[parameters('adminUsername')]"
374 | },
375 | "adminPassword": {
376 | "value": "[parameters('adminPassword')]"
377 | },
378 | "availabilitySetName": {
379 | "value": "[concat(variables('cnAvailabilitySetNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrVMPerAvailabilitySet'))), 2, '0'))]"
380 | },
381 | "secrets": {
382 | "value": "[variables('certSecrets')]"
383 | },
384 | "dscExtensionName": {
385 | "value": "ConfigHpcNode"
386 | },
387 | "dscSettings": {
388 | "value": {
389 | "wmfVersion": "4.0",
390 | "configuration": {
391 | "url": "[concat(variables('sharedResxBaseUrl'),'/ConfigHpcNodeNoAD.ps1.zip')]",
392 | "script": "ConfigHpcNode.ps1",
393 | "function": "ConfigHpcNode"
394 | },
395 | "configurationArguments": {
396 | "NodeType": "ComputeNode",
397 | "HeadNodeList": "[parameters('clusterName')]",
398 | "SSLThumbprint": "[parameters('certThumbprint')]",
399 | "PostConfigScript": ""
400 | }
401 | }
402 | }
403 | }
404 | }
405 | }
406 | ],
407 | "outputs": {
408 | "clusterDNSName": {
409 | "type": "string",
410 | "value": "[reference('setupClusterPublicIP').outputs.fqdn.value]"
411 | }
412 | }
413 | }
--------------------------------------------------------------------------------
/newcluster-templates/single-hn-lnxcn.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "clusterName": {
6 | "type": "string",
7 | "minLength": 3,
8 | "maxLength": 15,
9 | "metadata": {
10 | "description": "The name of the HPC cluster, also used as the head node name. It must contain between 3 and 15 characters with lowercase letters and numbers, and must start with a letter."
11 | }
12 | },
13 | "headNodeVMSize": {
14 | "type": "string",
15 | "defaultValue": "Standard_A4",
16 | "metadata": {
17 | "description": "The VM size for the head node, all available VM sizes in Azure can be found at https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes."
18 | }
19 | },
20 | "computeNodeImage": {
21 | "type": "string",
22 | "defaultValue": "CentOS_7.0",
23 | "allowedValues": [
24 | "CentOS_6.5",
25 | "CentOS_6.6",
26 | "CentOS_6.7",
27 | "CentOS_7.0",
28 | "CentOS_7.1",
29 | "CentOS_6.5_HPC",
30 | "CentOS_7.1_HPC",
31 | "RHEL_6.7",
32 | "RHEL_6.8",
33 | "RHEL_7.2",
34 | "SLES_12_HPC",
35 | "SLES_12_HPC_Premium",
36 | "Ubuntu_14.04",
37 | "Ubuntu_16.04"
38 | ],
39 | "metadata": {
40 | "description": "The Linux VM image of the compute nodes"
41 | }
42 | },
43 | "computeNodeNamePrefix": {
44 | "type": "string",
45 | "defaultValue": "IaaSLnxCN",
46 | "metadata": {
47 | "description": "The name prefix of the compute nodes. It must be no more than 12 characters, begin with a letter, and contain only letters, numbers and hyphens. For example, if 'IaaSCN' is specified, the compute node names will be 'IaaSCN000', 'IaaSCN001', ..."
48 | }
49 | },
50 | "computeNodeNumber": {
51 | "type": "int",
52 | "defaultValue": 10,
53 | "metadata": {
54 | "description": "The number of the compute nodes."
55 | }
56 | },
57 | "computeNodeVMSize": {
58 | "type": "string",
59 | "defaultValue": "Standard_A3",
60 | "metadata": {
61 | "description": "The VM size for the compute nodes, all available VM sizes in Azure can be found at https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes."
62 | }
63 | },
64 | "adminUsername": {
65 | "type": "string",
66 | "defaultValue": "hpcadmin",
67 | "metadata": {
68 | "description": "Administrator user name for the virtual machines."
69 | }
70 | },
71 | "adminPassword": {
72 | "type": "securestring",
73 | "metadata": {
74 | "description": "Administrator password for the virtual machines."
75 | }
76 | },
77 | "hpcPackVersion": {
78 | "type": "string",
79 | "defaultValue": "latest",
80 | "metadata": {
81 | "description": "The version for HPC Pack 2016. It is strongly recommended to specify as 'latest'. The deployment will fail if an incorrect version is specified."
82 | }
83 | },
84 | "vaultName": {
85 | "type": "string",
86 | "metadata": {
87 | "description": "Name of the KeyVault in which the certificate is stored."
88 | }
89 | },
90 | "vaultResourceGroup": {
91 | "type": "string",
92 | "metadata": {
93 | "description": "Resource Group of the KeyVault in which the certificate is stored."
94 | }
95 | },
96 | "certificateUrl": {
97 | "type": "string",
98 | "metadata": {
99 | "description": "Url of the certificate with version in KeyVault e.g. https://testault.vault.azure.net/secrets/testcert/b621es1db241e56a72d037479xab1r7."
100 | }
101 | },
102 | "certThumbprint": {
103 | "type": "string",
104 | "metadata": {
105 | "description": "Thumbprint of the certificate."
106 | }
107 | }
108 | },
109 | "variables": {
110 | "apiVersion": "2015-06-15",
111 | "storageAccountType": "Standard_LRS",
112 | "storageAccountNameHN": "[concat('hpc', uniqueString(resourceGroup().id, parameters('clusterName')))]",
113 | "storageAccountIdHN": "[resourceId('Microsoft.Storage/storageAccounts',variables('storageAccountNameHN'))]",
114 | "cnStorageAccountNamePrefix": "[concat('hpc', uniqueString(resourceGroup().id, parameters('computeNodeNamePrefix')))]",
115 | "nbrCNPerStorageAccount": 30,
116 | "cnStorageAccountNumber": "[add(div(sub(parameters('computeNodeNumber'), 1), variables('nbrCNPerStorageAccount')), 1)]",
117 | "addressPrefix": "10.0.0.0/16",
118 | "subnet1Name": "Subnet-1",
119 | "subnet1Prefix": "10.0.0.0/22",
120 | "virtualNetworkName": "[concat(parameters('clusterName'),'vnet')]",
121 | "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
122 | "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]",
123 | "publicIPName": "[concat(parameters('clusterName'),'publicip')]",
124 | "publicIPDNSNameLabel": "[concat(toLower(parameters('clusterName')), uniqueString(resourceGroup().id))]",
125 | "publicIPAddressType": "Dynamic",
126 | "availabilitySetNameHN": "[concat(parameters('clusterName'), '-avset')]",
127 | "cnAvailabilitySetNamePrefix": "[concat(parameters('computeNodeNamePrefix'), 'avset')]",
128 | "nbrVMPerAvailabilitySet": 80,
129 | "cnAvailabilitySetNumber": "[add(div(parameters('computeNodeNumber'), variables('nbrVMPerAvailabilitySet')), 1)]",
130 | "uniqueSuffix": "[uniqueString(variables('subnetRef'))]",
131 | "uniqueNicSuffix": "[concat('-nic-', variables('uniqueSuffix'))]",
132 | "nicNameHN": "[concat(parameters('clusterName'), variables('uniqueNicSuffix'))]",
133 | "vmSizeSuffix": "[uniqueString(resourceGroup().id)]",
134 | "suffixA8Size": "[concat('Standard_A8', variables('vmSizeSuffix'))]",
135 | "suffixA9Size": "[concat('Standard_A9', variables('vmSizeSuffix'))]",
136 | "suffixHNSize": "[concat(parameters('headNodeVMSize'), variables('vmSizeSuffix'))]",
137 | "suffixCNSize": "[concat(parameters('computeNodeVMSize'), variables('vmSizeSuffix'))]",
138 | "cnRDMASuffix": "[replace(replace(replace(variables('suffixCNSize'), variables('suffixA8Size'),'-rdma'), variables('suffixA9Size'),'-rdma'),variables('suffixCNSize'), '')]",
139 | "hnRDMASuffix": "[replace(replace(replace(variables('suffixHNSize'), variables('suffixA8Size'),'-rdma'), variables('suffixA9Size'),'-rdma'),variables('suffixHNSize'), '')]",
140 | "winCertSecrets": [
141 | {
142 | "sourceVault": {
143 | "id": "[resourceId(parameters('vaultResourceGroup'), 'Microsoft.KeyVault/vaults', parameters('vaultName'))]"
144 | },
145 | "vaultCertificates": [
146 | {
147 | "certificateUrl": "[parameters('certificateUrl')]",
148 | "certificateStore": "My"
149 | }
150 | ]
151 | }
152 | ],
153 | "lnxCertSecrets": [
154 | {
155 | "sourceVault": {
156 | "id": "[resourceId(parameters('vaultResourceGroup'), 'Microsoft.KeyVault/vaults', parameters('vaultName'))]"
157 | },
158 | "vaultCertificates": [
159 | {
160 | "certificateUrl": "[parameters('certificateUrl')]"
161 | }
162 | ]
163 | }
164 | ],
165 | "computeNodeImages": {
166 | "CentOS_6.5": {
167 | "publisher": "OpenLogic",
168 | "offer": "CentOS",
169 | "sku": "6.5",
170 | "version": "latest"
171 | },
172 | "CentOS_6.6": {
173 | "publisher": "OpenLogic",
174 | "offer": "CentOS",
175 | "sku": "6.6",
176 | "version": "latest"
177 | },
178 | "CentOS_6.7": {
179 | "publisher": "OpenLogic",
180 | "offer": "CentOS",
181 | "sku": "6.7",
182 | "version": "latest"
183 | },
184 | "CentOS_7.0": {
185 | "publisher": "OpenLogic",
186 | "offer": "CentOS",
187 | "sku": "7.0",
188 | "version": "latest"
189 | },
190 | "CentOS_7.1": {
191 | "publisher": "OpenLogic",
192 | "offer": "CentOS",
193 | "sku": "7.1",
194 | "version": "latest"
195 | },
196 | "CentOS_7.2": {
197 | "publisher": "OpenLogic",
198 | "offer": "CentOS",
199 | "sku": "7.2",
200 | "version": "latest"
201 | },
202 | "CentOS_6.5_HPC": {
203 | "publisher": "OpenLogic",
204 | "offer": "CentOS-HPC",
205 | "sku": "6.5",
206 | "version": "latest"
207 | },
208 | "CentOS_7.1_HPC": {
209 | "publisher": "OpenLogic",
210 | "offer": "CentOS-HPC",
211 | "sku": "7.1",
212 | "version": "latest"
213 | },
214 | "RHEL_6.7": {
215 | "publisher": "RedHat",
216 | "offer": "RHEL",
217 | "sku": "6.7",
218 | "version": "latest"
219 | },
220 | "RHEL_6.8": {
221 | "publisher": "RedHat",
222 | "offer": "RHEL",
223 | "sku": "6.8",
224 | "version": "latest"
225 | },
226 | "RHEL_7.2": {
227 | "publisher": "RedHat",
228 | "offer": "RHEL",
229 | "sku": "7.2",
230 | "version": "latest"
231 | },
232 | "SLES_12": {
233 | "publisher": "SUSE",
234 | "offer": "SLES",
235 | "sku": "12-SP1",
236 | "version": "latest"
237 | },
238 | "SLES_12_Premium": {
239 | "publisher": "SUSE",
240 | "offer": "SLES-Priority",
241 | "sku": "12-SP1",
242 | "version": "latest"
243 | },
244 | "SLES_12_HPC": {
245 | "publisher": "SUSE",
246 | "offer": "SLES-HPC",
247 | "sku": "12",
248 | "version": "latest"
249 | },
250 | "SLES_12_HPC_Premium": {
251 | "publisher": "SUSE",
252 | "offer": "SLES-HPC-Priority",
253 | "sku": "12",
254 | "version": "latest"
255 | },
256 | "Ubuntu_14.04": {
257 | "publisher": "Canonical",
258 | "offer": "UbuntuServer",
259 | "sku": "14.04.3-LTS",
260 | "version": "latest"
261 | },
262 | "Ubuntu_16.04": {
263 | "publisher": "Canonical",
264 | "offer": "UbuntuServer",
265 | "sku": "16.04.0-LTS",
266 | "version": "latest"
267 | }
268 | },
269 | "selectedLinuxImageRef": "[variables('computeNodeImages')[parameters('computeNodeImage')]]",
270 | "sharedResxBaseUrl": "https://raw.githubusercontent.com/MsHpcPack/HPCPack2016/master/newcluster-templates/shared-resources"
271 | },
272 | "resources": [
273 | {
274 | "type": "Microsoft.Storage/storageAccounts",
275 | "name": "[variables('storageAccountNameHN')]",
276 | "apiVersion": "[variables('apiVersion')]",
277 | "location": "[resourceGroup().location]",
278 | "properties": {
279 | "accountType": "[variables('storageAccountType')]"
280 | }
281 | },
282 | {
283 | "apiVersion": "[variables('apiVersion')]",
284 | "type": "Microsoft.Network/virtualNetworks",
285 | "name": "[variables('virtualNetworkName')]",
286 | "location": "[resourceGroup().location]",
287 | "properties": {
288 | "addressSpace": {
289 | "addressPrefixes": [
290 | "[variables('addressPrefix')]"
291 | ]
292 | },
293 | "subnets": [
294 | {
295 | "name": "[variables('subnet1Name')]",
296 | "properties": {
297 | "addressPrefix": "[variables('subnet1Prefix')]"
298 | }
299 | }
300 | ]
301 | }
302 | },
303 | {
304 | "name": "setupClusterPublicIP",
305 | "type": "Microsoft.Resources/deployments",
306 | "apiVersion": "2015-01-01",
307 | "properties": {
308 | "mode": "Incremental",
309 | "templateLink": {
310 | "uri": "[concat(variables('sharedResxBaseUrl'), '/publicip-new.json')]",
311 | "contentVersion": "1.0.0.0"
312 | },
313 | "parameters": {
314 | "apiVersion": {
315 | "value": "[variables('apiVersion')]"
316 | },
317 | "publicIPAddressName": {
318 | "value": "[variables('publicIPName')]"
319 | },
320 | "publicIPAddressType": {
321 | "value": "[variables('publicIPAddressType')]"
322 | },
323 | "domainNameLabel": {
324 | "value": "[variables('publicIPDNSNameLabel')]"
325 | },
326 | "publicIPRGName": {
327 | "value": "[resourceGroup().name]"
328 | }
329 | }
330 | }
331 | },
332 | {
333 | "apiVersion": "[variables('apiVersion')]",
334 | "type": "Microsoft.Network/networkInterfaces",
335 | "name": "[variables('nicNameHN')]",
336 | "location": "[resourceGroup().location]",
337 | "dependsOn": [
338 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
339 | "Microsoft.Resources/deployments/setupClusterPublicIP"
340 | ],
341 | "properties": {
342 | "ipConfigurations": [
343 | {
344 | "name": "IPConfig",
345 | "properties": {
346 | "privateIPAllocationMethod": "Dynamic",
347 | "publicIPAddress": {
348 | "id": "[reference('setupClusterPublicIP').outputs.resourceId.value]"
349 | },
350 | "subnet": {
351 | "id": "[variables('subnetRef')]"
352 | }
353 | }
354 | }
355 | ]
356 | }
357 | },
358 | {
359 | "apiVersion": "[variables('apiVersion')]",
360 | "type": "Microsoft.Compute/virtualMachines",
361 | "name": "[parameters('clusterName')]",
362 | "location": "[resourceGroup().location]",
363 | "dependsOn": [
364 | "[concat('Microsoft.Network/networkInterfaces/', variables('nicNameHN'))]",
365 | "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountNameHN'))]"
366 | ],
367 | "properties": {
368 | "hardwareProfile": {
369 | "vmSize": "[parameters('headNodeVMSize')]"
370 | },
371 | "osProfile": {
372 | "computerName": "[parameters('clusterName')]",
373 | "adminUsername": "[parameters('adminUsername')]",
374 | "adminPassword": "[parameters('adminPassword')]",
375 | "windowsConfiguration": {
376 | "enableAutomaticUpdates": false
377 | },
378 | "secrets": "[variables('winCertSecrets')]"
379 | },
380 | "storageProfile": {
381 | "imageReference": {
382 | "publisher": "MicrosoftWindowsServerHPCPack",
383 | "offer": "WindowsServerHPCPack",
384 | "sku": "2016",
385 | "version": "[parameters('hpcPackVersion')]"
386 | },
387 | "osDisk": {
388 | "name": "osdisk",
389 | "vhd": {
390 | "uri": "[concat('http://', variables('storageAccountNameHN'),'.blob.core.windows.net/vhds/', toLower(parameters('clusterName')), '-os-', uniqueString(variables('subnetRef')), '.vhd')]"
391 | },
392 | "caching": "ReadOnly",
393 | "createOption": "FromImage"
394 | }
395 | },
396 | "networkProfile": {
397 | "networkInterfaces": [
398 | {
399 | "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('clusterName'), variables('uniqueNicSuffix')))]"
400 | }
401 | ]
402 | }
403 | }
404 | },
405 | {
406 | "type": "Microsoft.Compute/virtualMachines/extensions",
407 | "name": "[concat(parameters('clusterName'),'/installSingleHeadNode')]",
408 | "apiVersion": "[variables('apiVersion')]",
409 | "location": "[resourceGroup().location]",
410 | "dependsOn": [
411 | "[concat('Microsoft.Compute/virtualMachines/', parameters('clusterName'))]"
412 | ],
413 | "properties": {
414 | "publisher": "Microsoft.Powershell",
415 | "type": "DSC",
416 | "typeHandlerVersion": "2.20",
417 | "autoUpgradeMinorVersion": true,
418 | "settings": {
419 | "configuration": {
420 | "url": "[concat(variables('sharedResxBaseUrl'),'/InstallHpcSingleHeadNode.ps1.zip')]",
421 | "script": "InstallHpcSingleHeadNode.ps1",
422 | "function": "InstallHpcSingleHeadNode"
423 | },
424 | "configurationArguments": {
425 | "SSLThumbprint": "[parameters('certThumbprint')]",
426 | "LinuxCommOverHttp": true,
427 | "CNSize": "[parameters('computeNodeVMSize')]",
428 | "SubscriptionId": "[subscription().subscriptionId]",
429 | "VNet": "[variables('virtualNetworkName')]",
430 | "Subnet": "[variables('subnet1Name')]",
431 | "Location": "[resourceGroup().location]",
432 | "ResourceGroup": "[resourceGroup().name]"
433 | }
434 | },
435 | "protectedSettings": {
436 | "configurationArguments": {
437 | "SetupUserCredential": {
438 | "UserName": "[parameters('adminUsername')]",
439 | "Password": "[parameters('adminPassword')]"
440 | },
441 | "AzureStorageConnString": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountNameHN'), ';AccountKey=', listKeys(variables('storageAccountIdHN'),variables('apiVersion')).key1)]"
442 | }
443 | }
444 | }
445 | },
446 | {
447 | "type": "Microsoft.Compute/availabilitySets",
448 | "name": "[concat(variables('cnAvailabilitySetNamePrefix'), padLeft(string(copyIndex()), 2, '0'))]",
449 | "apiVersion": "[variables('apiVersion')]",
450 | "location": "[resourceGroup().location]",
451 | "copy": {
452 | "name": "cnAvailabilitySetCopy",
453 | "count": "[variables('cnAvailabilitySetNumber')]"
454 | }
455 | },
456 | {
457 | "type": "Microsoft.Storage/storageAccounts",
458 | "name": "[concat(variables('cnStorageAccountNamePrefix'), padLeft(string(copyIndex()), 2, '0'))]",
459 | "apiVersion": "[variables('apiVersion')]",
460 | "location": "[resourceGroup().location]",
461 | "copy": {
462 | "name": "cnStorageAccountCopy",
463 | "count": "[variables('cnStorageAccountNumber')]"
464 | },
465 | "properties": {
466 | "accountType": "[variables('storageAccountType')]"
467 | }
468 | },
469 | {
470 | "apiVersion": "2015-01-01",
471 | "type": "Microsoft.Resources/deployments",
472 | "name": "[concat('create', parameters('computeNodeNamePrefix'), padLeft(string(copyIndex()), 3, '0'))]",
473 | "dependsOn": [
474 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
475 | "[concat('Microsoft.Compute/availabilitySets/', variables('cnAvailabilitySetNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrVMPerAvailabilitySet'))), 2, '0'))]",
476 | "[concat('Microsoft.Storage/storageAccounts/', variables('cnStorageAccountNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrCNPerStorageAccount'))), 2, '0'))]"
477 | ],
478 | "copy": {
479 | "name": "CN",
480 | "count": "[parameters('computeNodeNumber')]"
481 | },
482 | "properties": {
483 | "mode": "Incremental",
484 | "templateLink": {
485 | "uri": "[concat(variables('sharedResxBaseUrl'),'/linux-node.json')]",
486 | "contentVersion": "1.0.0.0"
487 | },
488 | "parameters": {
489 | "apiVersion": {
490 | "value": "[variables('apiVersion')]"
491 | },
492 | "subnetId": {
493 | "value": "[variables('subnetRef')]"
494 | },
495 | "vmName": {
496 | "value": "[concat(parameters('computeNodeNamePrefix'), padLeft(string(copyIndex()), 3, '0'))]"
497 | },
498 | "vmSize": {
499 | "value": "[parameters('computeNodeVMSize')]"
500 | },
501 | "storageAccountName": {
502 | "value": "[concat(variables('cnStorageAccountNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrCNPerStorageAccount'))), 2, '0'))]"
503 | },
504 | "imageReference": {
505 | "value": "[variables('selectedLinuxImageRef')]"
506 | },
507 | "adminUsername": {
508 | "value": "[parameters('adminUsername')]"
509 | },
510 | "adminPassword": {
511 | "value": "[parameters('adminPassword')]"
512 | },
513 | "availabilitySetName": {
514 | "value": "[concat(variables('cnAvailabilitySetNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrVMPerAvailabilitySet'))), 2, '0'))]"
515 | },
516 | "secrets": {
517 | "value": "[variables('lnxCertSecrets')]"
518 | },
519 | "headNodeList": {
520 | "value": "[parameters('clusterName')]"
521 | }
522 | }
523 | }
524 | }
525 | ],
526 | "outputs": {
527 | "clusterDNSName": {
528 | "type": "string",
529 | "value": "[reference('setupClusterPublicIP').outputs.fqdn.value]"
530 | }
531 | }
532 | }
--------------------------------------------------------------------------------
/newcluster-templates/three-hns-wincn-noad.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "clusterName": {
6 | "type": "string",
7 | "minLength": 3,
8 | "maxLength": 15,
9 | "metadata": {
10 | "description": "The name of the HPC cluster, also used as the head node name. It must contain between 3 and 15 characters with lowercase letters and numbers, and must start with a letter."
11 | }
12 | },
13 | "sqlServerVMName": {
14 | "type": "string",
15 | "metadata": {
16 | "description": "The name of the SQL Server VM."
17 | }
18 | },
19 | "sqlServerVMSize": {
20 | "type": "string",
21 | "defaultValue": "Standard_A4",
22 | "metadata": {
23 | "description": "The VM size for the SQL Server VM, all available VM sizes in Azure can be found at https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes"
24 | }
25 | },
26 | "headNodeList": {
27 | "type": "string",
28 | "defaultValue": "HPCHN01,HPCHN02,HPCHN03",
29 | "metadata": {
30 | "description": "The list of head nodes joined with ','"
31 | }
32 | },
33 | "headNodeVMSize": {
34 | "type": "string",
35 | "defaultValue": "Standard_A4",
36 | "metadata": {
37 | "description": "The VM size for the head node, all available VM sizes in Azure can be found at https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes."
38 | }
39 | },
40 | "computeNodeNamePrefix": {
41 | "type": "string",
42 | "defaultValue": "IaaSCN",
43 | "metadata": {
44 | "description": "The name prefix of the compute nodes. It must be no more than 12 characters, begin with a letter, and contain only letters, numbers and hyphens. For example, if 'IaaSCN' is specified, the compute node names will be 'IaaSCN000', 'IaaSCN001', ..."
45 | }
46 | },
47 | "computeNodeNumber": {
48 | "type": "int",
49 | "defaultValue": 10,
50 | "metadata": {
51 | "description": "The number of the compute nodes."
52 | }
53 | },
54 | "computeNodeVMSize": {
55 | "type": "string",
56 | "defaultValue": "Standard_A3",
57 | "metadata": {
58 | "description": "The VM size for the compute nodes, all available VM sizes in Azure can be found at https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes."
59 | }
60 | },
61 | "adminUsername": {
62 | "type": "string",
63 | "defaultValue": "hpcadmin",
64 | "metadata": {
65 | "description": "Administrator user name for the virtual machines."
66 | }
67 | },
68 | "adminPassword": {
69 | "type": "securestring",
70 | "metadata": {
71 | "description": "Administrator password for the virtual machines."
72 | }
73 | },
74 | "sqlLoginName": {
75 | "type": "string",
76 | "defaultValue": "hpcsql",
77 | "metadata": {
78 | "description": "Sql login name."
79 | }
80 | },
81 | "sqlLoginPassword": {
82 | "type": "securestring",
83 | "metadata": {
84 | "description": "Sql login password."
85 | }
86 | },
87 | "hpcPackVersion": {
88 | "type": "string",
89 | "defaultValue": "latest",
90 | "metadata": {
91 | "description": "The version for HPC Pack 2016. It is strongly recommended to specify as 'latest'. The deployment will fail if an incorrect version is specified."
92 | }
93 | },
94 | "vaultName": {
95 | "type": "string",
96 | "metadata": {
97 | "description": "Name of the KeyVault in which the certificate is stored."
98 | }
99 | },
100 | "vaultResourceGroup": {
101 | "type": "string",
102 | "metadata": {
103 | "description": "Resource Group of the KeyVault in which the certificate is stored."
104 | }
105 | },
106 | "certificateUrl": {
107 | "type": "string",
108 | "metadata": {
109 | "description": "Url of the certificate with version in KeyVault e.g. https://testault.vault.azure.net/secrets/testcert/b621es1db241e56a72d037479xab1r7."
110 | }
111 | },
112 | "certThumbprint": {
113 | "type": "string",
114 | "metadata": {
115 | "description": "Thumbprint of the certificate."
116 | }
117 | }
118 | },
119 | "variables": {
120 | "apiVersion": "2015-06-15",
121 | "storageAccountType": "Standard_LRS",
122 | "storageAccountNameHN": "[concat('hpc', uniqueString(resourceGroup().id, parameters('clusterName')))]",
123 | "storageAccountIdHN": "[resourceId('Microsoft.Storage/storageAccounts',variables('storageAccountNameHN'))]",
124 | "cnStorageAccountNamePrefix": "[concat('hpc', uniqueString(resourceGroup().id, parameters('computeNodeNamePrefix')))]",
125 | "nbrCNPerStorageAccount": 30,
126 | "cnStorageAccountNumber": "[add(div(sub(parameters('computeNodeNumber'), 1), variables('nbrCNPerStorageAccount')), 1)]",
127 | "lbName": "[concat(parameters('clusterName'),'-lb')]",
128 | "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbName'))]",
129 | "lbFrontEndIPConfigID": "[concat(variables('lbID'),'/frontendIPConfigurations/LoadBalancerFrontEnd')]",
130 | "lbPoolID": "[concat(variables('lbID'),'/backendAddressPools/BackendPool1')]",
131 | "lbProbeID": "[concat(variables('lbID'),'/probes/tcpProbe')]",
132 | "addressPrefix": "10.0.0.0/16",
133 | "subnet1Name": "Subnet-1",
134 | "subnet1Prefix": "10.0.0.0/22",
135 | "headNodes": "[split(parameters('headNodeList'), ',')]",
136 | "virtualNetworkName": "[concat(parameters('clusterName'),'vnet')]",
137 | "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
138 | "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]",
139 | "publicIPName": "[concat(parameters('clusterName'),'publicip')]",
140 | "publicIPDNSNameLabel": "[concat(toLower(parameters('clusterName')), uniqueString(resourceGroup().id))]",
141 | "publicIPAddressType": "Dynamic",
142 | "availabilitySetNameHN": "[concat(parameters('clusterName'), '-avset')]",
143 | "cnAvailabilitySetNamePrefix": "[concat(parameters('computeNodeNamePrefix'), 'avset')]",
144 | "nbrVMPerAvailabilitySet": 80,
145 | "cnAvailabilitySetNumber": "[add(div(parameters('computeNodeNumber'), variables('nbrVMPerAvailabilitySet')), 1)]",
146 | "uniqueSuffix": "[uniqueString(variables('subnetRef'))]",
147 | "uniqueNicSuffix": "[concat('-nic-', variables('uniqueSuffix'))]",
148 | "vmSizeSuffix": "[uniqueString(resourceGroup().id)]",
149 | "suffixA8Size": "[concat('Standard_A8', variables('vmSizeSuffix'))]",
150 | "suffixA9Size": "[concat('Standard_A9', variables('vmSizeSuffix'))]",
151 | "suffixHNSize": "[concat(parameters('headNodeVMSize'), variables('vmSizeSuffix'))]",
152 | "suffixCNSize": "[concat(parameters('computeNodeVMSize'), variables('vmSizeSuffix'))]",
153 | "cnRDMASuffix": "[replace(replace(replace(variables('suffixCNSize'), variables('suffixA8Size'),'-rdma'), variables('suffixA9Size'),'-rdma'),variables('suffixCNSize'), '')]",
154 | "hnRDMASuffix": "[replace(replace(replace(variables('suffixHNSize'), variables('suffixA8Size'),'-rdma'), variables('suffixA9Size'),'-rdma'),variables('suffixHNSize'), '')]",
155 | "certSecrets": [
156 | {
157 | "sourceVault": {
158 | "id": "[resourceId(parameters('vaultResourceGroup'), 'Microsoft.KeyVault/vaults', parameters('vaultName'))]"
159 | },
160 | "vaultCertificates": [
161 | {
162 | "certificateUrl": "[parameters('certificateUrl')]",
163 | "certificateStore": "My"
164 | }
165 | ]
166 | }
167 | ],
168 | "sharedResxBaseUrl": "https://raw.githubusercontent.com/MsHpcPack/HPCPack2016/master/newcluster-templates/shared-resources"
169 | },
170 | "resources": [
171 | {
172 | "type": "Microsoft.Storage/storageAccounts",
173 | "name": "[variables('storageAccountNameHN')]",
174 | "apiVersion": "[variables('apiVersion')]",
175 | "location": "[resourceGroup().location]",
176 | "properties": {
177 | "accountType": "[variables('storageAccountType')]"
178 | }
179 | },
180 | {
181 | "apiVersion": "[variables('apiVersion')]",
182 | "type": "Microsoft.Network/virtualNetworks",
183 | "name": "[variables('virtualNetworkName')]",
184 | "location": "[resourceGroup().location]",
185 | "properties": {
186 | "addressSpace": {
187 | "addressPrefixes": [
188 | "[variables('addressPrefix')]"
189 | ]
190 | },
191 | "subnets": [
192 | {
193 | "name": "[variables('subnet1Name')]",
194 | "properties": {
195 | "addressPrefix": "[variables('subnet1Prefix')]"
196 | }
197 | }
198 | ]
199 | }
200 | },
201 | {
202 | "name": "setupClusterPublicIP",
203 | "type": "Microsoft.Resources/deployments",
204 | "apiVersion": "2015-01-01",
205 | "properties": {
206 | "mode": "Incremental",
207 | "templateLink": {
208 | "uri": "[concat(variables('sharedResxBaseUrl'), '/publicip-new.json')]",
209 | "contentVersion": "1.0.0.0"
210 | },
211 | "parameters": {
212 | "apiVersion": {
213 | "value": "[variables('apiVersion')]"
214 | },
215 | "publicIPAddressName": {
216 | "value": "[variables('publicIPName')]"
217 | },
218 | "publicIPAddressType": {
219 | "value": "[variables('publicIPAddressType')]"
220 | },
221 | "domainNameLabel": {
222 | "value": "[variables('publicIPDNSNameLabel')]"
223 | },
224 | "publicIPRGName": {
225 | "value": "[resourceGroup().name]"
226 | }
227 | }
228 | }
229 | },
230 | {
231 | "apiVersion": "[variables('apiVersion')]",
232 | "name": "[variables('lbName')]",
233 | "type": "Microsoft.Network/loadBalancers",
234 | "location": "[resourceGroup().location]",
235 | "dependsOn": [
236 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
237 | "Microsoft.Resources/deployments/setupClusterPublicIP"
238 | ],
239 | "properties": {
240 | "frontendIPConfigurations": [
241 | {
242 | "name": "LoadBalancerFrontEnd",
243 | "properties": {
244 | "publicIPAddress": {
245 | "id": "[reference('setupClusterPublicIP').outputs.resourceId.value]"
246 | }
247 | }
248 | }
249 | ],
250 | "backendAddressPools": [
251 | {
252 | "name": "BackendPool1"
253 | }
254 | ],
255 | "inboundNatRules": [
256 | {
257 | "name": "[concat('RDP-', variables('headNodes')[0])]",
258 | "properties": {
259 | "frontendIPConfiguration": {
260 | "id": "[variables('lbFrontEndIPConfigID')]"
261 | },
262 | "protocol": "Tcp",
263 | "frontendPort": 50001,
264 | "backendPort": 3389,
265 | "enableFloatingIP": false
266 | }
267 | },
268 | {
269 | "name": "[concat('RDP-', variables('headNodes')[1])]",
270 | "properties": {
271 | "frontendIPConfiguration": {
272 | "id": "[variables('lbFrontEndIPConfigID')]"
273 | },
274 | "protocol": "Tcp",
275 | "frontendPort": 50002,
276 | "backendPort": 3389,
277 | "enableFloatingIP": false
278 | }
279 | },
280 | {
281 | "name": "[concat('RDP-', variables('headNodes')[2])]",
282 | "properties": {
283 | "frontendIPConfiguration": {
284 | "id": "[variables('lbFrontEndIPConfigID')]"
285 | },
286 | "protocol": "Tcp",
287 | "frontendPort": 50003,
288 | "backendPort": 3389,
289 | "enableFloatingIP": false
290 | }
291 | }
292 | ],
293 | "loadBalancingRules": [
294 | {
295 | "name": "LBRule",
296 | "properties": {
297 | "frontendIPConfiguration": {
298 | "id": "[variables('lbFrontEndIPConfigID')]"
299 | },
300 | "backendAddressPool": {
301 | "id": "[variables('lbPoolID')]"
302 | },
303 | "protocol": "Tcp",
304 | "frontendPort": 443,
305 | "backendPort": 443,
306 | "enableFloatingIP": false,
307 | "idleTimeoutInMinutes": 5,
308 | "probe": {
309 | "id": "[variables('lbProbeID')]"
310 | }
311 | }
312 | }
313 | ],
314 | "probes": [
315 | {
316 | "name": "tcpProbe",
317 | "properties": {
318 | "protocol": "Tcp",
319 | "port": 5800,
320 | "intervalInSeconds": 5,
321 | "numberOfProbes": 2
322 | }
323 | }
324 | ]
325 | }
326 | },
327 | {
328 | "apiVersion": "[variables('apiVersion')]",
329 | "type": "Microsoft.Network/networkInterfaces",
330 | "name": "[concat(variables('headNodes')[copyIndex()], variables('uniqueNicSuffix'))]",
331 | "location": "[resourceGroup().location]",
332 | "dependsOn": [
333 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
334 | "[concat('Microsoft.Network/loadBalancers/', variables('lbName'))]"
335 | ],
336 | "copy": {
337 | "name": "HNNics",
338 | "count": "[length(variables('headNodes'))]"
339 | },
340 | "properties": {
341 | "ipConfigurations": [
342 | {
343 | "name": "IPConfig",
344 | "properties": {
345 | "privateIPAllocationMethod": "Dynamic",
346 | "subnet": {
347 | "id": "[variables('subnetRef')]"
348 | },
349 | "loadBalancerBackendAddressPools": [
350 | {
351 | "id": "[variables('lbPoolID')]"
352 | }
353 | ],
354 | "loadBalancerInboundNatRules": [
355 | {
356 | "id": "[concat(variables('lbID'),'/inboundNatRules/RDP-', variables('headNodes')[copyIndex()])]"
357 | }
358 | ]
359 | }
360 | }
361 | ]
362 | }
363 | },
364 | {
365 | "type": "Microsoft.Compute/availabilitySets",
366 | "name": "[variables('availabilitySetNameHN')]",
367 | "apiVersion": "[variables('apiVersion')]",
368 | "location": "[resourceGroup().location]"
369 | },
370 | {
371 | "apiVersion": "2015-01-01",
372 | "type": "Microsoft.Resources/deployments",
373 | "name": "[concat('create', variables('headNodes')[copyIndex()])]",
374 | "dependsOn": [
375 | "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetNameHN'))]",
376 | "[concat('Microsoft.Network/networkInterfaces/', variables('headNodes')[copyIndex()], variables('uniqueNicSuffix'))]",
377 | "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountNameHN'))]"
378 | ],
379 | "copy": {
380 | "name": "createHeadNodeCopy",
381 | "count": "[length(variables('headNodes'))]"
382 | },
383 | "properties": {
384 | "mode": "Incremental",
385 | "templateLink": {
386 | "uri": "[concat(variables('sharedResxBaseUrl'),'/windowsvm', variables('hnRDMASuffix'), '.json')]",
387 | "contentVersion": "1.0.0.0"
388 | },
389 | "parameters": {
390 | "apiVersion": {
391 | "value": "[variables('apiVersion')]"
392 | },
393 | "subnetId": {
394 | "value": "[variables('subnetRef')]"
395 | },
396 | "nicName": {
397 | "value": "[concat(variables('headNodes')[copyIndex()], variables('uniqueNicSuffix'))]"
398 | },
399 | "vmName": {
400 | "value": "[variables('headNodes')[copyIndex()]]"
401 | },
402 | "vmSize": {
403 | "value": "[parameters('headNodeVMSize')]"
404 | },
405 | "storageAccountName": {
406 | "value": "[variables('storageAccountNameHN')]"
407 | },
408 | "imageReference": {
409 | "value": {
410 | "publisher": "MicrosoftWindowsServerHPCPack",
411 | "offer": "WindowsServerHPCPack",
412 | "sku": "2016",
413 | "version": "[parameters('hpcPackVersion')]"
414 | }
415 | },
416 | "adminUsername": {
417 | "value": "[parameters('adminUsername')]"
418 | },
419 | "adminPassword": {
420 | "value": "[parameters('adminPassword')]"
421 | },
422 | "availabilitySetName": {
423 | "value": "[variables('availabilitySetNameHN')]"
424 | },
425 | "secrets": {
426 | "value": "[variables('certSecrets')]"
427 | }
428 | }
429 | }
430 | },
431 | {
432 | "apiVersion": "2015-01-01",
433 | "type": "Microsoft.Resources/deployments",
434 | "name": "[concat('createDBServer', parameters('sqlServerVMName'))]",
435 | "dependsOn": [
436 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
437 | "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetNameHN'))]",
438 | "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountNameHN'))]"
439 | ],
440 | "properties": {
441 | "mode": "Incremental",
442 | "templateLink": {
443 | "uri": "[concat(variables('sharedResxBaseUrl'), '/windowsvm-dsc.json')]",
444 | "contentVersion": "1.0.0.0"
445 | },
446 | "parameters": {
447 | "apiVersion": {
448 | "value": "[variables('apiVersion')]"
449 | },
450 | "subnetId": {
451 | "value": "[variables('subnetRef')]"
452 | },
453 | "vmName": {
454 | "value": "[parameters('sqlServerVMName')]"
455 | },
456 | "vmSize": {
457 | "value": "[parameters('sqlServerVMSize')]"
458 | },
459 | "storageAccountName": {
460 | "value": "[variables('storageAccountNameHN')]"
461 | },
462 | "imageReference": {
463 | "value": {
464 | "publisher": "MicrosoftSQLServer",
465 | "offer": "SQL2016-WS2012R2",
466 | "sku": "Standard",
467 | "version": "latest"
468 | }
469 | },
470 | "adminUsername": {
471 | "value": "[parameters('adminUsername')]"
472 | },
473 | "adminPassword": {
474 | "value": "[parameters('adminPassword')]"
475 | },
476 | "availabilitySetName": {
477 | "value": "[variables('availabilitySetNameHN')]"
478 | },
479 | "dataDiskSizeInGB": {
480 | "value": 200
481 | },
482 | "dscExtensionName": {
483 | "value": "configSQLServer"
484 | },
485 | "dscSettings": {
486 | "value": {
487 | "configuration": {
488 | "url": "[concat(variables('sharedResxBaseUrl'),'/ConfigSQLServer.ps1.zip')]",
489 | "script": "ConfigSQLServer.ps1",
490 | "function": "ConfigSQLServer"
491 | },
492 | "configurationArguments": {
493 | }
494 | }
495 | },
496 | "dscProtectedSettings": {
497 | "value": {
498 | "configurationArguments": {
499 | "LoginCredential": {
500 | "UserName": "[parameters('sqlLoginName')]",
501 | "Password": "[parameters('sqlLoginPassword')]"
502 | }
503 | }
504 | }
505 | }
506 | }
507 | }
508 | },
509 | {
510 | "apiVersion": "2015-01-01",
511 | "type": "Microsoft.Resources/deployments",
512 | "name": "[concat(variables('headNodes')[copyIndex(1)],'-installHpcHNPrereq')]",
513 | "dependsOn": [
514 | "[concat('Microsoft.Resources/deployments/create', variables('headNodes')[copyIndex(1)])]"
515 | ],
516 | "copy": {
517 | "name": "HNPreReqInstallCopy",
518 | "count": "[sub(length(variables('headNodes')), 1)]"
519 | },
520 | "properties": {
521 | "mode": "Incremental",
522 | "templateLink": {
523 | "uri": "[concat(variables('sharedResxBaseUrl'),'/dsc-extension.json')]",
524 | "contentVersion": "1.0.0.0"
525 | },
526 | "parameters": {
527 | "apiVersion": {
528 | "value": "[variables('apiVersion')]"
529 | },
530 | "vmName": {
531 | "value": "[variables('headNodes')[copyIndex(1)]]"
532 | },
533 | "dscExtensionName": {
534 | "value": "setupHpcHeadNode"
535 | },
536 | "dscSettings": {
537 | "value": {
538 | "configuration": {
539 | "url": "[concat(variables('sharedResxBaseUrl'),'/InstallHpcNode.ps1.zip')]",
540 | "script": "InstallHpcNode.ps1",
541 | "function": "InstallHpcNode"
542 | },
543 | "configurationArguments": {
544 | "NodeType": "HeadNodePreReq",
545 | "HeadNodeList": "[parameters('headNodeList')]",
546 | "SSLThumbprint": "[parameters('certThumbprint')]",
547 | "PostConfigScript": ""
548 | }
549 | }
550 | }
551 | }
552 | }
553 | },
554 | {
555 | "type": "Microsoft.Compute/virtualMachines/extensions",
556 | "name": "[concat(variables('headNodes')[0],'/setupHpcHeadNode')]",
557 | "apiVersion": "[variables('apiVersion')]",
558 | "location": "[resourceGroup().location]",
559 | "dependsOn": [
560 | "HNPreReqInstallCopy",
561 | "[concat('Microsoft.Resources/deployments/create', variables('headNodes')[0])]",
562 | "[concat('Microsoft.Resources/deployments/createDBServer', parameters('sqlServerVMName'))]"
563 | ],
564 | "properties": {
565 | "publisher": "Microsoft.Powershell",
566 | "type": "DSC",
567 | "typeHandlerVersion": "2.20",
568 | "autoUpgradeMinorVersion": true,
569 | "settings": {
570 | "configuration": {
571 | "url": "[concat(variables('sharedResxBaseUrl'),'/InstallHpcHeadNode.ps1.zip')]",
572 | "script": "InstallHpcHeadNode.ps1",
573 | "function": "InstallHpcHeadNode"
574 | },
575 | "configurationArguments": {
576 | "HeadNodeList": "[parameters('headNodeList')]",
577 | "SSLThumbprint": "[parameters('certThumbprint')]",
578 | "LinuxCommOverHttp": true,
579 | "ClusterName": "[parameters('clusterName')]",
580 | "SQLServerInstance": "[parameters('sqlServerVMName')]",
581 | "CNSize": "[parameters('computeNodeVMSize')]",
582 | "SubscriptionId": "[subscription().subscriptionId]",
583 | "VNet": "[variables('virtualNetworkName')]",
584 | "Subnet": "[variables('subnet1Name')]",
585 | "Location": "[resourceGroup().location]",
586 | "ResourceGroup": "[resourceGroup().name]"
587 | }
588 | },
589 | "protectedSettings": {
590 | "configurationArguments": {
591 | "SetupUserCredential": {
592 | "UserName": "[parameters('adminUsername')]",
593 | "Password": "[parameters('adminPassword')]"
594 | },
595 | "AzureStorageConnString": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountNameHN'), ';AccountKey=', listKeys(variables('storageAccountIdHN'),variables('apiVersion')).key1)]",
596 | "SqlLoginCredential": {
597 | "UserName": "[parameters('sqlLoginName')]",
598 | "Password": "[parameters('sqlLoginPassword')]"
599 | }
600 | }
601 | }
602 | }
603 | },
604 | {
605 | "type": "Microsoft.Compute/availabilitySets",
606 | "name": "[concat(variables('cnAvailabilitySetNamePrefix'), padLeft(string(copyIndex()), 2, '0'))]",
607 | "apiVersion": "[variables('apiVersion')]",
608 | "location": "[resourceGroup().location]",
609 | "copy": {
610 | "name": "cnAvailabilitySetCopy",
611 | "count": "[variables('cnAvailabilitySetNumber')]"
612 | }
613 | },
614 | {
615 | "type": "Microsoft.Storage/storageAccounts",
616 | "name": "[concat(variables('cnStorageAccountNamePrefix'), padLeft(string(copyIndex()), 2, '0'))]",
617 | "apiVersion": "[variables('apiVersion')]",
618 | "location": "[resourceGroup().location]",
619 | "copy": {
620 | "name": "cnStorageAccountCopy",
621 | "count": "[variables('cnStorageAccountNumber')]"
622 | },
623 | "properties": {
624 | "accountType": "[variables('storageAccountType')]"
625 | }
626 | },
627 | {
628 | "apiVersion": "2015-01-01",
629 | "type": "Microsoft.Resources/deployments",
630 | "name": "[concat('create', parameters('computeNodeNamePrefix'), padLeft(string(copyIndex()), 3, '0'))]",
631 | "dependsOn": [
632 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
633 | "[concat('Microsoft.Compute/availabilitySets/', variables('cnAvailabilitySetNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrVMPerAvailabilitySet'))), 2, '0'))]",
634 | "[concat('Microsoft.Storage/storageAccounts/', variables('cnStorageAccountNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrCNPerStorageAccount'))), 2, '0'))]"
635 | ],
636 | "copy": {
637 | "name": "CN",
638 | "count": "[parameters('computeNodeNumber')]"
639 | },
640 | "properties": {
641 | "mode": "Incremental",
642 | "templateLink": {
643 | "uri": "[concat(variables('sharedResxBaseUrl'),'/windowsvm-dsc', variables('cnRDMASuffix'), '.json')]",
644 | "contentVersion": "1.0.0.0"
645 | },
646 | "parameters": {
647 | "apiVersion": {
648 | "value": "[variables('apiVersion')]"
649 | },
650 | "subnetId": {
651 | "value": "[variables('subnetRef')]"
652 | },
653 | "vmName": {
654 | "value": "[concat(parameters('computeNodeNamePrefix'), padLeft(string(copyIndex()), 3, '0'))]"
655 | },
656 | "vmSize": {
657 | "value": "[parameters('computeNodeVMSize')]"
658 | },
659 | "storageAccountName": {
660 | "value": "[concat(variables('cnStorageAccountNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrCNPerStorageAccount'))), 2, '0'))]"
661 | },
662 | "imageReference": {
663 | "value": {
664 | "publisher": "MicrosoftWindowsServerHPCPack",
665 | "offer": "WindowsServerHPCPack",
666 | "sku": "2016CN",
667 | "version": "[parameters('hpcPackVersion')]"
668 | }
669 | },
670 | "adminUsername": {
671 | "value": "[parameters('adminUsername')]"
672 | },
673 | "adminPassword": {
674 | "value": "[parameters('adminPassword')]"
675 | },
676 | "availabilitySetName": {
677 | "value": "[concat(variables('cnAvailabilitySetNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrVMPerAvailabilitySet'))), 2, '0'))]"
678 | },
679 | "secrets": {
680 | "value": "[variables('certSecrets')]"
681 | },
682 | "dscExtensionName": {
683 | "value": "ConfigHpcNode"
684 | },
685 | "dscSettings": {
686 | "value": {
687 | "wmfVersion": "4.0",
688 | "configuration": {
689 | "url": "[concat(variables('sharedResxBaseUrl'),'/ConfigHpcNodeNoAD.ps1.zip')]",
690 | "script": "ConfigHpcNode.ps1",
691 | "function": "ConfigHpcNode"
692 | },
693 | "configurationArguments": {
694 | "NodeType": "ComputeNode",
695 | "HeadNodeList": "[parameters('headNodeList')]",
696 | "SSLThumbprint": "[parameters('certThumbprint')]",
697 | "PostConfigScript": ""
698 | }
699 | }
700 | }
701 | }
702 | }
703 | }
704 | ],
705 | "outputs": {
706 | "clusterDNSName": {
707 | "type": "string",
708 | "value": "[reference('setupClusterPublicIP').outputs.fqdn.value]"
709 | }
710 | }
711 | }
--------------------------------------------------------------------------------
/newcluster-templates/three-hns-lnxcn.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "clusterName": {
6 | "type": "string",
7 | "minLength": 3,
8 | "maxLength": 15,
9 | "metadata": {
10 | "description": "The name of the HPC cluster, also used as the head node name. It must contain between 3 and 15 characters with lowercase letters and numbers, and must start with a letter."
11 | }
12 | },
13 | "sqlServerVMName": {
14 | "type": "string",
15 | "metadata": {
16 | "description": "The name of the SQL Server VM."
17 | }
18 | },
19 | "sqlServerVMSize": {
20 | "type": "string",
21 | "defaultValue": "Standard_A4",
22 | "metadata": {
23 | "description": "The VM size for the SQL Server VM, all available VM sizes in Azure can be found at https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes"
24 | }
25 | },
26 | "headNodeList": {
27 | "type": "string",
28 | "defaultValue": "HPCHN01,HPCHN02,HPCHN03",
29 | "metadata": {
30 | "description": "The list of head nodes joined with ','"
31 | }
32 | },
33 | "headNodeVMSize": {
34 | "type": "string",
35 | "defaultValue": "Standard_A4",
36 | "metadata": {
37 | "description": "The VM size for the head node, all available VM sizes in Azure can be found at https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes."
38 | }
39 | },
40 | "computeNodeImage": {
41 | "type": "string",
42 | "defaultValue": "CentOS_7.0",
43 | "allowedValues": [
44 | "CentOS_6.5",
45 | "CentOS_6.6",
46 | "CentOS_6.7",
47 | "CentOS_7.0",
48 | "CentOS_7.1",
49 | "CentOS_6.5_HPC",
50 | "CentOS_7.1_HPC",
51 | "RHEL_6.7",
52 | "RHEL_6.8",
53 | "RHEL_7.2",
54 | "SLES_12_HPC",
55 | "SLES_12_HPC_Premium",
56 | "Ubuntu_14.04",
57 | "Ubuntu_16.04"
58 | ],
59 | "metadata": {
60 | "description": "The VM image of the compute nodes"
61 | }
62 | },
63 | "computeNodeNamePrefix": {
64 | "type": "string",
65 | "defaultValue": "IaaSLnxCN",
66 | "metadata": {
67 | "description": "The name prefix of the compute nodes. It must be no more than 12 characters, begin with a letter, and contain only letters, numbers and hyphens. For example, if 'IaaSCN' is specified, the compute node names will be 'IaaSCN000', 'IaaSCN001', ..."
68 | }
69 | },
70 | "computeNodeNumber": {
71 | "type": "int",
72 | "defaultValue": 10,
73 | "metadata": {
74 | "description": "The number of the compute nodes."
75 | }
76 | },
77 | "computeNodeVMSize": {
78 | "type": "string",
79 | "defaultValue": "Standard_A3",
80 | "metadata": {
81 | "description": "The VM size for the compute nodes, all available VM sizes in Azure can be found at https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes."
82 | }
83 | },
84 | "adminUsername": {
85 | "type": "string",
86 | "defaultValue": "hpcadmin",
87 | "metadata": {
88 | "description": "Administrator user name for the virtual machines."
89 | }
90 | },
91 | "adminPassword": {
92 | "type": "securestring",
93 | "metadata": {
94 | "description": "Administrator password for the virtual machines."
95 | }
96 | },
97 | "sqlLoginName": {
98 | "type": "string",
99 | "defaultValue": "hpcsql",
100 | "metadata": {
101 | "description": "Sql login name."
102 | }
103 | },
104 | "sqlLoginPassword": {
105 | "type": "securestring",
106 | "metadata": {
107 | "description": "Sql login password"
108 | }
109 | },
110 | "hpcPackVersion": {
111 | "type": "string",
112 | "defaultValue": "latest",
113 | "metadata": {
114 | "description": "The version for HPC Pack 2016. It is strongly recommended to specify as 'latest'. The deployment will fail if an incorrect version is specified."
115 | }
116 | },
117 | "vaultName": {
118 | "type": "string",
119 | "metadata": {
120 | "description": "Name of the KeyVault in which the certificate is stored."
121 | }
122 | },
123 | "vaultResourceGroup": {
124 | "type": "string",
125 | "metadata": {
126 | "description": "Resource Group of the KeyVault in which the certificate is stored."
127 | }
128 | },
129 | "certificateUrl": {
130 | "type": "string",
131 | "metadata": {
132 | "description": "Url of the certificate with version in KeyVault e.g. https://testault.vault.azure.net/secrets/testcert/b621es1db241e56a72d037479xab1r7."
133 | }
134 | },
135 | "certThumbprint": {
136 | "type": "string",
137 | "metadata": {
138 | "description": "Thumbprint of the certificate."
139 | }
140 | }
141 | },
142 | "variables": {
143 | "apiVersion": "2015-06-15",
144 | "storageAccountType": "Standard_LRS",
145 | "storageAccountNameHN": "[concat('hpc', uniqueString(resourceGroup().id, parameters('clusterName')))]",
146 | "storageAccountIdHN": "[resourceId('Microsoft.Storage/storageAccounts',variables('storageAccountNameHN'))]",
147 | "cnStorageAccountNamePrefix": "[concat('hpc', uniqueString(resourceGroup().id, parameters('computeNodeNamePrefix')))]",
148 | "nbrCNPerStorageAccount": 30,
149 | "cnStorageAccountNumber": "[add(div(sub(parameters('computeNodeNumber'), 1), variables('nbrCNPerStorageAccount')), 1)]",
150 | "lbName": "[concat(parameters('clusterName'),'-lb')]",
151 | "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbName'))]",
152 | "lbFrontEndIPConfigID": "[concat(variables('lbID'),'/frontendIPConfigurations/LoadBalancerFrontEnd')]",
153 | "lbPoolID": "[concat(variables('lbID'),'/backendAddressPools/BackendPool1')]",
154 | "lbProbeID": "[concat(variables('lbID'),'/probes/tcpProbe')]",
155 | "addressPrefix": "10.0.0.0/16",
156 | "subnet1Name": "Subnet-1",
157 | "subnet1Prefix": "10.0.0.0/22",
158 | "headNodes": "[split(parameters('headNodeList'), ',')]",
159 | "virtualNetworkName": "[concat(parameters('clusterName'),'vnet')]",
160 | "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
161 | "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]",
162 | "publicIPName": "[concat(parameters('clusterName'),'publicip')]",
163 | "publicIPDNSNameLabel": "[concat(toLower(parameters('clusterName')), uniqueString(resourceGroup().id))]",
164 | "publicIPAddressType": "Dynamic",
165 | "availabilitySetNameHN": "[concat(parameters('clusterName'), '-avset')]",
166 | "cnAvailabilitySetNamePrefix": "[concat(parameters('computeNodeNamePrefix'), 'avset')]",
167 | "nbrVMPerAvailabilitySet": 80,
168 | "cnAvailabilitySetNumber": "[add(div(parameters('computeNodeNumber'), variables('nbrVMPerAvailabilitySet')), 1)]",
169 | "uniqueSuffix": "[uniqueString(variables('subnetRef'))]",
170 | "uniqueNicSuffix": "[concat('-nic-', variables('uniqueSuffix'))]",
171 | "vmSizeSuffix": "[uniqueString(resourceGroup().id)]",
172 | "suffixA8Size": "[concat('Standard_A8', variables('vmSizeSuffix'))]",
173 | "suffixA9Size": "[concat('Standard_A9', variables('vmSizeSuffix'))]",
174 | "suffixHNSize": "[concat(parameters('headNodeVMSize'), variables('vmSizeSuffix'))]",
175 | "suffixCNSize": "[concat(parameters('computeNodeVMSize'), variables('vmSizeSuffix'))]",
176 | "cnRDMASuffix": "[replace(replace(replace(variables('suffixCNSize'), variables('suffixA8Size'),'-rdma'), variables('suffixA9Size'),'-rdma'),variables('suffixCNSize'), '')]",
177 | "hnRDMASuffix": "[replace(replace(replace(variables('suffixHNSize'), variables('suffixA8Size'),'-rdma'), variables('suffixA9Size'),'-rdma'),variables('suffixHNSize'), '')]",
178 | "winCertSecrets": [
179 | {
180 | "sourceVault": {
181 | "id": "[resourceId(parameters('vaultResourceGroup'), 'Microsoft.KeyVault/vaults', parameters('vaultName'))]"
182 | },
183 | "vaultCertificates": [
184 | {
185 | "certificateUrl": "[parameters('certificateUrl')]",
186 | "certificateStore": "My"
187 | }
188 | ]
189 | }
190 | ],
191 | "lnxCertSecrets": [
192 | {
193 | "sourceVault": {
194 | "id": "[resourceId(parameters('vaultResourceGroup'), 'Microsoft.KeyVault/vaults', parameters('vaultName'))]"
195 | },
196 | "vaultCertificates": [
197 | {
198 | "certificateUrl": "[parameters('certificateUrl')]"
199 | }
200 | ]
201 | }
202 | ],
203 | "computeNodeImages": {
204 | "CentOS_6.5": {
205 | "publisher": "OpenLogic",
206 | "offer": "CentOS",
207 | "sku": "6.5",
208 | "version": "latest"
209 | },
210 | "CentOS_6.6": {
211 | "publisher": "OpenLogic",
212 | "offer": "CentOS",
213 | "sku": "6.6",
214 | "version": "latest"
215 | },
216 | "CentOS_6.7": {
217 | "publisher": "OpenLogic",
218 | "offer": "CentOS",
219 | "sku": "6.7",
220 | "version": "latest"
221 | },
222 | "CentOS_7.0": {
223 | "publisher": "OpenLogic",
224 | "offer": "CentOS",
225 | "sku": "7.0",
226 | "version": "latest"
227 | },
228 | "CentOS_7.1": {
229 | "publisher": "OpenLogic",
230 | "offer": "CentOS",
231 | "sku": "7.1",
232 | "version": "latest"
233 | },
234 | "CentOS_7.2": {
235 | "publisher": "OpenLogic",
236 | "offer": "CentOS",
237 | "sku": "7.2",
238 | "version": "latest"
239 | },
240 | "CentOS_6.5_HPC": {
241 | "publisher": "OpenLogic",
242 | "offer": "CentOS-HPC",
243 | "sku": "6.5",
244 | "version": "latest"
245 | },
246 | "CentOS_7.1_HPC": {
247 | "publisher": "OpenLogic",
248 | "offer": "CentOS-HPC",
249 | "sku": "7.1",
250 | "version": "latest"
251 | },
252 | "RHEL_6.7": {
253 | "publisher": "RedHat",
254 | "offer": "RHEL",
255 | "sku": "6.7",
256 | "version": "latest"
257 | },
258 | "RHEL_6.8": {
259 | "publisher": "RedHat",
260 | "offer": "RHEL",
261 | "sku": "6.8",
262 | "version": "latest"
263 | },
264 | "RHEL_7.2": {
265 | "publisher": "RedHat",
266 | "offer": "RHEL",
267 | "sku": "7.2",
268 | "version": "latest"
269 | },
270 | "SLES_12": {
271 | "publisher": "SUSE",
272 | "offer": "SLES",
273 | "sku": "12-SP1",
274 | "version": "latest"
275 | },
276 | "SLES_12_Premium": {
277 | "publisher": "SUSE",
278 | "offer": "SLES-Priority",
279 | "sku": "12-SP1",
280 | "version": "latest"
281 | },
282 | "SLES_12_HPC": {
283 | "publisher": "SUSE",
284 | "offer": "SLES-HPC",
285 | "sku": "12",
286 | "version": "latest"
287 | },
288 | "SLES_12_HPC_Premium": {
289 | "publisher": "SUSE",
290 | "offer": "SLES-HPC-Priority",
291 | "sku": "12",
292 | "version": "latest"
293 | },
294 | "Ubuntu_14.04": {
295 | "publisher": "Canonical",
296 | "offer": "UbuntuServer",
297 | "sku": "14.04.3-LTS",
298 | "version": "latest"
299 | },
300 | "Ubuntu_16.04": {
301 | "publisher": "Canonical",
302 | "offer": "UbuntuServer",
303 | "sku": "16.04.0-LTS",
304 | "version": "latest"
305 | }
306 | },
307 | "selectedLinuxImageRef": "[variables('computeNodeImages')[parameters('computeNodeImage')]]",
308 | "sharedResxBaseUrl": "https://raw.githubusercontent.com/MsHpcPack/HPCPack2016/master/newcluster-templates/shared-resources"
309 | },
310 | "resources": [
311 | {
312 | "type": "Microsoft.Storage/storageAccounts",
313 | "name": "[variables('storageAccountNameHN')]",
314 | "apiVersion": "[variables('apiVersion')]",
315 | "location": "[resourceGroup().location]",
316 | "properties": {
317 | "accountType": "[variables('storageAccountType')]"
318 | }
319 | },
320 | {
321 | "apiVersion": "[variables('apiVersion')]",
322 | "type": "Microsoft.Network/virtualNetworks",
323 | "name": "[variables('virtualNetworkName')]",
324 | "location": "[resourceGroup().location]",
325 | "properties": {
326 | "addressSpace": {
327 | "addressPrefixes": [
328 | "[variables('addressPrefix')]"
329 | ]
330 | },
331 | "subnets": [
332 | {
333 | "name": "[variables('subnet1Name')]",
334 | "properties": {
335 | "addressPrefix": "[variables('subnet1Prefix')]"
336 | }
337 | }
338 | ]
339 | }
340 | },
341 | {
342 | "name": "setupClusterPublicIP",
343 | "type": "Microsoft.Resources/deployments",
344 | "apiVersion": "2015-01-01",
345 | "properties": {
346 | "mode": "Incremental",
347 | "templateLink": {
348 | "uri": "[concat(variables('sharedResxBaseUrl'), '/publicip-new.json')]",
349 | "contentVersion": "1.0.0.0"
350 | },
351 | "parameters": {
352 | "apiVersion": {
353 | "value": "[variables('apiVersion')]"
354 | },
355 | "publicIPAddressName": {
356 | "value": "[variables('publicIPName')]"
357 | },
358 | "publicIPAddressType": {
359 | "value": "[variables('publicIPAddressType')]"
360 | },
361 | "domainNameLabel": {
362 | "value": "[variables('publicIPDNSNameLabel')]"
363 | },
364 | "publicIPRGName": {
365 | "value": "[resourceGroup().name]"
366 | }
367 | }
368 | }
369 | },
370 | {
371 | "apiVersion": "[variables('apiVersion')]",
372 | "name": "[variables('lbName')]",
373 | "type": "Microsoft.Network/loadBalancers",
374 | "location": "[resourceGroup().location]",
375 | "dependsOn": [
376 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
377 | "Microsoft.Resources/deployments/setupClusterPublicIP"
378 | ],
379 | "properties": {
380 | "frontendIPConfigurations": [
381 | {
382 | "name": "LoadBalancerFrontEnd",
383 | "properties": {
384 | "publicIPAddress": {
385 | "id": "[reference('setupClusterPublicIP').outputs.resourceId.value]"
386 | }
387 | }
388 | }
389 | ],
390 | "backendAddressPools": [
391 | {
392 | "name": "BackendPool1"
393 | }
394 | ],
395 | "inboundNatRules": [
396 | {
397 | "name": "[concat('RDP-', variables('headNodes')[0])]",
398 | "properties": {
399 | "frontendIPConfiguration": {
400 | "id": "[variables('lbFrontEndIPConfigID')]"
401 | },
402 | "protocol": "Tcp",
403 | "frontendPort": 50001,
404 | "backendPort": 3389,
405 | "enableFloatingIP": false
406 | }
407 | },
408 | {
409 | "name": "[concat('RDP-', variables('headNodes')[1])]",
410 | "properties": {
411 | "frontendIPConfiguration": {
412 | "id": "[variables('lbFrontEndIPConfigID')]"
413 | },
414 | "protocol": "Tcp",
415 | "frontendPort": 50002,
416 | "backendPort": 3389,
417 | "enableFloatingIP": false
418 | }
419 | },
420 | {
421 | "name": "[concat('RDP-', variables('headNodes')[2])]",
422 | "properties": {
423 | "frontendIPConfiguration": {
424 | "id": "[variables('lbFrontEndIPConfigID')]"
425 | },
426 | "protocol": "Tcp",
427 | "frontendPort": 50003,
428 | "backendPort": 3389,
429 | "enableFloatingIP": false
430 | }
431 | }
432 | ],
433 | "loadBalancingRules": [
434 | {
435 | "name": "LBRule",
436 | "properties": {
437 | "frontendIPConfiguration": {
438 | "id": "[variables('lbFrontEndIPConfigID')]"
439 | },
440 | "backendAddressPool": {
441 | "id": "[variables('lbPoolID')]"
442 | },
443 | "protocol": "Tcp",
444 | "frontendPort": 443,
445 | "backendPort": 443,
446 | "enableFloatingIP": false,
447 | "idleTimeoutInMinutes": 5,
448 | "probe": {
449 | "id": "[variables('lbProbeID')]"
450 | }
451 | }
452 | }
453 | ],
454 | "probes": [
455 | {
456 | "name": "tcpProbe",
457 | "properties": {
458 | "protocol": "Tcp",
459 | "port": 5800,
460 | "intervalInSeconds": 5,
461 | "numberOfProbes": 2
462 | }
463 | }
464 | ]
465 | }
466 | },
467 | {
468 | "apiVersion": "[variables('apiVersion')]",
469 | "type": "Microsoft.Network/networkInterfaces",
470 | "name": "[concat(variables('headNodes')[copyIndex()], variables('uniqueNicSuffix'))]",
471 | "location": "[resourceGroup().location]",
472 | "dependsOn": [
473 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
474 | "[concat('Microsoft.Network/loadBalancers/', variables('lbName'))]"
475 | ],
476 | "copy": {
477 | "name": "HNNics",
478 | "count": "[length(variables('headNodes'))]"
479 | },
480 | "properties": {
481 | "ipConfigurations": [
482 | {
483 | "name": "IPConfig",
484 | "properties": {
485 | "privateIPAllocationMethod": "Dynamic",
486 | "subnet": {
487 | "id": "[variables('subnetRef')]"
488 | },
489 | "loadBalancerBackendAddressPools": [
490 | {
491 | "id": "[variables('lbPoolID')]"
492 | }
493 | ],
494 | "loadBalancerInboundNatRules": [
495 | {
496 | "id": "[concat(variables('lbID'),'/inboundNatRules/RDP-', variables('headNodes')[copyIndex()])]"
497 | }
498 | ]
499 | }
500 | }
501 | ]
502 | }
503 | },
504 | {
505 | "type": "Microsoft.Compute/availabilitySets",
506 | "name": "[variables('availabilitySetNameHN')]",
507 | "apiVersion": "[variables('apiVersion')]",
508 | "location": "[resourceGroup().location]"
509 | },
510 | {
511 | "apiVersion": "2015-01-01",
512 | "type": "Microsoft.Resources/deployments",
513 | "name": "[concat('create', variables('headNodes')[copyIndex()])]",
514 | "dependsOn": [
515 | "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetNameHN'))]",
516 | "[concat('Microsoft.Network/networkInterfaces/', variables('headNodes')[copyIndex()], variables('uniqueNicSuffix'))]",
517 | "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountNameHN'))]"
518 | ],
519 | "copy": {
520 | "name": "createHeadNodeCopy",
521 | "count": "[length(variables('headNodes'))]"
522 | },
523 | "properties": {
524 | "mode": "Incremental",
525 | "templateLink": {
526 | "uri": "[concat(variables('sharedResxBaseUrl'),'/windowsvm', variables('hnRDMASuffix'), '.json')]",
527 | "contentVersion": "1.0.0.0"
528 | },
529 | "parameters": {
530 | "apiVersion": {
531 | "value": "[variables('apiVersion')]"
532 | },
533 | "subnetId": {
534 | "value": "[variables('subnetRef')]"
535 | },
536 | "nicName": {
537 | "value": "[concat(variables('headNodes')[copyIndex()], variables('uniqueNicSuffix'))]"
538 | },
539 | "vmName": {
540 | "value": "[variables('headNodes')[copyIndex()]]"
541 | },
542 | "vmSize": {
543 | "value": "[parameters('headNodeVMSize')]"
544 | },
545 | "storageAccountName": {
546 | "value": "[variables('storageAccountNameHN')]"
547 | },
548 | "imageReference": {
549 | "value": {
550 | "publisher": "MicrosoftWindowsServerHPCPack",
551 | "offer": "WindowsServerHPCPack",
552 | "sku": "2016",
553 | "version": "[parameters('hpcPackVersion')]"
554 | }
555 | },
556 | "adminUsername": {
557 | "value": "[parameters('adminUsername')]"
558 | },
559 | "adminPassword": {
560 | "value": "[parameters('adminPassword')]"
561 | },
562 | "availabilitySetName": {
563 | "value": "[variables('availabilitySetNameHN')]"
564 | },
565 | "secrets": {
566 | "value": "[variables('winCertSecrets')]"
567 | }
568 | }
569 | }
570 | },
571 | {
572 | "apiVersion": "2015-01-01",
573 | "type": "Microsoft.Resources/deployments",
574 | "name": "[concat('createDBServer', parameters('sqlServerVMName'))]",
575 | "dependsOn": [
576 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
577 | "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetNameHN'))]",
578 | "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountNameHN'))]"
579 | ],
580 | "properties": {
581 | "mode": "Incremental",
582 | "templateLink": {
583 | "uri": "[concat(variables('sharedResxBaseUrl'), '/windowsvm-dsc.json')]",
584 | "contentVersion": "1.0.0.0"
585 | },
586 | "parameters": {
587 | "apiVersion": {
588 | "value": "[variables('apiVersion')]"
589 | },
590 | "subnetId": {
591 | "value": "[variables('subnetRef')]"
592 | },
593 | "vmName": {
594 | "value": "[parameters('sqlServerVMName')]"
595 | },
596 | "vmSize": {
597 | "value": "[parameters('sqlServerVMSize')]"
598 | },
599 | "storageAccountName": {
600 | "value": "[variables('storageAccountNameHN')]"
601 | },
602 | "imageReference": {
603 | "value": {
604 | "publisher": "MicrosoftSQLServer",
605 | "offer": "SQL2016-WS2012R2",
606 | "sku": "Standard",
607 | "version": "latest"
608 | }
609 | },
610 | "adminUsername": {
611 | "value": "[parameters('adminUsername')]"
612 | },
613 | "adminPassword": {
614 | "value": "[parameters('adminPassword')]"
615 | },
616 | "availabilitySetName": {
617 | "value": "[variables('availabilitySetNameHN')]"
618 | },
619 | "dataDiskSizeInGB": {
620 | "value": 200
621 | },
622 | "dscExtensionName": {
623 | "value": "configSQLServer"
624 | },
625 | "dscSettings": {
626 | "value": {
627 | "configuration": {
628 | "url": "[concat(variables('sharedResxBaseUrl'),'/ConfigSQLServer.ps1.zip')]",
629 | "script": "ConfigSQLServer.ps1",
630 | "function": "ConfigSQLServer"
631 | },
632 | "configurationArguments": {
633 | }
634 | }
635 | },
636 | "dscProtectedSettings": {
637 | "value": {
638 | "configurationArguments": {
639 | "LoginCredential": {
640 | "UserName": "[parameters('sqlLoginName')]",
641 | "Password": "[parameters('sqlLoginPassword')]"
642 | }
643 | }
644 | }
645 | }
646 | }
647 | }
648 | },
649 | {
650 | "apiVersion": "2015-01-01",
651 | "type": "Microsoft.Resources/deployments",
652 | "name": "[concat(variables('headNodes')[copyIndex(1)],'-installHpcHNPrereq')]",
653 | "dependsOn": [
654 | "[concat('Microsoft.Resources/deployments/create', variables('headNodes')[copyIndex(1)])]"
655 | ],
656 | "copy": {
657 | "name": "HNPreReqInstallCopy",
658 | "count": "[sub(length(variables('headNodes')), 1)]"
659 | },
660 | "properties": {
661 | "mode": "Incremental",
662 | "templateLink": {
663 | "uri": "[concat(variables('sharedResxBaseUrl'),'/dsc-extension.json')]",
664 | "contentVersion": "1.0.0.0"
665 | },
666 | "parameters": {
667 | "apiVersion": {
668 | "value": "[variables('apiVersion')]"
669 | },
670 | "vmName": {
671 | "value": "[variables('headNodes')[copyIndex(1)]]"
672 | },
673 | "dscExtensionName": {
674 | "value": "setupHpcHeadNode"
675 | },
676 | "dscSettings": {
677 | "value": {
678 | "configuration": {
679 | "url": "[concat(variables('sharedResxBaseUrl'),'/InstallHpcNode.ps1.zip')]",
680 | "script": "InstallHpcNode.ps1",
681 | "function": "InstallHpcNode"
682 | },
683 | "configurationArguments": {
684 | "NodeType": "HeadNodePreReq",
685 | "HeadNodeList": "[parameters('headNodeList')]",
686 | "SSLThumbprint": "[parameters('certThumbprint')]",
687 | "PostConfigScript": ""
688 | }
689 | }
690 | }
691 | }
692 | }
693 | },
694 | {
695 | "type": "Microsoft.Compute/virtualMachines/extensions",
696 | "name": "[concat(variables('headNodes')[0],'/setupHpcHeadNode')]",
697 | "apiVersion": "[variables('apiVersion')]",
698 | "location": "[resourceGroup().location]",
699 | "dependsOn": [
700 | "HNPreReqInstallCopy",
701 | "[concat('Microsoft.Resources/deployments/create', variables('headNodes')[0])]",
702 | "[concat('Microsoft.Resources/deployments/createDBServer', parameters('sqlServerVMName'))]"
703 | ],
704 | "properties": {
705 | "publisher": "Microsoft.Powershell",
706 | "type": "DSC",
707 | "typeHandlerVersion": "2.20",
708 | "autoUpgradeMinorVersion": true,
709 | "settings": {
710 | "configuration": {
711 | "url": "[concat(variables('sharedResxBaseUrl'),'/InstallHpcHeadNode.ps1.zip')]",
712 | "script": "InstallHpcHeadNode.ps1",
713 | "function": "InstallHpcHeadNode"
714 | },
715 | "configurationArguments": {
716 | "HeadNodeList": "[parameters('headNodeList')]",
717 | "SSLThumbprint": "[parameters('certThumbprint')]",
718 | "ClusterName": "[parameters('clusterName')]",
719 | "SQLServerInstance": "[parameters('sqlServerVMName')]",
720 | "LinuxCommOverHttp": true,
721 | "CNSize": "[parameters('computeNodeVMSize')]",
722 | "SubscriptionId": "[subscription().subscriptionId]",
723 | "VNet": "[variables('virtualNetworkName')]",
724 | "Subnet": "[variables('subnet1Name')]",
725 | "Location": "[resourceGroup().location]",
726 | "ResourceGroup": "[resourceGroup().name]"
727 | }
728 | },
729 | "protectedSettings": {
730 | "configurationArguments": {
731 | "SetupUserCredential": {
732 | "UserName": "[parameters('adminUsername')]",
733 | "Password": "[parameters('adminPassword')]"
734 | },
735 | "AzureStorageConnString": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountNameHN'), ';AccountKey=', listKeys(variables('storageAccountIdHN'),variables('apiVersion')).key1)]",
736 | "SqlLoginCredential": {
737 | "UserName": "[parameters('sqlLoginName')]",
738 | "Password": "[parameters('sqlLoginPassword')]"
739 | }
740 | }
741 | }
742 | }
743 | },
744 | {
745 | "type": "Microsoft.Compute/availabilitySets",
746 | "name": "[concat(variables('cnAvailabilitySetNamePrefix'), padLeft(string(copyIndex()), 2, '0'))]",
747 | "apiVersion": "[variables('apiVersion')]",
748 | "location": "[resourceGroup().location]",
749 | "copy": {
750 | "name": "cnAvailabilitySetCopy",
751 | "count": "[variables('cnAvailabilitySetNumber')]"
752 | }
753 | },
754 | {
755 | "type": "Microsoft.Storage/storageAccounts",
756 | "name": "[concat(variables('cnStorageAccountNamePrefix'), padLeft(string(copyIndex()), 2, '0'))]",
757 | "apiVersion": "[variables('apiVersion')]",
758 | "location": "[resourceGroup().location]",
759 | "copy": {
760 | "name": "cnStorageAccountCopy",
761 | "count": "[variables('cnStorageAccountNumber')]"
762 | },
763 | "properties": {
764 | "accountType": "[variables('storageAccountType')]"
765 | }
766 | },
767 | {
768 | "apiVersion": "2015-01-01",
769 | "type": "Microsoft.Resources/deployments",
770 | "name": "[concat('create', parameters('computeNodeNamePrefix'), padLeft(string(copyIndex()), 3, '0'))]",
771 | "dependsOn": [
772 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
773 | "[concat('Microsoft.Compute/availabilitySets/', variables('cnAvailabilitySetNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrVMPerAvailabilitySet'))), 2, '0'))]",
774 | "[concat('Microsoft.Storage/storageAccounts/', variables('cnStorageAccountNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrCNPerStorageAccount'))), 2, '0'))]"
775 | ],
776 | "copy": {
777 | "name": "CN",
778 | "count": "[parameters('computeNodeNumber')]"
779 | },
780 | "properties": {
781 | "mode": "Incremental",
782 | "templateLink": {
783 | "uri": "[concat(variables('sharedResxBaseUrl'),'/linux-node.json')]",
784 | "contentVersion": "1.0.0.0"
785 | },
786 | "parameters": {
787 | "apiVersion": {
788 | "value": "[variables('apiVersion')]"
789 | },
790 | "subnetId": {
791 | "value": "[variables('subnetRef')]"
792 | },
793 | "vmName": {
794 | "value": "[concat(parameters('computeNodeNamePrefix'), padLeft(string(copyIndex()), 3, '0'))]"
795 | },
796 | "vmSize": {
797 | "value": "[parameters('computeNodeVMSize')]"
798 | },
799 | "storageAccountName": {
800 | "value": "[concat(variables('cnStorageAccountNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrCNPerStorageAccount'))), 2, '0'))]"
801 | },
802 | "imageReference": {
803 | "value": "[variables('selectedLinuxImageRef')]"
804 | },
805 | "adminUsername": {
806 | "value": "[parameters('adminUsername')]"
807 | },
808 | "adminPassword": {
809 | "value": "[parameters('adminPassword')]"
810 | },
811 | "availabilitySetName": {
812 | "value": "[concat(variables('cnAvailabilitySetNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrVMPerAvailabilitySet'))), 2, '0'))]"
813 | },
814 | "secrets": {
815 | "value": "[variables('lnxCertSecrets')]"
816 | },
817 | "headNodeList": {
818 | "value": "[parameters('headNodeList')]"
819 | }
820 | }
821 | }
822 | }
823 | ],
824 | "outputs": {
825 | "clusterDNSName": {
826 | "type": "string",
827 | "value": "[reference('setupClusterPublicIP').outputs.fqdn.value]"
828 | }
829 | }
830 | }
--------------------------------------------------------------------------------
/newcluster-templates/three-hns-wincn-ad.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "clusterName": {
6 | "type": "string",
7 | "minLength": 3,
8 | "maxLength": 12,
9 | "metadata": {
10 | "description": "The name of the HPC cluster, also used as the host name prefix of the domain controller. It must contain between 3 and 12 characters with lowercase letters and numbers, and must start with a letter."
11 | }
12 | },
13 | "privateDomainName": {
14 | "type": "string",
15 | "defaultValue": "hpc.local",
16 | "metadata": {
17 | "description": "The fully qualified domain name (FQDN) for the private domain forest which will be created by this template, for example 'hpc.local'."
18 | }
19 | },
20 | "sqlServerVMName": {
21 | "type": "string",
22 | "metadata": {
23 | "description": "The name of the SQL Server VM."
24 | }
25 | },
26 | "sqlServerVMSize": {
27 | "type": "string",
28 | "defaultValue": "Standard_A4",
29 | "metadata": {
30 | "description": "The VM size for the SQL Server VM, all available VM sizes in Azure can be found at https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes"
31 | }
32 | },
33 | "headNodeList": {
34 | "type": "string",
35 | "defaultValue": "HPCHN01,HPCHN02,HPCHN03",
36 | "metadata": {
37 | "description": "The list of head nodes joined with ','."
38 | }
39 | },
40 | "headNodeVMSize": {
41 | "type": "string",
42 | "defaultValue": "Standard_A4",
43 | "metadata": {
44 | "description": "The VM size for the head node, all available VM sizes in Azure can be found at https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes."
45 | }
46 | },
47 | "computeNodeNamePrefix": {
48 | "type": "string",
49 | "defaultValue": "IaaSCN",
50 | "metadata": {
51 | "description": "The name prefix of the compute nodes. It must be no more than 12 characters, begin with a letter, and contain only letters, numbers and hyphens. For example, if 'IaaSCN' is specified, the compute node names will be 'IaaSCN000', 'IaaSCN001', ..."
52 | }
53 | },
54 | "computeNodeNumber": {
55 | "type": "int",
56 | "defaultValue": 10,
57 | "metadata": {
58 | "description": "The number of the compute nodes."
59 | }
60 | },
61 | "computeNodeVMSize": {
62 | "type": "string",
63 | "defaultValue": "Standard_A3",
64 | "metadata": {
65 | "description": "The VM size for the compute nodes, all available VM sizes in Azure can be found at https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes."
66 | }
67 | },
68 | "adminUsername": {
69 | "type": "string",
70 | "defaultValue": "hpcadmin",
71 | "metadata": {
72 | "description": "Administrator user name for the virtual machines and the Active Directory domain."
73 | }
74 | },
75 | "adminPassword": {
76 | "type": "securestring",
77 | "metadata": {
78 | "description": "Administrator password for the virtual machines and the Active Directory domain"
79 | }
80 | },
81 | "hpcPackVersion": {
82 | "type": "string",
83 | "defaultValue": "latest",
84 | "metadata": {
85 | "description": "The version for HPC Pack 2016. It is strongly recommended to specify as 'latest'. The deployment will fail if an incorrect version is specified."
86 | }
87 | },
88 | "vaultName": {
89 | "type": "string",
90 | "metadata": {
91 | "description": "Name of the KeyVault in which the certificate is stored."
92 | }
93 | },
94 | "vaultResourceGroup": {
95 | "type": "string",
96 | "metadata": {
97 | "description": "Resource Group of the KeyVault in which the certificate is stored."
98 | }
99 | },
100 | "certificateUrl": {
101 | "type": "string",
102 | "metadata": {
103 | "description": "Url of the certificate with version in KeyVault e.g. https://testault.vault.azure.net/secrets/testcert/b621es1db241e56a72d037479xab1r7."
104 | }
105 | },
106 | "certThumbprint": {
107 | "type": "string",
108 | "metadata": {
109 | "description": "Thumbprint of the certificate."
110 | }
111 | }
112 | },
113 | "variables": {
114 | "apiVersion": "2015-06-15",
115 | "storageAccountType": "Standard_LRS",
116 | "storageAccountNameHN": "[concat('hpc', uniqueString(resourceGroup().id, parameters('clusterName')))]",
117 | "storageAccountIdHN": "[resourceId('Microsoft.Storage/storageAccounts',variables('storageAccountNameHN'))]",
118 | "cnStorageAccountNamePrefix": "[concat('hpc', uniqueString(resourceGroup().id, parameters('computeNodeNamePrefix')))]",
119 | "nbrCNPerStorageAccount": 30,
120 | "cnStorageAccountNumber": "[add(div(sub(parameters('computeNodeNumber'), 1), variables('nbrCNPerStorageAccount')), 1)]",
121 | "lbName": "[concat(parameters('clusterName'),'-lb')]",
122 | "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbName'))]",
123 | "lbFrontEndIPConfigID": "[concat(variables('lbID'),'/frontendIPConfigurations/LoadBalancerFrontEnd')]",
124 | "lbPoolID": "[concat(variables('lbID'),'/backendAddressPools/BackendPool1')]",
125 | "lbProbeID": "[concat(variables('lbID'),'/probes/tcpProbe')]",
126 | "addressPrefix": "10.0.0.0/16",
127 | "subnet1Name": "Subnet-1",
128 | "subnet1Prefix": "10.0.0.0/22",
129 | "headNodes": "[split(parameters('headNodeList'), ',')]",
130 | "virtualNetworkName": "[concat(parameters('clusterName'),'vnet')]",
131 | "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
132 | "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]",
133 | "publicIPName": "[concat(parameters('clusterName'),'publicip')]",
134 | "publicIPDNSNameLabel": "[concat(toLower(parameters('clusterName')), uniqueString(resourceGroup().id))]",
135 | "publicIPAddressType": "Dynamic",
136 | "availabilitySetNameHN": "[concat(parameters('clusterName'), '-avset')]",
137 | "cnAvailabilitySetNamePrefix": "[concat(parameters('computeNodeNamePrefix'), 'avset')]",
138 | "nbrVMPerAvailabilitySet": 80,
139 | "cnAvailabilitySetNumber": "[add(div(parameters('computeNodeNumber'), variables('nbrVMPerAvailabilitySet')), 1)]",
140 | "uniqueSuffix": "[uniqueString(variables('subnetRef'))]",
141 | "uniqueNicSuffix": "[concat('-nic-', variables('uniqueSuffix'))]",
142 | "dcVMName": "[concat(parameters('clusterName'),'dc')]",
143 | "nicNameDC": "[concat(variables('dcVMName'), variables('uniqueNicSuffix'))]",
144 | "vmSizeSuffix": "[uniqueString(resourceGroup().id)]",
145 | "suffixA8Size": "[concat('Standard_A8', variables('vmSizeSuffix'))]",
146 | "suffixA9Size": "[concat('Standard_A9', variables('vmSizeSuffix'))]",
147 | "suffixHNSize": "[concat(parameters('headNodeVMSize'), variables('vmSizeSuffix'))]",
148 | "suffixCNSize": "[concat(parameters('computeNodeVMSize'), variables('vmSizeSuffix'))]",
149 | "cnRDMASuffix": "[replace(replace(replace(variables('suffixCNSize'), variables('suffixA8Size'),'-rdma'), variables('suffixA9Size'),'-rdma'),variables('suffixCNSize'), '')]",
150 | "hnRDMASuffix": "[replace(replace(replace(variables('suffixHNSize'), variables('suffixA8Size'),'-rdma'), variables('suffixA9Size'),'-rdma'),variables('suffixHNSize'), '')]",
151 | "certSecrets": [
152 | {
153 | "sourceVault": {
154 | "id": "[resourceId(parameters('vaultResourceGroup'), 'Microsoft.KeyVault/vaults', parameters('vaultName'))]"
155 | },
156 | "vaultCertificates": [
157 | {
158 | "certificateUrl": "[parameters('certificateUrl')]",
159 | "certificateStore": "My"
160 | }
161 | ]
162 | }
163 | ],
164 | "sharedResxBaseUrl": "https://raw.githubusercontent.com/MsHpcPack/HPCPack2016/master/newcluster-templates/shared-resources"
165 | },
166 | "resources": [
167 | {
168 | "type": "Microsoft.Storage/storageAccounts",
169 | "name": "[variables('storageAccountNameHN')]",
170 | "apiVersion": "[variables('apiVersion')]",
171 | "location": "[resourceGroup().location]",
172 | "properties": {
173 | "accountType": "[variables('storageAccountType')]"
174 | }
175 | },
176 | {
177 | "apiVersion": "[variables('apiVersion')]",
178 | "type": "Microsoft.Network/virtualNetworks",
179 | "name": "[variables('virtualNetworkName')]",
180 | "location": "[resourceGroup().location]",
181 | "properties": {
182 | "addressSpace": {
183 | "addressPrefixes": [
184 | "[variables('addressPrefix')]"
185 | ]
186 | },
187 | "subnets": [
188 | {
189 | "name": "[variables('subnet1Name')]",
190 | "properties": {
191 | "addressPrefix": "[variables('subnet1Prefix')]"
192 | }
193 | }
194 | ]
195 | }
196 | },
197 | {
198 | "name": "setupClusterPublicIP",
199 | "type": "Microsoft.Resources/deployments",
200 | "apiVersion": "2015-01-01",
201 | "properties": {
202 | "mode": "Incremental",
203 | "templateLink": {
204 | "uri": "[concat(variables('sharedResxBaseUrl'), '/publicip-new.json')]",
205 | "contentVersion": "1.0.0.0"
206 | },
207 | "parameters": {
208 | "apiVersion": {
209 | "value": "[variables('apiVersion')]"
210 | },
211 | "publicIPAddressName": {
212 | "value": "[variables('publicIPName')]"
213 | },
214 | "publicIPAddressType": {
215 | "value": "[variables('publicIPAddressType')]"
216 | },
217 | "domainNameLabel": {
218 | "value": "[variables('publicIPDNSNameLabel')]"
219 | },
220 | "publicIPRGName": {
221 | "value": "[resourceGroup().name]"
222 | }
223 | }
224 | }
225 | },
226 | {
227 | "apiVersion": "[variables('apiVersion')]",
228 | "name": "[variables('lbName')]",
229 | "type": "Microsoft.Network/loadBalancers",
230 | "location": "[resourceGroup().location]",
231 | "dependsOn": [
232 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
233 | "Microsoft.Resources/deployments/setupClusterPublicIP"
234 | ],
235 | "properties": {
236 | "frontendIPConfigurations": [
237 | {
238 | "name": "LoadBalancerFrontEnd",
239 | "properties": {
240 | "publicIPAddress": {
241 | "id": "[reference('setupClusterPublicIP').outputs.resourceId.value]"
242 | }
243 | }
244 | }
245 | ],
246 | "backendAddressPools": [
247 | {
248 | "name": "BackendPool1"
249 | }
250 | ],
251 | "inboundNatRules": [
252 | {
253 | "name": "[concat('RDP-', variables('headNodes')[0])]",
254 | "properties": {
255 | "frontendIPConfiguration": {
256 | "id": "[variables('lbFrontEndIPConfigID')]"
257 | },
258 | "protocol": "Tcp",
259 | "frontendPort": 50001,
260 | "backendPort": 3389,
261 | "enableFloatingIP": false
262 | }
263 | },
264 | {
265 | "name": "[concat('RDP-', variables('headNodes')[1])]",
266 | "properties": {
267 | "frontendIPConfiguration": {
268 | "id": "[variables('lbFrontEndIPConfigID')]"
269 | },
270 | "protocol": "Tcp",
271 | "frontendPort": 50002,
272 | "backendPort": 3389,
273 | "enableFloatingIP": false
274 | }
275 | },
276 | {
277 | "name": "[concat('RDP-', variables('headNodes')[2])]",
278 | "properties": {
279 | "frontendIPConfiguration": {
280 | "id": "[variables('lbFrontEndIPConfigID')]"
281 | },
282 | "protocol": "Tcp",
283 | "frontendPort": 50003,
284 | "backendPort": 3389,
285 | "enableFloatingIP": false
286 | }
287 | }
288 | ],
289 | "loadBalancingRules": [
290 | {
291 | "name": "LBRule",
292 | "properties": {
293 | "frontendIPConfiguration": {
294 | "id": "[variables('lbFrontEndIPConfigID')]"
295 | },
296 | "backendAddressPool": {
297 | "id": "[variables('lbPoolID')]"
298 | },
299 | "protocol": "Tcp",
300 | "frontendPort": 443,
301 | "backendPort": 443,
302 | "enableFloatingIP": false,
303 | "idleTimeoutInMinutes": 5,
304 | "probe": {
305 | "id": "[variables('lbProbeID')]"
306 | }
307 | }
308 | }
309 | ],
310 | "probes": [
311 | {
312 | "name": "tcpProbe",
313 | "properties": {
314 | "protocol": "Tcp",
315 | "port": 5800,
316 | "intervalInSeconds": 5,
317 | "numberOfProbes": 2
318 | }
319 | }
320 | ]
321 | }
322 | },
323 | {
324 | "apiVersion": "[variables('apiVersion')]",
325 | "type": "Microsoft.Network/networkInterfaces",
326 | "name": "[variables('nicNameDC')]",
327 | "location": "[resourceGroup().location]",
328 | "dependsOn": [
329 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
330 | ],
331 | "properties": {
332 | "ipConfigurations": [
333 | {
334 | "name": "IPConfig",
335 | "properties": {
336 | "privateIPAllocationMethod": "Static",
337 | "privateIPAddress": "10.0.0.4",
338 | "subnet": {
339 | "id": "[variables('subnetRef')]"
340 | }
341 | }
342 | }
343 | ]
344 | }
345 | },
346 | {
347 | "apiVersion": "2015-01-01",
348 | "type": "Microsoft.Resources/deployments",
349 | "name": "[concat('createDC', variables('dcVMName'))]",
350 | "dependsOn": [
351 | "[concat('Microsoft.Network/networkInterfaces/', variables('nicNameDC'))]",
352 | "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountNameHN'))]"
353 | ],
354 | "properties": {
355 | "mode": "Incremental",
356 | "templateLink": {
357 | "uri": "[concat(variables('sharedResxBaseUrl'), '/hpc-domain-controller.json')]",
358 | "contentVersion": "1.0.0.0"
359 | },
360 | "parameters": {
361 | "apiVersion": {
362 | "value": "[variables('apiVersion')]"
363 | },
364 | "vmName": {
365 | "value": "[variables('dcVMName')]"
366 | },
367 | "vmSize": {
368 | "value": "Standard_A2"
369 | },
370 | "storageAccountName": {
371 | "value": "[variables('storageAccountNameHN')]"
372 | },
373 | "nicName": {
374 | "value": "[variables('nicNameDC')]"
375 | },
376 | "adminUsername": {
377 | "value": "[parameters('adminUsername')]"
378 | },
379 | "adminPassword": {
380 | "value": "[parameters('adminPassword')]"
381 | },
382 | "dataDiskSizeInGB": {
383 | "value": 200
384 | },
385 | "imageReference": {
386 | "value": {
387 | "publisher": "MicrosoftWindowsServer",
388 | "offer": "WindowsServer",
389 | "sku": "2012-R2-Datacenter",
390 | "version": "4.0.20161012"
391 | }
392 | },
393 | "privateDomainName": {
394 | "value": "[parameters('privateDomainName')]"
395 | },
396 | "subnetId": {
397 | "value": "[variables('subnetRef')]"
398 | },
399 | "scriptBaseUri": {
400 | "value": "[variables('sharedResxBaseUrl')]"
401 | }
402 | }
403 | }
404 | },
405 | {
406 | "apiVersion": "[variables('apiVersion')]",
407 | "type": "Microsoft.Network/networkInterfaces",
408 | "name": "[concat(variables('headNodes')[copyIndex()], variables('uniqueNicSuffix'))]",
409 | "location": "[resourceGroup().location]",
410 | "dependsOn": [
411 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
412 | "[concat('Microsoft.Network/networkInterfaces/', variables('nicNameDC'))]",
413 | "[concat('Microsoft.Network/loadBalancers/', variables('lbName'))]"
414 | ],
415 | "copy": {
416 | "name": "HNNics",
417 | "count": "[length(variables('headNodes'))]"
418 | },
419 | "properties": {
420 | "ipConfigurations": [
421 | {
422 | "name": "IPConfig",
423 | "properties": {
424 | "privateIPAllocationMethod": "Dynamic",
425 | "subnet": {
426 | "id": "[variables('subnetRef')]"
427 | },
428 | "loadBalancerBackendAddressPools": [
429 | {
430 | "id": "[variables('lbPoolID')]"
431 | }
432 | ],
433 | "loadBalancerInboundNatRules": [
434 | {
435 | "id": "[concat(variables('lbID'),'/inboundNatRules/RDP-', variables('headNodes')[copyIndex()])]"
436 | }
437 | ]
438 | }
439 | }
440 | ]
441 | }
442 | },
443 | {
444 | "type": "Microsoft.Compute/availabilitySets",
445 | "name": "[variables('availabilitySetNameHN')]",
446 | "apiVersion": "[variables('apiVersion')]",
447 | "location": "[resourceGroup().location]"
448 | },
449 | {
450 | "apiVersion": "2015-01-01",
451 | "type": "Microsoft.Resources/deployments",
452 | "name": "[concat('create', variables('headNodes')[copyIndex()])]",
453 | "dependsOn": [
454 | "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetNameHN'))]",
455 | "[concat('Microsoft.Network/networkInterfaces/', variables('headNodes')[copyIndex()], variables('uniqueNicSuffix'))]",
456 | "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountNameHN'))]"
457 | ],
458 | "copy": {
459 | "name": "createHeadNodeCopy",
460 | "count": "[length(variables('headNodes'))]"
461 | },
462 | "properties": {
463 | "mode": "Incremental",
464 | "templateLink": {
465 | "uri": "[concat(variables('sharedResxBaseUrl'),'/windowsvm', variables('hnRDMASuffix'), '.json')]",
466 | "contentVersion": "1.0.0.0"
467 | },
468 | "parameters": {
469 | "apiVersion": {
470 | "value": "[variables('apiVersion')]"
471 | },
472 | "subnetId": {
473 | "value": "[variables('subnetRef')]"
474 | },
475 | "nicName": {
476 | "value": "[concat(variables('headNodes')[copyIndex()], variables('uniqueNicSuffix'))]"
477 | },
478 | "vmName": {
479 | "value": "[variables('headNodes')[copyIndex()]]"
480 | },
481 | "vmSize": {
482 | "value": "[parameters('headNodeVMSize')]"
483 | },
484 | "storageAccountName": {
485 | "value": "[variables('storageAccountNameHN')]"
486 | },
487 | "imageReference": {
488 | "value": {
489 | "publisher": "MicrosoftWindowsServerHPCPack",
490 | "offer": "WindowsServerHPCPack",
491 | "sku": "2016",
492 | "version": "[parameters('hpcPackVersion')]"
493 | }
494 | },
495 | "adminUsername": {
496 | "value": "[parameters('adminUsername')]"
497 | },
498 | "adminPassword": {
499 | "value": "[parameters('adminPassword')]"
500 | },
501 | "availabilitySetName": {
502 | "value": "[variables('availabilitySetNameHN')]"
503 | },
504 | "secrets": {
505 | "value": "[variables('certSecrets')]"
506 | }
507 | }
508 | }
509 | },
510 | {
511 | "apiVersion": "2015-01-01",
512 | "type": "Microsoft.Resources/deployments",
513 | "name": "[concat('createDBServer', parameters('sqlServerVMName'))]",
514 | "dependsOn": [
515 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
516 | "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetNameHN'))]",
517 | "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountNameHN'))]"
518 | ],
519 | "properties": {
520 | "mode": "Incremental",
521 | "templateLink": {
522 | "uri": "[concat(variables('sharedResxBaseUrl'), '/windowsvm-dsc.json')]",
523 | "contentVersion": "1.0.0.0"
524 | },
525 | "parameters": {
526 | "apiVersion": {
527 | "value": "[variables('apiVersion')]"
528 | },
529 | "subnetId": {
530 | "value": "[variables('subnetRef')]"
531 | },
532 | "vmName": {
533 | "value": "[parameters('sqlServerVMName')]"
534 | },
535 | "vmSize": {
536 | "value": "[parameters('sqlServerVMSize')]"
537 | },
538 | "storageAccountName": {
539 | "value": "[variables('storageAccountNameHN')]"
540 | },
541 | "imageReference": {
542 | "value": {
543 | "publisher": "MicrosoftSQLServer",
544 | "offer": "SQL2016-WS2012R2",
545 | "sku": "Standard",
546 | "version": "latest"
547 | }
548 | },
549 | "adminUsername": {
550 | "value": "[parameters('adminUsername')]"
551 | },
552 | "adminPassword": {
553 | "value": "[parameters('adminPassword')]"
554 | },
555 | "availabilitySetName": {
556 | "value": "[variables('availabilitySetNameHN')]"
557 | },
558 | "dataDiskSizeInGB": {
559 | "value": 200
560 | },
561 | "dscExtensionName": {
562 | "value": "configSQLServer"
563 | },
564 | "dscSettings": {
565 | "value": {
566 | "configuration": {
567 | "url": "[concat(variables('sharedResxBaseUrl'),'/ConfigSQLServer.ps1.zip')]",
568 | "script": "ConfigSQLServer.ps1",
569 | "function": "ConfigSQLServer"
570 | }
571 | }
572 | }
573 | }
574 | }
575 | },
576 | {
577 | "apiVersion": "2015-01-01",
578 | "type": "Microsoft.Resources/deployments",
579 | "name": "updateVNetDNS",
580 | "dependsOn": [
581 | "[concat('Microsoft.Resources/deployments/createDC', variables('dcVMName'))]"
582 | ],
583 | "properties": {
584 | "mode": "Incremental",
585 | "templateLink": {
586 | "uri": "[concat(variables('sharedResxBaseUrl'),'/vnet-with-dns-server.json')]",
587 | "contentVersion": "1.0.0.0"
588 | },
589 | "parameters": {
590 | "apiVersion": {
591 | "value": "[variables('apiVersion')]"
592 | },
593 | "virtualNetworkName": {
594 | "value": "[variables('virtualNetworkName')]"
595 | },
596 | "virtualNetworkAddressRange": {
597 | "value": "[variables('addressPrefix')]"
598 | },
599 | "subnetName": {
600 | "value": "[variables('subnet1Name')]"
601 | },
602 | "subnetRange": {
603 | "value": "[variables('subnet1Prefix')]"
604 | },
605 | "DNSServerAddress": {
606 | "value": [
607 | "10.0.0.4",
608 | "8.8.8.8"
609 | ]
610 | }
611 | }
612 | }
613 | },
614 | {
615 | "apiVersion": "2015-01-01",
616 | "type": "Microsoft.Resources/deployments",
617 | "name": "[concat('joinDomain', variables('headNodes')[copyIndex()])]",
618 | "dependsOn": [
619 | "[concat('Microsoft.Resources/deployments/create', variables('headNodes')[copyIndex()])]",
620 | "Microsoft.Resources/deployments/updateVNetDNS"
621 | ],
622 | "copy": {
623 | "name": "HNJoinDomainCopy",
624 | "count": "[length(variables('headNodes'))]"
625 | },
626 | "properties": {
627 | "mode": "Incremental",
628 | "templateLink": {
629 | "uri": "[concat(variables('sharedResxBaseUrl'),'/dsc-extension.json')]",
630 | "contentVersion": "1.0.0.0"
631 | },
632 | "parameters": {
633 | "apiVersion": {
634 | "value": "[variables('apiVersion')]"
635 | },
636 | "vmName": {
637 | "value": "[variables('headNodes')[copyIndex()]]"
638 | },
639 | "dscExtensionName": {
640 | "value": "setupHpcHeadNode"
641 | },
642 | "dscSettings": {
643 | "value": {
644 | "configuration": {
645 | "url": "[concat(variables('sharedResxBaseUrl'),'/JoinADDomain.ps1.zip')]",
646 | "script": "JoinADDomain.ps1",
647 | "function": "JoinADDomain"
648 | },
649 | "configurationArguments": {
650 | "DomainName": "[parameters('privateDomainName')]",
651 | "DNSServer": "10.0.0.4,8.8.8.8"
652 | }
653 | }
654 | },
655 | "dscProtectedSettings": {
656 | "value": {
657 | "configurationArguments": {
658 | "AdminCreds": {
659 | "UserName": "[parameters('adminUsername')]",
660 | "Password": "[parameters('adminPassword')]"
661 | }
662 | }
663 | }
664 | }
665 | }
666 | }
667 | },
668 | {
669 | "apiVersion": "2015-01-01",
670 | "type": "Microsoft.Resources/deployments",
671 | "name": "[concat('joinDomain', parameters('sqlServerVMName'))]",
672 | "dependsOn": [
673 | "[concat('Microsoft.Resources/deployments/createDBServer', parameters('sqlServerVMName'))]",
674 | "Microsoft.Resources/deployments/updateVNetDNS"
675 | ],
676 | "properties": {
677 | "mode": "Incremental",
678 | "templateLink": {
679 | "uri": "[concat(variables('sharedResxBaseUrl'),'/dsc-extension.json')]",
680 | "contentVersion": "1.0.0.0"
681 | },
682 | "parameters": {
683 | "apiVersion": {
684 | "value": "[variables('apiVersion')]"
685 | },
686 | "vmName": {
687 | "value": "[parameters('sqlServerVMName')]"
688 | },
689 | "dscExtensionName": {
690 | "value": "configSQLServer"
691 | },
692 | "dscSettings": {
693 | "value": {
694 | "configuration": {
695 | "url": "[concat(variables('sharedResxBaseUrl'),'/JoinADDomain.ps1.zip')]",
696 | "script": "JoinADDomain.ps1",
697 | "function": "JoinADDomain"
698 | },
699 | "configurationArguments": {
700 | "DomainName": "[parameters('privateDomainName')]",
701 | "DNSServer": "10.0.0.4,8.8.8.8"
702 | }
703 | }
704 | },
705 | "dscProtectedSettings": {
706 | "value": {
707 | "configurationArguments": {
708 | "AdminCreds": {
709 | "UserName": "[parameters('adminUsername')]",
710 | "Password": "[parameters('adminPassword')]"
711 | }
712 | }
713 | }
714 | }
715 | }
716 | }
717 | },
718 | {
719 | "apiVersion": "2015-01-01",
720 | "type": "Microsoft.Resources/deployments",
721 | "name": "configDBPermissions",
722 | "dependsOn": [
723 | "HNJoinDomainCopy",
724 | "[concat('Microsoft.Resources/deployments/joinDomain', parameters('sqlServerVMName'))]"
725 | ],
726 | "properties": {
727 | "mode": "Incremental",
728 | "templateLink": {
729 | "uri": "[concat(variables('sharedResxBaseUrl'),'/dsc-extension.json')]",
730 | "contentVersion": "1.0.0.0"
731 | },
732 | "parameters": {
733 | "apiVersion": {
734 | "value": "[variables('apiVersion')]"
735 | },
736 | "vmName": {
737 | "value": "[parameters('sqlServerVMName')]"
738 | },
739 | "dscExtensionName": {
740 | "value": "configSQLServer"
741 | },
742 | "dscSettings": {
743 | "value": {
744 | "configuration": {
745 | "url": "[concat(variables('sharedResxBaseUrl'),'/ConfigDBPermissions.ps1.zip')]",
746 | "script": "ConfigDBPermissions.ps1",
747 | "function": "ConfigDBPermissions"
748 | },
749 | "configurationArguments": {
750 | "DomainName": "[parameters('privateDomainName')]",
751 | "HeadNodeList": "[parameters('headNodeList')]"
752 | }
753 | }
754 | },
755 | "dscProtectedSettings": {
756 | "value": {
757 | "configurationArguments": {
758 | "AdminCreds": {
759 | "UserName": "[parameters('adminUsername')]",
760 | "Password": "[parameters('adminPassword')]"
761 | }
762 | }
763 | }
764 | }
765 | }
766 | }
767 | },
768 | {
769 | "apiVersion": "2015-01-01",
770 | "type": "Microsoft.Resources/deployments",
771 | "name": "[concat(variables('headNodes')[copyIndex(1)],'-installHpcHNPrereq')]",
772 | "dependsOn": [
773 | "[concat('Microsoft.Resources/deployments/joinDomain', variables('headNodes')[copyIndex(1)])]"
774 | ],
775 | "copy": {
776 | "name": "HNPreReqInstallCopy",
777 | "count": "[sub(length(variables('headNodes')), 1)]"
778 | },
779 | "properties": {
780 | "mode": "Incremental",
781 | "templateLink": {
782 | "uri": "[concat(variables('sharedResxBaseUrl'),'/dsc-extension.json')]",
783 | "contentVersion": "1.0.0.0"
784 | },
785 | "parameters": {
786 | "apiVersion": {
787 | "value": "[variables('apiVersion')]"
788 | },
789 | "vmName": {
790 | "value": "[variables('headNodes')[copyIndex(1)]]"
791 | },
792 | "dscExtensionName": {
793 | "value": "setupHpcHeadNode"
794 | },
795 | "dscSettings": {
796 | "value": {
797 | "configuration": {
798 | "url": "[concat(variables('sharedResxBaseUrl'),'/InstallHpcNode.ps1.zip')]",
799 | "script": "InstallHpcNode.ps1",
800 | "function": "InstallHpcNode"
801 | },
802 | "configurationArguments": {
803 | "NodeType": "HeadNodePreReq",
804 | "HeadNodeList": "[parameters('headNodeList')]",
805 | "SSLThumbprint": "[parameters('certThumbprint')]",
806 | "PostConfigScript": ""
807 | }
808 | }
809 | }
810 | }
811 | }
812 | },
813 |
814 | {
815 | "type": "Microsoft.Compute/virtualMachines/extensions",
816 | "name": "[concat(variables('headNodes')[0],'/setupHpcHeadNode')]",
817 | "apiVersion": "[variables('apiVersion')]",
818 | "location": "[resourceGroup().location]",
819 | "dependsOn": [
820 | "HNPreReqInstallCopy",
821 | "Microsoft.Resources/deployments/configDBPermissions"
822 | ],
823 | "properties": {
824 | "publisher": "Microsoft.Powershell",
825 | "type": "DSC",
826 | "typeHandlerVersion": "2.20",
827 | "autoUpgradeMinorVersion": true,
828 | "settings": {
829 | "configuration": {
830 | "url": "[concat(variables('sharedResxBaseUrl'),'/InstallHpcHeadNode.ps1.zip')]",
831 | "script": "InstallHpcHeadNode.ps1",
832 | "function": "InstallHpcHeadNode"
833 | },
834 | "configurationArguments": {
835 | "HeadNodeList": "[parameters('headNodeList')]",
836 | "SSLThumbprint": "[parameters('certThumbprint')]",
837 | "LinuxCommOverHttp": true,
838 | "ClusterName": "[parameters('clusterName')]",
839 | "SQLServerInstance": "[parameters('sqlServerVMName')]",
840 | "CNSize": "[parameters('computeNodeVMSize')]",
841 | "SubscriptionId": "[subscription().subscriptionId]",
842 | "VNet": "[variables('virtualNetworkName')]",
843 | "Subnet": "[variables('subnet1Name')]",
844 | "Location": "[resourceGroup().location]",
845 | "ResourceGroup": "[resourceGroup().name]"
846 | }
847 | },
848 | "protectedSettings": {
849 | "configurationArguments": {
850 | "SetupUserCredential": {
851 | "UserName": "[concat(parameters('privateDomainName'), '\\', parameters('adminUsername'))]",
852 | "Password": "[parameters('adminPassword')]"
853 | },
854 | "AzureStorageConnString": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountNameHN'), ';AccountKey=', listKeys(variables('storageAccountIdHN'),variables('apiVersion')).key1)]"
855 | }
856 | }
857 | }
858 | },
859 | {
860 | "type": "Microsoft.Compute/availabilitySets",
861 | "name": "[concat(variables('cnAvailabilitySetNamePrefix'), padLeft(string(copyIndex()), 2, '0'))]",
862 | "apiVersion": "[variables('apiVersion')]",
863 | "location": "[resourceGroup().location]",
864 | "copy": {
865 | "name": "cnAvailabilitySetCopy",
866 | "count": "[variables('cnAvailabilitySetNumber')]"
867 | },
868 | "dependsOn": [
869 | "Microsoft.Resources/deployments/updateVNetDNS"
870 | ]
871 | },
872 | {
873 | "type": "Microsoft.Storage/storageAccounts",
874 | "name": "[concat(variables('cnStorageAccountNamePrefix'), padLeft(string(copyIndex()), 2, '0'))]",
875 | "apiVersion": "[variables('apiVersion')]",
876 | "location": "[resourceGroup().location]",
877 | "copy": {
878 | "name": "cnStorageAccountCopy",
879 | "count": "[variables('cnStorageAccountNumber')]"
880 | },
881 | "dependsOn": [
882 | "Microsoft.Resources/deployments/updateVNetDNS"
883 | ],
884 | "properties": {
885 | "accountType": "[variables('storageAccountType')]"
886 | }
887 | },
888 | {
889 | "apiVersion": "2015-01-01",
890 | "type": "Microsoft.Resources/deployments",
891 | "name": "[concat('create', parameters('computeNodeNamePrefix'), padLeft(string(copyIndex()), 3, '0'))]",
892 | "dependsOn": [
893 | "Microsoft.Resources/deployments/updateVNetDNS",
894 | "[concat('Microsoft.Compute/availabilitySets/', variables('cnAvailabilitySetNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrVMPerAvailabilitySet'))), 2, '0'))]",
895 | "[concat('Microsoft.Storage/storageAccounts/', variables('cnStorageAccountNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrCNPerStorageAccount'))), 2, '0'))]"
896 | ],
897 | "copy": {
898 | "name": "CN",
899 | "count": "[parameters('computeNodeNumber')]"
900 | },
901 | "properties": {
902 | "mode": "Incremental",
903 | "templateLink": {
904 | "uri": "[concat(variables('sharedResxBaseUrl'),'/windowsvm-dsc', variables('cnRDMASuffix'), '.json')]",
905 | "contentVersion": "1.0.0.0"
906 | },
907 | "parameters": {
908 | "apiVersion": {
909 | "value": "[variables('apiVersion')]"
910 | },
911 | "subnetId": {
912 | "value": "[variables('subnetRef')]"
913 | },
914 | "vmName": {
915 | "value": "[concat(parameters('computeNodeNamePrefix'), padLeft(string(copyIndex()), 3, '0'))]"
916 | },
917 | "vmSize": {
918 | "value": "[parameters('computeNodeVMSize')]"
919 | },
920 | "storageAccountName": {
921 | "value": "[concat(variables('cnStorageAccountNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrCNPerStorageAccount'))), 2, '0'))]"
922 | },
923 | "imageReference": {
924 | "value": {
925 | "publisher": "MicrosoftWindowsServerHPCPack",
926 | "offer": "WindowsServerHPCPack",
927 | "sku": "2016CN",
928 | "version": "[parameters('hpcPackVersion')]"
929 | }
930 | },
931 | "adminUsername": {
932 | "value": "[parameters('adminUsername')]"
933 | },
934 | "adminPassword": {
935 | "value": "[parameters('adminPassword')]"
936 | },
937 | "availabilitySetName": {
938 | "value": "[concat(variables('cnAvailabilitySetNamePrefix'), padLeft(string(div(copyIndex(), variables('nbrVMPerAvailabilitySet'))), 2, '0'))]"
939 | },
940 | "secrets": {
941 | "value": "[variables('certSecrets')]"
942 | },
943 | "dscExtensionName": {
944 | "value": "ConfigHpcNode"
945 | },
946 | "dscSettings": {
947 | "value": {
948 | "wmfVersion": "4.0",
949 | "configuration": {
950 | "url": "[concat(variables('sharedResxBaseUrl'),'/ConfigHpcNode.ps1.zip')]",
951 | "script": "ConfigHpcNode.ps1",
952 | "function": "ConfigHpcNode"
953 | },
954 | "configurationArguments": {
955 | "DomainName": "[parameters('privateDomainName')]",
956 | "NodeType": "ComputeNode",
957 | "HeadNodeList": "[parameters('headNodeList')]",
958 | "SSLThumbprint": "[parameters('certThumbprint')]",
959 | "PostConfigScript": ""
960 | }
961 | }
962 | },
963 | "dscProtectedSettings": {
964 | "value": {
965 | "configurationArguments": {
966 | "AdminCreds": {
967 | "UserName": "[parameters('adminUsername')]",
968 | "Password": "[parameters('adminPassword')]"
969 | }
970 | }
971 | }
972 | }
973 | }
974 | }
975 | }
976 | ],
977 | "outputs": {
978 | "clusterDNSName": {
979 | "type": "string",
980 | "value": "[reference('setupClusterPublicIP').outputs.fqdn.value]"
981 | }
982 | }
983 | }
--------------------------------------------------------------------------------