176 строки
5.1 KiB
JSON
176 строки
5.1 KiB
JSON
{
|
|
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
|
|
"contentVersion": "1.0.0.0",
|
|
"parameters": {
|
|
"region": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"Description": "Location where resources will be provisioned"
|
|
}
|
|
},
|
|
"networkSettings": {
|
|
"type": "object",
|
|
"metadata": {
|
|
"Description": "Network settings object"
|
|
}
|
|
},
|
|
"loadBalancerType": {
|
|
"type": "string",
|
|
"defaultValue": "internal",
|
|
"allowedValues": [
|
|
"internal",
|
|
"external"
|
|
]
|
|
},
|
|
"esDataHaSetName": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"Description": "Name of the availability set for the data nodes"
|
|
}
|
|
},
|
|
"storageAccountName": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"Description": "A shared storage account for images"
|
|
}
|
|
},
|
|
"dnsName": {
|
|
"type": "string"
|
|
},
|
|
"ilbIpAddress": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"variables": {
|
|
"externalFELBConfig": [
|
|
{
|
|
"name": "LBFE",
|
|
"properties": {
|
|
"publicIPAddress": {
|
|
"id": "[resourceId('Microsoft.Network/publicIPAddresses','publicIp')]"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"internalFELBConfig": [
|
|
{
|
|
"Name": "LBFE",
|
|
"Properties": {
|
|
"subnet": {
|
|
"Id": "[concat(resourceId('Microsoft.Network/virtualNetworks',parameters('networkSettings').virtualNetworkName), '/subnets/', parameters('networkSettings').subnet.master.name)]"
|
|
},
|
|
"privateIPAddress": "[parameters('ilbIpAddress')]",
|
|
"privateIPAllocationMethod": "Static"
|
|
}
|
|
}
|
|
],
|
|
"feLoadBalancerConfig": "[variables(concat(parameters('loadBalancerType'), 'FELBConfig'))]"
|
|
},
|
|
"resources": [
|
|
{
|
|
"type": "Microsoft.Storage/storageAccounts",
|
|
"name": "[parameters('storageAccountName')]",
|
|
"apiVersion": "2015-05-01-preview",
|
|
"location": "[parameters('region')]",
|
|
"properties": {
|
|
"accountType": "Standard_LRS"
|
|
}
|
|
},
|
|
{
|
|
"apiVersion": "2015-05-01-preview",
|
|
"type": "Microsoft.Compute/availabilitySets",
|
|
"name": "[parameters('esDataHaSetName')]",
|
|
"location": "[parameters('region')]",
|
|
"properties": {}
|
|
},
|
|
{
|
|
"apiVersion": "2015-05-01-preview",
|
|
"type": "Microsoft.Network/publicIPAddresses",
|
|
"name": "publicIp",
|
|
"location": "[parameters('region')]",
|
|
"properties": {
|
|
"publicIPAllocationMethod": "Dynamic",
|
|
"dnsSettings": {
|
|
"domainNameLabel": "[parameters('dnsName')]"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"apiVersion": "2015-05-01-preview",
|
|
"type": "Microsoft.Network/virtualNetworks",
|
|
"name": "[parameters('networkSettings').virtualNetworkName]",
|
|
"location": "[parameters('region')]",
|
|
"properties": {
|
|
"addressSpace": {
|
|
"addressPrefixes": [
|
|
"[parameters('networkSettings').addressPrefix]"
|
|
]
|
|
},
|
|
"subnets": [
|
|
{
|
|
"name": "[parameters('networkSettings').subnet.master.name]",
|
|
"properties": {
|
|
"addressPrefix": "[parameters('networkSettings').subnet.master.prefix]"
|
|
}
|
|
},
|
|
{
|
|
"name": "[parameters('networkSettings').subnet.data.name]",
|
|
"properties": {
|
|
"addressPrefix": "[parameters('networkSettings').subnet.data.prefix]"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"apiVersion": "2015-05-01-preview",
|
|
"name": "loadBalancer",
|
|
"type": "Microsoft.Network/loadBalancers",
|
|
"location": "[parameters('region')]",
|
|
"dependsOn": [
|
|
"[concat('Microsoft.Network/publicIPAddresses/', 'publicIp')]"
|
|
],
|
|
"properties": {
|
|
"frontendIPConfigurations": "[variables('feLoadBalancerConfig')]",
|
|
"backendAddressPools": [
|
|
{
|
|
"name": "LBBE"
|
|
}
|
|
],
|
|
"inboundNatRules": "parameters('lbManagementRule')",
|
|
"loadBalancingRules": [
|
|
{
|
|
"name": "LBRule",
|
|
"properties": {
|
|
"frontendIPConfiguration": {
|
|
"id": "[concat(resourceId('Microsoft.Network/loadBalancers','loadBalancer'),'/frontendIPConfigurations/LBFE')]"
|
|
},
|
|
"backendAddressPool": {
|
|
"id": "[concat(resourceId('Microsoft.Network/loadBalancers','loadBalancer'),'/backendAddressPools/LBBE')]"
|
|
},
|
|
"protocol": "tcp",
|
|
"frontendPort": 9200,
|
|
"backendPort": 9200,
|
|
"enableFloatingIP": false,
|
|
"idleTimeoutInMinutes": 5,
|
|
"probe": {
|
|
"id": "[concat(resourceId('Microsoft.Network/loadBalancers','loadBalancer'),'/probes/esProbe')]"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"probes": [
|
|
{
|
|
"name": "esProbe",
|
|
"properties": {
|
|
"protocol": "tcp",
|
|
"port": 9200,
|
|
"intervalInSeconds": 30,
|
|
"numberOfProbes": 3
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |