Browse Source

Merge branch 'dev' into features/add-seq-sink

# Conflicts SOLVED:
#	.gitignore
#	src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs
#	src/Services/Basket/Basket.API/Basket.API.csproj
#	src/Services/Basket/Basket.API/Program.cs
#	src/Services/Basket/Basket.API/Startup.cs
#	src/Services/Catalog/Catalog.API/Catalog.API.csproj
#	src/Services/Catalog/Catalog.API/Program.cs
#	src/Services/Catalog/Catalog.API/Startup.cs
#	src/Services/Identity/Identity.API/Identity.API.csproj
#	src/Services/Identity/Identity.API/Program.cs
#	src/Services/Identity/Identity.API/Startup.cs
#	src/Services/Location/Locations.API/Locations.API.csproj
#	src/Services/Location/Locations.API/Program.cs
#	src/Services/Location/Locations.API/Startup.cs
#	src/Services/Marketing/Marketing.API/Marketing.API.csproj
#	src/Services/Marketing/Marketing.API/Program.cs
#	src/Services/Marketing/Marketing.API/Startup.cs
#	src/Services/Ordering/Ordering.API/Ordering.API.csproj
#	src/Services/Ordering/Ordering.API/Program.cs
#	src/Services/Ordering/Ordering.API/Startup.cs
#	src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj
#	src/Services/Ordering/Ordering.SignalrHub/Program.cs
#	src/Services/Ordering/Ordering.SignalrHub/Startup.cs
#	src/Services/Payment/Payment.API/Payment.API.csproj
#	src/Services/Payment/Payment.API/Program.cs
#	src/Services/Payment/Payment.API/Startup.cs
#	src/Web/WebMVC/Program.cs
#	src/Web/WebMVC/Startup.cs
#	src/Web/WebStatus/Program.cs
#	src/Web/WebStatus/Startup.cs
#	src/Web/WebStatus/WebStatus.csproj
pull/952/head
Miguel Veloso 6 years ago
parent
commit
c1d7ca8951
213 changed files with 39323 additions and 186 deletions
  1. +3
    -0
      README.md
  2. +10
    -10
      docker-compose-tests.yml
  3. +25
    -0
      docker-compose.override.yml
  4. +33
    -18
      docker-compose.yml
  5. +105
    -0
      eShopOnContainers-ServicesAndWebApps.sln
  6. +21
    -0
      k8s/helm/apigwmm/templates/deployment.yaml
  7. +12
    -1
      k8s/helm/apigwmm/values.yaml
  8. +21
    -0
      k8s/helm/apigwms/templates/deployment.yaml
  9. +12
    -1
      k8s/helm/apigwms/values.yaml
  10. +21
    -0
      k8s/helm/apigwwm/templates/deployment.yaml
  11. +12
    -1
      k8s/helm/apigwwm/values.yaml
  12. +21
    -1
      k8s/helm/apigwws/templates/deployment.yaml
  13. +12
    -1
      k8s/helm/apigwws/values.yaml
  14. +4
    -0
      k8s/helm/app.yaml
  15. +21
    -0
      k8s/helm/basket-api/templates/deployment.yaml
  16. +12
    -0
      k8s/helm/basket-api/values.yaml
  17. +21
    -0
      k8s/helm/catalog-api/templates/deployment.yaml
  18. +12
    -0
      k8s/helm/catalog-api/values.yaml
  19. +1
    -1
      k8s/helm/deploy-all.ps1
  20. +5
    -0
      k8s/helm/identity-api/templates/configmap.yaml
  21. +21
    -0
      k8s/helm/identity-api/templates/deployment.yaml
  22. +16
    -1
      k8s/helm/identity-api/values.yaml
  23. +2
    -0
      k8s/helm/inf.yaml
  24. +21
    -0
      k8s/helm/locations-api/templates/deployment.yaml
  25. +12
    -1
      k8s/helm/locations-api/values.yaml
  26. +21
    -0
      k8s/helm/marketing-api/templates/deployment.yaml
  27. +12
    -1
      k8s/helm/marketing-api/values.yaml
  28. +21
    -0
      k8s/helm/mobileshoppingagg/templates/deployment.yaml
  29. +12
    -1
      k8s/helm/mobileshoppingagg/values.yaml
  30. +21
    -0
      k8s/helm/ordering-api/templates/deployment.yaml
  31. +12
    -1
      k8s/helm/ordering-api/values.yaml
  32. +21
    -0
      k8s/helm/ordering-backgroundtasks/templates/deployment.yaml
  33. +12
    -1
      k8s/helm/ordering-backgroundtasks/values.yaml
  34. +21
    -0
      k8s/helm/payment-api/templates/deployment.yaml
  35. +12
    -1
      k8s/helm/payment-api/values.yaml
  36. +21
    -0
      k8s/helm/webhooks-api/.helmignore
  37. +5
    -0
      k8s/helm/webhooks-api/Chart.yaml
  38. +8
    -0
      k8s/helm/webhooks-api/templates/NOTES.txt
  39. +32
    -0
      k8s/helm/webhooks-api/templates/_helpers.tpl
  40. +51
    -0
      k8s/helm/webhooks-api/templates/_names.tpl
  41. +20
    -0
      k8s/helm/webhooks-api/templates/configmap.yaml
  42. +71
    -0
      k8s/helm/webhooks-api/templates/deployment.yaml
  43. +33
    -0
      k8s/helm/webhooks-api/templates/ingress.yaml
  44. +19
    -0
      k8s/helm/webhooks-api/templates/service.yaml
  45. +53
    -0
      k8s/helm/webhooks-api/values.yaml
  46. +21
    -0
      k8s/helm/webhooks-web/.helmignore
  47. +5
    -0
      k8s/helm/webhooks-web/Chart.yaml
  48. +8
    -0
      k8s/helm/webhooks-web/templates/NOTES.txt
  49. +32
    -0
      k8s/helm/webhooks-web/templates/_helpers.tpl
  50. +51
    -0
      k8s/helm/webhooks-web/templates/_names.tpl
  51. +19
    -0
      k8s/helm/webhooks-web/templates/configmap.yaml
  52. +71
    -0
      k8s/helm/webhooks-web/templates/deployment.yaml
  53. +33
    -0
      k8s/helm/webhooks-web/templates/ingress.yaml
  54. +19
    -0
      k8s/helm/webhooks-web/templates/service.yaml
  55. +52
    -0
      k8s/helm/webhooks-web/values.yaml
  56. +21
    -0
      k8s/helm/webshoppingagg/templates/deployment.yaml
  57. +12
    -0
      k8s/helm/webshoppingagg/values.yaml
  58. +1
    -5
      src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj
  59. +6
    -0
      src/ApiGateways/ApiGw-Base/Program.cs
  60. +1
    -3
      src/ApiGateways/ApiGw-Base/Startup.cs
  61. +2
    -2
      src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj
  62. +2
    -2
      src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj
  63. +1
    -1
      src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj
  64. +1
    -1
      src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj
  65. +4
    -4
      src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj
  66. +1
    -1
      src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj
  67. +35
    -14
      src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs
  68. +3
    -4
      src/Services/Basket/Basket.API/Basket.API.csproj
  69. +6
    -4
      src/Services/Basket/Basket.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs
  70. +1
    -1
      src/Services/Basket/Basket.API/Startup.cs
  71. +7
    -4
      src/Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj
  72. +7
    -4
      src/Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj
  73. +4
    -6
      src/Services/Catalog/Catalog.API/Catalog.API.csproj
  74. +1
    -1
      src/Services/Catalog/Catalog.API/Startup.cs
  75. +6
    -3
      src/Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj
  76. +7
    -4
      src/Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj
  77. +59
    -7
      src/Services/Identity/Identity.API/Configuration/Config.cs
  78. +2
    -0
      src/Services/Identity/Identity.API/Data/ConfigurationDbContextSeed.cs
  79. +5
    -4
      src/Services/Identity/Identity.API/Identity.API.csproj
  80. +1
    -1
      src/Services/Identity/Identity.API/Startup.cs
  81. +3
    -3
      src/Services/Location/Locations.API/Locations.API.csproj
  82. +1
    -1
      src/Services/Location/Locations.API/Startup.cs
  83. +6
    -3
      src/Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj
  84. +3
    -3
      src/Services/Marketing/Marketing.API/Marketing.API.csproj
  85. +1
    -1
      src/Services/Marketing/Marketing.API/Startup.cs
  86. +6
    -3
      src/Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj
  87. +4
    -5
      src/Services/Ordering/Ordering.API/Ordering.API.csproj
  88. +1
    -1
      src/Services/Ordering/Ordering.API/Startup.cs
  89. +5
    -5
      src/Services/Ordering/Ordering.API/web.config
  90. +2
    -2
      src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj
  91. +1
    -1
      src/Services/Ordering/Ordering.BackgroundTasks/Startup.cs
  92. +1
    -1
      src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj
  93. +6
    -3
      src/Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj
  94. +2
    -2
      src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj
  95. +3
    -3
      src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj
  96. +7
    -4
      src/Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj
  97. +3
    -3
      src/Services/Payment/Payment.API/Payment.API.csproj
  98. +1
    -1
      src/Services/Payment/Payment.API/Startup.cs
  99. +15
    -0
      src/Services/Webhooks/Webhooks.API/Controllers/HomeController.cs
  100. +35
    -0
      src/Services/Webhooks/Webhooks.API/Controllers/WebhookSubscriptionRequest.cs

