This commit is contained in:
Erik Pique 2019-01-29 15:11:16 +01:00
parent b19df7753a
commit 315090798d
12 changed files with 103 additions and 13 deletions

View File

@ -5,6 +5,7 @@
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameters>
<Parameter Name="OrderingSignalrHub_InstanceCount" DefaultValue="-1" />
<Parameter Name="OrderingBackground_InstanceCount" DefaultValue="-1" />
<Parameter Name="MarketingApi_InstanceCount" DefaultValue="-1" />
<Parameter Name="LocationsApi_InstanceCount" DefaultValue="-1" />
@ -20,6 +21,15 @@
<!-- Import the ServiceManifest from the ServicePackage. The ServiceManifestName and ServiceManifestVersion
should match the Name and Version attributes of the ServiceManifest element defined in the
ServiceManifest.xml file. -->
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="OrderingSignalrHubPkg" ServiceManifestVersion="1.0.0" />
<ConfigOverrides />
<Policies>
<ContainerHostPolicies CodePackageRef="Code">
<PortBinding ContainerPort="80" EndpointRef="OrderingSignalrHubTypeEndpoint" />
</ContainerHostPolicies>
</Policies>
</ServiceManifestImport>
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="OrderingBackgroundPkg" ServiceManifestVersion="1.0.0" />
<ConfigOverrides />
@ -112,6 +122,11 @@
ServiceFabric PowerShell module.
The attribute ServiceTypeName below must match the name defined in the imported ServiceManifest.xml file. -->
<Service Name="OrderingSignalrHub" ServicePackageActivationMode="ExclusiveProcess">
<StatelessService ServiceTypeName="OrderingSignalrHubType" InstanceCount="[OrderingSignalrHub_InstanceCount]">
<SingletonPartition />
</StatelessService>
</Service>
<Service Name="OrderingBackground" ServicePackageActivationMode="ExclusiveProcess">
<StatelessService ServiceTypeName="OrderingBackgroundType" InstanceCount="[OrderingBackground_InstanceCount]">
<SingletonPartition />

View File

@ -15,7 +15,7 @@
<EntryPoint>
<!-- Follow this link for more information about deploying Windows containers to Service Fabric: https://aka.ms/sfguestcontainers -->
<ContainerHost>
<ImageName>eshop/ordering.backgroundtasks</ImageName>
<ImageName>eshop/ordering.background:#{tag}#</ImageName>
</ContainerHost>
</EntryPoint>
<!-- Pass environment variables to your container: -->
@ -42,7 +42,7 @@
<!-- This endpoint is used by the communication listener to obtain the port on which to
listen. Please note that if your service is partitioned, this port is shared with
replicas of different partitions that are placed in your code. -->
<Endpoint Name="OrderingBackgroundTypeEndpoint" Port="5111" UriScheme="http"/>
<Endpoint Name="OrderingBackgroundTypeEndpoint" Port="5111" UriScheme="http" PathSuffix="eShopOnServiceFabric/OrderingBackground" />
</Endpoints>
</Resources>
</ServiceManifest>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<Settings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<!-- Add your custom configuration sections and parameters here -->
<!--
<Section Name="MyConfigSection">
<Parameter Name="MyParameter" Value="Value1" />
</Section>
-->
</Settings>

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest Name="OrderingSignalrHubPkg"
Version="1.0.0"
xmlns="http://schemas.microsoft.com/2011/01/fabric"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ServiceTypes>
<!-- This is the name of your ServiceType.
The UseImplicitHost attribute indicates this is a guest service. -->
<StatelessServiceType ServiceTypeName="OrderingSignalrHubType" UseImplicitHost="true" />
</ServiceTypes>
<!-- Code package is your service executable. -->
<CodePackage Name="Code" Version="1.0.0">
<EntryPoint>
<!-- Follow this link for more information about deploying Windows containers to Service Fabric: https://aka.ms/sfguestcontainers -->
<ContainerHost>
<ImageName>eshop/ordering.signalrhub:#{tag}#</ImageName>
</ContainerHost>
</EntryPoint>
<!-- Pass environment variables to your container: -->
<EnvironmentVariables>
<EnvironmentVariable Name="ASPNETCORE_ENVIRONMEN" Value="Development"/>
<EnvironmentVariable Name="ASPNETCORE_URLS" Value="http://0.0.0.0:80"/>
<EnvironmentVariable Name="EventBusConnection" Value="rabbitmq.eshoponservicefabricbus"/>
<EnvironmentVariable Name="EventBusUserName" Value="admin"/>
<EnvironmentVariable Name="EventBusPassword" Value="password"/>
<EnvironmentVariable Name="AzureServiceBusEnabled" Value="False"/>
<EnvironmentVariable Name="OrchestratorType" Value="SF"/>
<EnvironmentVariable Name="identityUrl" Value="http://identityapi.eshoponservicefabric:5105"/>
</EnvironmentVariables>
</CodePackage>
<!-- Config package is the contents of the Config directoy under PackageRoot that contains an
independently-updateable and versioned set of custom configuration settings for your service. -->
<ConfigPackage Name="Config" Version="1.0.0" />
<Resources>
<Endpoints>
<!-- This endpoint is used by the communication listener to obtain the port on which to
listen. Please note that if your service is partitioned, this port is shared with
replicas of different partitions that are placed in your code. -->
<Endpoint Name="OrderingSignalrHubTypeEndpoint" Port="5112" UriScheme="http" PathSuffix="eShopOnServiceFabric/OrderingSignalrHub" />
</Endpoints>
</Resources>
</ServiceManifest>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Application Name="fabric:/eShopOnServiceFabric" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameters>
<Parameter Name="OrderingSignalrHub_InstanceCount" Value="-1" />
<Parameter Name="OrderingBackground_InstanceCount" Value="-1" />
<Parameter Name="MarketingApi_InstanceCount" Value="1" />
<Parameter Name="LocationsApi_InstanceCount" Value="1" />

