From 7861d5df872d233a361ab33dab50f7cf110337db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Tom=C3=A1s?= Date: Thu, 26 Oct 2017 19:18:45 +0200 Subject: [PATCH 1/7] Updated settings for k8s / SF to enable Load testing mode Updated load tests --- .../BasketApiPkg/ServiceManifest.xml | 3 ++- .../CatalogApiPkg/ServiceManifest.xml | 2 +- .../LocationsApiPkg/ServiceManifest.xml | 3 ++- .../MarketingApiPkg/ServiceManifest.xml | 3 ++- .../OrderingApiPkg/ServiceManifest.xml | 3 ++- .../PaymentApiPkg/ServiceManifest.xml | 2 +- .../WebMVCPkg/ServiceManifest.xml | 1 + .../BasketApiPkg/ServiceManifest.xml | 1 + .../LocationsApiPkg/ServiceManifest.xml | 1 + .../MarketingApiPkg/ServiceManifest.xml | 1 + .../OrderingApiPkg/ServiceManifest.xml | 1 + .../WebMVCPkg/ServiceManifest.xml | 1 + k8s/conf_local.yml | 1 + k8s/deployments.yaml | 25 +++++++++++++++++++ test/Services/LoadTest/Basket.loadtest | 2 +- test/Services/LoadTest/Campaigns.loadtest | 4 +-- test/Services/LoadTest/Catalog.loadtest | 2 +- test/Services/LoadTest/Locations.loadtest | 2 +- test/Services/LoadTest/OrderProducts.loadtest | 7 +++++- .../LoadTest/WebMVC/AddProducts.webtest | 4 +-- .../LoadTest/WebMVC/CreateNewOrder.webtest | 2 +- 21 files changed, 56 insertions(+), 15 deletions(-) diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml index b73e3d5f7..b315a9cd6 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml @@ -29,6 +29,7 @@ + @@ -41,7 +42,7 @@ - + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml index f46e22fc7..a5ec64ccf 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml @@ -44,7 +44,7 @@ - + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml index b67bb16ee..4059d0685 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml @@ -30,6 +30,7 @@ + @@ -42,7 +43,7 @@ - + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml index 615379176..e13280003 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml @@ -36,6 +36,7 @@ + @@ -48,7 +49,7 @@ - + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml index b6820aa70..4fd00e64a 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml @@ -32,6 +32,7 @@ + @@ -44,7 +45,7 @@ - + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml index 2a9a4dfd6..a9365f0bb 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml @@ -38,7 +38,7 @@ - + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml index 9b6e89cfe..ef6d8b4c9 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml @@ -36,6 +36,7 @@ + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml index 4a5574fd6..f7912732e 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml @@ -31,6 +31,7 @@ + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml index 47dbb5a12..b235e2ec6 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml @@ -32,6 +32,7 @@ + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml index db840c274..48447232c 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml @@ -38,6 +38,7 @@ + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml index d014b3ee8..e8106908b 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml @@ -34,6 +34,7 @@ + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml index 927220a15..b3041084c 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml @@ -36,6 +36,7 @@ + diff --git a/k8s/conf_local.yml b/k8s/conf_local.yml index a605ff7aa..9a2059e63 100644 --- a/k8s/conf_local.yml +++ b/k8s/conf_local.yml @@ -22,6 +22,7 @@ data: OrderingSqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word; PaymentBus: rabbitmq UseAzureServiceBus: "False" + EnableLoadTest: "False" keystore: keystore-data GracePeriodManager_GracePeriodTime: "1" GracePeriodManager_CheckUpdateTime: "15000" diff --git a/k8s/deployments.yaml b/k8s/deployments.yaml index 14b5ac31b..9935b83d7 100644 --- a/k8s/deployments.yaml +++ b/k8s/deployments.yaml @@ -42,6 +42,11 @@ spec: configMapKeyRef: name: urls key: IdentityUrl + - name: UseLoadTest + valueFrom: + configMapKeyRef: + name: externalcfg + key: EnableLoadTest - name: OrchestratorType value: 'K8S' ports: @@ -269,6 +274,11 @@ spec: configMapKeyRef: name: externalcfg key: Instrumentation_Key + - name: UseLoadTest + valueFrom: + configMapKeyRef: + name: externalcfg + key: EnableLoadTest - name: OrchestratorType value: 'K8S' ports: @@ -344,6 +354,11 @@ spec: configMapKeyRef: name: externalcfg key: Instrumentation_Key + - name: UseLoadTest + valueFrom: + configMapKeyRef: + name: externalcfg + key: EnableLoadTest - name: OrchestratorType value: 'K8S' ports: @@ -429,6 +444,11 @@ spec: configMapKeyRef: name: externalcfg key: Instrumentation_Key + - name: UseLoadTest + valueFrom: + configMapKeyRef: + name: externalcfg + key: EnableLoadTest - name: OrchestratorType value: 'K8S' ports: @@ -601,6 +621,11 @@ spec: configMapKeyRef: name: externalcfg key: Instrumentation_Key + - name: UseLoadTest + valueFrom: + configMapKeyRef: + name: externalcfg + key: EnableLoadTest - name: OrchestratorType value: 'K8S' ports: diff --git a/test/Services/LoadTest/Basket.loadtest b/test/Services/LoadTest/Basket.loadtest index 03dce8647..63a682a5d 100644 --- a/test/Services/LoadTest/Basket.loadtest +++ b/test/Services/LoadTest/Basket.loadtest @@ -3,7 +3,7 @@ - + diff --git a/test/Services/LoadTest/Campaigns.loadtest b/test/Services/LoadTest/Campaigns.loadtest index ac91e6979..0e1fa2fb3 100644 --- a/test/Services/LoadTest/Campaigns.loadtest +++ b/test/Services/LoadTest/Campaigns.loadtest @@ -3,7 +3,7 @@ - + @@ -45,7 +45,7 @@ - + diff --git a/test/Services/LoadTest/Catalog.loadtest b/test/Services/LoadTest/Catalog.loadtest index 938fba855..ec522dc5e 100644 --- a/test/Services/LoadTest/Catalog.loadtest +++ b/test/Services/LoadTest/Catalog.loadtest @@ -3,7 +3,7 @@ - + diff --git a/test/Services/LoadTest/Locations.loadtest b/test/Services/LoadTest/Locations.loadtest index af36d698c..84a77fd5e 100644 --- a/test/Services/LoadTest/Locations.loadtest +++ b/test/Services/LoadTest/Locations.loadtest @@ -3,7 +3,7 @@ - + diff --git a/test/Services/LoadTest/OrderProducts.loadtest b/test/Services/LoadTest/OrderProducts.loadtest index 63e0f88f3..a03af3d7a 100644 --- a/test/Services/LoadTest/OrderProducts.loadtest +++ b/test/Services/LoadTest/OrderProducts.loadtest @@ -3,7 +3,7 @@ - + @@ -49,6 +49,11 @@ + + + + + diff --git a/test/Services/LoadTest/WebMVC/AddProducts.webtest b/test/Services/LoadTest/WebMVC/AddProducts.webtest index 66c8df9f0..060148a1f 100644 --- a/test/Services/LoadTest/WebMVC/AddProducts.webtest +++ b/test/Services/LoadTest/WebMVC/AddProducts.webtest @@ -25,7 +25,7 @@ - + @@ -37,6 +37,7 @@ + @@ -45,7 +46,6 @@ - diff --git a/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest b/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest index e83777734..e43f84d56 100644 --- a/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest +++ b/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest @@ -165,6 +165,7 @@ + @@ -186,7 +187,6 @@ - From 780123813d5f74c6e834efdcae717ccb8cd2af48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Tom=C3=A1s?= Date: Fri, 27 Oct 2017 10:53:02 +0200 Subject: [PATCH 2/7] Added placeholder for eshop image tags in SF config manifests --- .../ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml | 2 +- .../ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml index b315a9cd6..75aecd407 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/basket.api:latest + eshop/basket.api:#{tag}# diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml index a5ec64ccf..bd30b4494 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/catalog.api:latest + eshop/catalog.api:#{tag}# diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml index 4059d0685..5c19939a4 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/locations.api:latest + eshop/locations.api:#{tag}# diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml index e13280003..defca436c 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/marketing.api:latest + eshop/marketing.api:#{tag}# diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml index 4fd00e64a..035005544 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/ordering.api:latest + eshop/ordering.api:#{tag}# diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml index a9365f0bb..88deeeade 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/payment.api:latest + eshop/payment.api:#{tag}# diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml index 60a6ef71b..35bc15b68 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/identity.api:latest + eshop/identity.api:#{tag}# diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml index ef6d8b4c9..7b6aa5565 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/webmvc:latest + eshop/webmvc:#{tag}# diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml index 470eb37b4..64d719c59 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/webspa:latest + eshop/webspa:#{tag}# diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml index 26e50454b..456c92ea1 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/webstatus:latest + eshop/webstatus:#{tag}# diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml index f7912732e..d45768eba 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/basket.api-win + eshop/basket.api-win:#{tag}# diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml index f101ce6b9..5c14568eb 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/catalog.api-win + eshop/catalog.api-win:#{tag}# diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml index b235e2ec6..36a817d36 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/locations.api-win + eshop/locations.api-win:#{tag}# diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml index 48447232c..2fa855974 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/marketing.api-win + eshop/marketing.api-win:#{tag}# diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml index e8106908b..3ef5408a5 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/ordering.api-win + eshop/ordering.api-win:#{tag}# diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml index fe787521f..5d46ef47c 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/payment.api-win + eshop/payment.api-win:#{tag}# diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml index f6de99e73..9650b783e 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/identity.api-win + eshop/identity.api-win:#{tag}# diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml index b3041084c..55828da3e 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/webmvc-win + eshop/webmvc-win:#{tag}# diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml index ea6e46d72..a0bd28a94 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/webspa-win + eshop/webspa-win:#{tag}# diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml index 3cbfc87a9..58968f0e5 100644 --- a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml @@ -15,7 +15,7 @@ - eshop/webstatus-win + eshop/webstatus-win:#{tag}# From bf40b4be8313a7144230dcd79c6ef2689e3fdf72 Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Fri, 27 Oct 2017 13:08:50 -0700 Subject: [PATCH 3/7] Increased the port range for firewall rules --- cli-windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli-windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 b/cli-windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 index e3545c584..271b6a77d 100644 --- a/cli-windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 +++ b/cli-windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 @@ -21,6 +21,6 @@ try { Write-Host "Rule found" } catch [Exception] { - New-NetFirewallRule -DisplayName eShopOnContainers-Inbound -Confirm -Description "eShopOnContainers Inbound Rule for port range 5100-5110" -LocalAddress Any -LocalPort 5100-5110 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound - New-NetFirewallRule -DisplayName eShopOnContainers-Outbound -Confirm -Description "eShopOnContainers Outbound Rule for port range 5100-5110" -LocalAddress Any -LocalPort 5100-5110 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound + New-NetFirewallRule -DisplayName eShopOnContainers-Inbound -Confirm -Description "eShopOnContainers Inbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound + New-NetFirewallRule -DisplayName eShopOnContainers-Outbound -Confirm -Description "eShopOnContainers Outbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound } \ No newline at end of file From 8c810ad8a1a8cb5867abd79b4313196bfda644b3 Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Fri, 27 Oct 2017 14:28:27 -0700 Subject: [PATCH 4/7] Minor changes in SwaggerEndpoints for each microservice. --- src/Services/Basket/Basket.API/Startup.cs | 2 +- src/Services/Catalog/Catalog.API/Startup.cs | 2 +- src/Services/Location/Locations.API/Startup.cs | 2 +- src/Services/Marketing/Marketing.API/Startup.cs | 2 +- src/Services/Ordering/Ordering.API/Startup.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Services/Basket/Basket.API/Startup.cs b/src/Services/Basket/Basket.API/Startup.cs index d1550eec8..e96a4e9e9 100644 --- a/src/Services/Basket/Basket.API/Startup.cs +++ b/src/Services/Basket/Basket.API/Startup.cs @@ -199,7 +199,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API app.UseSwagger() .UseSwaggerUI(c => { - c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "My API V1"); + c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Basket.API V1"); c.ConfigureOAuth2("basketswaggerui", "", "", "Basket Swagger UI"); }); diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs index 6037b0eb0..892740b16 100644 --- a/src/Services/Catalog/Catalog.API/Startup.cs +++ b/src/Services/Catalog/Catalog.API/Startup.cs @@ -198,7 +198,7 @@ app.UseSwagger() .UseSwaggerUI(c => { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); + c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Catalog.API V1"); }); ConfigureEventBus(app); diff --git a/src/Services/Location/Locations.API/Startup.cs b/src/Services/Location/Locations.API/Startup.cs index 0cf49a3b5..3f895c625 100644 --- a/src/Services/Location/Locations.API/Startup.cs +++ b/src/Services/Location/Locations.API/Startup.cs @@ -171,7 +171,7 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API app.UseSwagger() .UseSwaggerUI(c => { - c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "My API V1"); + c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Locations.API V1"); c.ConfigureOAuth2("locationsswaggerui", "", "", "Locations Swagger UI"); }); diff --git a/src/Services/Marketing/Marketing.API/Startup.cs b/src/Services/Marketing/Marketing.API/Startup.cs index 461ecc080..6112ecd4f 100644 --- a/src/Services/Marketing/Marketing.API/Startup.cs +++ b/src/Services/Marketing/Marketing.API/Startup.cs @@ -203,7 +203,7 @@ app.UseSwagger() .UseSwaggerUI(c => { - c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "My API V1"); + c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Marketing.API V1"); c.ConfigureOAuth2("marketingswaggerui", "", "", "Marketing Swagger UI"); }); diff --git a/src/Services/Ordering/Ordering.API/Startup.cs b/src/Services/Ordering/Ordering.API/Startup.cs index 76cb274e7..c55cfd2c0 100644 --- a/src/Services/Ordering/Ordering.API/Startup.cs +++ b/src/Services/Ordering/Ordering.API/Startup.cs @@ -225,7 +225,7 @@ app.UseSwagger() .UseSwaggerUI(c => { - c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "My API V1"); + c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Ordering.API V1"); c.ConfigureOAuth2("orderingswaggerui", "", "", "Ordering Swagger UI"); }); From 779c7c290109ad663a81868272a8c17ae5317c36 Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Fri, 27 Oct 2017 15:27:51 -0700 Subject: [PATCH 5/7] Refactoring in docker-compose files --- docker-compose.override.yml | 9 +++ docker-compose.prod.yml | 126 ++++++++++++++++++++++++++---------- docker-compose.yml | 5 -- 3 files changed, 100 insertions(+), 40 deletions(-) diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 449bc4a74..370aeed11 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -212,3 +212,12 @@ services: nosql.data: ports: - "27017:27017" + + basket.data: + ports: + - "6379:6379" + + rabbitmq: + ports: + - "15672:15672" + - "5672:5672" \ No newline at end of file diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index a2301c236..e20614509 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -6,79 +6,99 @@ version: '3' # but values present in the environment vars at runtime will always override those defined inside the .env file # An external IP or DNS name has to be used when testing the Web apps and the Xamarin apps from remote machines/devices using the same WiFi, for instance. # +# IMPORTANT: Note that this compose file uses ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP instead of ESHOP_EXTERNAL_DNS_NAME_OR_IP # Set ASPNETCORE_ENVIRONMENT=Development to get errors while testing. # # You need to start it with the following CLI command: # docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d services: - + basket.api: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basket.data} - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} + ports: - "5103:80" catalog.api: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word} - PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG_URL:-http://localhost:5101/api/v1/catalog/items/[0]/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME} - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY} - UseCustomizationData=True - AzureServiceBusEnabled=False - AzureStorageEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5101:80" identity.api: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - SpaClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5104 - - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback - - ConnectionStrings__DefaultConnection=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word} + - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback #localhost do not work for UWP login, so we have to use "external" IP always + - ConnectionString=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word} - MvcClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5110. - LocationApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5109 - MarketingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110 - BasketApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103 - - OrderingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102 - - UseCustomizationData=True + - OrderingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102 + - UseCustomizationData=True + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5105:80" ordering.api: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - UseCustomizationData=True - AzureServiceBusEnabled=False - CheckUpdateTime=30000 - - GracePeriodTime=1 + - GracePeriodTime=1 + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5102:80" marketing.api: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word} - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data} - MongoDatabase=MarketingDb - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI} @@ -87,56 +107,60 @@ services: - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY} - AzureServiceBusEnabled=False - AzureStorageEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5110:80" webspa: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - CatalogUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101 - OrderingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102 - - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your host's firewall at range 5100-5110. + - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - BasketUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103 - MarketingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110 + - LocationsUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5109 - CatalogUrlHC=http://catalog.api/hc - OrderingUrlHC=http://ordering.api/hc - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. - BasketUrlHC=http://basket.api/hc - MarketingUrlHC=http://marketing.api/hc + - PaymentUrlHC=http://payment.api/hc - UseCustomizationData=True + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5104:80" webmvc: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - CatalogUrl=http://catalog.api - OrderingUrl=http://ordering.api - BasketUrl=http://basket.api - - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. - - MarketingUrl=http://marketing.api #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. - #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser. + - LocationsUrl=http://locations.api + - IdentityUrl=http://10.0.75.1:5105 + - MarketingUrl=http://marketing.api #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. #Remote: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser. + - CatalogUrlHC=http://catalog.api/hc + - OrderingUrlHC=http://ordering.api/hc + - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. + - BasketUrlHC=http://basket.api/hc + - MarketingUrlHC=http://marketing.api/hc + - PaymentUrlHC=http://payment.api/hc - UseCustomizationData=True + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5100:80" - sql.data: - environment: - - MSSQL_SA_PASSWORD=Pass@word - - ACCEPT_EULA=Y - - MSSQL_PID=Developer - ports: - - "5433:1433" - - nosql.data: - ports: - - "27017:27017" - webstatus: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - CatalogUrl=http://catalog.api/hc - OrderingUrl=http://ordering.api/hc @@ -144,30 +168,62 @@ services: - IdentityUrl=http://identity.api/hc - LocationsUrl=http://locations.api/hc - MarketingUrl=http://marketing.api/hc + - PaymentUrl=http://payment.api/hc - mvc=http://webmvc/hc - spa=http://webspa/hc - + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5107:80" payment.api: environment: - - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:5108 + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5108:80" locations.api: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data} - Database=LocationsDb - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} + ports: + - "5109:80" + + sql.data: + environment: + - MSSQL_SA_PASSWORD=Pass@word + - ACCEPT_EULA=Y + - MSSQL_PID=Developer + ports: + - "5433:1433" + + nosql.data: + ports: + - "27017:27017" + + basket.data: + ports: + - "6379:6379" + + rabbitmq: ports: - - "5109:80" \ No newline at end of file + - "15672:15672" + - "5672:5672" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index d05d5f697..1c854c998 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -104,11 +104,6 @@ services: basket.data: image: redis - ports: - - "6379:6379" rabbitmq: image: rabbitmq:3-management - ports: - - "15672:15672" - - "5672:5672" \ No newline at end of file From dbc80a3596d807cbc41ea47d48fcb9b52a139076 Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Fri, 27 Oct 2017 15:30:36 -0700 Subject: [PATCH 6/7] Updates in docker-compose.prod.yml --- docker-compose.prod.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index e20614509..5a15ab408 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -7,7 +7,8 @@ version: '3' # An external IP or DNS name has to be used when testing the Web apps and the Xamarin apps from remote machines/devices using the same WiFi, for instance. # # IMPORTANT: Note that this compose file uses ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP instead of ESHOP_EXTERNAL_DNS_NAME_OR_IP -# Set ASPNETCORE_ENVIRONMENT=Development to get errors while testing. + +# Set ASPNETCORE_ENVIRONMENT=Development, instead Production, if you want to show up errors while testing. # # You need to start it with the following CLI command: # docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d @@ -16,7 +17,7 @@ services: basket.api: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basket.data} - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. @@ -34,7 +35,7 @@ services: catalog.api: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word} - PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG_URL:-http://localhost:5101/api/v1/catalog/items/[0]/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110. @@ -53,7 +54,7 @@ services: identity.api: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - SpaClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5104 - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback #localhost do not work for UWP login, so we have to use "external" IP always @@ -71,7 +72,7 @@ services: ordering.api: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. @@ -91,7 +92,7 @@ services: marketing.api: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word} - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data} @@ -115,7 +116,7 @@ services: webspa: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - CatalogUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101 - OrderingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102 @@ -137,7 +138,7 @@ services: webmvc: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - CatalogUrl=http://catalog.api - OrderingUrl=http://ordering.api @@ -160,7 +161,7 @@ services: webstatus: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - CatalogUrl=http://catalog.api/hc - OrderingUrl=http://ordering.api/hc @@ -178,7 +179,7 @@ services: payment.api: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} @@ -191,7 +192,7 @@ services: locations.api: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data} - Database=LocationsDb From 338d911621b4fa2ee4e7cc6e9f1d7d3bcf09e45c Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Fri, 27 Oct 2017 18:38:54 -0700 Subject: [PATCH 7/7] Updated the docker-compose.ci.build.yml to use the latest ASPNETCORE BUILD/SDK Image (2.0.2) and just 'dot net publish' against the whole .sln --- docker-compose.ci.build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.ci.build.yml b/docker-compose.ci.build.yml index d4b69f9c5..ebee57db1 100644 --- a/docker-compose.ci.build.yml +++ b/docker-compose.ci.build.yml @@ -2,7 +2,7 @@ version: '3' services: ci-build: - image: microsoft/aspnetcore-build:2.0 + image: microsoft/aspnetcore-build:2.0.2 #Depending on the bug below, you can also try this other SDK image: microsoft/aspnetcore-build:1.0-2.0-2017-10 or microsoft/aspnetcore-build:1.0-2.0 volumes: - .:/src - ./cli-linux:/cli-linux @@ -11,8 +11,8 @@ services: # Next line is using the .sln file to compile all the projects. # Sometime there is an issue in msbuild exits the process before finishing building the bits: (https://github.com/Microsoft/msbuild/issues/2153) # Random error: error MSB4017: The build stopped unexpectedly be cause of an unexpected logger failure. - #command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && dotnet restore ./eShopOnContainers-ServicesAndWebApps.sln --verbosity minimal && dotnet publish ./eShopOnContainers-ServicesAndWebApps.sln -c Release -o ./obj/Docker/publish --verbosity minimal" + command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && dotnet publish ./eShopOnContainers-ServicesAndWebApps.sln -c Release -o ./obj/Docker/publish" # NOTE: Using build-bits-linux.sh from Linux build container exits before ending. - command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && pushd /cli-linux && ./build-bits-linux.sh /src" + #command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && pushd /cli-linux && ./build-bits-linux.sh /src" \ No newline at end of file