+ 3
- 0
README.md View File

@ -1,6 +1,9 @@
# eShopOnContainers - Microservices Architecture and Containers based Reference Application (**BETA state** - Visual Studio 2017 and CLI environments compatible)
Sample .NET Core reference application, powered by Microsoft, based on a simplified microservices architecture and Docker containers.
[![Build status (Linux images)](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/All%20Microservices%20Linux)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=184)
## IMPORTANT NOTES!
**You can use either the latest version of Visual Studio or simply Docker CLI and .NET CLI for Windows, Mac and Linux**.


+ 10
- 10
docker-compose-tests.yml View File

@ -14,7 +14,7 @@ services:
image: mongo
identity-api-test:
image: eshop/identity-api-test:${TAG:-latest}
image: ${REGISTRY:-eshop}/identity-api-test:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Identity/Identity.API/Dockerfile
@ -22,7 +22,7 @@ services:
- sql-data-test
basket-api-test:
image: eshop/basket-api-test:${TAG:-latest}
image: ${REGISTRY:-eshop}/basket-api-test:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Basket/Basket.API/Dockerfile
@ -35,7 +35,7 @@ services:
- ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests
basket-api-unit-test:
image: eshop/basket-api-test:${TAG:-latest}
image: ${REGISTRY:-eshop}/basket-api-test:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Basket/Basket.API/Dockerfile
@ -48,7 +48,7 @@ services:
- ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests
catalog-api-test:
image: eshop/catalog-api-test:${TAG:-latest}
image: ${REGISTRY:-eshop}/catalog-api-test:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Catalog/Catalog.API/Dockerfile
@ -60,7 +60,7 @@ services:
- ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests
catalog-api-unit-test:
image: eshop/catalog-api-test:${TAG:-latest}
image: ${REGISTRY:-eshop}/catalog-api-test:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Catalog/Catalog.API/Dockerfile
@ -72,7 +72,7 @@ services:
- ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests
ordering-api-test:
image: eshop/ordering-api-test:${TAG:-latest}
image: ${REGISTRY:-eshop}/ordering-api-test:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Ordering/Ordering.API/Dockerfile
@ -84,7 +84,7 @@ services:
- ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests
ordering-api-unit-test:
image: eshop/ordering-api-test:${TAG:-latest}
image: ${REGISTRY:-eshop}/ordering-api-test:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Ordering/Ordering.API/Dockerfile
@ -96,7 +96,7 @@ services:
- ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests
marketing-api-test:
image: eshop/marketing-api-test:${TAG:-latest}
image: ${REGISTRY:-eshop}/marketing-api-test:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Marketing/Marketing.API/Dockerfile
@ -110,7 +110,7 @@ services:
- ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests
payment-api-test:
image: eshop/payment-api-test:${TAG:-latest}
image: ${REGISTRY:-eshop}/payment-api-test:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Payment/Payment.API/Dockerfile
@ -118,7 +118,7 @@ services:
- rabbitmq-test
locations-api-test:
image: eshop/locations-api-test:${TAG:-latest}
image: ${REGISTRY:-eshop}/locations-api-test:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Location/Locations.API/Dockerfile


+ 25
- 0
docker-compose.override.yml View File

@ -47,6 +47,8 @@ services:
- OrderingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102
- MobileShoppingAggClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5120
- WebShoppingAggClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5121
- WebhooksApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5113
- WebhooksWebClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5114
- UseCustomizationData=True
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE}
@ -188,6 +190,19 @@ services:
ports:
- "5109:80" # Important: In a production environment your should remove the external port (5109) kept here for microservice debugging purposes.
# The API Gateway redirects and access through the internal port (80).
webhooks.api:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://0.0.0.0:80
- ConnectionString=${ESHOP_AZURE_WEBHOOKS_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.WebhooksDb;User Id=sa;Password=Pass@word}
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
- EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
- EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
- IdentityUrl=http://identity.api
- IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105
ports:
- "5113:80" # Important: In a production environment your should remove the external port (5109) kept here for microservice debugging purposes.
# The API Gateway redirects and access through the internal port (80).
mobileshoppingapigw:
environment:
@ -386,3 +401,13 @@ services:
ports:
- "5100:80"
webhooks.client:
environment:
- ASPNETCORE_URLS=http://0.0.0.0:80
- Token=6168DB8D-DC58-4094-AF24-483278923590 # Webhooks are registered with this token (any value is valid) but the client won't check it
- IdentityUrl=http://10.0.75.1:5105
- CallBackUrl=http://localhost:5114
- WebhooksUrl=http://webhooks.api
- SelfUrl=http://webhooks.client/
ports:
- "5114:80"

+ 33
- 18
docker-compose.yml View File