View File

@ -41,6 +41,8 @@
<Content Include="ApplicationPackageRoot\OrderingApiPkg\ServiceManifest.xml" />
<Content Include="ApplicationPackageRoot\OrderingBackgroundPkg\Config\Settings.xml" />
<Content Include="ApplicationPackageRoot\OrderingBackgroundPkg\ServiceManifest.xml" />
<Content Include="ApplicationPackageRoot\OrderingSignalrHubPkg\Config\Settings.xml" />
<Content Include="ApplicationPackageRoot\OrderingSignalrHubPkg\ServiceManifest.xml" />
<Content Include="ApplicationPackageRoot\PaymentApiPkg\Config\Settings.xml" />
<Content Include="ApplicationPackageRoot\PaymentApiPkg\ServiceManifest.xml" />
<Content Include="packages.config" />

View File

@ -25,18 +25,22 @@
<EnvironmentVariable Name="CatalogUrl" Value="http://catalogapi.eshoponservicefabric:5101"/>
<EnvironmentVariable Name="OrderingUrl" Value="http://orderingapi.eshoponservicefabric:5102"/>
<EnvironmentVariable Name="BasketUrl" Value="http://basketapi.eshoponservicefabric:5103"/>
<EnvironmentVariable Name="PaymentUrl" Value="http://paymentapi.eshoponservicefabric:5108"/>
<EnvironmentVariable Name="IdentityUrl" Value=""/>
<EnvironmentVariable Name="MarketingUrl" Value="http://marketingapi.eshoponservicefabric:5110"/>
<EnvironmentVariable Name="LocationsUrl" Value="http://locationsapi.eshoponservicefabric:5109"/>
<EnvironmentVariable Name="CatalogUrlHC" Value="http://catalogapi.eshoponservicefabric:5101/hc"/>
<EnvironmentVariable Name="OrderingUrlHC" Value="http://orderingapi.eshoponservicefabric:5102/hc"/>
<EnvironmentVariable Name="IdentityUrlHC" Value="http://identityapi.eshoponservicefabric:5105/hc"/>
<EnvironmentVariable Name="OrderingBackgroundUrlHC" Value="http://ordering.background.eshoponservicefabric:5111/hc"/>
<EnvironmentVariable Name="OrderingSignalrHubUrlHC" Value="http://ordering.signalrhub.eshoponservicefabric:5112/hc"/>
<EnvironmentVariable Name="BasketUrlHC" Value="http://basketapi.eshoponservicefabric:5103/hc"/>
<EnvironmentVariable Name="PaymentUrlHC" Value="http://paymentapi.eshoponservicefabric:5108/hc"/>
<EnvironmentVariable Name="IdentityUrlHC" Value="http://identityapi.eshoponservicefabric:5105/hc"/>
<EnvironmentVariable Name="MarketingUrlHC" Value="http://marketingapi.eshoponservicefabric:5110/hc"/>
<EnvironmentVariable Name="ApplicationInsights__InstrumentationKey" Value=""/>
<EnvironmentVariable Name="LocationsUrlHC" Value="http://locationsapi.eshoponservicefabric:5109/hc"/>
<EnvironmentVariable Name="PaymentUrlHC" Value="http://paymentapi.eshoponservicefabric:5108/hc"/>
<EnvironmentVariable Name="ApplicationInsights:InstrumentationKey" Value=""/>
<EnvironmentVariable Name="OrchestratorType" Value="SF"/>
<EnvironmentVariable Name="UseLoadTest" Value="True"/>
<EnvironmentVariable Name="UseLoadTest" Value="False"/>
</EnvironmentVariables>
</CodePackage>

View File

@ -11,6 +11,9 @@
<Parameter Name="BasketUrl" DefaultValue="" />
<Parameter Name="MarketingUrl" DefaultValue="" />
<Parameter Name="IdentityUrl" DefaultValue="" />
<Parameter Name="OrderingBackgroundUrl" DefaultValue=""/>
<Parameter Name="OrderingSignalrHubUrl" DefaultValue=""/>
<Parameter Name="PaymentUrl" DefaultValue=""/>
<Parameter Name="InstrumentationKey" DefaultValue="" />
</Parameters>
<!-- Import the ServiceManifest from the ServicePackage. The ServiceManifestName and ServiceManifestVersion
@ -21,11 +24,14 @@
<!-- Override external urls depending on environment -->
<EnvironmentOverrides CodePackageRef="Code">
<EnvironmentVariable Name="CatalogUrl" Value="[CatalogUrl]"/>
<EnvironmentVariable Name="PaymentUrl" Value="[PaymentUrl]"/>
<EnvironmentVariable Name="OrderingUrl" Value="[OrderingUrl]"/>
<EnvironmentVariable Name="BasketUrl" Value="[BasketUrl]"/>
<EnvironmentVariable Name="MarketingUrl" Value="[MarketingUrl]"/>
<EnvironmentVariable Name="IdentityUrl" Value="[IdentityUrl]"/>
<EnvironmentVariable Name="ApplicationInsights__InstrumentationKey" Value="[InstrumentationKey]"/>
<EnvironmentVariable Name="OrderingBackgroundUrl" Value="[OrderingBackgroundUrl]"/>
<EnvironmentVariable Name="OrderingSignalrHubUrl" Value="[OrderingSignalrHubUrl]"/>
<EnvironmentVariable Name="ApplicationInsights:InstrumentationKey" Value="[InstrumentationKey]"/>
</EnvironmentOverrides>
<Policies>
<ContainerHostPolicies CodePackageRef="Code">

View File

@ -26,14 +26,21 @@
<EnvironmentVariable Name="OrderingUrl" Value=""/>
<EnvironmentVariable Name="BasketUrl" Value=""/>
<EnvironmentVariable Name="MarketingUrl" Value=""/>
<EnvironmentVariable Name="PaymentUrl" Value=""/>
<EnvironmentVariable Name="OrderingBackgroundUrl" Value=""/>
<EnvironmentVariable Name="OrderingSignalrHubUrl" Value=""/>
<EnvironmentVariable Name="IdentityUrl" Value="http://#{your_sf_dns}#:5105"/>
<EnvironmentVariable Name="CatalogUrlHC" Value="http://catalogapi.eshoponservicefabric:5101/hc"/>
<EnvironmentVariable Name="OrderingUrlHC" Value="http://orderingapi.eshoponservicefabric:5102/hc"/>
<EnvironmentVariable Name="IdentityUrlHC" Value="http://identityapi.eshoponservicefabric:5105/hc"/>
<EnvironmentVariable Name="OrderingBackgroundUrlHC" Value="http://ordering.backgroundtasks.eshoponservicefabric:5111/hc"/>
<EnvironmentVariable Name="OrderingSignalrHubUrlHC" Value="http://ordering.signalrhub.eshoponservicefabric:5112/hc"/>
<EnvironmentVariable Name="BasketUrlHC" Value="http://basketapi.eshoponservicefabric:5103/hc"/>
<EnvironmentVariable Name="IdentityUrlHC" Value="http://identityapi.eshoponservicefabric:5105/hc"/>
<EnvironmentVariable Name="MarketingUrlHC" Value="http://marketingapi.eshoponservicefabric:5110/hc"/>
<EnvironmentVariable Name="LocationsUrlHC" Value="http://locationsapi.eshoponservicefabric:5109/hc"/>
<EnvironmentVariable Name="PaymentUrlHC" Value="http://paymentapi.eshoponservicefabric:5108/hc"/>
<EnvironmentVariable Name="UseCustomizationData" Value="True"/>
<EnvironmentVariable Name="ApplicationInsights__InstrumentationKey" Value=""/>
<EnvironmentVariable Name="ApplicationInsights:InstrumentationKey" Value=""/>
<EnvironmentVariable Name="OrchestratorType" Value="SF"/>
</EnvironmentVariables>
</CodePackage>

