github.com/deis/deis@v1.13.5-0.20170519182049-1d9e59fbdbfc/contrib/azure/arm-template.json (about) 1 { 2 "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json", 3 "contentVersion": "1.0.0.0", 4 "parameters": { 5 "newStorageAccountName": { 6 "type": "string", 7 "metadata": { 8 "description": "Name of the of the storage account for VM OS Disk" 9 } 10 }, 11 "publicDomainName": { 12 "type": "string", 13 "metadata": { 14 "description": "Domain name associated with the load balancer public IP" 15 } 16 }, 17 "dnsPrefixNameForPublicIP": { 18 "type": "string", 19 "metadata": { 20 "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." 21 } 22 }, 23 "vmSize": { 24 "type": "string", 25 "defaultValue": "Standard_A3", 26 "allowedValues": [ 27 "Standard_A0", 28 "Standard_A1", 29 "Standard_A2", 30 "Standard_A3", 31 "Standard_A5", 32 "Standard_A4", 33 "Standard_A6", 34 "Standard_A7", 35 "Basic_A0", 36 "Basic_A1", 37 "Basic_A2", 38 "Basic_A3", 39 "Basic_A4", 40 "Standard_D1_v2", 41 "Standard_D2_v2", 42 "Standard_D3_v2", 43 "Standard_D4_v2", 44 "Standard_D5_v2", 45 "Standard_D11_v2", 46 "Standard_D12_v2", 47 "Standard_D13_v2", 48 "Standard_D14_v2", 49 "Standard_D15_v2", 50 "Standard_F1", 51 "Standard_F2", 52 "Standard_F4", 53 "Standard_F8", 54 "Standard_F16", 55 "Standard_D1", 56 "Standard_D2", 57 "Standard_D3", 58 "Standard_D4", 59 "Standard_D11", 60 "Standard_D12", 61 "Standard_D13", 62 "Standard_D14", 63 "Standard_DS1_v2", 64 "Standard_DS2_v2", 65 "Standard_DS3_v2", 66 "Standard_DS4_v2", 67 "Standard_DS5_v2", 68 "Standard_DS11_v2", 69 "Standard_DS12_v2", 70 "Standard_DS13_v2", 71 "Standard_DS14_v2", 72 "Standard_DS15_v2", 73 "Standard_F1s", 74 "Standard_F2s", 75 "Standard_F4s", 76 "Standard_F8s", 77 "Standard_F16s", 78 "Standard_A8", 79 "Standard_A9", 80 "Standard_A10", 81 "Standard_A11" 82 ], 83 "metadata": { 84 "description": "Instance size for the VMs" 85 } 86 }, 87 "adminUserName": { 88 "type": "string", 89 "metadata": { 90 "description": "Username to login to the VMs" 91 } 92 }, 93 "sshKeyData": { 94 "type": "string", 95 "metadata": { 96 "description": "Public key for SSH authentication" 97 } 98 }, 99 "customData": { 100 "type": "string", 101 "metadata": { 102 "description": "Base64-encoded cloud-config.yaml file to deploy and start fleet" 103 } 104 }, 105 "numberOfNodes": { 106 "type": "int", 107 "metadata": { 108 "description": "Number of member nodes" 109 }, 110 "defaultValue": 3 111 }, 112 "dockerVolumeSize": { 113 "type": "int", 114 "metadata": { 115 "description": "Size in GB of the Docker volume" 116 }, 117 "defaultValue": 100 118 }, 119 "coreosVersion": { 120 "type": "string", 121 "metadata": { 122 "description": "Version of CoreOS to deploy" 123 } 124 }, 125 "storageAccountType": { 126 "type": "string", 127 "metadata": { 128 "description": "Storage account type" 129 }, 130 "allowedValues": [ 131 "Standard_LRS", 132 "Premium_LRS" 133 ], 134 "defaultValue": "Premium_LRS" 135 } 136 }, 137 "variables": { 138 "addressPrefix": "10.0.0.0/16", 139 "subnet1Name": "Subnet-1", 140 "subnet1Prefix": "10.0.0.0/24", 141 "publicIPAddressType": "Dynamic", 142 "imagePublisher": "CoreOS", 143 "imageOffer": "CoreOS", 144 "imageSKU": "Stable", 145 "vmNamePrefix": "deisNode", 146 "virtualNetworkName": "deisvNet", 147 "availabilitySetName": "deisAvailabilitySet", 148 "loadBalancerName": "loadBalancer", 149 "loadBalancerAPIRuleName": "loadBalancerAPIRule", 150 "loadBalancerBuilderRuleName": "loadBalancerBuildRule", 151 "loadBalancerPublicIPName": "loadBalancerIP", 152 "loadBalancerIPConfigName": "loadBalancerIPConfig", 153 "lbBackendAddressPoolName": "lbBackendAddressPool", 154 "apiProbeName": "apiProbe", 155 "builderProbeName": "builderProbe", 156 "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]", 157 "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", 158 "subnet1Ref": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]", 159 "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('loadBalancerName'))]", 160 "lbAPIRuleID": "[concat(variables('lbID'),'/loadBalancingRules/',variables('loadBalancerAPIRuleName'))]", 161 "lbBuilderRuleID": "[concat(variables('lbID'),'/loadBalancingRules/',variables('loadBalancerBuilderRuleName'))]", 162 "lbIPConfig": "[concat(variables('lbID'),'/frontendIPConfigurations/',variables('loadBalancerIPConfigName'))]", 163 "apiProbeID": "[concat(variables('lbID'),'/probes/',variables('apiProbeName'))]", 164 "builderProbeID": "[concat(variables('lbID'),'/probes/',variables('builderProbeName'))]", 165 "lbPoolID": "[concat(variables('lbID'),'/backendAddressPools/',variables('lbBackendAddressPoolName'))]" 166 }, 167 "resources": [ 168 { 169 "type": "Microsoft.Compute/availabilitySets", 170 "name": "[variables('availabilitySetName')]", 171 "apiVersion": "2016-03-30", 172 "location": "[resourceGroup().location]", 173 "properties": {} 174 }, 175 { 176 "type": "Microsoft.Storage/storageAccounts", 177 "name": "[parameters('newStorageAccountName')]", 178 "location": "[resourceGroup().location]", 179 "apiVersion": "2015-06-15", 180 "properties": { 181 "accountType": "[parameters('storageAccountType')]" 182 } 183 }, 184 { 185 "apiVersion": "2016-06-01", 186 "type": "Microsoft.Network/publicIPAddresses", 187 "name": "[variables('loadBalancerPublicIPName')]", 188 "location": "[resourceGroup().location]", 189 "properties": { 190 "publicIPAllocationMethod": "Dynamic", 191 "dnsSettings": { 192 "domainNameLabel": "[parameters('publicDomainName')]" 193 } 194 } 195 }, 196 { 197 "apiVersion": "2016-06-01", 198 "type": "Microsoft.Network/publicIPAddresses", 199 "name": "[concat(parameters('dnsPrefixNameForPublicIP'),copyIndex())]", 200 "location": "[resourceGroup().location]", 201 "tags": { 202 "displayName": "PublicIPAddress" 203 }, 204 "properties": { 205 "publicIPAllocationMethod": "Dynamic", 206 "dnsSettings": { 207 "domainNameLabel": "[concat(parameters('dnsPrefixNameForPublicIP'),copyIndex())]" 208 } 209 }, 210 "copy": { 211 "name": "publicIpCopy", 212 "count": "[parameters('numberOfNodes')]" 213 } 214 }, 215 { 216 "apiVersion": "2016-06-01", 217 "type": "Microsoft.Network/loadBalancers", 218 "name": "[variables('loadBalancerName')]", 219 "location": "[resourceGroup().location]", 220 "dependsOn": [ 221 "[concat('Microsoft.Network/publicIPAddresses/', variables('loadBalancerPublicIPName'))]" 222 ], 223 "properties": { 224 "frontendIPConfigurations": [ 225 { 226 "name": "[variables('loadBalancerIPConfigName')]", 227 "properties": { 228 "publicIPAddress": { 229 "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('loadBalancerPublicIPName'))]" 230 } 231 } 232 } 233 ], 234 "backendAddressPools": [ 235 { 236 "name": "[variables('lbBackendAddressPoolName')]", 237 "properties": { 238 "loadBalancingRules": [ 239 { 240 "id": "[variables('lbAPIRuleID')]" 241 }, 242 { 243 "id": "[variables('lbBuilderRuleID')]" 244 } 245 ] 246 } 247 } 248 ], 249 "loadBalancingRules": [ 250 { 251 "name": "[variables('loadBalancerAPIRuleName')]", 252 "dependsOn": [ 253 "[variables('lbIPConfig')]" 254 ], 255 "properties": { 256 "frontendIPConfiguration": { 257 "id": "[variables('lbIPConfig')]" 258 }, 259 "backendAddressPool": { 260 "id": "[variables('lbPoolID')]" 261 }, 262 "protocol": "TCP", 263 "frontendPort": 80, 264 "backendPort": 80, 265 "enableFloatingIP": false, 266 "idleTimeoutInMinutes": 10, 267 "probe": { 268 "id": "[variables('apiProbeID')]" 269 } 270 } 271 }, 272 { 273 "name": "[variables('loadBalancerBuilderRuleName')]", 274 "properties": { 275 "frontendIPConfiguration": { 276 "id": "[variables('lbIPConfig')]" 277 }, 278 "backendAddressPool": { 279 "id": "[variables('lbPoolID')]" 280 }, 281 "protocol": "TCP", 282 "frontendPort": 2222, 283 "backendPort": 2222, 284 "enableFloatingIP": false, 285 "idleTimeoutInMinutes": 10 286 } 287 } 288 ], 289 "probes": [ 290 { 291 "name": "[variables('apiProbeName')]", 292 "properties": { 293 "protocol": "HTTP", 294 "port": 80, 295 "intervalInSeconds": 5, 296 "numberOfProbes": 2, 297 "requestPath": "/health-check" 298 } 299 } 300 ] 301 } 302 }, 303 { 304 "type": "Microsoft.Network/virtualNetworks", 305 "name": "[variables('virtualNetworkName')]", 306 "location": "[resourceGroup().location]", 307 "apiVersion": "2015-05-01-preview", 308 "dependsOn": [ 309 "[variables('nsgID')]" 310 ], 311 "properties": { 312 "addressSpace": { 313 "addressPrefixes": [ 314 "[variables('addressPrefix')]" 315 ] 316 }, 317 "subnets": [ 318 { 319 "name": "[variables('subnet1Name')]", 320 "properties": { 321 "addressPrefix": "[variables('subnet1Prefix')]" 322 } 323 } 324 ] 325 } 326 }, 327 { 328 "type": "Microsoft.Network/networkInterfaces", 329 "name": "[concat('nic', copyindex())]", 330 "copy": { 331 "name": "nicLoop", 332 "count": "[parameters('numberOfNodes')]" 333 }, 334 "location": "[resourceGroup().location]", 335 "dependsOn": [ 336 "[concat('Microsoft.Network/publicIPAddresses/', concat(parameters('dnsPrefixNameForPublicIP'),copyIndex()))]", 337 "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", 338 "[variables('lbID')]" 339 ], 340 "apiVersion": "2016-06-01", 341 "properties": { 342 "ipConfigurations": [ 343 { 344 "name": "ipconfig1", 345 "properties": { 346 "privateIPAllocationMethod": "Dynamic", 347 "publicIPAddress": { 348 "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(parameters('dnsPrefixNameForPublicIP'),copyIndex()))]" 349 }, 350 "subnet": { 351 "id": "[variables('subnet1Ref')]" 352 }, 353 "loadBalancerBackendAddressPools": [ 354 { 355 "id": "[variables('lbPoolID')]" 356 } 357 ] 358 } 359 } 360 ] 361 } 362 }, 363 { 364 "type": "Microsoft.Compute/virtualMachines", 365 "name": "[concat(variables('vmNamePrefix'), copyindex())]", 366 "copy": { 367 "name": "virtualMachineLoop", 368 "count": "[parameters('numberOfNodes')]" 369 }, 370 "location": "[resourceGroup().location]", 371 "dependsOn": [ 372 "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", 373 "[concat('Microsoft.Network/networkInterfaces/', 'nic', copyindex())]", 374 "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]" 375 ], 376 "apiVersion": "2016-03-30", 377 "properties": { 378 "availabilitySet": { 379 "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('availabilitySetName'))]" 380 }, 381 "hardwareProfile": { 382 "vmSize": "[parameters('vmSize')]" 383 }, 384 "osProfile": { 385 "computername": "[concat(variables('vmNamePrefix'), copyindex())]", 386 "adminUsername": "[parameters('adminUsername')]", 387 "customData": "[parameters('customData')]", 388 "linuxConfiguration": { 389 "disablePasswordAuthentication": "true", 390 "ssh": { 391 "publicKeys": [ 392 { 393 "path": "[variables('sshKeyPath')]", 394 "keyData": "[parameters('sshKeyData')]" 395 } 396 ] 397 } 398 } 399 }, 400 "storageProfile": { 401 "imageReference": { 402 "publisher": "[variables('imagePublisher')]", 403 "offer": "[variables('imageOffer')]", 404 "sku": "[variables('imageSKU')]", 405 "version": "[parameters('coreosVersion')]" 406 }, 407 "dataDisks": [ 408 { 409 "name": "dockerdisk", 410 "diskSizeGB": "[parameters('dockerVolumeSize')]", 411 "lun": 0, 412 "vhd": { 413 "uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/vhds/','datadisk', copyindex(),'.vhd')]" 414 }, 415 "createOption": "Empty" 416 } 417 ], 418 "osDisk": { 419 "name": "osdisk", 420 "vhd": { 421 "uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/vhds/','osdisk', copyindex(),'.vhd')]" 422 }, 423 "caching": "ReadWrite", 424 "createOption": "FromImage" 425 } 426 }, 427 "networkProfile": { 428 "networkInterfaces": [ 429 { 430 "id": "[resourceId('Microsoft.Network/networkInterfaces',concat('nic',copyindex()))]" 431 } 432 ] 433 } 434 } 435 } 436 ] 437 }