@ -17,7 +17,7 @@ services:
image: rabbitmq:3-management-alpine
identity.api:
image: eshop/identity.api:${TAG:-latest}
image: ${REGISTRY:-eshop}/identity.api:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Identity/Identity.API/Dockerfile
@ -25,7 +25,7 @@ services:
- sql.data
basket.api:
image: eshop/basket.api:${TAG:-latest}
image: ${REGISTRY:-eshop}/basket.api:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Basket/Basket.API/Dockerfile
@ -35,7 +35,7 @@ services:
- rabbitmq
catalog.api:
image: eshop/catalog.api:${TAG:-latest}
image: ${REGISTRY:-eshop}/catalog.api:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Catalog/Catalog.API/Dockerfile
@ -44,7 +44,7 @@ services:
- rabbitmq
ordering.api:
image: eshop/ordering.api:${TAG:-latest}
image: ${REGISTRY:-eshop}/ordering.api:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Ordering/Ordering.API/Dockerfile
@ -53,7 +53,7 @@ services:
- rabbitmq
ordering.backgroundtasks:
image: eshop/ordering.backgroundtasks:${TAG:-latest}
image: ${REGISTRY:-eshop}/ordering.backgroundtasks:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile
@ -62,7 +62,7 @@ services:
- rabbitmq
marketing.api:
image: eshop/marketing.api:${TAG:-latest}
image: ${REGISTRY:-eshop}/marketing.api:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Marketing/Marketing.API/Dockerfile
@ -73,7 +73,7 @@ services:
- rabbitmq
payment.api:
image: eshop/payment.api:${TAG:-latest}
image: ${REGISTRY:-eshop}/payment.api:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Payment/Payment.API/Dockerfile
@ -81,7 +81,7 @@ services:
- rabbitmq
locations.api:
image: eshop/locations.api:${TAG:-latest}
image: ${REGISTRY:-eshop}/locations.api:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Location/Locations.API/Dockerfile
@ -89,8 +89,16 @@ services:
- nosql.data
- rabbitmq
webhooks.api:
image: ${REGISTRY:-eshop}/webhooks.api:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Webhooks/Webhooks.API/Dockerfile
depends_on:
- sql.data
mobileshoppingapigw:
image: eshop/ocelotapigw:${TAG:-latest}
image: ${REGISTRY:-eshop}/ocelotapigw:${TAG:-latest}
build:
context: .
dockerfile: src/ApiGateways/ApiGw-Base/Dockerfile
@ -105,7 +113,7 @@ services:
- basket.api
mobilemarketingapigw:
image: eshop/ocelotapigw:${TAG:-latest}
image: ${REGISTRY:-eshop}/ocelotapigw:${TAG:-latest}
build:
context: .
dockerfile: src/ApiGateways/ApiGw-Base/Dockerfile
@ -120,7 +128,7 @@ services:
- basket.api
webshoppingapigw:
image: eshop/ocelotapigw:${TAG:-latest}
image: ${REGISTRY:-eshop}/ocelotapigw:${TAG:-latest}
build:
context: .
dockerfile: src/ApiGateways/ApiGw-Base/Dockerfile
@ -135,7 +143,7 @@ services:
- basket.api
webmarketingapigw:
image: eshop/ocelotapigw:${TAG:-latest}
image: ${REGISTRY:-eshop}/ocelotapigw:${TAG:-latest}
build:
context: .
dockerfile: src/ApiGateways/ApiGw-Base/Dockerfile
@ -150,7 +158,7 @@ services:
- basket.api
mobileshoppingagg:
image: eshop/mobileshoppingagg:${TAG:-latest}
image: ${REGISTRY:-eshop}/mobileshoppingagg:${TAG:-latest}
build:
context: .
dockerfile: src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile
@ -165,7 +173,7 @@ services:
- basket.api
webshoppingagg:
image: eshop/webshoppingagg:${TAG:-latest}
image: ${REGISTRY:-eshop}/webshoppingagg:${TAG:-latest}
build:
context: .
dockerfile: src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile
@ -180,7 +188,7 @@ services:
- basket.api
ordering.signalrhub:
image: eshop/ordering.signalrhub:${TAG:-latest}
image: ${REGISTRY:-eshop}/ordering.signalrhub:${TAG:-latest}
build:
context: .
dockerfile: src/Services/Ordering/Ordering.SignalrHub/Dockerfile
@ -195,13 +203,13 @@ services:
- basket.api
webstatus:
image: eshop/webstatus:${TAG:-latest}
image: ${REGISTRY:-eshop}/webstatus:${TAG:-latest}
build:
context: .
dockerfile: src/Web/WebStatus/Dockerfile
webspa:
image: eshop/webspa:${TAG:-latest}
image: ${REGISTRY:-eshop}/webspa:${TAG:-latest}
build:
context: .
dockerfile: src/Web/WebSPA/Dockerfile
@ -211,7 +219,7 @@ services:
# - webmarketingapigw
webmvc:
image: eshop/webmvc:${TAG:-latest}
image: ${REGISTRY:-eshop}/webmvc:${TAG:-latest}
build:
context: .
dockerfile: src/Web/WebMVC/Dockerfile
@ -220,3 +228,10 @@ services:
- webshoppingapigw
- webmarketingapigw
webhooks.client:
image: ${REGISTRY:-eshop}/webhooks.client:${TAG:-latest}
build:
context: .
dockerfile: src/Web/WebhookClient/Dockerfile
depends_on:
- webhooks.api

+ 105
- 0
eShopOnContainers-ServicesAndWebApps.sln View File

@ -140,6 +140,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Payment", "Payment", "{C61C
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.API", "src\Services\Payment\Payment.API\Payment.API.csproj", "{0AB40131-8AD7-436F-9C6B-EDA59CFA3A84}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Webhooks", "Webhooks", "{E0AA11C4-2873-461D-8F82-53392530FB7A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Webhooks.API", "src\Services\Webhooks\Webhooks.API\Webhooks.API.csproj", "{84E2016E-0435-44C6-8020-3D288AA38B2C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebhookClient", "src\Web\WebhookClient\WebhookClient.csproj", "{766D7E92-6AF0-476C-ADD5-282BF4D8C576}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
@ -1642,6 +1648,102 @@ Global
{0AB40131-8AD7-436F-9C6B-EDA59CFA3A84}.Release|x64.Build.0 = Release|Any CPU
{0AB40131-8AD7-436F-9C6B-EDA59CFA3A84}.Release|x86.ActiveCfg = Release|Any CPU
{0AB40131-8AD7-436F-9C6B-EDA59CFA3A84}.Release|x86.Build.0 = Release|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.AppStore|ARM.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.AppStore|ARM.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.AppStore|iPhone.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.AppStore|x64.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.AppStore|x64.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.AppStore|x86.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.AppStore|x86.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Debug|ARM.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Debug|ARM.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Debug|iPhone.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Debug|x64.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Debug|x64.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Debug|x86.ActiveCfg = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Debug|x86.Build.0 = Debug|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Release|Any CPU.Build.0 = Release|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Release|ARM.ActiveCfg = Release|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Release|ARM.Build.0 = Release|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Release|iPhone.ActiveCfg = Release|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Release|iPhone.Build.0 = Release|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Release|x64.ActiveCfg = Release|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Release|x64.Build.0 = Release|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Release|x86.ActiveCfg = Release|Any CPU
{84E2016E-0435-44C6-8020-3D288AA38B2C}.Release|x86.Build.0 = Release|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.AppStore|ARM.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.AppStore|ARM.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.AppStore|iPhone.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.AppStore|x64.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.AppStore|x64.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.AppStore|x86.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.AppStore|x86.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Debug|Any CPU.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Debug|ARM.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Debug|ARM.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Debug|iPhone.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Debug|x64.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Debug|x64.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Debug|x86.ActiveCfg = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Debug|x86.Build.0 = Debug|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|Any CPU.ActiveCfg = Release|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|Any CPU.Build.0 = Release|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|ARM.ActiveCfg = Release|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|ARM.Build.0 = Release|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|iPhone.ActiveCfg = Release|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|iPhone.Build.0 = Release|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|x64.ActiveCfg = Release|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|x64.Build.0 = Release|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|x86.ActiveCfg = Release|Any CPU
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -1703,6 +1805,9 @@ Global
{120CABB3-0FEA-4B40-B4B5-2D3041798C80} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B}
{C61C5CFE-4876-4A46-A96E-5BBF596A984A} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
{0AB40131-8AD7-436F-9C6B-EDA59CFA3A84} = {C61C5CFE-4876-4A46-A96E-5BBF596A984A}
{E0AA11C4-2873-461D-8F82-53392530FB7A} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
{84E2016E-0435-44C6-8020-3D288AA38B2C} = {E0AA11C4-2873-461D-8F82-53392530FB7A}
{766D7E92-6AF0-476C-ADD5-282BF4D8C576} = {E279BF0F-7F66-4F3A-A3AB-2CDA66C1CD04}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9}


+ 21
- 0
k8s/helm/apigwmm/templates/deployment.yaml View File

@ -36,6 +36,27 @@ spec:
path: configuration.json
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:


+ 12
- 1
k8s/helm/apigwmm/values.yaml View File

@ -50,4 +50,15 @@ env:
values:
- name: ASPNETCORE_ENVIRONMENT
value: Development
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 21
- 0
k8s/helm/apigwms/templates/deployment.yaml View File

@ -36,6 +36,27 @@ spec:
path: configuration.json
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:


+ 12
- 1
k8s/helm/apigwms/values.yaml View File

@ -50,4 +50,15 @@ env:
values:
- name: ASPNETCORE_ENVIRONMENT
value: Development
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 21
- 0
k8s/helm/apigwwm/templates/deployment.yaml View File

@ -36,6 +36,27 @@ spec:
path: configuration.json
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:


+ 12
- 1
k8s/helm/apigwwm/values.yaml View File

@ -50,4 +50,15 @@ env:
values:
- name: ASPNETCORE_ENVIRONMENT
value: Development
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 21
- 1
k8s/helm/apigwws/templates/deployment.yaml View File

@ -6,7 +6,6 @@ kind: Deployment
metadata:
name: {{ template "apigwws.fullname" . }}
labels:
ufo: {{ $cfgname}}
app: {{ template "apigwws.name" . }}
chart: {{ template "apigwws.chart" . }}
release: {{ .Release.Name }}
@ -36,6 +35,27 @@ spec:
path: configuration.json
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:


+ 12
- 1
k8s/helm/apigwws/values.yaml View File

@ -50,4 +50,15 @@ env:
values:
- name: ASPNETCORE_ENVIRONMENT
value: Development
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 4
- 0
k8s/helm/app.yaml View File

@ -22,6 +22,8 @@ app: # app global settings
payment: payment-api # ingress entry for payment api
locations: locations-api # ingress entry for locations api
marketing: marketing-api # ingress entry for marketing api
webhooks: webhooks-api # ingress entry for webhooks api
webhooksweb: webhooks-web # ingress entry for webhooks web demo client
svc:
basket: basket # service name for basket api
catalog: catalog # service name for catalog api
@ -41,3 +43,5 @@ app: # app global settings
payment: payment # service name for payment api
locations: locations # service name for locations api
marketing: marketing # service name for marketing ap
webhooks: webhooks # service name for webhooks api
webhooksweb: webhooksweb # service name for webhooks web

+ 21
- 0
k8s/helm/basket-api/templates/deployment.yaml View File

@ -28,6 +28,27 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:


+ 12
- 0
k8s/helm/basket-api/values.yaml View File

@ -41,3 +41,15 @@ env:
values:
- name: OrchestratorType
value: 'K8S'
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 21
- 0
k8s/helm/catalog-api/templates/deployment.yaml View File

@ -28,6 +28,27 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:


+ 12
- 0
k8s/helm/catalog-api/values.yaml View File

@ -44,4 +44,16 @@ env:
value: Development
- name: OrchestratorType
value: 'K8S'
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 1
- 1
k8s/helm/deploy-all.ps1 View File

@ -61,7 +61,7 @@ if (-not [string]::IsNullOrEmpty($registry)) {
Write-Host "Begin eShopOnContainers installation using Helm" -ForegroundColor Green
$infras = ("sql-data", "nosql-data", "rabbitmq", "keystore-data", "basket-data")
$charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-api","catalog-api", "identity-api", "locations-api", "marketing-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus")
$charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-api","catalog-api", "identity-api", "locations-api", "marketing-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web")
if ($deployInfrastructure) {
foreach ($infra in $infras) {


+ 5
- 0
k8s/helm/identity-api/templates/configmap.yaml View File

@ -9,6 +9,8 @@
{{- $mobileshoppingagg := include "url-of" (list .Values.app.ingress.entries.mobileshoppingagg .) -}}
{{- $webhoppingagg := include "url-of" (list .Values.app.ingress.entries.webshoppingagg .) -}}
{{- $xamarincallback := include "url-of" (list "xamarincallback" .) -}}
{{- $webhooks_url := include "url-of" (list .Values.app.ingress.entries.webhooks .) -}}
{{- $webhooksweb_url := include "url-of" (list .Values.app.ingress.entries.webhooksweb .) -}}
apiVersion: v1
kind: ConfigMap
@ -32,4 +34,7 @@ data:
mobileshoppingagg_e: http://{{ $mobileshoppingagg }}
webshoppingagg_e: http://{{ $webhoppingagg }}
xamarin_callback_e: http://{{ $xamarincallback }}
webhooksapi_e: http://{{ $webhooks_url }}
webhooksweb_e: http://{{ $webhooksweb_url }}

+ 21
- 0
k8s/helm/identity-api/templates/deployment.yaml View File

@ -28,6 +28,27 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:


+ 16
- 1
k8s/helm/identity-api/values.yaml View File

@ -54,6 +54,10 @@ env:
key: webshoppingagg_e
- name: XamarinCallback
key: xamarin_callback_e
- name: WebhooksApiClient
key: webhooksapi_e
- name: WebhooksWebClient
key: webhooksweb_e
values:
- name: ASPNETCORE_ENVIRONMENT
value: Development
@ -61,4 +65,15 @@ env:
value: 'K8S'
- name: IsClusterEnv
value: 'True'
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 2
- 0
k8s/helm/inf.yaml View File

@ -16,6 +16,8 @@ inf:
db: IdentityDb # Ordering API SQL db name
marketing:
db: MarketingDb # Marketing API SQL db name
webhooks:
db: WebhooksDb # Webhooks DB
mongo:
# host: my-nosql-data # Uncomment to use specify custom mongo host. By default nosql-data is used
locations:


+ 21
- 0
k8s/helm/locations-api/templates/deployment.yaml View File

@ -28,6 +28,27 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:


+ 12
- 1
k8s/helm/locations-api/values.yaml View File

@ -52,4 +52,15 @@ env:
value: Development
- name: OrchestratorType
value: 'K8S'
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 21
- 0
k8s/helm/marketing-api/templates/deployment.yaml View File

@ -28,6 +28,27 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:


+ 12
- 1
k8s/helm/marketing-api/values.yaml View File

@ -56,4 +56,15 @@ env:
value: Development
- name: OrchestratorType
value: 'K8S'
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 21
- 0
k8s/helm/mobileshoppingagg/templates/deployment.yaml View File

@ -28,6 +28,27 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:


+ 12
- 1
k8s/helm/mobileshoppingagg/values.yaml View File

@ -64,4 +64,15 @@ env:
value: 'K8S'
- name: IsClusterEnv
value: 'True'
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 21
- 0
k8s/helm/ordering-api/templates/deployment.yaml View File

@ -28,6 +28,27 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:


+ 12
- 1
k8s/helm/ordering-api/values.yaml View File

@ -50,4 +50,15 @@ env:
value: Development
- name: OrchestratorType
value: 'K8S'
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 21
- 0
k8s/helm/ordering-backgroundtasks/templates/deployment.yaml View File

@ -28,6 +28,27 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:


+ 12
- 1
k8s/helm/ordering-backgroundtasks/values.yaml View File

@ -56,4 +56,15 @@ env:
value: Development
- name: OrchestratorType
value: 'K8S'
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 21
- 0
k8s/helm/payment-api/templates/deployment.yaml View File

@ -28,6 +28,27 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:


+ 12
- 1
k8s/helm/payment-api/values.yaml View File

@ -42,4 +42,15 @@ env:
value: Development
- name: OrchestratorType
value: 'K8S'
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 21
- 0
k8s/helm/webhooks-api/.helmignore View File

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 5
- 0
k8s/helm/webhooks-api/Chart.yaml View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: webhooks-api
version: 0.1.0

+ 8
- 0
k8s/helm/webhooks-api/templates/NOTES.txt View File

@ -0,0 +1,8 @@
eShop Ordering API installed.
-----------------------------
This API is not directly exposed outside cluster. If need to access it use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "webhooks-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 32
- 0
k8s/helm/webhooks-api/templates/_helpers.tpl View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "webhooks-api.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "webhooks-api.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "webhooks-api.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 51
- 0
k8s/helm/webhooks-api/templates/_names.tpl View File

@ -0,0 +1,51 @@
{{- define "suffix-name" -}}
{{- if .Values.app.name -}}
{{- .Values.app.name -}}
{{- else -}}
{{- .Release.Name -}}
{{- end -}}
{{- end -}}
{{- define "sql-name" -}}
{{- if .Values.inf.sql.host -}}
{{- .Values.inf.sql.host -}}
{{- else -}}
{{- printf "%s" "sql-data" -}}
{{- end -}}
{{- end -}}
{{- define "mongo-name" -}}
{{- if .Values.inf.mongo.host -}}
{{- .Values.inf.mongo.host -}}
{{- else -}}
{{- printf "%s" "nosql-data" -}}
{{- end -}}
{{- end -}}
{{- define "url-of" -}}
{{- $name := first .}}
{{- $ctx := last .}}
{{- if eq $name "" -}}
{{- $ctx.Values.inf.k8s.dns -}}
{{- else -}}
{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just <dns>/<name> */}}
{{- end -}}
{{- end -}}
{{- define "pathBase" -}}
{{- if .Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" . -}}
{{- printf "%s-%s" .Values.pathBase $suffix -}}
{{- else -}}
{{- .Values.pathBase -}}
{{- end -}}
{{- end -}}
{{- define "fqdn-image" -}}
{{- if .Values.inf.registry -}}
{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}}
{{- else -}}
{{- .Values.image.repository -}}
{{- end -}}
{{- end -}}

+ 20
- 0
k8s/helm/webhooks-api/templates/configmap.yaml View File

@ -0,0 +1,20 @@
{{- $name := include "webhooks-api.fullname" . -}}
{{- $sqlsrv := include "sql-name" . -}}
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: "cfg-{{ $name }}"
labels:
app: {{ template "webhooks-api.name" . }}
chart: {{ template "webhooks-api.chart" .}}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
webhooks__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.webhooks.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
urls__IdentityUrl: http://{{ $identity }}
urls__IdentityUrlExternal: http://{{ $identity }}
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

+ 71
- 0
k8s/helm/webhooks-api/templates/deployment.yaml View File

@ -0,0 +1,71 @@
{{- $name := include "webhooks-api.fullname" . -}}
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "webhooks-api.fullname" . }}
labels:
ufo: {{ $cfgname}}
app: {{ template "webhooks-api.name" . }}
chart: {{ template "webhooks-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "webhooks-api.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "webhooks-api.name" . }}
release: {{ .Release.Name }}
spec:
{{ if .Values.inf.registry -}}
imagePullSecrets:
- name: {{ .Values.inf.registry.secretName }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: PATH_BASE
value: {{ include "pathBase" . }}
- name: k8sname
value: {{ .Values.clusterName }}
{{- if .Values.env.values -}}
{{- range .Values.env.values }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end -}}
{{- end -}}
{{- if .Values.env.configmap -}}
{{- range .Values.env.configmap }}
- name: {{ .name }}
valueFrom:
configMapKeyRef:
name: {{ $cfgname }}
key: {{ .key }}
{{- end -}}
{{- end }}
ports:
- name: http
containerPort: 80
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

+ 33
- 0
k8s/helm/webhooks-api/templates/ingress.yaml View File

@ -0,0 +1,33 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := include "pathBase" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "webhooks-api.fullname" . }}
labels:
app: {{ template "webhooks-api.name" . }}
chart: {{ template "webhooks-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
- {{ .Values.inf.k8s.dns }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ .Values.app.svc.webhooks }}
servicePort: http
{{- end }}

+ 19
- 0
k8s/helm/webhooks-api/templates/service.yaml View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.app.svc.webhooks }}
labels:
app: {{ template "webhooks-api.name" . }}
chart: {{ template "webhooks-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "webhooks-api.name" . }}
release: {{ .Release.Name }}

+ 53
- 0
k8s/helm/webhooks-api/values.yaml View File

@ -0,0 +1,53 @@
replicaCount: 1
clusterName: eshop-aks
pathBase: /webhooks-api
image:
repository: eshop/webhooks.api
tag: latest
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
ingress:
enabled: true
annotations: {}
hosts:
- chart-example.local
tls: []
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
# env defines the environment variables that will be declared in the pod
env:
urls:
# configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap).
configmap:
- name: ConnectionString
key: webhooks__ConnectionString
- name: ApplicationInsights__InstrumentationKey
key: all__InstrumentationKey
- name: EventBusConnection
key: all__EventBusConnection
- name: AzureServiceBusEnabled
key: all__UseAzureServiceBus
- name: IdentityUrl
key: urls__IdentityUrl
- name: IdentityUrlExternal
key: urls__IdentityUrlExternal
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values:
- name: ASPNETCORE_ENVIRONMENT
value: Development
- name: OrchestratorType
value: 'K8S'

+ 21
- 0
k8s/helm/webhooks-web/.helmignore View File

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 5
- 0
k8s/helm/webhooks-web/Chart.yaml View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: webhooks-web
version: 0.1.0

+ 8
- 0
k8s/helm/webhooks-web/templates/NOTES.txt View File

@ -0,0 +1,8 @@
eShop Ordering API installed.
-----------------------------
This API is not directly exposed outside cluster. If need to access it use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "webhooks-web.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 32
- 0
k8s/helm/webhooks-web/templates/_helpers.tpl View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "webhooks-web.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "webhooks-web.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "webhooks-web.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 51
- 0
k8s/helm/webhooks-web/templates/_names.tpl View File

@ -0,0 +1,51 @@
{{- define "suffix-name" -}}
{{- if .Values.app.name -}}
{{- .Values.app.name -}}
{{- else -}}
{{- .Release.Name -}}
{{- end -}}
{{- end -}}
{{- define "sql-name" -}}
{{- if .Values.inf.sql.host -}}
{{- .Values.inf.sql.host -}}
{{- else -}}
{{- printf "%s" "sql-data" -}}
{{- end -}}
{{- end -}}
{{- define "mongo-name" -}}
{{- if .Values.inf.mongo.host -}}
{{- .Values.inf.mongo.host -}}
{{- else -}}
{{- printf "%s" "nosql-data" -}}
{{- end -}}
{{- end -}}
{{- define "url-of" -}}
{{- $name := first .}}
{{- $ctx := last .}}
{{- if eq $name "" -}}
{{- $ctx.Values.inf.k8s.dns -}}
{{- else -}}
{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just <dns>/<name> */}}
{{- end -}}
{{- end -}}
{{- define "pathBase" -}}
{{- if .Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" . -}}
{{- printf "%s-%s" .Values.pathBase $suffix -}}
{{- else -}}
{{- .Values.pathBase -}}
{{- end -}}
{{- end -}}
{{- define "fqdn-image" -}}
{{- if .Values.inf.registry -}}
{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}}
{{- else -}}
{{- .Values.image.repository -}}
{{- end -}}
{{- end -}}

+ 19
- 0
k8s/helm/webhooks-web/templates/configmap.yaml View File

@ -0,0 +1,19 @@
{{- $name := include "webhooks-web.fullname" . -}}
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
{{- $webhooksweb := include "url-of" (list .Values.app.ingress.entries.webhooksweb .) -}}
{{- $webhooks := include "url-of" (list .Values.app.ingress.entries.webhooks .) -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: "cfg-{{ $name }}"
labels:
app: {{ template "webhooks-web.name" . }}
chart: {{ template "webhooks-web.chart" .}}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
urls__webhooks: http://{{ $webhooks }}
identity_e: http://{{ $identity }}
webhooksweb_e: http://{{ $webhooksweb }}
urls_webhooksweb: http://{{ .Values.app.svc.webhooksweb }}

+ 71
- 0
k8s/helm/webhooks-web/templates/deployment.yaml View File

@ -0,0 +1,71 @@
{{- $name := include "webhooks-web.fullname" . -}}
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "webhooks-web.fullname" . }}
labels:
ufo: {{ $cfgname}}
app: {{ template "webhooks-web.name" . }}
chart: {{ template "webhooks-web.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "webhooks-web.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "webhooks-web.name" . }}
release: {{ .Release.Name }}
spec:
{{ if .Values.inf.registry -}}
imagePullSecrets:
- name: {{ .Values.inf.registry.secretName }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: PATH_BASE
value: {{ include "pathBase" . }}
- name: k8sname
value: {{ .Values.clusterName }}
{{- if .Values.env.values -}}
{{- range .Values.env.values }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end -}}
{{- end -}}
{{- if .Values.env.configmap -}}
{{- range .Values.env.configmap }}
- name: {{ .name }}
valueFrom:
configMapKeyRef:
name: {{ $cfgname }}
key: {{ .key }}
{{- end -}}
{{- end }}
ports:
- name: http
containerPort: 80
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

+ 33
- 0
k8s/helm/webhooks-web/templates/ingress.yaml View File

@ -0,0 +1,33 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := include "pathBase" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "webhooks-web.fullname" . }}
labels:
app: {{ template "webhooks-web.name" . }}
chart: {{ template "webhooks-web.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
- {{ .Values.inf.k8s.dns }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ .Values.app.svc.webhooksweb }}
servicePort: http
{{- end }}

+ 19
- 0
k8s/helm/webhooks-web/templates/service.yaml View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.app.svc.webhooksweb }}
labels:
app: {{ template "webhooks-web.name" . }}
chart: {{ template "webhooks-web.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "webhooks-web.name" . }}
release: {{ .Release.Name }}

+ 52
- 0
k8s/helm/webhooks-web/values.yaml View File

@ -0,0 +1,52 @@
replicaCount: 1
clusterName: eshop-aks
pathBase: /webhooks-web
image:
repository: eshop/webhooks.client
tag: latest
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
ingress:
enabled: true
annotations: {}
hosts:
- chart-example.local
tls: []
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
# env defines the environment variables that will be declared in the pod
env:
urls:
# configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap).
configmap:
- name: WebhooksUrl
key: urls__webhooks
- name: IdentityUrl
key: identity_e
- name: CallbackUrl
key: webhooksweb_e
- name: SelfUrl
key: webhooksweb_e
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values:
- name: ASPNETCORE_ENVIRONMENT
value: Production
- name: OrchestratorType
value: 'K8S'
- name: Token
value: "WebHooks-Demo-Web" # Can use whatever you want

+ 21
- 0
k8s/helm/webshoppingagg/templates/deployment.yaml View File

@ -28,6 +28,27 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:


+ 12
- 0
k8s/helm/webshoppingagg/values.yaml View File

@ -64,4 +64,16 @@ env:
value: 'K8S'
- name: IsClusterEnv
value: 'True'
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 1
- 5
src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj View File

@ -5,11 +5,7 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />


+ 6
- 0
src/ApiGateways/ApiGw-Base/Program.cs View File

@ -25,6 +25,12 @@ namespace OcelotApiGw
builder.ConfigureServices(s => s.AddSingleton(builder))
.ConfigureAppConfiguration(ic => ic.AddJsonFile(Path.Combine("configuration", "configuration.json")))
.UseStartup<Startup>()
.ConfigureLogging((hostingContext, loggingbuilder) =>
{
loggingbuilder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
loggingbuilder.AddConsole();
loggingbuilder.AddDebug();
})
.UseSerilog((builderContext, config) =>
{
config


+ 1
- 3
src/ApiGateways/ApiGw-Base/Startup.cs View File

@ -76,7 +76,7 @@ namespace OcelotApiGw
services.AddOcelot(_cfg);
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
var pathBase = _cfg["PATH_BASE"];
@ -101,8 +101,6 @@ namespace OcelotApiGw
Predicate = r => r.Name.Contains("self")
});
loggerFactory.AddConsole(_cfg.GetSection("Logging"));
app.UseCors("CorsPolicy");
app.UseOcelot().Wait();


+ 2
- 2
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj View File

@ -13,14 +13,14 @@
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.2.0-preview3-35497" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.2.0" />
</ItemGroup>
</Project>

+ 2
- 2
src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj View File

@ -13,13 +13,13 @@
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.2.0-preview3-35497" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.2.0" />
</ItemGroup>
</Project>

+ 1
- 1
src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj View File

@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="Autofac" Version="4.6.2" />
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0-preview3-35497" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Polly" Version="6.0.1" />
<PackageReference Include="RabbitMQ.Client" Version="5.0.1" />


+ 1
- 1
src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj View File

@ -9,7 +9,7 @@
<PackageReference Include="Autofac" Version="4.6.2" />
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="3.0.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0-preview3-35497" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
</ItemGroup>
<ItemGroup>


+ 4
- 4
src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj View File

@ -6,10 +6,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0-preview3-35497" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.0-preview3-35497" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.2.0-preview3-35497" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.0-preview3-35497" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.2.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.2" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
</ItemGroup>
<ItemGroup>


+ 1
- 1
src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj View File

@ -6,7 +6,7 @@
<ItemGroup>
<PackageReference Include="Polly" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.0-preview3-35497" />
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project>

+ 35
- 14
src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs View File

@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Polly;
@ -10,8 +11,17 @@ namespace Microsoft.AspNetCore.Hosting
{
public static class IWebHostExtensions
{
public static bool IsInKubernetes(this IWebHost webHost)
{
var cfg = webHost.Services.GetService<IConfiguration>();
var orchestratorType = cfg.GetValue<string>("OrchestratorType");
return orchestratorType?.ToUpper() == "K8S";
}
public static IWebHost MigrateDbContext<TContext>(this IWebHost webHost, Action<TContext,IServiceProvider> seeder) where TContext : DbContext
{
var underK8s = webHost.IsInKubernetes();
using (var scope = webHost.Services.CreateScope())
{
var services = scope.ServiceProvider;
@ -24,36 +34,47 @@ namespace Microsoft.AspNetCore.Hosting
{
logger.LogInformation("Migrating database associated with context {DbContextName}", typeof(TContext).Name);
var retry = Policy.Handle<SqlException>()
.WaitAndRetry(new TimeSpan[]
{
if (underK8s)
{
InvokeSeeder(seeder, context, services);
}
else
{
var retry = Policy.Handle<SqlException>()
.WaitAndRetry(new TimeSpan[]
{
TimeSpan.FromSeconds(3),
TimeSpan.FromSeconds(5),
TimeSpan.FromSeconds(8),
});
});
retry.Execute(() =>
{
//if the sql server container is not created on run docker compose this
//migration can't fail for network related exception. The retry options for DbContext only
//apply to transient exceptions.
context.Database
.Migrate();
seeder(context, services);
});
//apply to transient exceptions
// Note that this is NOT applied when running some orchestrators (let the orchestrator to recreate the failing service)
retry.Execute(() => InvokeSeeder(seeder, context, services));
}
logger.LogInformation("Migrated database associated with context {DbContextName}", typeof(TContext).Name);
}
catch (Exception ex)
{
logger.LogError(ex, "An error occurred while migrating the database used on context {DbContextName}", typeof(TContext).Name);
if (underK8s)
{
throw; // Rethrow under k8s because we rely on k8s to re-run the pod
}
}
}
return webHost;
}
private static void InvokeSeeder<TContext>(Action<TContext, IServiceProvider> seeder, TContext context, IServiceProvider services)
where TContext : DbContext
{
context.Database.Migrate();
seeder(context, services);
}
}
}

+ 3
- 4
src/Services/Basket/Basket.API/Basket.API.csproj View File

@ -16,18 +16,17 @@
<PackageReference Include="AspNetCore.HealthChecks.AzureServiceBus" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.Rabbitmq" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.Redis" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.2" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.2.0" />
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.1.2" />


+ 6
- 4
src/Services/Basket/Basket.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs View File

@ -19,11 +19,13 @@ namespace Basket.API.Infrastructure.Filters
operation.Responses.Add("401", new Response { Description = "Unauthorized" });
operation.Responses.Add("403", new Response { Description = "Forbidden" });
operation.Security = new List<IDictionary<string, IEnumerable<string>>>();
operation.Security.Add(new Dictionary<string, IEnumerable<string>>
operation.Security = new List<IDictionary<string, IEnumerable<string>>>
{
{ "oauth2", new [] { "basketapi" } }
});
new Dictionary<string, IEnumerable<string>>
{
{ "oauth2", new [] { "basketapi" } }
}
};
}
}
}

