Added Reverse Proxy LB Rule to ARM template

This commit is contained in:
Ramón Tomás 2017-09-15 16:50:10 +02:00
parent 480723e351
commit e673236bbd
4 changed files with 26 additions and 2 deletions

View File

@ -19,6 +19,7 @@
<Parameter Name="CatalogApi_InstanceCount" DefaultValue="-1" />
<Parameter Name="BasketApi_InstanceCount" DefaultValue="-1" />
<Parameter Name="IdentityUrlExternal" DefaultValue="" />
<Parameter Name="PicBaseUrl" DefaultValue="" />
</Parameters>
<!-- Import the ServiceManifest from the ServicePackage. The ServiceManifestName and ServiceManifestVersion
should match the Name and Version attributes of the ServiceManifest element defined in the
@ -104,7 +105,9 @@
</ServiceManifestImport>
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="CatalogApiPkg" ServiceManifestVersion="1.0.0" />
<ConfigOverrides />
<EnvironmentOverrides CodePackageRef="Code">
<EnvironmentVariable Name="PicBaseUrl" Value="[PicBaseUrl]"/>
</EnvironmentOverrides>
<Policies>
<ContainerHostPolicies CodePackageRef="Code">
<PortBinding ContainerPort="80" EndpointRef="CatalogApiTypeEndpoint"/>

View File

@ -13,5 +13,6 @@
<Parameter Name="CatalogApi_InstanceCount" Value="-1" />
<Parameter Name="BasketApi_InstanceCount" Value="-1" />
<Parameter Name="IdentityUrlExternal" Value="http://your_sf_dns:5105" />
<Parameter Name="PicBaseUrl" Value="http://your_sf_dns:19081/eShopOnServiceFabric/CatalogApi/api/v1/catalog/items/[0]/pic/" />
</Parameters>
</Application>

View File

@ -27,6 +27,7 @@
<EnvironmentVariable Name="BasketUrl" Value="http://basketapi.eshoponservicefabric:5103"/>
<EnvironmentVariable Name="IdentityUrl" Value=""/>
<EnvironmentVariable Name="MarketingUrl" Value="http://marketingapi.eshoponservicefabric:5110"/>
<EnvironmentVariable Name="LocationsUrl" Value="http://locationsapi.eshoponservicefabric:5109"/>
</EnvironmentVariables>
</CodePackage>

View File

@ -367,6 +367,25 @@
"protocol": "tcp"
}
},
{
"name": "ReverseProxyHttpRule",
"properties": {
"backendAddressPool": {
"id": "[variables('lbPoolID0')]"
},
"backendPort": "[parameters('nt0reverseProxyEndpointPort')]",
"enableFloatingIP": "false",
"frontendIPConfiguration": {
"id": "[variables('lbIPConfig0')]"
},
"frontendPort": "[parameters('nt0reverseProxyEndpointPort')]",
"idleTimeoutInMinutes": "5",
"probe": {
"id": "[variables('lbHttpProbeID0')]"
},
"protocol": "tcp"
}
},
{
"name": "WebMVCHttpRule",
"properties": {