зеркало из
1
0
Форкнуть 0

updated the load balancer to accept DNS name label

This commit is contained in:
RohitSharma-pnp 2016-09-14 12:18:33 -07:00
Родитель c91e432b25
Коммит d59e9bbb1d
11 изменённых файлов: 90 добавлений и 1 удалений

Просмотреть файл

@ -7,6 +7,7 @@
"namePrefix": "intranet-dmz",
"endpoint": {
"hasPublicEndpoint": "no",
"domainNameLabel": "",
"internalLoadBalancerSettings": {
"privateIPAddress": "10.0.0.10",
"subnetName": "dmz-in"

Просмотреть файл

@ -7,6 +7,7 @@
"namePrefix": "intranet-dmz",
"endpoint": {
"hasPublicEndpoint": "no",
"domainNameLabel": "",
"internalLoadBalancerSettings": {
"privateIPAddress": "10.0.0.10",
"subnetName": "dmz-in"

Просмотреть файл

@ -7,6 +7,7 @@
"namePrefix": "internet-dmz",
"endpoint": {
"hasPublicEndpoint": "yes",
"domainNameLabel": "",
"internalLoadBalancerSettings": { }
},
"applianceSettings": {

Просмотреть файл

@ -7,6 +7,7 @@
"namePrefix": "internet-dmz",
"endpoint": {
"hasPublicEndpoint": "yes",
"domainNameLabel": "bb-scenario-name",
"internalLoadBalancerSettings": { }
},
"applianceSettings": {

Просмотреть файл

@ -9,6 +9,7 @@
{
"name": "lbfe1",
"loadBalancerType": "internal",
"domainNameLabel": "",
"internalLoadBalancerSettings": {
"privateIPAddress": "10.0.0.254",
"subnetName": "web"

Просмотреть файл

@ -9,6 +9,7 @@
{
"name": "bb-dev-biz-lbfe1",
"loadBalancerType": "internal",
"domainNameLabel": "",
"internalLoadBalancerSettings": {
"privateIPAddress": "10.0.2.100",
"subnetName": "biz"

Просмотреть файл

@ -8,6 +8,7 @@
"frontendIPConfigurations": [
{
"name": "bb-dev-lbfe1",
"domainNameLabel": "",
"loadBalancerType": "public"
}
],

Просмотреть файл

@ -137,6 +137,7 @@
<None Include="templates\resources\Microsoft.Network\loadBalancer\lb-backendPools.json" />
<None Include="templates\resources\Microsoft.Network\loadBalancer\lb-empty-nic-array-helper.json" />
<None Include="templates\resources\Microsoft.Network\loadBalancer\lb-frontendIPConfiguration-internal.json" />
<None Include="templates\resources\Microsoft.Network\loadBalancer\lb-frontendIPConfiguration-public-dns-label.json" />
<None Include="templates\resources\Microsoft.Network\loadBalancer\lb-frontendIPConfiguration-public.json" />
<None Include="templates\resources\Microsoft.Network\loadBalancer\lb-frontendIPConfiguration-settings.json" />
<None Include="templates\resources\Microsoft.Network\loadBalancer\lb-inboundNatRules-all-settings.json" />

Просмотреть файл

@ -65,6 +65,7 @@
{
"name": "nva-lb-fe",
"loadBalancerType": "[variables('loadBalancerType')[tolower(parameters('context').dmzSettings.endpoint.hasPublicEndpoint)]]",
"domainNameLabel": "[parameters('context').dmzSettings.endpoint.domainNameLabel]",
"internalLoadBalancerSettings": "[parameters('context').dmzSettings.endpoint.internalLoadBalancerSettings]"
}
],

Просмотреть файл

@ -0,0 +1,73 @@
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"deploymentContext": { "type": "object" },
"source": { "type": "object" },
"context": { "type": "object" },
"state": {
"type": "array",
"defaultValue": [ ]
},
"iteration": {
"type": "int",
"defaultValue": 0
}
},
"variables": {
"templateUniqueString": "[uniqueString(concat(string(parameters('deploymentContext')), string(parameters('source')), string(parameters('context')), string(parameters('state')), parameters('iteration')))]",
"publicIpAddressName": "[concat(parameters('source').name, '-pip')]",
"deploymentName": "[concat(parameters('deploymentContext').parentTemplateUniqueString, '-deployPIP-', variables('templateUniqueString'))]"
},
"resources": [
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"name": "[variables('deploymentName')]",
"properties": {
"mode": "Incremental",
"parameters": { },
"template": {
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": { },
"variables": { },
"resources": [
{
"apiVersion": "2016-03-30",
"type": "Microsoft.Network/publicIPAddresses",
"name": "[variables('publicIpAddressName')]",
"location": "[resourceGroup().location]",
"properties": {
"publicIPAllocationMethod": "Static",
"dnsSettings": {
"domainNameLabel": "[parameters('source').domainNameLabel]"
}
}
}
],
"outputs": {
"instance": {
"type": "array",
"value": [
{
"name": "[parameters('source').name]",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"publicIPAddress": { "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIpAddressName'))]" }
}
}
]
}
}
}
}
}
],
"outputs": {
"collection": {
"type": "array",
"value": "[concat(parameters('state'), reference(variables('deploymentName')).outputs.instance.value)]"
}
}
}

Просмотреть файл

@ -17,8 +17,15 @@
"variables": {
"templateUniqueString": "[uniqueString(concat(string(parameters('deploymentContext')), string(parameters('source')), string(parameters('context')), string(parameters('state')), parameters('iteration')))]",
"publicIpConfigurations": [
"[uri(deployment().properties.templateLink.uri, 'lb-frontendIPConfiguration-public.json')]",
"[uri(deployment().properties.templateLink.uri, 'lb-frontendIPConfiguration-public-dns-label.json')]"
],
"templateToInvoke": "[variables('publicIpConfigurations')[mod(add(length(parameters('source').domainNameLabel), 2), add(length(parameters('source').domainNameLabel), 1))]]",
"ipConfigurations": {
"public": "[uri(deployment().properties.templateLink.uri, 'lb-frontendIPConfiguration-public.json')]",
"public": "[variables('templateToInvoke')]",
"internal": "[uri(deployment().properties.templateLink.uri, 'lb-frontendIPConfiguration-internal.json')]"
},
"deploymentName": "[concat(parameters('deploymentContext').parentTemplateUniqueString, '-config', parameters('iteration'), '-', variables('templateUniqueString'))]"