+ 1
- 1
src/Services/Basket/Basket.API/Startup.cs View File

@ -228,7 +228,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
if (orchestratorType?.ToUpper() == "K8S")
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
services.AddApplicationInsightsKubernetesEnricher();
}
if (orchestratorType?.ToUpper() == "SF")
{


+ 7
- 4
src/Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj View File

@ -17,12 +17,15 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
<PackageReference Include="Moq" Version="4.8.1" />
<PackageReference Include="Moq" Version="4.10.1" />
</ItemGroup>
<ItemGroup>


+ 7
- 4
src/Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj View File

@ -7,12 +7,15 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
<PackageReference Include="MediatR" Version="5.1.0" />
<PackageReference Include="Moq" Version="4.8.1" />
<PackageReference Include="Moq" Version="4.10.1" />
</ItemGroup>
<ItemGroup>


+ 4
- 6
src/Services/Catalog/Catalog.API/Catalog.API.csproj View File

@ -38,17 +38,15 @@
<PackageReference Include="AspNetCore.HealthChecks.AzureStorage" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.Rabbitmq" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.0" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.2" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.2.0" />
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.1.2" />


+ 1
- 1
src/Services/Catalog/Catalog.API/Startup.cs View File

@ -117,7 +117,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API
if (orchestratorType?.ToUpper() == "K8S")
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
services.AddApplicationInsightsKubernetesEnricher();
}
if (orchestratorType?.ToUpper() == "SF")
{


+ 6
- 3
src/Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj View File

@ -33,10 +33,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>


+ 7
- 4
src/Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj View File

@ -7,11 +7,14 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
<PackageReference Include="Moq" Version="4.8.1" />
<PackageReference Include="Moq" Version="4.10.1" />
</ItemGroup>
<ItemGroup>


+ 59
- 7
src/Services/Identity/Identity.API/Configuration/Config.cs View File

@ -17,7 +17,8 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
new ApiResource("locations", "Locations Service"),
new ApiResource("mobileshoppingagg", "Mobile Shopping Aggregator"),
new ApiResource("webshoppingagg", "Web Shopping Aggregator"),
new ApiResource("orders.signalrhub", "Ordering Signalr Hub")
new ApiResource("orders.signalrhub", "Ordering Signalr Hub"),
new ApiResource("webhooks", "Webhooks registration Service"),
};
}
@ -33,7 +34,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
}
// client want to access resources (aka scopes)
public static IEnumerable<Client> GetClients(Dictionary<string,string> clientsUrl)
public static IEnumerable<Client> GetClients(Dictionary<string, string> clientsUrl)
{
return new List<Client>
{
@ -57,7 +58,8 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
"locations",
"marketing",
"webshoppingagg",
"orders.signalrhub"
"orders.signalrhub",
"webhooks"
},
},
new Client
@ -74,7 +76,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
RequireConsent = false,
RequirePkce = true,
PostLogoutRedirectUris = { $"{clientsUrl["Xamarin"]}/Account/Redirecting" },
AllowedCorsOrigins = { "http://eshopxamarin" },
//AllowedCorsOrigins = { "http://eshopxamarin" },
AllowedScopes = new List<string>
{
IdentityServerConstants.StandardScopes.OpenId,
@ -84,7 +86,8 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
"basket",
"locations",
"marketing",
"mobileshoppingagg"
"mobileshoppingagg",
"webhooks"
},
//Allow requesting refresh tokens for long lived API access
AllowOfflineAccess = true,
@ -122,7 +125,40 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
"locations",
"marketing",
"webshoppingagg",
"orders.signalrhub"
"orders.signalrhub",
"webhooks"
},
AccessTokenLifetime = 60*60*2, // 2 hours
IdentityTokenLifetime= 60*60*2 // 2 hours
},
new Client
{
ClientId = "webhooksclient",
ClientName = "Webhooks Client",
ClientSecrets = new List<Secret>
{
new Secret("secret".Sha256())
},
ClientUri = $"{clientsUrl["WebhooksWeb"]}", // public uri of the client
AllowedGrantTypes = GrantTypes.Hybrid,
AllowAccessTokensViaBrowser = false,
RequireConsent = false,
AllowOfflineAccess = true,
AlwaysIncludeUserClaimsInIdToken = true,
RedirectUris = new List<string>
{
$"{clientsUrl["WebhooksWeb"]}/signin-oidc"
},
PostLogoutRedirectUris = new List<string>
{
$"{clientsUrl["WebhooksWeb"]}/signout-callback-oidc"
},
AllowedScopes = new List<string>
{
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,
IdentityServerConstants.StandardScopes.OfflineAccess,
"webhooks"
},
AccessTokenLifetime = 60*60*2, // 2 hours
IdentityTokenLifetime= 60*60*2 // 2 hours
@ -157,7 +193,8 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
"basket",
"locations",
"marketing",
"webshoppingagg"
"webshoppingagg",
"webhooks"
},
},
new Client
@ -249,6 +286,21 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
{
"webshoppingagg"
}
},
new Client
{
ClientId = "webhooksswaggerui",
ClientName = "WebHooks Service Swagger UI",
AllowedGrantTypes = GrantTypes.Implicit,
AllowAccessTokensViaBrowser = true,
RedirectUris = { $"{clientsUrl["WebhooksApi"]}/swagger/oauth2-redirect.html" },
PostLogoutRedirectUris = { $"{clientsUrl["WebhooksApi"]}/swagger/" },
AllowedScopes =
{
"webhooks"
}
}
};
}


