github.com/naphatkrit/deis@v1.12.3/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_A4", 32 "Standard_D1", 33 "Standard_DS1", 34 "Standard_D2", 35 "Standard_DS2", 36 "Standard_D3", 37 "Standard_DS3", 38 "Standard_D4", 39 "Standard_DS4", 40 "Standard_D11", 41 "Standard_DS11", 42 "Standard_D12", 43 "Standard_DS12", 44 "Standard_D13", 45 "Standard_DS13", 46 "Standard_D14", 47 "Standard_DS14" 48 ], 49 "metadata": { 50 "description": "Instance size for the VMs" 51 } 52 }, 53 "adminUserName": { 54 "type": "string", 55 "metadata": { 56 "description": "Username to login to the VMs" 57 } 58 }, 59 "sshKeyData": { 60 "type": "string", 61 "metadata": { 62 "description": "Public key for SSH authentication" 63 } 64 }, 65 "customData": { 66 "type": "string", 67 "metadata": { 68 "description": "Base64-encoded cloud-config.yaml file to deploy and start fleet" 69 } 70 }, 71 "numberOfNodes": { 72 "type": "int", 73 "metadata": { 74 "description": "Number of member nodes" 75 }, 76 "defaultValue": "3" 77 }, 78 "dockerVolumeSize": { 79 "type": "int", 80 "metadata": { 81 "description": "Size in GB of the Docker volume" 82 }, 83 "defaultValue": "100" 84 }, 85 "coreosVersion": { 86 "type": "string", 87 "metadata": { 88 "description": "Version of CoreOS to deploy" 89 } 90 }, 91 "storageAccountType": { 92 "type": "string", 93 "metadata": { 94 "description": "Storage account type" 95 }, 96 "allowedValues": [ 97 "Standard_LRS", 98 "Premium_LRS" 99 ], 100 "defaultValue": "Premium_LRS" 101 } 102 }, 103 "variables": { 104 "addressPrefix": "10.0.0.0/16", 105 "subnet1Name": "Subnet-1", 106 "subnet1Prefix": "10.0.0.0/24", 107 "publicIPAddressType": "Dynamic", 108 "imagePublisher": "CoreOS", 109 "imageOffer": "CoreOS", 110 "imageSKU": "Stable", 111 "vmNamePrefix": "deisNode", 112 "virtualNetworkName": "deisvNet", 113 "availabilitySetName": "deisAvailabilitySet", 114 "loadBalancerName": "loadBalancer", 115 "loadBalancerAPIRuleName": "loadBalancerAPIRule", 116 "loadBalancerBuilderRuleName": "loadBalancerBuildRule", 117 "loadBalancerPublicIPName": "loadBalancerIP", 118 "loadBalancerIPConfigName": "loadBalancerIPConfig", 119 "lbBackendAddressPoolName": "lbBackendAddressPool", 120 "apiProbeName": "apiProbe", 121 "builderProbeName": "builderProbe", 122 "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]", 123 "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", 124 "subnet1Ref": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]", 125 "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('loadBalancerName'))]", 126 "lbAPIRuleID": "[concat(variables('lbID'),'/loadBalancingRules/',variables('loadBalancerAPIRuleName'))]", 127 "lbBuilderRuleID": "[concat(variables('lbID'),'/loadBalancingRules/',variables('loadBalancerBuilderRuleName'))]", 128 "lbIPConfig": "[concat(variables('lbID'),'/frontendIPConfigurations/',variables('loadBalancerIPConfigName'))]", 129 "apiProbeID": "[concat(variables('lbID'),'/probes/',variables('apiProbeName'))]", 130 "builderProbeID": "[concat(variables('lbID'),'/probes/',variables('builderProbeName'))]", 131 "lbPoolID": "[concat(variables('lbID'),'/backendAddressPools/',variables('lbBackendAddressPoolName'))]" 132 }, 133 "resources": [ 134 { 135 "type": "Microsoft.Compute/availabilitySets", 136 "name": "[variables('availabilitySetName')]", 137 "apiVersion": "2015-05-01-preview", 138 "location": "[resourceGroup().location]", 139 "properties": {} 140 }, 141 { 142 "type": "Microsoft.Storage/storageAccounts", 143 "name": "[parameters('newStorageAccountName')]", 144 "location": "[resourceGroup().location]", 145 "apiVersion": "2015-05-01-preview", 146 "properties": { 147 "accountType": "[parameters('storageAccountType')]" 148 } 149 }, 150 { 151 "apiVersion": "2015-05-01-preview", 152 "type": "Microsoft.Network/publicIPAddresses", 153 "name": "[variables('loadBalancerPublicIPName')]", 154 "location": "[resourceGroup().location]", 155 "properties": { 156 "publicIPAllocationMethod": "Dynamic", 157 "dnsSettings": { 158 "domainNameLabel": "[parameters('publicDomainName')]" 159 } 160 } 161 }, 162 { 163 "apiVersion": "2015-05-01-preview", 164 "type": "Microsoft.Network/publicIPAddresses", 165 "name": "[concat(parameters('dnsPrefixNameForPublicIP'),copyIndex())]", 166 "location": "[resourceGroup().location]", 167 "tags": { 168 "displayName": "PublicIPAddress" 169 }, 170 "properties": { 171 "publicIPAllocationMethod": "Dynamic", 172 "dnsSettings": { 173 "domainNameLabel": "[concat(parameters('dnsPrefixNameForPublicIP'),copyIndex())]" 174 } 175 }, 176 "copy": { 177 "name": "publicIpCopy", 178 "count": "[parameters('numberOfNodes')]" 179 } 180 }, 181 { 182 "apiVersion": "2015-05-01-preview", 183 "type": "Microsoft.Network/loadBalancers", 184 "name": "[variables('loadBalancerName')]", 185 "location": "[resourceGroup().location]", 186 "dependsOn": [ 187 "[concat('Microsoft.Network/publicIPAddresses/', variables('loadBalancerPublicIPName'))]" 188 ], 189 "properties": { 190 "frontendIPConfigurations": [ 191 { 192 "name": "[variables('loadBalancerIPConfigName')]", 193 "properties": { 194 "publicIPAddress": { 195 "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('loadBalancerPublicIPName'))]" 196 } 197 } 198 } 199 ], 200 "backendAddressPools": [ 201 { 202 "name": "[variables('lbBackendAddressPoolName')]", 203 "properties": { 204 "loadBalancingRules": [ 205 { 206 "id": "[variables('lbAPIRuleID')]" 207 }, 208 { 209 "id": "[variables('lbBuilderRuleID')]" 210 } 211 ] 212 } 213 } 214 ], 215 "loadBalancingRules": [ 216 { 217 "name": "[variables('loadBalancerAPIRuleName')]", 218 "dependsOn": [ 219 "[variables('lbIPConfig')]" 220 ], 221 "properties": { 222 "frontendIPConfiguration": { 223 "id": "[variables('lbIPConfig')]" 224 }, 225 "backendAddressPool": { 226 "id": "[variables('lbPoolID')]" 227 }, 228 "protocol": "TCP", 229 "frontendPort": "80", 230 "backendPort": "80", 231 "enableFloatingIP": false, 232 "idleTimeoutInMinutes": "10", 233 "probe": { 234 "id": "[variables('apiProbeID')]" 235 } 236 } 237 }, 238 { 239 "name": "[variables('loadBalancerBuilderRuleName')]", 240 "dependsOn": [ 241 "[variables('lbIPConfig')]" 242 ], 243 "properties": { 244 "frontendIPConfiguration": { 245 "id": "[variables('lbIPConfig')]" 246 }, 247 "backendAddressPool": { 248 "id": "[variables('lbPoolID')]" 249 }, 250 "protocol": "TCP", 251 "frontendPort": "2222", 252 "backendPort": "2222", 253 "enableFloatingIP": false, 254 "idleTimeoutInMinutes": "10" 255 } 256 } 257 ], 258 "probes": [ 259 { 260 "name": "[variables('apiProbeName')]", 261 "properties": { 262 "protocol": "HTTP", 263 "port": "80", 264 "intervalInSeconds": "5", 265 "numberOfProbes": "2", 266 "requestPath": "/health-check" 267 } 268 } 269 ] 270 } 271 }, 272 { 273 "type": "Microsoft.Network/virtualNetworks", 274 "name": "[variables('virtualNetworkName')]", 275 "location": "[resourceGroup().location]", 276 "apiVersion": "2015-05-01-preview", 277 "properties": { 278 "addressSpace": { 279 "addressPrefixes": [ 280 "[variables('addressPrefix')]" 281 ] 282 }, 283 "subnets": [ 284 { 285 "name": "[variables('subnet1Name')]", 286 "properties": { 287 "addressPrefix": "[variables('subnet1Prefix')]" 288 } 289 } 290 ] 291 } 292 }, 293 { 294 "type": "Microsoft.Network/networkInterfaces", 295 "name": "[concat('nic', copyindex())]", 296 "copy": { 297 "name": "nicLoop", 298 "count": "[parameters('numberOfNodes')]" 299 }, 300 "location": "[resourceGroup().location]", 301 "dependsOn": [ 302 "[concat('Microsoft.Network/publicIPAddresses/', concat(parameters('dnsPrefixNameForPublicIP'),copyIndex()))]", 303 "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", 304 "[variables('lbID')]" 305 ], 306 "apiVersion": "2015-05-01-preview", 307 "properties": { 308 "ipConfigurations": [ 309 { 310 "name": "ipconfig1", 311 "properties": { 312 "privateIPAllocationMethod": "Dynamic", 313 "publicIPAddress": { 314 "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(parameters('dnsPrefixNameForPublicIP'),copyIndex()))]" 315 }, 316 "subnet": { 317 "id": "[variables('subnet1Ref')]" 318 }, 319 "loadBalancerBackendAddressPools": [ 320 { 321 "id": "[variables('lbPoolID')]" 322 } 323 ] 324 } 325 } 326 ] 327 } 328 }, 329 { 330 "type": "Microsoft.Compute/virtualMachines", 331 "name": "[concat(variables('vmNamePrefix'), copyindex())]", 332 "copy": { 333 "name": "virtualMachineLoop", 334 "count": "[parameters('numberOfNodes')]" 335 }, 336 "location": "[resourceGroup().location]", 337 "dependsOn": [ 338 "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", 339 "[concat('Microsoft.Network/networkInterfaces/', 'nic', copyindex())]", 340 "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]" 341 ], 342 "apiVersion": "2015-05-01-preview", 343 "properties": { 344 "availabilitySet": { 345 "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('availabilitySetName'))]" 346 }, 347 "hardwareProfile": { 348 "vmSize": "[parameters('vmSize')]" 349 }, 350 "osProfile": { 351 "computername": "[concat(variables('vmNamePrefix'), copyindex())]", 352 "adminUsername": "[parameters('adminUsername')]", 353 "customData": "[parameters('customData')]", 354 "linuxConfiguration": { 355 "disablePasswordAuthentication": "true", 356 "ssh": { 357 "publicKeys": [ 358 { 359 "path": "[variables('sshKeyPath')]", 360 "keyData": "[parameters('sshKeyData')]" 361 } 362 ] 363 } 364 } 365 }, 366 "storageProfile": { 367 "imageReference": { 368 "publisher": "[variables('imagePublisher')]", 369 "offer": "[variables('imageOffer')]", 370 "sku": "[variables('imageSKU')]", 371 "version": "[parameters('coreosVersion')]" 372 }, 373 "dataDisks": [ 374 { 375 "name": "dockerdisk", 376 "diskSizeGB": "[parameters('dockerVolumeSize')]", 377 "lun": 0, 378 "vhd": { 379 "uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/vhds/','datadisk', copyindex(),'.vhd')]" 380 }, 381 "createOption": "Empty" 382 } 383 ], 384 "osDisk": { 385 "name": "osdisk", 386 "vhd": { 387 "uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/vhds/','osdisk', copyindex(),'.vhd')]" 388 }, 389 "caching": "ReadWrite", 390 "createOption": "FromImage" 391 } 392 }, 393 "networkProfile": { 394 "networkInterfaces": [ 395 { 396 "id": "[resourceId('Microsoft.Network/networkInterfaces',concat('nic',copyindex()))]" 397 } 398 ] 399 } 400 } 401 } 402 ] 403 }