View File

@ -24,6 +24,8 @@
<EnvironmentVariable Name="ASPNETCORE_URLS" Value="http://0.0.0.0:80"/>
<EnvironmentVariable Name="CatalogUrl" Value="http://catalogapi.eshoponservicefabric:5101/hc"/>
<EnvironmentVariable Name="OrderingUrl" Value="http://orderingapi.eshoponservicefabric:5102/hc"/>
<EnvironmentVariable Name="OrderingBackgroundUrl" Value="http://ordering.background.eshoponservicefabric:5111/hc"/>
<EnvironmentVariable Name="OrderingSignalrHubUrl" Value="http://ordering.signalrhub.eshoponservicefabric:5112/hc"/>
<EnvironmentVariable Name="BasketUrl" Value="http://basketapi.eshoponservicefabric:5103/hc"/>
<EnvironmentVariable Name="IdentityUrl" Value="http://identityapi.eshoponservicefabric:5105/hc"/>
<EnvironmentVariable Name="MarketingUrl" Value="http://marketingapi.eshoponservicefabric:5110/hc"/>
@ -31,7 +33,7 @@
<EnvironmentVariable Name="PaymentUrl" Value="http://paymentapi.eshoponservicefabric:5108/hc"/>
<EnvironmentVariable Name="mvc" Value="http://webmvc.eshoponservicefabric:5100/hc"/>
<EnvironmentVariable Name="spa" Value="http://webspa.eshoponservicefabric:5104/hc"/>
<EnvironmentVariable Name="ApplicationInsights__InstrumentationKey" Value=""/>
<EnvironmentVariable Name="ApplicationInsights:InstrumentationKey" Value=""/>
<EnvironmentVariable Name="OrchestratorType" Value="SF"/>
</EnvironmentVariables>
</CodePackage>

View File

@ -23,7 +23,7 @@ Project("{A07B5EB6-E848-4116-A8D0-A826331D98C6}") = "Sql", "Infrastructure\eShop
EndProject
Project("{A07B5EB6-E848-4116-A8D0-A826331D98C6}") = "eShopOnServiceFabricApiGW", "eShopOnServiceFabricApiGateWays\eShopOnServiceFabricApiGW\eShopOnServiceFabricApiGW.sfproj", "{70EAD9E4-3357-4E09-A920-2A819D7D75BB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiGw_Base", "eShopOnServiceFabricApiGateWays\ApiGw_Base\ApiGw_Base.csproj", "{915E300A-B501-45A5-8A21-E39F72937FF1}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApiGw_Base", "eShopOnServiceFabricApiGateWays\ApiGw_Base\ApiGw_Base.csproj", "{915E300A-B501-45A5-8A21-E39F72937FF1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -22,13 +22,11 @@
<EnvironmentVariables>
<EnvironmentVariable Name="ASPNETCORE_ENVIRONMENT" Value="Development"/>
<EnvironmentVariable Name="ASPNETCORE_URLS" Value="http://0.0.0.0:80"/>
<EnvironmentVariable Name="CatalogUrl" Value="http://catalogapi.eshoponservicefabric:5101"/>
<EnvironmentVariable Name="OrderingUrl" Value="http://orderingapi.eshoponservicefabric:5102"/>
<EnvironmentVariable Name="BasketUrl" Value="http://basketapi.eshoponservicefabric:5103"/>
<EnvironmentVariable Name="PaymentUrl" Value="http://paymentapi.eshoponservicefabric:5108"/>
<EnvironmentVariable Name="IdentityUrl" Value=""/>
<EnvironmentVariable Name="MarketingUrl" Value="http://marketingapi.eshoponservicefabric:5110"/>
<EnvironmentVariable Name="LocationsUrl" Value="http://locationsapi.eshoponservicefabric:5109"/>
<EnvironmentVariable Name="CatalogUrlHC" Value="http://catalogapi.eshoponservicefabric:5101/hc"/>