+ 2
- 0
src/Services/Identity/Identity.API/Data/ConfigurationDbContextSeed.cs View File

@ -28,6 +28,8 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Data
clientUrls.Add("OrderingApi", configuration.GetValue<string>("OrderingApiClient"));
clientUrls.Add("MobileShoppingAgg", configuration.GetValue<string>("MobileShoppingAggClient"));
clientUrls.Add("WebShoppingAgg", configuration.GetValue<string>("WebShoppingAggClient"));
clientUrls.Add("WebhooksApi", configuration.GetValue<string>("WebhooksApiClient"));
clientUrls.Add("WebhooksWeb", configuration.GetValue<string>("WebhooksWebClient"));
if (!context.Clients.Any())
{


+ 5
- 4
src/Services/Identity/Identity.API/Identity.API.csproj View File

@ -14,27 +14,28 @@
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.1.0" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.2" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Redis" Version="2.2.0-preview2-35157" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.2.0" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="1.0.163" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="1.0.172" />
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.1.2" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.Seq" Version="4.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="3.0.0" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="1.0.163" />
</ItemGroup>
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">


+ 1
- 1
src/Services/Identity/Identity.API/Startup.cs View File

@ -182,7 +182,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
if (orchestratorType?.ToUpper() == "K8S")
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
services.AddApplicationInsightsKubernetesEnricher();
}
if (orchestratorType?.ToUpper() == "SF")
{


+ 3
- 3
src/Services/Location/Locations.API/Locations.API.csproj View File

@ -9,12 +9,12 @@
<PackageReference Include="AspNetCore.HealthChecks.AzureServiceBus" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.MongoDb" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.Rabbitmq" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.2" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />


+ 1
- 1
src/Services/Location/Locations.API/Startup.cs View File

@ -201,7 +201,7 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
if (orchestratorType?.ToUpper() == "K8S")
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
services.AddApplicationInsightsKubernetesEnricher();
}
if (orchestratorType?.ToUpper() == "SF")
{


+ 6
- 3
src/Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj View File

@ -17,10 +17,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>


+ 3
- 3
src/Services/Marketing/Marketing.API/Marketing.API.csproj View File

@ -25,12 +25,12 @@
<PackageReference Include="AspNetCore.HealthChecks.MongoDb" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.Rabbitmq" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.2" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />


+ 1
- 1
src/Services/Marketing/Marketing.API/Startup.cs View File

@ -225,7 +225,7 @@
if (orchestratorType?.ToUpper() == "K8S")
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
services.AddApplicationInsightsKubernetesEnricher();
}
if (orchestratorType?.ToUpper() == "SF")
{


+ 6
- 3
src/Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj View File

@ -17,10 +17,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>


+ 4
- 5
src/Services/Ordering/Ordering.API/Ordering.API.csproj View File

@ -5,7 +5,6 @@
<UserSecretsId>aspnet-Ordering.API-20161122013547</UserSecretsId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
<NoWin32Manifest>true</NoWin32Manifest>
<LangVersion>latest</LangVersion>
</PropertyGroup>
@ -32,16 +31,16 @@
<PackageReference Include="AspNetCore.HealthChecks.AzureServiceBus" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.Rabbitmq" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
<PackageReference Include="Dapper" Version="1.50.4" />
<PackageReference Include="Dapper" Version="1.50.7" />
<PackageReference Include="FluentValidation.AspNetCore" Version="7.5.0" />
<PackageReference Include="MediatR" Version="5.1.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="5.1.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.2" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />


+ 1
- 1
src/Services/Ordering/Ordering.API/Startup.cs View File

@ -146,7 +146,7 @@
if (orchestratorType?.ToUpper() == "K8S")
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
services.AddApplicationInsightsKubernetesEnricher();
}
if (orchestratorType?.ToUpper() == "SF")
{


+ 5
- 5
src/Services/Ordering/Ordering.API/web.config View File

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
-->
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false">
<environmentVariables />
</aspNetCore>
</system.webServer>
</configuration>
</configuration>

+ 2
- 2
src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj View File

@ -14,11 +14,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
<PackageReference Include="AspNetCore.HealthChecks.AzureServiceBus" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.Rabbitmq" Version="2.2.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
<PackageReference Include="Dapper" Version="1.50.4" />
<PackageReference Include="Dapper" Version="1.50.7" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />


+ 1
- 1
src/Services/Ordering/Ordering.BackgroundTasks/Startup.cs View File

@ -103,7 +103,7 @@ namespace Ordering.BackgroundTasks
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, Microsoft.AspNetCore.Hosting.IHostingEnvironment env)
public void Configure(IApplicationBuilder app)
{
app.UseHealthChecks("/hc", new HealthCheckOptions()
{


+ 1
- 1
src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj View File

@ -7,7 +7,7 @@
<ItemGroup>
<PackageReference Include="MediatR" Version="5.1.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="5.1.0" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.4.0" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.5.1" />
</ItemGroup>
<ItemGroup>


+ 6
- 3
src/Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj View File

@ -17,10 +17,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>


+ 2
- 2
src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj View File

@ -9,8 +9,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.2.0" />
</ItemGroup>


+ 3
- 3
src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj View File

@ -12,12 +12,12 @@
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.AzureServiceBus" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.Rabbitmq" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.2" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />


+ 7
- 4
src/Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj View File

@ -7,12 +7,15 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
<PackageReference Include="MediatR" Version="5.1.0" />
<PackageReference Include="Moq" Version="4.8.1" />
<PackageReference Include="Moq" Version="4.10.1" />
</ItemGroup>
<ItemGroup>


+ 3
- 3
src/Services/Payment/Payment.API/Payment.API.csproj View File

@ -9,12 +9,12 @@
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.AzureServiceBus" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.Rabbitmq" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.2" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.2.0" />


+ 1
- 1
src/Services/Payment/Payment.API/Startup.cs View File

@ -123,7 +123,7 @@ namespace Payment.API
if (orchestratorType?.ToUpper() == "K8S")
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
services.AddApplicationInsightsKubernetesEnricher();
}
if (orchestratorType?.ToUpper() == "SF")
{


+ 15
- 0
src/Services/Webhooks/Webhooks.API/Controllers/HomeController.cs View File

@ -0,0 +1,15 @@
using Microsoft.AspNetCore.Mvc;
namespace Webhooks.API.Controllers
{
public class HomeController : Controller
{
// GET: /<controller>/
public IActionResult Index()
{
return new RedirectResult("~/swagger");
}
}
}

+ 35
- 0
src/Services/Webhooks/Webhooks.API/Controllers/WebhookSubscriptionRequest.cs View File

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Webhooks.API.Model;
namespace Webhooks.API.Controllers
{
public class WebhookSubscriptionRequest : IValidatableObject
{
public string Url { get; set; }
public string Token { get; set; }
public string Event { get; set; }
public string GrantUrl { get; set; }
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
if (!Uri.IsWellFormedUriString(GrantUrl, UriKind.Absolute))
{
yield return new ValidationResult("GrantUrl is not valid", new[] { nameof(GrantUrl) });
}
if (!Uri.IsWellFormedUriString(Url, UriKind.Absolute))
{
yield return new ValidationResult("Url is not valid", new[] { nameof(Url) });
}
var isOk = Enum.TryParse<WebhookType>(Event, ignoreCase: true, result: out WebhookType whtype);
if (!isOk)
{
yield return new ValidationResult($"{Event} is invalid event name", new[] { nameof(Event) });
}
}
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save