diff --git a/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Mobile.Bff.Marketing.json b/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Mobile.Bff.Marketing.json index 85d6777e6..23b43ba43 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Mobile.Bff.Marketing.json +++ b/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Mobile.Bff.Marketing.json @@ -5,8 +5,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "marketing.api", - "Port": 80 + "Host": "marketingapi.eshoponservicefabric", + "Port": 5110 } ], "UpstreamPathTemplate": "/api/{version}/m/{everything}", @@ -17,8 +17,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "locations.api", - "Port": 80 + "Host": "locationsapi.eshoponservicefabric", + "Port": 5109 } ], "UpstreamPathTemplate": "/api/{version}/l/{everything}", @@ -26,9 +26,9 @@ } ], - "GlobalConfiguration": { - "RequestIdKey": "OcRequestId", - "AdministrationPath": "/administration" - } + "GlobalConfiguration": { + "RequestIdKey": "OcRequestId", + "AdministrationPath": "/administration" + } } \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Mobile.Bff.Shopping.json b/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Mobile.Bff.Shopping.json index 0fd6d9024..3733f4a51 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Mobile.Bff.Shopping.json +++ b/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Mobile.Bff.Shopping.json @@ -1,115 +1,115 @@ { - "ReRoutes": [ - { - "DownstreamPathTemplate": "/api/{version}/{everything}", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ - { - "Host": "catalog.api", - "Port": 80 - } - ], - "UpstreamPathTemplate": "/api/{version}/c/{everything}", - "UpstreamHttpMethod": [ "GET" ] - }, - { - "DownstreamPathTemplate": "/api/{version}/{everything}", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ - { - "Host": "basket.api", - "Port": 80 - } - ], - "UpstreamPathTemplate": "/api/{version}/b/{everything}", - "UpstreamHttpMethod": [], - "AuthenticationOptions": { - "AuthenticationProviderKey": "IdentityApiKey", - "AllowedScopes": [] + "ReRoutes": [ + { + "DownstreamPathTemplate": "/api/{version}/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "catalogapi.eshoponservicefabric", + "Port": 5101 } - }, - { - "DownstreamPathTemplate": "/api/{version}/{everything}", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ - { - "Host": "ordering.api", - "Port": 80 - } - ], - "UpstreamPathTemplate": "/api/{version}/o/{everything}", - "UpstreamHttpMethod": [], - "AuthenticationOptions": { - "AuthenticationProviderKey": "IdentityApiKey", - "AllowedScopes": [] + ], + "UpstreamPathTemplate": "/api/{version}/c/{everything}", + "UpstreamHttpMethod": [ "GET" ] + }, + { + "DownstreamPathTemplate": "/api/{version}/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "basketapi.eshoponservicefabric", + "Port": 5103 } - }, - { - "DownstreamPathTemplate": "/{everything}", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ - { - "Host": "mobileshoppingagg", - "Port": 80 - } - ], - "UpstreamPathTemplate": "/{everything}", - "UpstreamHttpMethod": [ "POST", "PUT", "GET" ], - "AuthenticationOptions": { - "AuthenticationProviderKey": "IdentityApiKey", - "AllowedScopes": [] + ], + "UpstreamPathTemplate": "/api/{version}/b/{everything}", + "UpstreamHttpMethod": [], + "AuthenticationOptions": { + "AuthenticationProviderKey": "IdentityApiKey", + "AllowedScopes": [] + } + }, + { + "DownstreamPathTemplate": "/api/{version}/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "orderingapi.eshoponservicefabric", + "Port": 5102 + } + ], + "UpstreamPathTemplate": "/api/{version}/o/{everything}", + "UpstreamHttpMethod": [], + "AuthenticationOptions": { + "AuthenticationProviderKey": "IdentityApiKey", + "AllowedScopes": [] + } + }, + { + "DownstreamPathTemplate": "/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "mobileshoppingagg.eshoponservicefabric", + "Port": 5120 } - }, - { - "DownstreamPathTemplate": "/{everything}", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ - { - "Host": "ordering.api", - "Port": 80 - } - ], - "UpstreamPathTemplate": "/orders-api/{everything}", - "UpstreamHttpMethod": [] - }, - { - "DownstreamPathTemplate": "/{everything}", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ - { - "Host": "basket.api", - "Port": 80 - } - ], - "UpstreamPathTemplate": "/basket-api/{everything}", - "UpstreamHttpMethod": [] - }, - { - "DownstreamPathTemplate": "/{everything}", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ - { - "Host": "catalog.api", - "Port": 80 - } - ], - "UpstreamPathTemplate": "/catalog-api/{everything}", - "UpstreamHttpMethod": [] - }, - { - "DownstreamPathTemplate": "/{everything}", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ - { - "Host": "payment.api", - "Port": 80 - } - ], - "UpstreamPathTemplate": "/payment-api/{everything}", - "UpstreamHttpMethod": [] + ], + "UpstreamPathTemplate": "/{everything}", + "UpstreamHttpMethod": [ "POST", "PUT", "GET" ], + "AuthenticationOptions": { + "AuthenticationProviderKey": "IdentityApiKey", + "AllowedScopes": [] } - - ], + }, + { + "DownstreamPathTemplate": "/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "orderingapi.eshoponservicefabric", + "Port": 5102 + } + ], + "UpstreamPathTemplate": "/orders-api/{everything}", + "UpstreamHttpMethod": [] + }, + { + "DownstreamPathTemplate": "/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "basketapi.eshoponservicefabric", + "Port": 5103 + } + ], + "UpstreamPathTemplate": "/basket-api/{everything}", + "UpstreamHttpMethod": [] + }, + { + "DownstreamPathTemplate": "/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "catalogapi.eshoponservicefabric", + "Port": 5101 + } + ], + "UpstreamPathTemplate": "/catalog-api/{everything}", + "UpstreamHttpMethod": [] + }, + { + "DownstreamPathTemplate": "/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "paymentapi.eshoponservicefabric", + "Port": 5108 + } + ], + "UpstreamPathTemplate": "/payment-api/{everything}", + "UpstreamHttpMethod": [] + } + + ], "GlobalConfiguration": { "RequestIdKey": "OcRequestId", "AdministrationPath": "/administration" diff --git a/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Web.Bff.Marketing.json b/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Web.Bff.Marketing.json index 8afe4a4d6..338ee7f0e 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Web.Bff.Marketing.json +++ b/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Web.Bff.Marketing.json @@ -5,8 +5,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "marketing.api", - "Port": 80 + "Host": "marketingapi.eshoponservicefabric", + "Port": 5110 } ], "UpstreamPathTemplate": "/api/{version}/m/{everything}", @@ -17,8 +17,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "locations.api", - "Port": 80 + "Host": "locationsapi.eshoponservicefabric", + "Port": 5109 } ], "UpstreamPathTemplate": "/api/{version}/l/{everything}", diff --git a/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Web.Bff.Shopping.json b/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Web.Bff.Shopping.json index b3e01d773..727a7da8b 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Web.Bff.Shopping.json +++ b/ServiceFabric/Linux/eShopOnServiceFabricApiGateWays/ApiGw_Base/Configurations/configuration.Web.Bff.Shopping.json @@ -5,8 +5,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "catalog.api", - "Port": 80 + "Host": "catalogapi.eshoponservicefabric", + "Port": 5101 } ], "UpstreamPathTemplate": "/api/{version}/c/{everything}", @@ -17,8 +17,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "basket.api", - "Port": 80 + "Host": "basketapi.eshoponservicefabric", + "Port": 5103 } ], "UpstreamPathTemplate": "/api/{version}/b/{everything}", @@ -33,8 +33,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "ordering.api", - "Port": 80 + "Host": "orderingapi.eshoponservicefabric", + "Port": 5102 } ], "UpstreamPathTemplate": "/api/{version}/o/{everything}", @@ -49,8 +49,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "webshoppingagg", - "Port": 80 + "Host": "webshoppingagg.eshoponservicefabric", + "Port": 5121 } ], "UpstreamPathTemplate": "/{everything}", @@ -65,8 +65,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "ordering.api", - "Port": 80 + "Host": "orderingapi.eshoponservicefabric", + "Port": 5102 } ], "UpstreamPathTemplate": "/orders-api/{everything}", @@ -77,7 +77,7 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "ordering.signalrhub", + "Host": "ordering.signalrhub.eshoponservicefabric", "Port": 80 } ], @@ -89,8 +89,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "basket.api", - "Port": 80 + "Host": "basketapi.eshoponservicefabric", + "Port": 5103 } ], "UpstreamPathTemplate": "/basket-api/{everything}", @@ -101,8 +101,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "catalog.api", - "Port": 80 + "Host": "catalogapi.eshoponservicefabric", + "Port": 5101 } ], "UpstreamPathTemplate": "/catalog-api/{everything}", @@ -113,8 +113,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "payment.api", - "Port": 80 + "Host": "paymentapi.eshoponservicefabric", + "Port": 5108 } ], "UpstreamPathTemplate": "/payment-api/{everything}", diff --git a/ServiceFabric/Linux/sfLinux.sln b/ServiceFabric/Linux/sfLinux.sln index 0800198f2..d942549bd 100644 --- a/ServiceFabric/Linux/sfLinux.sln +++ b/ServiceFabric/Linux/sfLinux.sln @@ -23,7 +23,9 @@ 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 +Project("{A07B5EB6-E848-4116-A8D0-A826331D98C6}") = "eShopOnServiceFabricBFF", "..\..\..\..\..\..\Users\epique\Downloads\eShopOnServiceFabricBFF\eShopOnServiceFabricBFF\eShopOnServiceFabricBFF.sfproj", "{E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -121,6 +123,14 @@ Global {915E300A-B501-45A5-8A21-E39F72937FF1}.Release|Any CPU.Build.0 = Release|Any CPU {915E300A-B501-45A5-8A21-E39F72937FF1}.Release|x64.ActiveCfg = Release|Any CPU {915E300A-B501-45A5-8A21-E39F72937FF1}.Release|x64.Build.0 = Release|Any CPU + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Debug|Any CPU.ActiveCfg = Debug|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Debug|x64.ActiveCfg = Debug|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Debug|x64.Build.0 = Debug|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Debug|x64.Deploy.0 = Debug|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Release|Any CPU.ActiveCfg = Release|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Release|x64.ActiveCfg = Release|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Release|x64.Build.0 = Release|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Release|x64.Deploy.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml index 05704ada8..8fd1de234 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml @@ -5,6 +5,7 @@ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + @@ -20,6 +21,16 @@ + + + + + + + + + + @@ -112,6 +123,11 @@ ServiceFabric PowerShell module. The attribute ServiceTypeName below must match the name defined in the imported ServiceManifest.xml file. --> + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingSignalrhubPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingSignalrhubPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingSignalrhubPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingSignalrhubPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingSignalrhubPkg/ServiceManifest.xml new file mode 100644 index 000000000..7437a02b2 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingSignalrhubPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + eshop/ordering.signalrhub:#{tag}# + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Cloud.xml index 48b8b6b33..bb3b4c6ad 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Cloud.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Cloud.xml @@ -1,6 +1,7 @@  + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/eShopOnServiceFabric.sfproj b/ServiceFabric/Windows/eShopOnServiceFabric/eShopOnServiceFabric.sfproj index 869298e5b..facd0a647 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabric/eShopOnServiceFabric.sfproj +++ b/ServiceFabric/Windows/eShopOnServiceFabric/eShopOnServiceFabric.sfproj @@ -41,6 +41,8 @@ + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Mobile.Bff.Marketing.json b/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Mobile.Bff.Marketing.json index 85d6777e6..52c122bf1 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Mobile.Bff.Marketing.json +++ b/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Mobile.Bff.Marketing.json @@ -5,8 +5,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "marketing.api", - "Port": 80 + "Host": "marketingapi.eshoponservicefabric", + "Port": 5110 } ], "UpstreamPathTemplate": "/api/{version}/m/{everything}", @@ -17,8 +17,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "locations.api", - "Port": 80 + "Host": "locationsapi.eshoponservicefabric", + "Port": 5109 } ], "UpstreamPathTemplate": "/api/{version}/l/{everything}", diff --git a/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Mobile.Bff.Shopping.json b/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Mobile.Bff.Shopping.json index 0fd6d9024..9acbf4756 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Mobile.Bff.Shopping.json +++ b/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Mobile.Bff.Shopping.json @@ -5,8 +5,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "catalog.api", - "Port": 80 + "Host": "catalogapi.eshoponservicefabric", + "Port": 5101 } ], "UpstreamPathTemplate": "/api/{version}/c/{everything}", @@ -17,8 +17,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "basket.api", - "Port": 80 + "Host": "basketapi.eshoponservicefabric", + "Port": 5103 } ], "UpstreamPathTemplate": "/api/{version}/b/{everything}", @@ -33,8 +33,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "ordering.api", - "Port": 80 + "Host": "orderingapi.eshoponservicefabric", + "Port": 5102 } ], "UpstreamPathTemplate": "/api/{version}/o/{everything}", @@ -49,8 +49,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "mobileshoppingagg", - "Port": 80 + "Host": "mobileshoppingagg.eshoponservicefabric", + "Port": 5120 } ], "UpstreamPathTemplate": "/{everything}", @@ -65,8 +65,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "ordering.api", - "Port": 80 + "Host": "orderingapi.eshoponservicefabric", + "Port": 5102 } ], "UpstreamPathTemplate": "/orders-api/{everything}", @@ -77,8 +77,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "basket.api", - "Port": 80 + "Host": "basketapi.eshoponservicefabric", + "Port": 5103 } ], "UpstreamPathTemplate": "/basket-api/{everything}", @@ -89,8 +89,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "catalog.api", - "Port": 80 + "Host": "catalogapi.eshoponservicefabric", + "Port": 5101 } ], "UpstreamPathTemplate": "/catalog-api/{everything}", @@ -101,8 +101,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "payment.api", - "Port": 80 + "Host": "paymentapi.eshoponservicefabric", + "Port": 5108 } ], "UpstreamPathTemplate": "/payment-api/{everything}", diff --git a/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Web.Bff.Marketing.json b/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Web.Bff.Marketing.json index 8afe4a4d6..338ee7f0e 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Web.Bff.Marketing.json +++ b/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Web.Bff.Marketing.json @@ -5,8 +5,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "marketing.api", - "Port": 80 + "Host": "marketingapi.eshoponservicefabric", + "Port": 5110 } ], "UpstreamPathTemplate": "/api/{version}/m/{everything}", @@ -17,8 +17,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "locations.api", - "Port": 80 + "Host": "locationsapi.eshoponservicefabric", + "Port": 5109 } ], "UpstreamPathTemplate": "/api/{version}/l/{everything}", diff --git a/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Web.Bff.Shopping.json b/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Web.Bff.Shopping.json index b3e01d773..727a7da8b 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Web.Bff.Shopping.json +++ b/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/ApiGw_Base/Configurations/configuration.Web.Bff.Shopping.json @@ -5,8 +5,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "catalog.api", - "Port": 80 + "Host": "catalogapi.eshoponservicefabric", + "Port": 5101 } ], "UpstreamPathTemplate": "/api/{version}/c/{everything}", @@ -17,8 +17,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "basket.api", - "Port": 80 + "Host": "basketapi.eshoponservicefabric", + "Port": 5103 } ], "UpstreamPathTemplate": "/api/{version}/b/{everything}", @@ -33,8 +33,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "ordering.api", - "Port": 80 + "Host": "orderingapi.eshoponservicefabric", + "Port": 5102 } ], "UpstreamPathTemplate": "/api/{version}/o/{everything}", @@ -49,8 +49,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "webshoppingagg", - "Port": 80 + "Host": "webshoppingagg.eshoponservicefabric", + "Port": 5121 } ], "UpstreamPathTemplate": "/{everything}", @@ -65,8 +65,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "ordering.api", - "Port": 80 + "Host": "orderingapi.eshoponservicefabric", + "Port": 5102 } ], "UpstreamPathTemplate": "/orders-api/{everything}", @@ -77,7 +77,7 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "ordering.signalrhub", + "Host": "ordering.signalrhub.eshoponservicefabric", "Port": 80 } ], @@ -89,8 +89,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "basket.api", - "Port": 80 + "Host": "basketapi.eshoponservicefabric", + "Port": 5103 } ], "UpstreamPathTemplate": "/basket-api/{everything}", @@ -101,8 +101,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "catalog.api", - "Port": 80 + "Host": "catalogapi.eshoponservicefabric", + "Port": 5101 } ], "UpstreamPathTemplate": "/catalog-api/{everything}", @@ -113,8 +113,8 @@ "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "payment.api", - "Port": 80 + "Host": "paymentapi.eshoponservicefabric", + "Port": 5108 } ], "UpstreamPathTemplate": "/payment-api/{everything}", diff --git a/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/eShopOnServiceFabricApiGW/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/eShopOnServiceFabricApiGW/PublishProfiles/Local.5Node.xml index aea6a1fed..d630c33f8 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/eShopOnServiceFabricApiGW/PublishProfiles/Local.5Node.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabricApiGateWays/eShopOnServiceFabricApiGW/eShopOnServiceFabricApiGW/PublishProfiles/Local.5Node.xml @@ -8,7 +8,7 @@ --> - + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..abcef07c1 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobilemarketingapigwPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobilemarketingapigwPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobilemarketingapigwPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobilemarketingapigwPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobilemarketingapigwPkg/ServiceManifest.xml new file mode 100644 index 000000000..f52402266 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobilemarketingapigwPkg/ServiceManifest.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + eshop/ocelotapigw:#{tag}# + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobileshoppingaggPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobileshoppingaggPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobileshoppingaggPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobileshoppingaggPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobileshoppingaggPkg/ServiceManifest.xml new file mode 100644 index 000000000..5c8389650 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobileshoppingaggPkg/ServiceManifest.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + eshop/mobileshoppingagg:#{tag}# + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobileshoppingapigwPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobileshoppingapigwPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobileshoppingapigwPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobileshoppingapigwPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobileshoppingapigwPkg/ServiceManifest.xml new file mode 100644 index 000000000..51b541a48 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/mobileshoppingapigwPkg/ServiceManifest.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + eshop/ocelotapigw:#{tag}# + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webmarketingapigwPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webmarketingapigwPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webmarketingapigwPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webmarketingapigwPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webmarketingapigwPkg/ServiceManifest.xml new file mode 100644 index 000000000..8cee2f02d --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webmarketingapigwPkg/ServiceManifest.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + eshop/ocelotapigw:#{tag}# + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webshoppingaggPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webshoppingaggPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webshoppingaggPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webshoppingaggPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webshoppingaggPkg/ServiceManifest.xml new file mode 100644 index 000000000..bbe6caeb2 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webshoppingaggPkg/ServiceManifest.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + eshop/webshoppingagg:#{tag}# + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webshoppingapigwPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webshoppingapigwPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webshoppingapigwPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webshoppingapigwPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webshoppingapigwPkg/ServiceManifest.xml new file mode 100644 index 000000000..1693e2a1d --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationPackageRoot/webshoppingapigwPkg/ServiceManifest.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + eshop/ocelotapigw:#{tag}# + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..d5264ea5d --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationParameters/Cloud.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..3c8af4d04 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..3c8af4d04 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/PublishProfiles/Cloud.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricBFF/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/eShopOnServiceFabricBFF/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/eShopOnServiceFabricBFF.sfproj b/ServiceFabric/Windows/eShopOnServiceFabricBFF/eShopOnServiceFabricBFF.sfproj new file mode 100644 index 000000000..e4a9c74d0 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/eShopOnServiceFabricBFF.sfproj @@ -0,0 +1,56 @@ + + + + + e7ce09db-6223-4a36-a5a9-aec2e4fe6833 + 2.3 + 1.5 + 1.6.7 + v4.6.2 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricBFF/packages.config b/ServiceFabric/Windows/eShopOnServiceFabricBFF/packages.config new file mode 100644 index 000000000..6fcd5700a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricBFF/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/sfwin.sln b/ServiceFabric/Windows/sfwin.sln index 0180cb8fe..d83c1797e 100644 --- a/ServiceFabric/Windows/sfwin.sln +++ b/ServiceFabric/Windows/sfwin.sln @@ -25,6 +25,8 @@ Project("{A07B5EB6-E848-4116-A8D0-A826331D98C6}") = "Redis", "Infrastructure\eSh EndProject Project("{A07B5EB6-E848-4116-A8D0-A826331D98C6}") = "Sql", "Infrastructure\eShopOnServiceFabricSql\Sql\Sql.sfproj", "{65A83188-79C1-47AD-931D-8E8A87247408}" EndProject +Project("{A07B5EB6-E848-4116-A8D0-A826331D98C6}") = "eShopOnServiceFabricBFF", "eShopOnServiceFabricBFF\eShopOnServiceFabricBFF.sfproj", "{E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -121,6 +123,14 @@ Global {65A83188-79C1-47AD-931D-8E8A87247408}.Release|x64.ActiveCfg = Release|x64 {65A83188-79C1-47AD-931D-8E8A87247408}.Release|x64.Build.0 = Release|x64 {65A83188-79C1-47AD-931D-8E8A87247408}.Release|x64.Deploy.0 = Release|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Debug|Any CPU.ActiveCfg = Debug|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Debug|x64.ActiveCfg = Debug|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Debug|x64.Build.0 = Debug|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Debug|x64.Deploy.0 = Debug|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Release|Any CPU.ActiveCfg = Release|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Release|x64.ActiveCfg = Release|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Release|x64.Build.0 = Release|x64 + {E7CE09DB-6223-4A36-A5A9-AEC2E4FE6833}.Release|x64.Deploy.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE