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

View File

@ -13,5 +13,6 @@
<Parameter Name="CatalogApi_InstanceCount" Value="-1" /> <Parameter Name="CatalogApi_InstanceCount" Value="-1" />
<Parameter Name="BasketApi_InstanceCount" Value="-1" /> <Parameter Name="BasketApi_InstanceCount" Value="-1" />
<Parameter Name="IdentityUrlExternal" Value="http://your_sf_dns:5105" /> <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> </Parameters>
</Application> </Application>

View File

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

View File

@ -367,6 +367,25 @@
"protocol": "tcp" "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", "name": "WebMVCHttpRule",
"properties": { "properties": {