Browse Source

Merge pull request #1 from dotnet-architecture/dev

update
pull/1069/head^2
chinaq 5 years ago
committed by GitHub
parent
commit
3e3d11fe1c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
68 changed files with 363 additions and 618 deletions
  1. +11
    -34
      build/azure-devops/apigws/azure-pipelines.yml
  2. +12
    -33
      build/azure-devops/basket-api/azure-pipelines.yml
  3. +92
    -0
      build/azure-devops/buildimages.yaml
  4. +12
    -33
      build/azure-devops/catalog-api/azure-pipelines.yml
  5. +12
    -33
      build/azure-devops/identity-api/azure-pipelines.yml
  6. +13
    -34
      build/azure-devops/location-api/azure-pipelines.yml
  7. +13
    -34
      build/azure-devops/marketing-api/azure-pipelines.yml
  8. +14
    -34
      build/azure-devops/mobile-shopping-agg/azure-pipelines.yml
  9. +30
    -0
      build/azure-devops/multiarch.yaml
  10. +12
    -33
      build/azure-devops/ordering-api/azure-pipelines.yml
  11. +12
    -33
      build/azure-devops/payment-api/azure-pipelines.yml
  12. +13
    -34
      build/azure-devops/web-shopping-agg/azure-pipelines.yml
  13. +13
    -34
      build/azure-devops/webhooks-api/azure-pipelines.yml
  14. +13
    -34
      build/azure-devops/webhooks-client/azure-pipelines.yml
  15. +11
    -34
      build/azure-devops/webmvc/azure-pipelines.yml
  16. +10
    -33
      build/azure-devops/webspa/azure-pipelines.yml
  17. +11
    -34
      build/azure-devops/webstatus/azure-pipelines.yml
  18. +1
    -0
      docker-compose.override.yml
  19. +2
    -0
      docker-compose.yml
  20. BIN
      docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook)-v1.1.pdf
  21. BIN
      docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook).pdf
  22. BIN
      docs/MicrosoftAzure_StartGuide_Developers-old.pdf
  23. BIN
      docs/MicrosoftAzure_StartGuide_Developers.pdf
  24. BIN
      img/eShopScreen.png
  25. BIN
      img/ebook_arch_dev_microservices_containers_cover.png
  26. BIN
      img/ebook_containers_lifecycle.png
  27. +1
    -1
      k8s/helm/app.yaml
  28. +1
    -1
      k8s/helm/basket-api/templates/configmap.yaml
  29. +1
    -1
      k8s/helm/catalog-api/templates/configmap.yaml
  30. +3
    -3
      k8s/helm/deploy-all.ps1
  31. +1
    -1
      k8s/helm/identity-api/templates/configmap.yaml
  32. +4
    -4
      k8s/helm/inf.yaml
  33. +1
    -1
      k8s/helm/locations-api/templates/configmap.yaml
  34. +1
    -1
      k8s/helm/marketing-api/templates/configmap.yaml
  35. +1
    -1
      k8s/helm/mobileshoppingagg/templates/configmap.yaml
  36. +1
    -1
      k8s/helm/ordering-api/templates/configmap.yaml
  37. +1
    -1
      k8s/helm/ordering-backgroundtasks/templates/configmap.yaml
  38. +1
    -1
      k8s/helm/ordering-signalrhub/templates/configmap.yaml
  39. +1
    -1
      k8s/helm/payment-api/templates/configmap.yaml
  40. +1
    -1
      k8s/helm/webhooks-api/templates/configmap.yaml
  41. +1
    -1
      k8s/helm/webmvc/templates/configmap.yaml
  42. +1
    -1
      k8s/helm/webshoppingagg/templates/configmap.yaml
  43. +1
    -1
      k8s/helm/webspa/templates/configmap.yaml
  44. +1
    -1
      k8s/helm/webstatus/templates/configmap.yaml
  45. +1
    -1
      readme/readme.md
  46. +0
    -3
      src/ApiGateways/ApiGw-Base/Dockerfile
  47. +4
    -10
      src/ApiGateways/Mobile.Bff.Shopping/aggregator/Controllers/BasketController.cs
  48. +0
    -3
      src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile
  49. +4
    -9
      src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/BasketController.cs
  50. +0
    -3
      src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile
  51. +0
    -3
      src/Services/Basket/Basket.API/Dockerfile
  52. +0
    -3
      src/Services/Catalog/Catalog.API/Dockerfile
  53. +0
    -3
      src/Services/Identity/Identity.API/Dockerfile
  54. +0
    -3
      src/Services/Location/Locations.API/Dockerfile
  55. +0
    -3
      src/Services/Marketing/Marketing.API/Dockerfile
  56. +5
    -6
      src/Services/Ordering/Ordering.API/Application/Validations/CancelOrderCommandValidator.cs
  57. +9
    -6
      src/Services/Ordering/Ordering.API/Application/Validations/CreateOrderCommandValidator.cs
  58. +5
    -2
      src/Services/Ordering/Ordering.API/Application/Validations/IdentifiedCommandValidator.cs
  59. +5
    -6
      src/Services/Ordering/Ordering.API/Application/Validations/ShipOrderCommandValidator.cs
  60. +0
    -3
      src/Services/Ordering/Ordering.API/Dockerfile
  61. +0
    -3
      src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile
  62. +0
    -3
      src/Services/Ordering/Ordering.SignalrHub/Dockerfile
  63. +0
    -3
      src/Services/Payment/Payment.API/Dockerfile
  64. +0
    -3
      src/Services/Webhooks/Webhooks.API/Dockerfile
  65. +0
    -3
      src/Web/WebMVC/Dockerfile
  66. +0
    -3
      src/Web/WebSPA/Dockerfile
  67. +0
    -3
      src/Web/WebStatus/Dockerfile
  68. +0
    -3
      src/Web/WebhookClient/Dockerfile

