2 "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 "contentVersion": "1.0.0.0",
7 "defaultValue": "16.04.0-LTS",
15 "description": "The OS"
24 "description": "Number of VMs to provision"
29 "defaultValue": "10.0.0.2",
31 "description": "Static Private IP will be assigned to the machine"
37 "description": "entrypoint script name for k8s master"
43 "description": "entrypoint script name for k8s node"
48 "defaultValue": "Standard_D14_v2",
62 "description": "VM size"
68 "description": "Unique DNS label to assign DNS name"
73 "dnsLabelPrefix": "[concat('dns-',uniquestring(resourceGroup().id))]",
77 "vmName": "[concat('k8s-host-', substring(uniquestring(resourceGroup().id),0,4))]",
78 "adminUsername": "[concat('ubuntu')]",
79 "adminPassword": "Qwertyuiop@@1",
80 "sshKeyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD5zrmH1dHgXbNwP2qbNVySScnFVcEP25HBd2VJu2PiJLDhwgHj44Lj9ZvLyRFCetqd8CAKnLV5qy37rwaCtlH/t8Qb36cUGPhegxpF2++uTY0b6K7Zb6hEMBNw3J1z+GU7OoVwZJhsNAw4t8/7WWmJA4Owo99TJkEKvhCYjBCLoC5sIvG/lJsaFIG8A5MjnBlwgSZ3FsUU+aY1KYZUztodkyv7laDMOinwSvJggKrCugsqZdVo5bhmcSFbqrZa/a/wgqeok+79W0/DLh5Tlf7By46ASDKGnFlwDshPu++I3KMU3eRz0rJLOKeIUCz7k80X0WJ6BrSS7l+IrpDXV1M5 ubuntu@aria",
81 "storageAccountName": "[concat('salinuxvm', substring(uniquestring(resourceGroup().id),0,4))]",
82 "imagePublisher": "Canonical",
83 "imageOffer": "UbuntuServer",
84 "nicName": "[concat('VMNic-',variables('vmName'))]",
85 "dnsPrefix": "[concat(variables('dnsLabelPrefix'),'-',substring(uniquestring(resourceGroup().id),0,4))]",
86 "addressPrefix": "10.0.0.0/16",
87 "subnetName": "Subnet",
88 "subnetPrefix": "10.0.0.0/24",
89 "storageAccountType": "Standard_LRS",
90 "publicIPAddressType": "Dynamic",
91 "publicIPAddressName": "nicLoop100",
92 "virtualNetworkName": "[concat('VNET-',variables('vmName'))]",
93 "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets/', variables('virtualNetworkName'), variables('subnetName'))]",
94 "networkSecurityGroupName": "[concat(variables('vmName'), '_obrien_local_nsg')]",
95 "sshKeyPathRoot": "[concat('/root/','/.ssh/authorized_keys')]",
96 "sshKeyPath": "[concat('/home/',variables('adminUsername'),'/.ssh/authorized_keys')]",
97 "availabilitySetName": "[concat('availabilitySet-',substring(uniquestring(resourceGroup().id),0,4))]"
101 "type": "Microsoft.Compute/availabilitySets",
102 "name": "[variables('availabilitySetName')]",
103 "apiVersion": "2016-04-30-preview",
104 "location": "[resourceGroup().location]",
107 "platformFaultDomainCount": 3,
108 "platformUpdateDomainCount": 3
112 "type": "Microsoft.Storage/storageAccounts",
113 "name": "[variables('storageAccountName')]",
114 "apiVersion": "2017-06-01",
115 "location": "[resourceGroup().location]",
117 "name": "[variables('storageAccountType')]"
123 "apiVersion": "2017-03-01",
124 "type": "Microsoft.Network/networkSecurityGroups",
125 "name": "[variables('networkSecurityGroupName')]",
126 "location": "[resourceGroup().location]",
133 "name": "SSHAllowAny",
135 "description": "SSHAllowAny",
137 "sourcePortRange": "*",
138 "destinationPortRange": "22",
139 "sourceAddressPrefix": "*",
140 "destinationAddressPrefix": "*",
143 "direction": "Inbound"
147 "name": "DockerAllowAny",
149 "description": "DockerAllowAny",
151 "sourcePortRange": "*",
152 "destinationPortRange": "2376",
153 "sourceAddressPrefix": "*",
154 "destinationAddressPrefix": "*",
157 "direction": "Inbound"
161 "name": "port500-UdpAllowAny",
163 "description": "port500-udpAllowAny",
165 "sourcePortRange": "*",
166 "destinationPortRange": "500",
167 "sourceAddressPrefix": "*",
168 "destinationAddressPrefix": "*",
171 "direction": "Inbound"
175 "name": "port4500-UdpAllowAny",
177 "description": "port4500-udpAllowAny",
179 "sourcePortRange": "*",
180 "destinationPortRange": "4500",
181 "sourceAddressPrefix": "*",
182 "destinationAddressPrefix": "*",
185 "direction": "Inbound"
189 "name": "port_10249-10255_172",
191 "description": "port_10249-10255_172",
193 "sourcePortRange": "*",
194 "destinationPortRange": "10249-10255",
195 "sourceAddressPrefix": "*",
196 "destinationAddressPrefix": "*",
199 "direction": "Inbound"
205 "description": "All in",
207 "sourcePortRange": "*",
208 "destinationPortRange": "*",
209 "sourceAddressPrefix": "Internet",
210 "destinationAddressPrefix": "*",
213 "direction": "Inbound"
217 "name": "block-8080",
219 "description": "block-8080",
221 "sourcePortRange": "8080",
222 "destinationPortRange": "*",
223 "sourceAddressPrefix": "Internet",
224 "destinationAddressPrefix": "*",
227 "direction": "Outbound"
233 "description": "All out",
235 "sourcePortRange": "*",
236 "destinationPortRange": "*",
237 "sourceAddressPrefix": "Internet",
238 "destinationAddressPrefix": "*",
241 "direction": "Outbound"
248 "apiVersion": "2017-04-01",
249 "type": "Microsoft.Network/virtualNetworks",
250 "name": "[variables('virtualNetworkName')]",
251 "location": "[resourceGroup().location]",
253 "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]"
258 "[variables('addressPrefix')]"
263 "name": "[variables('subnetName')]",
265 "addressPrefix": "[variables('subnetPrefix')]",
266 "networkSecurityGroup": {
267 "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
275 "apiVersion": "2017-08-01",
276 "type": "Microsoft.Network/networkInterfaces",
277 "name": "[concat(variables('nicName'), copyindex())]",
278 "location": "[resourceGroup().location]",
281 "count": "[parameters('numberOfVms')]"
284 "[resourceId('Microsoft.Network/publicIPAddresses/', concat('nicLoop',copyIndex(100)))]",
285 "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
288 "ipConfigurations": [
292 "privateIPAllocationMethod": "Static",
293 "privateIPAddress": "[concat(parameters('privateIPAddress'),copyindex())]",
295 "id": "[resourceId('Microsoft.Network/publicIPAddresses', concat('nicLoop',copyIndex(100)))]"
298 "id": "[variables('subnetRef')]"
306 "apiVersion": "2017-04-01",
307 "type": "Microsoft.Network/publicIPAddresses",
308 "name": "[concat('nicLoop',copyIndex(100))]",
309 "location": "[resourceGroup().location]",
312 "count": "[parameters('numberOfVms')]"
315 "publicIPAllocationMethod": "Dynamic",
317 "domainNameLabel": "[concat(variables('vmName'),parameters('dnslabel'), copyIndex(1000))]"
322 "apiVersion": "2017-03-30",
323 "type": "Microsoft.Compute/virtualMachines",
324 "name": "[concat(variables('vmName'), copyindex())]",
326 "name": "virtualMachineLoop",
327 "count": "[parameters('numberOfVms')]"
329 "location": "[resourceGroup().location]",
332 "[concat('Microsoft.Compute/availabilitySets/',variables('availabilitySetName'))]"
336 "vmSize": "[parameters('vmSize')]"
339 "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('availabilitySetName'))]"
342 "computerName": "[concat(variables('vmName'), copyindex())]",
343 "adminUsername": "[variables('adminUsername')]",
344 "adminPassword": "[variables('adminPassword')]",
345 "linuxConfiguration": {
346 "disablePasswordAuthentication": false,
350 "path": "[variables('sshKeyPath')]",
351 "keyData": "[variables('sshKeyData')]"
359 "publisher": "[variables('imagePublisher')]",
360 "offer": "[variables('imageOffer')]",
361 "sku": "[parameters('centosOSVersion')]",
366 "createOption": "FromImage"
370 "networkInterfaces": [
372 "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('nicName'),copyindex()))]"
376 "diagnosticsProfile": {
379 "storageUri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob)]"
385 "apiVersion": "2015-06-15",
386 "type": "Microsoft.Compute/virtualMachines/extensions",
387 "name": "[concat(variables('vmName'), '0','/onap')]",
388 "location": "[resourceGroup().location]",
393 "publisher": "Microsoft.Azure.Extensions",
394 "type": "CustomScript",
395 "typeHandlerVersion": "2.0",
396 "autoUpgradeMinorVersion": true,
399 "https://git.onap.org/integration/plain/deployment/Azure_ARM_Template/scripts/azure-rancher-server.sh"
401 "commandToExecute": "[concat('./' , parameters('masterScriptName'),' ',reference(variables('publicIPAddressName')).dnsSettings.fqdn,' ',parameters('privateIPAddress'),' ',parameters('numberOfVms'))]"
406 "apiVersion": "2015-06-15",
407 "type": "Microsoft.Compute/virtualMachines/extensions",
408 "name": "[concat(variables('vmName'), copyindex(1),'/onap')]",
410 "name": "virtualMachineExtnLoop",
411 "count": "[sub(parameters('numberOfVms'),1)]"
413 "location": "[resourceGroup().location]",
418 "publisher": "Microsoft.Azure.Extensions",
419 "type": "CustomScript",
420 "typeHandlerVersion": "2.0",
421 "autoUpgradeMinorVersion": true,
424 "https://git.onap.org/integration/plain/deployment/Azure_ARM_Template/scripts/azure-k8s-node.sh"
426 "commandToExecute": "[concat('./' , parameters('nodeScriptName'),' ',concat(parameters('privateIPAddress'),'0'))]"