Browse Source

Merge pull request #4 from dotnet-architecture/dev

Merge origin to fork
pull/1304/head
Dmytro Hridin 4 years ago
committed by GitHub
parent
commit
6a93f9a586
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 6237 additions and 3773 deletions
  1. +1
    -5
      README.md
  2. +3
    -0
      build/azure-devops/apigws/azure-pipelines.yml
  3. +3
    -0
      build/azure-devops/basket-api/azure-pipelines.yml
  4. +3
    -0
      build/azure-devops/catalog-api/azure-pipelines.yml
  5. +3
    -0
      build/azure-devops/identity-api/azure-pipelines.yml
  6. +3
    -0
      build/azure-devops/infrastructure/azure-pipelines.yml
  7. +3
    -0
      build/azure-devops/location-api/azure-pipelines.yml
  8. +3
    -0
      build/azure-devops/marketing-api/azure-pipelines.yml
  9. +3
    -0
      build/azure-devops/mobile-shopping-agg/azure-pipelines.yml
  10. +6
    -3
      build/azure-devops/multiarch.yaml
  11. +3
    -0
      build/azure-devops/ordering-api/azure-pipelines.yml
  12. +3
    -0
      build/azure-devops/payment-api/azure-pipelines.yml
  13. +3
    -0
      build/azure-devops/web-shopping-agg/azure-pipelines.yml
  14. +3
    -0
      build/azure-devops/webhooks-api/azure-pipelines.yml
  15. +4
    -1
      build/azure-devops/webhooks-client/azure-pipelines.yml
  16. +3
    -0
      build/azure-devops/webmvc/azure-pipelines.yml
  17. +3
    -0
      build/azure-devops/webspa/azure-pipelines.yml
  18. +3
    -0
      build/azure-devops/webstatus/azure-pipelines.yml
  19. +1
    -2
      src/Services/Basket/Basket.API/Program.cs
  20. +1
    -2
      src/Services/Catalog/Catalog.API/Program.cs
  21. +1
    -2
      src/Services/Identity/Identity.API/Program.cs
  22. +5
    -0
      src/Services/Identity/Identity.API/Startup.cs
  23. +1
    -2
      src/Services/Location/Locations.API/Program.cs
  24. +1
    -2
      src/Services/Marketing/Marketing.API/Program.cs
  25. +1
    -2
      src/Services/Ordering/Ordering.API/Program.cs
  26. +1
    -1
      src/Services/Ordering/Ordering.SignalrHub/Program.cs
  27. +1
    -2
      src/Services/Payment/Payment.API/Program.cs
  28. +2
    -1
      src/Services/Webhooks/Webhooks.API/Startup.cs
  29. +2
    -3
      src/Web/WebMVC/Program.cs
  30. +0
    -1
      src/Web/WebSPA/Program.cs
  31. +6147
    -3726
      src/Web/WebSPA/package-lock.json
  32. +16
    -16
      src/Web/WebSPA/package.json
  33. +1
    -2
      src/Web/WebStatus/Program.cs

+ 1
- 5
README.md View File