+ 11
- 34
build/azure-devops/apigws/azure-pipelines.yml View File

@ -16,37 +16,14 @@ trigger:
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
- src/ApiGateways/Web.Bff.Shopping/aggregator/*
jobs:
- job: BuildLinux
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: DockerCompose@0
displayName: Compose build apigws
inputs:
dockerComposeCommand: 'build mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push apigws
inputs:
dockerComposeCommand: 'push mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
- template: ../buildimages.yaml
parameters:
services: mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw
registryEndpoint: $(registryEndpoint)
helmfrom: $(Build.SourcesDirectory)/k8s/helm
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
- template: ../multiarch.yaml
parameters:
image: ocelotapigw
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 12
- 33
build/azure-devops/basket-api/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -12,34 +10,15 @@ trigger:
- src/BuildingBlocks/*
- src/Services/Basket/*
- k8s/helm/basket-api/*
steps:
- task: DockerCompose@0
displayName: Compose build basket
inputs:
dockerComposeCommand: 'build basket.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push basket
inputs:
dockerComposeCommand: 'push basket.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
jobs:
- template: ../buildimages.yaml
parameters:
services: basket.api
registryEndpoint: $(registryEndpoint)
helmfrom: $(Build.SourcesDirectory)/k8s/helm
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
- template: ../multiarch.yaml
parameters:
image: basket.api
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 92
- 0
build/azure-devops/buildimages.yaml View File

@ -0,0 +1,92 @@
parameters:
services: ''
registryEndpoint: ''
helmfrom: ''
helmto: ''
jobs:
- job: BuildContainersForPR_Linux
condition: eq('${{ variables['Build.Reason'] }}', 'PullRequest')
pool:
vmImage: 'ubuntu-16.04'
steps:
- bash: docker-compose build ${{ parameters.services }}
displayName: Create multiarch manifest
env:
TAG: ${{ variables['Build.SourceBranchName'] }}
- job: BuildContainersForPR_Windows
condition: eq('${{ variables['Build.Reason'] }}', 'PullRequest')
pool:
vmImage: 'windows-2019'
steps:
- bash: docker-compose build ${{ parameters.services }}
displayName: Create multiarch manifest
env:
TAG: ${{ variables['Build.SourceBranchName'] }}
PLATFORM: win
NODE_IMAGE: stefanscherer/node-windows:8.11
- job: BuildLinux
condition: ne('${{ variables['Build.Reason'] }}', 'PullRequest')
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: DockerCompose@0
displayName: Compose build ${{ parameters.services }}
inputs:
dockerComposeCommand: 'build ${{ parameters.services }}'
containerregistrytype: Container Registry
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=${{ variables['Build.SourceBranchName'] }}
- task: DockerCompose@0
displayName: Compose push ${{ parameters.images }}
inputs:
dockerComposeCommand: 'push ${{ parameters.services }}'
containerregistrytype: Container Registry
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=${{ variables['Build.SourceBranchName'] }}
- task: CopyFiles@2
inputs:
sourceFolder: ${{ parameters.helmfrom }}
targetFolder: ${{ parameters.helmto }}
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: ${{ parameters.helmto }}
artifactName: helm
- job: BuildWindows
condition: ne('${{ variables['Build.Reason'] }}', 'PullRequest')
pool:
vmImage: 'windows-2019'
steps:
- task: DockerCompose@0
displayName: Compose build ${{ parameters.services }}
inputs:
dockerComposeCommand: 'build ${{ parameters.services }}'
containerregistrytype: Container Registry
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=${{ variables['Build.SourceBranchName'] }}
PLATFORM=win
NODE_IMAGE=stefanscherer/node-windows:8.11
- task: DockerCompose@0
displayName: Compose push ${{ parameters.services }}
inputs:
dockerComposeCommand: 'push ${{ parameters.services }}'
containerregistrytype: Container Registry
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=${{ variables['Build.SourceBranchName'] }}
PLATFORM=win

+ 12
- 33
build/azure-devops/catalog-api/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -12,34 +10,15 @@ trigger:
- src/BuildingBlocks/*
- src/Services/Catalog/*
- k8s/helm/catalog-api/*
steps:
- task: DockerCompose@0
displayName: Compose build catalog
inputs:
dockerComposeCommand: 'build catalog.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push catalog
inputs:
dockerComposeCommand: 'push catalog.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
jobs:
- template: ../buildimages.yaml
parameters:
services: catalog.api
registryEndpoint: $(registryEndpoint)
helmfrom: $(Build.SourcesDirectory)/k8s/helm
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
- template: ../multiarch.yaml
parameters:
image: catalog.api
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 12
- 33
build/azure-devops/identity-api/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -12,34 +10,15 @@ trigger:
- src/BuildingBlocks/*
- src/Services/Identity/*
- k8s/helm/identity-api/*
steps:
- task: DockerCompose@0
displayName: Compose build identity
inputs:
dockerComposeCommand: 'build identity.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push identity
inputs:
dockerComposeCommand: 'push identity.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
jobs:
- template: ../buildimages.yaml
parameters:
services: identity.api
registryEndpoint: $(registryEndpoint)
helmfrom: $(Build.SourcesDirectory)/k8s/helm
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
- template: ../multiarch.yaml
parameters:
image: identity.api
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 13
- 34
build/azure-devops/location-api/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -11,35 +9,16 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Services/Location/*
- k8s/helm/locations-api/*
steps:
- task: DockerCompose@0
displayName: Compose build locations
inputs:
dockerComposeCommand: 'build locations.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push locations
inputs:
dockerComposeCommand: 'push locations.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
- k8s/helm/locations-api/*
jobs:
- template: ../buildimages.yaml
parameters:
services: locations.api
registryEndpoint: $(registryEndpoint)
helmfrom: $(Build.SourcesDirectory)/k8s/helm
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
- template: ../multiarch.yaml
parameters:
image: locations.api
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 13
- 34
build/azure-devops/marketing-api/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -11,35 +9,16 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Services/Marketing/*
- k8s/helm/marketing-api/*
steps:
- task: DockerCompose@0
displayName: Compose build marketing
inputs:
dockerComposeCommand: 'build marketing.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push marketing
inputs:
dockerComposeCommand: 'push marketing.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
- k8s/helm/marketing-api/*
jobs:
- template: ../buildimages.yaml
parameters:
services: marketing.api
registryEndpoint: $(registryEndpoint)
helmfrom: $(Build.SourcesDirectory)/k8s/helm
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
- template: ../multiarch.yaml
parameters:
image: marketing.api
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 14
- 34
build/azure-devops/mobile-shopping-agg/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -10,35 +8,17 @@ trigger:
paths:
include:
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
- k8s/helm/mobileshoppingagg/*
steps:
- task: DockerCompose@0
displayName: Compose build mobileshoppingagg
inputs:
dockerComposeCommand: 'build mobileshoppingagg'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push mobileshoppingagg
inputs:
dockerComposeCommand: 'push mobileshoppingagg'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
- k8s/helm/mobileshoppingagg/*
jobs:
- template: ../buildimages.yaml
parameters:
services: mobileshoppingagg
registryEndpoint: $(registryEndpoint)
helmfrom: $(Build.SourcesDirectory)/k8s/helm
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
- template: ../multiarch.yaml
parameters:
image: mobileshoppingagg
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 30
- 0
build/azure-devops/multiarch.yaml View File

@ -0,0 +1,30 @@
parameters:
image: ''
branch: ''
registry: 'eshop'
registryEndpoint: ''
jobs:
- job: manifest
condition: and(succeeded(),ne('${{ variables['Build.Reason'] }}', 'PullRequest'))
dependsOn:
- BuildWindows
- BuildLinux
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Docker@1
displayName: Docker Login
inputs:
command: login
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
- 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 push ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }}
docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:latest
displayName: Create multiarch manifest

+ 12
- 33
build/azure-devops/ordering-api/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -14,34 +12,15 @@ trigger:
- k8s/helm/ordering-api/*
- k8s/helm/ordering-backgroundtasks/*
- k8s/helm/ordering-signalrhub/*
steps:
- task: DockerCompose@0
displayName: Compose build ordering
inputs:
dockerComposeCommand: 'build ordering.api ordering.backgroundtasks ordering.signalrhub'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push ordering
inputs:
dockerComposeCommand: 'push ordering.api ordering.backgroundtasks ordering.signalrhub'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
jobs:
- template: ../buildimages.yaml
parameters:
services: ordering.api
registryEndpoint: $(registryEndpoint)
helmfrom: $(Build.SourcesDirectory)/k8s/helm
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
- template: ../multiarch.yaml
parameters:
image: ordering.api
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 12
- 33
build/azure-devops/payment-api/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -12,34 +10,15 @@ trigger:
- src/BuildingBlocks/*
- src/Services/Payment/*
- k8s/helm/payment-api/*
steps:
- task: DockerCompose@0
displayName: Compose build payment
inputs:
dockerComposeCommand: 'build payment.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push payment
inputs:
dockerComposeCommand: 'push payment.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
jobs:
- template: ../buildimages.yaml
parameters:
services: payment.api
registryEndpoint: $(registryEndpoint)
helmfrom: $(Build.SourcesDirectory)/k8s/helm
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
- template: ../multiarch.yaml
parameters:
image: payment.api
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 13
- 34
build/azure-devops/web-shopping-agg/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -10,35 +8,16 @@ trigger:
paths:
include:
- src/ApiGateways/Web.Bff.Shopping/aggregator/*
- k8s/helm/webshoppingagg/*
steps:
- task: DockerCompose@0
displayName: Compose build webshoppingagg
inputs:
dockerComposeCommand: 'build webshoppingagg'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push webshoppingagg
inputs:
dockerComposeCommand: 'push webshoppingagg'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
- k8s/helm/webshoppingagg/*
jobs:
- template: ../buildimages.yaml
parameters:
services: webshoppingagg
registryEndpoint: $(registryEndpoint)
helmfrom: $(Build.SourcesDirectory)/k8s/helm
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
- template: ../multiarch.yaml
parameters:
image: webshoppingagg
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 13
- 34
build/azure-devops/webhooks-api/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -11,35 +9,16 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Services/Webhooks/*
- k8s/helm/webhooks-api/*
steps:
- task: DockerCompose@0
displayName: Compose build webhooks
inputs:
dockerComposeCommand: 'build webhooks.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push webhooks
inputs:
dockerComposeCommand: 'push webhooks.api'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
- k8s/helm/webhooks-api/*
jobs:
- template: ../buildimages.yaml
parameters:
services: webhooks.api
registryEndpoint: $(registryEndpoint)
helmfrom: $(Build.SourcesDirectory)/k8s/helm
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
- template: ../multiarch.yaml
parameters:
image: webhooks.api
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 13
- 34
build/azure-devops/webhooks-client/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -11,35 +9,16 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Web/WebhookClient/*
- k8s/helm/webhooks-web/*
steps:
- task: DockerCompose@0
displayName: Compose build webhooks.client
inputs:
dockerComposeCommand: 'build webhooks.client'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push webhooks.client
inputs:
dockerComposeCommand: 'push webhooks.client'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
- k8s/helm/webhooks-web/*
jobs:
- template: ../buildimages.yaml
parameters:
services: webhooks.client
registryEndpoint: $(registryEndpoint)
helmfrom: $(Build.SourcesDirectory)/k8s/helm
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
- template: ../multiarch.yaml
parameters:
image: webhooks.client
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 11
- 34
build/azure-devops/webmvc/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -11,35 +9,14 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Web/WebMVC/*
- k8s/helm/webmvc/*
steps:
- task: DockerCompose@0
displayName: Compose build webmvc
inputs:
dockerComposeCommand: 'build webmvc'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push webmvc
inputs:
dockerComposeCommand: 'push webmvc'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
- k8s/helm/webmvc/*
jobs:
- template: ../buildimages.yaml
parameters:
services: webmvc
registryEndpoint: $(registryEndpoint)
- template: ../multiarch.yaml
parameters:
image: webmvc
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 10
- 33
build/azure-devops/webspa/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -12,34 +10,13 @@ trigger:
- src/BuildingBlocks/*
- src/Web/WebSPA/*
- k8s/helm/webspa/*
steps:
- task: DockerCompose@0
displayName: Compose build webspa
inputs:
dockerComposeCommand: 'build webspa'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push webspa
inputs:
dockerComposeCommand: 'push webspa'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
jobs:
- template: ../buildimages.yaml
parameters:
services: webspa
registryEndpoint: $(registryEndpoint)
- template: ../multiarch.yaml
parameters:
image: webspa
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

+ 11
- 34
build/azure-devops/webstatus/azure-pipelines.yml View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables:
registryEndpoint: eshop-registry
trigger:
@ -11,35 +9,14 @@ trigger:
include:
- src/BuildingBlocks/*
- src/Web/WebStatus/*
- k8s/helm/webstatus/*
steps:
- task: DockerCompose@0
displayName: Compose build webstatus
inputs:
dockerComposeCommand: 'build webstatus'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: DockerCompose@0
displayName: Compose push webstatus
inputs:
dockerComposeCommand: 'push webstatus'
containerregistrytype: Container Registry
dockerRegistryEndpoint: $(registryEndpoint)
dockerComposeFile: docker-compose.yml
qualifyImageNames: true
projectName: ""
dockerComposeFileArgs: |
TAG=$(Build.SourceBranchName)
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
- k8s/helm/webstatus/*
jobs:
- template: ../buildimages.yaml
parameters:
services: webstatus
registryEndpoint: $(registryEndpoint)
- template: ../multiarch.yaml
parameters:
image: webstatus
branch: $(Build.SourceBranchName)
registryEndpoint: $(registryEndpoint)

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

@ -111,6 +111,7 @@ services:
- OrchestratorType=${ORCHESTRATOR_TYPE}
- UseLoadTest=${USE_LOADTEST:-False}
- Serilog__MinimumLevel__Override__Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ=Verbose
- Serilog__MinimumLevel__Override__Ordering.API=Verbose
ports:
- "5102:80" # Important: In a production environment your should remove the external port (5102) kept here for microservice debugging purposes.
# The API Gateway redirects and access through the internal port (80).


+ 2
- 0
docker-compose.yml View File

@ -214,6 +214,8 @@ services:
build:
context: .
dockerfile: src/Web/WebSPA/Dockerfile
args:
- NODE_IMAGE=${NODE_IMAGE:-node:8.11}
# depends_on:
# - webshoppingagg
# - webshoppingapigw


BIN
docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook)-v1.1.pdf View File


BIN
docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook).pdf View File


BIN
docs/MicrosoftAzure_StartGuide_Developers-old.pdf View File


BIN
docs/MicrosoftAzure_StartGuide_Developers.pdf View File


BIN
img/eShopScreen.png View File

Before After
Width: 900  |  Height: 500  |  Size: 334 KiB

BIN
img/ebook_arch_dev_microservices_containers_cover.png View File

Before After
Width: 257  |  Height: 336  |  Size: 47 KiB Width: 260  |  Height: 336  |  Size: 45 KiB

BIN
img/ebook_containers_lifecycle.png View File

Before After
Width: 260  |  Height: 336  |  Size: 22 KiB Width: 276  |  Height: 335  |  Size: 30 KiB

+ 1
- 1
k8s/helm/app.yaml View File

@ -29,7 +29,7 @@ app: # app global settings
catalog: catalog # service name for catalog api
ordering: ordering # service name for ordering api
orderingbackgroundtasks: orderingbackgroundtasks # service name for orderingbackgroundtasks
orderingsignalrhub: ordering-signalrhub # service name for orderingsignalrhub
orderingsignalrhub: ordering-signalrhub # service name for orderingsignalrhub
identity: identity # service name for identity api
mvc: webmvc # service name for web mvc
spa: webspa # service name for web spa


+ 1
- 1
k8s/helm/basket-api/templates/configmap.yaml View File

@ -15,5 +15,5 @@ data:
urls__IdentityUrl: http://{{ $identity }}
basket__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

+ 1
- 1
k8s/helm/catalog-api/templates/configmap.yaml View File

@ -16,5 +16,5 @@ data:
catalog__PicBaseUrl: http://{{ $webshoppingapigw }}/api/v1/c/catalog/items/[0]/pic/
catalog__AzureStorageEnabled: "{{ .Values.inf.misc.useAzureStorage }}"
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

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

@ -67,7 +67,7 @@ $charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-a
if ($deployInfrastructure) {
foreach ($infra in $infras) {
Write-Host "Installing infrastructure: $infra" -ForegroundColor Green
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --name="$appName-$infra" $infra
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --name="$appName-$infra" $infra
}
}
else {
@ -78,11 +78,11 @@ if ($deployCharts) {
foreach ($chart in $charts) {
Write-Host "Installing: $chart" -ForegroundColor Green
if ($useCustomRegistry) {
helm install --set inf.registry.server=$registry --set inf.registry.login=$dockerUser --set inf.registry.pwd=$dockerPassword --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart
helm install --set inf.registry.server=$registry --set inf.registry.login=$dockerUser --set inf.registry.pwd=$dockerPassword --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart
}
else {
if ($chart -ne "eshop-common") { # eshop-common is ignored when no secret must be deployed
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart
}
}
}


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

@ -24,7 +24,7 @@ metadata:
data:
identity__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.identity.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
identity__keystore: {{ .Values.inf.redis.keystore.constr }}
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
mvc_e: http://{{ $mvc_url }}
spa_e: http://{{ $spa_url }}
locations_e: http://{{ $locations_url }}


+ 4
- 4
k8s/helm/inf.yaml View File

@ -1,4 +1,4 @@
# This heml values file defines all infrastructure used by eShopOnContainers.
# This helm values file defines all infrastructure used by eShopOnContainers.
# It is used on all charts, so ** MUST BE INCLUDED ** on every deployment
inf:
@ -15,11 +15,11 @@ inf:
identity:
db: IdentityDb # Ordering API SQL db name
marketing:
db: MarketingDb # Marketing API SQL db name
db: MarketingDb # Marketing API SQL db name
webhooks:
db: WebhooksDb # Webhooks DB
db: WebhooksDb # Webhooks DB
mongo:
# host: my-nosql-data # Uncomment to use specify custom mongo host. By default nosql-data is used
# host: my-nosql-data # Uncomment to use specify custom mongo host. By default nosql-data is used
locations:
database: LocationsDb
marketing:


+ 1
- 1
k8s/helm/locations-api/templates/configmap.yaml View File

@ -13,7 +13,7 @@ metadata:
heritage: {{ .Release.Service }}
data:
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }}


+ 1
- 1
k8s/helm/marketing-api/templates/configmap.yaml View File

@ -15,7 +15,7 @@ metadata:
heritage: {{ .Release.Service }}
data:
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }}


+ 1
- 1
k8s/helm/mobileshoppingagg/templates/configmap.yaml View File

@ -10,7 +10,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
mobileshoppingagg__keystore: {{ .Values.inf.redis.keystore.constr }}
internalurls__basket: http://{{ .Values.app.svc.basket }}


+ 1
- 1
k8s/helm/ordering-api/templates/configmap.yaml View File

@ -16,5 +16,5 @@ data:
ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
urls__IdentityUrl: http://{{ $identity }}
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

+ 1
- 1
k8s/helm/ordering-backgroundtasks/templates/configmap.yaml View File

@ -15,7 +15,7 @@ data:
ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
graceperiodmanager__CheckUpdateTime: "{{ .Values.cfg.checkUpdateTime }}"
graceperiodmanager__GracePeriodTime: "{{ .Values.cfg.gracePeriodTime }}"

+ 1
- 1
k8s/helm/ordering-signalrhub/templates/configmap.yaml View File

@ -12,7 +12,7 @@ metadata:
heritage: {{ .Release.Service }}
data:
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
signalr__StoreConnectionString: {{ .Values.inf.redis.keystore.constr }}
urls__IdentityUrl: http://{{ $identity }}

+ 1
- 1
k8s/helm/payment-api/templates/configmap.yaml View File

@ -11,5 +11,5 @@ metadata:
heritage: {{ .Release.Service }}
data:
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

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

@ -16,5 +16,5 @@ data:
urls__IdentityUrl: http://{{ $identity }}
urls__IdentityUrlExternal: http://{{ $identity }}
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

+ 1
- 1
k8s/helm/webmvc/templates/configmap.yaml View File

@ -14,7 +14,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
webmvc__keystore: {{ .Values.inf.redis.keystore.constr }}


+ 1
- 1
k8s/helm/webshoppingagg/templates/configmap.yaml View File

@ -10,7 +10,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
webshoppingagg__keystore: {{ .Values.inf.redis.keystore.constr }}
internalurls__basket: http://{{ .Values.app.svc.basket }}


+ 1
- 1
k8s/helm/webspa/templates/configmap.yaml View File

@ -16,7 +16,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
webspa__keystore: {{ .Values.inf.redis.keystore.constr }}
internalurls__apigwws: http://{{ .Values.app.svc.webshoppingapigw }}


+ 1
- 1
k8s/helm/webstatus/templates/configmap.yaml View File

@ -15,7 +15,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
webstatus__keystore: {{ .Values.inf.redis.keystore.constr }}


+ 1
- 1
readme/readme.md View File

@ -7,7 +7,7 @@ This file contains links to the documentation of the project.
## Documentation included in files
* [Branch Guide](../branch-guide.md): List of branches used and their purpose.
* [vsts-docs folder](../vsts-docs/readme.md): Information about how to setup a CI/CD procedure using VSTS
* [vsts-docs folder](../vsts-docs/readme.md): Information about how to setup a CI/CD procedure using Azure DevOps
* [Kubernetes](../k8s/readme.md): Information about how to deploy eShopOnContainers in a kubernetes cluster, and how to setup a CI/CD for k8s using VSTS
* [deploy](../deploy/readme.md): Information about how deploy Azure resources using the Azure CLI 2.0.
* [.env file](./README.ENV.md): What is the `.env` file and how to use it to configure eShopOnContainers to use external resources (like Azure)


+ 0
- 3
src/ApiGateways/ApiGw-Base/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/ApiGateways/ApiGw-Base/
RUN dotnet publish -c Release -o /app


+ 4
- 10
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Controllers/BasketController.cs View File

@ -36,15 +36,9 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Controllers
}
// Retrieve the current basket
var currentBasket = await _basket.GetByIdAsync(data.BuyerId);
if (currentBasket == null)
{
currentBasket = new BasketData(data.BuyerId);
}
var basket = await _basket.GetByIdAsync(data.BuyerId) ?? new BasketData(data.BuyerId);
var catalogItems = await _catalog.GetCatalogItemsAsync(data.Items.Select(x => x.ProductId));
var newBasket = new BasketData(data.BuyerId);
foreach (var bitem in data.Items)
{
@ -54,7 +48,7 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Controllers
return BadRequest($"Basket refers to a non-existing catalog item ({bitem.ProductId})");
}
newBasket.Items.Add(new BasketDataItem()
basket.Items.Add(new BasketDataItem()
{
Id = bitem.Id,
ProductId = catalogItem.Id.ToString(),
@ -65,9 +59,9 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Controllers
});
}
await _basket.UpdateAsync(newBasket);
await _basket.UpdateAsync(basket);
return newBasket;
return basket;
}
[HttpPut]


+ 0
- 3
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/ApiGateways/Mobile.Bff.Shopping/aggregator
RUN dotnet publish -c Release -o /app


+ 4
- 9
src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/BasketController.cs View File

@ -36,14 +36,9 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Controllers
}
// Retrieve the current basket
var currentBasket = await _basket.GetByIdAsync(data.BuyerId);
if (currentBasket == null)
{
currentBasket = new BasketData(data.BuyerId);
}
var basket = await _basket.GetByIdAsync(data.BuyerId) ?? new BasketData(data.BuyerId);
var catalogItems = await _catalog.GetCatalogItemsAsync(data.Items.Select(x => x.ProductId));
var newBasket = new BasketData(data.BuyerId);
foreach (var bitem in data.Items)
{
@ -53,7 +48,7 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Controllers
return BadRequest($"Basket refers to a non-existing catalog item ({bitem.ProductId})");
}
newBasket.Items.Add(new BasketDataItem()
basket.Items.Add(new BasketDataItem()
{
Id = bitem.Id,
ProductId = catalogItem.Id.ToString(),
@ -64,9 +59,9 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Controllers
});
}
await _basket.UpdateAsync(newBasket);
await _basket.UpdateAsync(basket);
return newBasket;
return basket;
}
[HttpPut]


+ 0
- 3
src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/ApiGateways/Web.Bff.Shopping/aggregator
RUN dotnet publish -c Release -o /app


+ 0
- 3
src/Services/Basket/Basket.API/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/Services/Basket/Basket.API
RUN dotnet publish -c Release -o /app


+ 0
- 3
src/Services/Catalog/Catalog.API/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/Services/Catalog/Catalog.API
RUN dotnet publish -c Release -o /app


+ 0
- 3
src/Services/Identity/Identity.API/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/Services/Identity/Identity.API
RUN dotnet publish -c Release -o /app


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

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/Services/Location/Locations.API
RUN dotnet publish -c Release -o /app


+ 0
- 3
src/Services/Marketing/Marketing.API/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/Services/Marketing/Marketing.API
RUN dotnet publish -c Release -o /app


+ 5
- 6
src/Services/Ordering/Ordering.API/Application/Validations/CancelOrderCommandValidator.cs View File

@ -1,17 +1,16 @@
using FluentValidation;
using Microsoft.Extensions.Logging;
using Ordering.API.Application.Commands;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Ordering.API.Application.Validations
{
public class CancelOrderCommandValidator : AbstractValidator<CancelOrderCommand>
{
public CancelOrderCommandValidator()
public CancelOrderCommandValidator(ILogger<CancelOrderCommandValidator> logger)
{
RuleFor(order => order.OrderNumber).NotEmpty().WithMessage("No orderId found");
logger.LogTrace("----- INSTANCE CREATED - {ClassName}", GetType().Name);
}
}
}
}

+ 9
- 6
src/Services/Ordering/Ordering.API/Application/Validations/CreateOrderCommandValidator.cs View File

@ -1,5 +1,6 @@
using FluentValidation;
using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
@ -9,19 +10,21 @@ namespace Ordering.API.Application.Validations
{
public class CreateOrderCommandValidator : AbstractValidator<CreateOrderCommand>
{
public CreateOrderCommandValidator()
public CreateOrderCommandValidator(ILogger<CreateOrderCommandValidator> logger)
{
RuleFor(command => command.City).NotEmpty();
RuleFor(command => command.Street).NotEmpty();
RuleFor(command => command.State).NotEmpty();
RuleFor(command => command.Country).NotEmpty();
RuleFor(command => command.ZipCode).NotEmpty();
RuleFor(command => command.CardNumber).NotEmpty().Length(12, 19);
RuleFor(command => command.CardNumber).NotEmpty().Length(12, 19);
RuleFor(command => command.CardHolderName).NotEmpty();
RuleFor(command => command.CardExpiration).NotEmpty().Must(BeValidExpirationDate).WithMessage("Please specify a valid card expiration date");
RuleFor(command => command.CardSecurityNumber).NotEmpty().Length(3);
RuleFor(command => command.CardExpiration).NotEmpty().Must(BeValidExpirationDate).WithMessage("Please specify a valid card expiration date");
RuleFor(command => command.CardSecurityNumber).NotEmpty().Length(3);
RuleFor(command => command.CardTypeId).NotEmpty();
RuleFor(command => command.OrderItems).Must(ContainOrderItems).WithMessage("No order items found");
RuleFor(command => command.OrderItems).Must(ContainOrderItems).WithMessage("No order items found");
logger.LogTrace("----- INSTANCE CREATED - {ClassName}", GetType().Name);
}
private bool BeValidExpirationDate(DateTime dateTime)
@ -34,4 +37,4 @@ namespace Ordering.API.Application.Validations
return orderItems.Any();
}
}
}
}

+ 5
- 2
src/Services/Ordering/Ordering.API/Application/Validations/IdentifiedCommandValidator.cs View File

@ -1,13 +1,16 @@
using FluentValidation;
using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands;
using Microsoft.Extensions.Logging;
namespace Ordering.API.Application.Validations
{
public class IdentifiedCommandValidator : AbstractValidator<IdentifiedCommand<CreateOrderCommand,bool>>
{
public IdentifiedCommandValidator()
public IdentifiedCommandValidator(ILogger<IdentifiedCommandValidator> logger)
{
RuleFor(command => command.Id).NotEmpty();
RuleFor(command => command.Id).NotEmpty();
logger.LogTrace("----- INSTANCE CREATED - {ClassName}", GetType().Name);
}
}
}

+ 5
- 6
src/Services/Ordering/Ordering.API/Application/Validations/ShipOrderCommandValidator.cs View File

@ -1,17 +1,16 @@
using FluentValidation;
using Microsoft.Extensions.Logging;
using Ordering.API.Application.Commands;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Ordering.API.Application.Validations
{
public class ShipOrderCommandValidator : AbstractValidator<ShipOrderCommand>
{
public ShipOrderCommandValidator()
public ShipOrderCommandValidator(ILogger<ShipOrderCommandValidator> logger)
{
RuleFor(order => order.OrderNumber).NotEmpty().WithMessage("No orderId found");
logger.LogTrace("----- INSTANCE CREATED - {ClassName}", GetType().Name);
}
}
}
}

+ 0
- 3
src/Services/Ordering/Ordering.API/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/Services/Ordering/Ordering.API
RUN dotnet publish -c Release -o /app


+ 0
- 3
src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/Services/Ordering/Ordering.BackgroundTasks
RUN dotnet publish -c Release -o /app


+ 0
- 3
src/Services/Ordering/Ordering.SignalrHub/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/Services/Ordering/Ordering.SignalrHub
RUN dotnet publish -c Release -o /app


+ 0
- 3
src/Services/Payment/Payment.API/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/Services/Payment/Payment.API
RUN dotnet publish -c Release -o /app


+ 0
- 3
src/Services/Webhooks/Webhooks.API/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR "/src/src/Services/Webhooks/Webhooks.API"
RUN dotnet publish -c Release -o /app


+ 0
- 3
src/Web/WebMVC/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/Web/WebMVC
RUN dotnet publish -c Release -o /app


+ 0
- 3
src/Web/WebSPA/Dockerfile View File

@ -20,9 +20,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
COPY --from=node-build /web/wwwroot /src/src/Web/WebSPA/wwwroot/
WORKDIR /src/src/Web/WebSPA


+ 0
- 3
src/Web/WebStatus/Dockerfile View File

@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/Web/WebStatus
RUN dotnet publish -c Release -o /app


+ 0
- 3
src/Web/WebhookClient/Dockerfile View File

@ -14,9 +14,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
COPY src/Services/*/*/*.csproj /src/csproj-files/
COPY src/Web/*/*.csproj /src/csproj-files/
ARG RUN=pwd
RUN ${RUN}
COPY . .
WORKDIR /src/src/Web/WebhookClient
RUN dotnet publish -c Release -o /app


Loading…
Cancel
Save