@ -85,11 +85,7 @@ You can download them and start reviewing these Guides/eBooks here:
| [![](img/Microservices-cover-small.png)](https://aka.ms/microservicesebook) | [![](img/DevOps-Cover-small.png)](https://aka.ms/dockerlifecycleebook) | [![](img/xamarin-enterprise-patterns-ebook-cover-small.png)](https://aka.ms/xamarinpatternsebook) |
| <sup> <a href='https://aka.ms/microservicesebook'>**Download .PDF**</a> </sup> | <sup> <a href='https://aka.ms/dockerlifecycleebook'>**Download** </a> </sup> | <sup> <a href='https://aka.ms/xamarinpatternsebook'>**Download** </a> </sup> |
Download in other formats (**eReaders** like **MOBI**, **EPUB**) and other eBooks at the [.NET Architecture center](http://dot.net/architecture).
If you have an e-book feedback, create a new issue here: <https://github.com/dotnet-architecture/ebooks/issues>
However, we encourage you to download and review the [.NET Microservices: Architecture for Containerized .NET Applications e-book](https://aka.ms/microservicesebook) because the architectural styles, patterns, and technologies explained in the guide use this reference application when explaining most implementations, so you'll understand the context, design and decisions taken in the current architecture and internal designs much better.
For more free e-Books check out [.NET Architecture center](https://dot.net/architecture). If you have an e-book feedback, let us know by creating a new issue here: <https://github.com/dotnet-architecture/ebooks/issues>
## Read further


+ 3
- 0
build/azure-devops/apigws/azure-pipelines.yml View File

@ -6,6 +6,9 @@ trigger:
paths:
include:
- src/ApiGateways/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/apigws/*
- deploy/k8s/helm/apigwmm/*
- deploy/k8s/helm/apigwms/*
- deploy/k8s/helm/apigwwm/*


+ 3
- 0
build/azure-devops/basket-api/azure-pipelines.yml View File

@ -9,6 +9,9 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Services/Basket/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/basket-api/*
- deploy/k8s/helm/basket-api/*
jobs:
- template: ../buildimages.yaml


+ 3
- 0
build/azure-devops/catalog-api/azure-pipelines.yml View File

@ -9,6 +9,9 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Services/Catalog/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/catalog-api/*
- deploy/k8s/helm/catalog-api/*
jobs:
- template: ../buildimages.yaml


+ 3
- 0
build/azure-devops/identity-api/azure-pipelines.yml View File

@ -9,6 +9,9 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Services/Identity/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/identity-api/*
- deploy/k8s/helm/identity-api/*
jobs:
- template: ../buildimages.yaml


+ 3
- 0
build/azure-devops/infrastructure/azure-pipelines.yml View File

@ -9,6 +9,9 @@ trigger:
- dev
paths:
include:
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/infrastructure/*
- deploy/k8s/helm/basket-data/*
- deploy/k8s/helm/keystore-data/*
- deploy/k8s/helm/nosql-data/*


+ 3
- 0
build/azure-devops/location-api/azure-pipelines.yml View File

@ -9,6 +9,9 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Services/Location/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/location-api/*
- deploy/k8s/helm/locations-api/*
jobs:
- template: ../buildimages.yaml


+ 3
- 0
build/azure-devops/marketing-api/azure-pipelines.yml View File

@ -9,6 +9,9 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Services/Marketing/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/marketing-api/*
- deploy/k8s/helm/marketing-api/*
jobs:
- template: ../buildimages.yaml


+ 3
- 0
build/azure-devops/mobile-shopping-agg/azure-pipelines.yml View File

@ -8,6 +8,9 @@ trigger:
paths:
include:
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/mobile-shopping-agg/*
- deploy/k8s/helm/mobileshoppingagg/*
jobs:
- template: ../buildimages.yaml


+ 6
- 3
build/azure-devops/multiarch.yaml View File

@ -8,7 +8,7 @@ jobs:
- job: manifest
condition: and(succeeded(),ne('${{ variables['Build.Reason'] }}', 'PullRequest'))
dependsOn:
- BuildWindows
# - BuildWindows
- BuildLinux
pool:
vmImage: 'Ubuntu 16.04'
@ -19,12 +19,15 @@ jobs:
command: login
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
# Disabled windows deploy
# docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:win-${{ parameters.branch }}
# docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest ${{ parameters.registry }}/${{ parameters.image }}:win-latest
- bash: |
mkdir -p ~/.docker
sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json
echo ',"experimental": "enabled" }' >> ~/.docker/config.json
docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:win-${{ parameters.branch }}
docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest ${{ parameters.registry }}/${{ parameters.image }}:win-latest
docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:{{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }}
docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest
docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }}
docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:latest
displayName: Create multiarch manifest

+ 3
- 0
build/azure-devops/ordering-api/azure-pipelines.yml View File

@ -9,6 +9,9 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Services/Ordering/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/ordering-api/*
- deploy/k8s/helm/ordering-api/*
- deploy/k8s/helm/ordering-backgroundtasks/*
- deploy/k8s/helm/ordering-signalrhub/*


+ 3
- 0
build/azure-devops/payment-api/azure-pipelines.yml View File

@ -9,6 +9,9 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Services/Payment/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/payment-api/*
- deploy/k8s/helm/payment-api/*
jobs:
- template: ../buildimages.yaml


+ 3
- 0
build/azure-devops/web-shopping-agg/azure-pipelines.yml View File

@ -8,6 +8,9 @@ trigger:
paths:
include:
- src/ApiGateways/Web.Bff.Shopping/aggregator/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/web-shopping-agg/*
- deploy/k8s/helm/webshoppingagg/*
jobs:
- template: ../buildimages.yaml


+ 3
- 0
build/azure-devops/webhooks-api/azure-pipelines.yml View File

@ -9,6 +9,9 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Services/Webhooks/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/webhooks-api/*
- deploy/k8s/helm/webhooks-api/*
jobs:
- template: ../buildimages.yaml


+ 4
- 1
build/azure-devops/webhooks-client/azure-pipelines.yml View File

@ -9,6 +9,9 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Web/WebhookClient/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/webhooks-client/*
- deploy/k8s/helm/webhooks-web/*
jobs:
- template: ../buildimages.yaml
@ -21,4 +24,4 @@ jobs:
parameters:
image: webhooks.client
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)
registryEndpoint: $(registryEndpoint)

+ 3
- 0
build/azure-devops/webmvc/azure-pipelines.yml View File

@ -9,6 +9,9 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Web/WebMVC/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/webmvc/*
- deploy/k8s/helm/webmvc/*
jobs:
- template: ../buildimages.yaml


+ 3
- 0
build/azure-devops/webspa/azure-pipelines.yml View File

@ -9,6 +9,9 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Web/WebSPA/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/webspa/*
- deploy/k8s/helm/webspa/*
jobs:
- template: ../buildimages.yaml


+ 3
- 0
build/azure-devops/webstatus/azure-pipelines.yml View File

@ -9,6 +9,9 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Web/WebStatus/*
- build/azure-devops/buildimages.yml
- build/azure-devops/multiarch.yml
- build/azure-devops/webstatus/*
- deploy/k8s/helm/webstatus/*
jobs:
- template: ../buildimages.yaml


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

@ -60,14 +60,13 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
});
})
.ConfigureAppConfiguration(x => x.AddConfiguration(configuration))
.UseFailing(options => {
options.ConfigPath = "/Failing";
options.NotFilteredPaths.AddRange(new[] {"/hc","/liveness"});
})
.UseStartup<Startup>()
.UseApplicationInsights()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseConfiguration(configuration)
.UseSerilog()
.Build();


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

@ -66,7 +66,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API
private static IWebHost CreateHostBuilder(IConfiguration configuration, string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseConfiguration(configuration)
.ConfigureAppConfiguration(x => x.AddConfiguration(configuration))
.CaptureStartupErrors(false)
.ConfigureKestrel(options =>
{
@ -82,7 +82,6 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API
})
.UseStartup<Startup>()
.UseApplicationInsights()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseWebRoot("Pics")
.UseSerilog()


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

@ -67,10 +67,9 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
private static IWebHost BuildWebHost(IConfiguration configuration, string[] args) =>
WebHost.CreateDefaultBuilder(args)
.CaptureStartupErrors(false)
.ConfigureAppConfiguration(x => x.AddConfiguration(configuration))
.UseStartup<Startup>()
.UseApplicationInsights()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseConfiguration(configuration)
.UseSerilog()
.Build();


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

@ -154,6 +154,11 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
app.UseForwardedHeaders();
// Adds IdentityServer
app.UseIdentityServer();
// Fix a problem with chrome. Chrome enabled a new feature "Cookies without SameSite must be secure",
// the coockies shold be expided from https, but in eShop, the internal comunicacion in aks and docker compose is http.
// To avoid this problem, the policy of cookies shold be in Lax mode.
app.UseCookiePolicy(new CookiePolicyOptions { MinimumSameSitePolicy = AspNetCore.Http.SameSiteMode.Lax });
app.UseRouting();
app.UseEndpoints(endpoints =>
{


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

@ -44,10 +44,9 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
private static IWebHost BuildWebHost(IConfiguration configuration, string[] args) =>
WebHost.CreateDefaultBuilder(args)
.CaptureStartupErrors(false)
.ConfigureAppConfiguration(x => x.AddConfiguration(configuration))
.UseStartup<Startup>()
.UseApplicationInsights()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseConfiguration(configuration)
.UseSerilog()
.Build();


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

@ -55,11 +55,10 @@
private static IWebHost BuildWebHost(IConfiguration configuration, string[] args) =>
WebHost.CreateDefaultBuilder(args)
.CaptureStartupErrors(false)
.ConfigureAppConfiguration(x => x.AddConfiguration(configuration))
.UseStartup<Startup>()
.UseApplicationInsights()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseWebRoot("Pics")
.UseConfiguration(configuration)
.UseSerilog()
.Build();


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

@ -77,10 +77,9 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API
});
})
.ConfigureAppConfiguration(x => x.AddConfiguration(configuration))
.UseStartup<Startup>()
.UseApplicationInsights()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseConfiguration(configuration)
.UseSerilog()
.Build();


+ 1
- 1
src/Services/Ordering/Ordering.SignalrHub/Program.cs View File

@ -46,8 +46,8 @@ namespace Ordering.SignalrHub
private static IWebHost BuildWebHost(IConfiguration configuration, string[] args) =>
WebHost.CreateDefaultBuilder(args)
.CaptureStartupErrors(false)
.ConfigureAppConfiguration(x => x.AddConfiguration(configuration))
.UseStartup<Startup>()
.UseConfiguration(configuration)
.UseSerilog()
.Build();


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

@ -44,10 +44,9 @@ namespace Payment.API
private static IWebHost BuildWebHost(IConfiguration configuration, string[] args) =>
WebHost.CreateDefaultBuilder(args)
.CaptureStartupErrors(false)
.ConfigureAppConfiguration(x => x.AddConfiguration(configuration))
.UseStartup<Startup>()
.UseApplicationInsights()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseConfiguration(configuration)
.UseSerilog()
.Build();


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

@ -80,9 +80,9 @@ namespace Webhooks.API
app.UseCors("CorsPolicy");
app.UseRouting();
ConfigureAuth(app);
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapDefaultControllerRoute();
@ -119,6 +119,7 @@ namespace Webhooks.API
*/
app.UseAuthentication();
app.UseAuthorization();
}
protected virtual void ConfigureEventBus(IApplicationBuilder app)


+ 2
- 3
src/Web/WebMVC/Program.cs View File

@ -42,10 +42,9 @@ namespace Microsoft.eShopOnContainers.WebMVC
private static IWebHost BuildWebHost(IConfiguration configuration, string[] args) =>
WebHost.CreateDefaultBuilder(args)
.CaptureStartupErrors(false)
.CaptureStartupErrors(false)
.ConfigureAppConfiguration(x => x.AddConfiguration(configuration))
.UseStartup<Startup>()
.UseApplicationInsights()
.UseConfiguration(configuration)
.UseSerilog()
.Build();


+ 0
- 1
src/Web/WebSPA/Program.cs View File

@ -29,7 +29,6 @@ namespace eShopConContainers.WebSPA
builder.AddDebug();
builder.AddAzureWebAppDiagnostics();
})
.UseApplicationInsights()
.UseSerilog((builderContext, config) =>
{
config


+ 6147
- 3726
src/Web/WebSPA/package-lock.json
File diff suppressed because it is too large
View File


+ 16
- 16
src/Web/WebSPA/package.json View File

@ -38,6 +38,9 @@
"@angular/router": "8.2.14",
"@microsoft/signalr": "3.0.1",
"@ng-bootstrap/ng-bootstrap": "5.2.1",
"@popperjs/core": "2.0.0",
"acorn": "^6.4.1",
"acorn-dynamic-import": "4.0.0",
"bootstrap": "4.4.1",
"core-js": "^3.0.0",
"file-loader": "2.0.0",
@ -46,14 +49,11 @@
"jquery": "3.4.1",
"ngx-toastr": "10.1.0",
"normalize.css": "8.0.0",
"@popperjs/core": "2.0.0",
"popper.js": "1.16.1",
"rxjs": "~6.4.0",
"rxjs-compat": "~6.4.0",
"webpack-dev-server": "3.1.14",
"zone.js": "~0.9.1",
"acorn-dynamic-import": "4.0.0",
"acorn": "^6.0.0",
"popper.js": "1.16.1"
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.803.23",
@ -62,32 +62,32 @@
"@angular/language-service": "8.2.14",
"@types/core-js": "2.5.0",
"@types/hammerjs": "2.0.35",
"@types/jasmine": "^3.3.12",
"@types/node": "^11.11.4",
"@types/jasmine": "^3.5.10",
"@types/node": "^11.15.9",
"@types/protractor": "4.0.0",
"@types/selenium-webdriver": "3.0.10",
"codelyzer": "^5.0.0-beta.1",
"eslint": "4.18.2",
"handlebars": "^4.7.2",
"jasmine-core": "^3.3.0",
"codelyzer": "^5.2.2",
"eslint": "^6.8.0",
"handlebars": "^4.7.6",
"jasmine-core": "^3.5.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.0.1",
"karma": "^4.4.1",
"karma-chrome-launcher": "^2.2.0",
"karma-cli": "^2.0.0",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"karma-jasmine-html-reporter": "^1.5.3",
"lodash": "^4.17.15",
"merge": "1.2.1",
"npm-watch": "0.5.0",
"protractor": "^5.4.2",
"protractor": "^5.4.3",
"rxjs-tslint": "^0.1.7",
"sass-lint": "1.12.1",
"ts-helpers": "1.1.2",
"ts-node": "~7.0.1",
"tslint": "^5.14.0",
"typedoc": "^0.15.0",
"typedoc": "^0.15.8",
"typescript": "3.4.5",
"url-loader": "1.1.1",
"webpack": "^4.29.6"
"webpack": "^4.42.1"
}
}

+ 1
- 2
src/Web/WebStatus/Program.cs View File

@ -47,10 +47,9 @@ namespace WebStatus
private static IWebHost BuildWebHost(IConfiguration configuration, string[] args) =>
WebHost.CreateDefaultBuilder(args)
.CaptureStartupErrors(false)
.ConfigureAppConfiguration(x => x.AddConfiguration(configuration))
.UseStartup<Startup>()
.UseApplicationInsights()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseConfiguration(configuration)
.UseSerilog()
.Build();


Loading…
Cancel
Save