Merge pull request #1 from dotnet-architecture/dev

Pull from base
This commit is contained in:
Gajendra Babu Thokala [MSFT] 2019-11-17 13:20:35 -08:00 committed by GitHub
commit 584cc59823
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
365 changed files with 20920 additions and 40619 deletions

View File

@ -5,14 +5,11 @@
.vs .vs
.vscode .vscode
docker-compose*.yml docker-compose*.yml
docker-compose.dcproj
*.sln
*.md *.md
hosts hosts
LICENSE LICENSE
*.testsettings *.testsettings
vsts-docs vsts-docs
test
ServiceFabric ServiceFabric
readme readme
k8s k8s

View File

@ -22,6 +22,7 @@ Dev branch contains the latest "stable" code, and their images are tagged with `
[![Web Status](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/webstatus?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=211&branchName=dev) | [![Webhooks API](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/webhooks?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=207&branchName=dev) | [![Webhooks demo client](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/webhooks-client?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=208&branchName=dev) | [![Web Status](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/webstatus?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=211&branchName=dev) | [![Webhooks API](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/webhooks?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=207&branchName=dev) | [![Webhooks demo client](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/webhooks-client?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=208&branchName=dev) |
## IMPORTANT NOTES! ## IMPORTANT NOTES!
**You can use either the latest version of Visual Studio or simply Docker CLI and .NET CLI for Windows, Mac and Linux**. **You can use either the latest version of Visual Studio or simply Docker CLI and .NET CLI for Windows, Mac and Linux**.
**Note for Pull Requests (PRs)**: We accept pull request from the community. When doing it, please do it onto the **DEV branch** which is the consolidated work-in-progress branch. Do not request it onto Master branch, if possible. **Note for Pull Requests (PRs)**: We accept pull request from the community. When doing it, please do it onto the **DEV branch** which is the consolidated work-in-progress branch. Do not request it onto Master branch, if possible.
@ -29,7 +30,14 @@ Dev branch contains the latest "stable" code, and their images are tagged with `
**NEWS / ANNOUNCEMENTS** **NEWS / ANNOUNCEMENTS**
Do you want to be up-to-date on .NET Architecture guidance and reference apps like eShopOnContainers? --> Subscribe by "WATCHING" this new GitHub repo: https://github.com/dotnet-architecture/News Do you want to be up-to-date on .NET Architecture guidance and reference apps like eShopOnContainers? --> Subscribe by "WATCHING" this new GitHub repo: https://github.com/dotnet-architecture/News
## Update to .NET Core 3
> There's currently an update to .NET Core 3 going on in the branch [features/migration-dotnet3](https://github.com/dotnet-architecture/eShopOnContainers/tree/features/migration-dotnet3).
>
> You can monitor this branch, but it's being changed frequently, community contributions will be accepted once it's officially released.
## Updated for .NET Core 2.2 "wave" of technologies ## Updated for .NET Core 2.2 "wave" of technologies
eShopOnContainers is updated to .NET Core 2.x (currently updated to 2.2) "wave" of technologies. Not just compilation but also new recommended code in EF Core, ASP.NET Core, and other new related versions. eShopOnContainers is updated to .NET Core 2.x (currently updated to 2.2) "wave" of technologies. Not just compilation but also new recommended code in EF Core, ASP.NET Core, and other new related versions.
The **dockerfiles** in the solution have also been updated and now support [**Docker Multi-Stage**](https://blogs.msdn.microsoft.com/stevelasker/2017/09/11/net-and-multistage-dockerfiles/) since mid-December 2017. The **dockerfiles** in the solution have also been updated and now support [**Docker Multi-Stage**](https://blogs.msdn.microsoft.com/stevelasker/2017/09/11/net-and-multistage-dockerfiles/) since mid-December 2017.
@ -37,6 +45,7 @@ The **dockerfiles** in the solution have also been updated and now support [**Do
>**PLEASE** Read our [branch guide](./branch-guide.md) to know about our branching policy >**PLEASE** Read our [branch guide](./branch-guide.md) to know about our branching policy
> ### DISCLAIMER > ### DISCLAIMER
>
> **IMPORTANT:** The current state of this sample application is **BETA**, because we are constantly evolving towards newly released technologies. Therefore, many areas could be improved and change significantly while refactoring the current code and implementing new features. Feedback with improvements and pull requests from the community will be highly appreciated and accepted. > **IMPORTANT:** The current state of this sample application is **BETA**, because we are constantly evolving towards newly released technologies. Therefore, many areas could be improved and change significantly while refactoring the current code and implementing new features. Feedback with improvements and pull requests from the community will be highly appreciated and accepted.
> >
> This reference application proposes a simplified microservice oriented architecture implementation to introduce technologies like .NET Core with Docker containers through a comprehensive application. The chosen domain is eShop/eCommerce but simply because it is a well-known domain by most people/developers. > This reference application proposes a simplified microservice oriented architecture implementation to introduce technologies like .NET Core with Docker containers through a comprehensive application. The chosen domain is eShop/eCommerce but simply because it is a well-known domain by most people/developers.
@ -46,11 +55,11 @@ However, this sample application should not be considered as an "eCommerce refer
![image](https://user-images.githubusercontent.com/1712635/40397331-059a7ec6-5de7-11e8-8542-a597eca16fef.png) ![image](https://user-images.githubusercontent.com/1712635/40397331-059a7ec6-5de7-11e8-8542-a597eca16fef.png)
> Read the planned <a href='https://github.com/dotnet/eShopOnContainers/wiki/01.-Roadmap-and-Milestones-for-future-releases'>Roadmap and Milestones for future releases of eShopOnContainers</a> within the Wiki for further info about possible new implementations and provide feedback at the <a href='https://github.com/dotnet/eShopOnContainers/issues'>ISSUES section</a> if you'd like to see any specific scenario implemented or improved. Also, feel free to discuss on any current issue. > Read the planned <a href='https://github.com/dotnet-architecture/eShopOnContainers/wiki/Roadmap'>Roadmap</a> within the Wiki for further info about possible new implementations and provide feedback at the <a href='https://github.com/dotnet/eShopOnContainers/issues'>ISSUES section</a> if you'd like to see any specific scenario implemented or improved. Also, feel free to discuss on any current issue.
### Architecture overview ### Architecture overview
This reference application is cross-platform at the server and client side, thanks to .NET Core services capable of running on Linux or Windows containers depending on your Docker host, and to Xamarin for mobile apps running on Android, iOS or Windows/UWP plus any browser for the client web apps. This reference application is cross-platform at the server and client side, thanks to .NET Core services capable of running on Linux or Windows containers depending on your Docker host, and to Xamarin for mobile apps running on Android, iOS or Windows/UWP plus any browser for the client web apps.
The architecture proposes a microservice oriented architecture implementation with multiple autonomous microservices (each one owning its own data/db) and implementing different approaches within each microservice (simple CRUD vs. DDD/CQRS patterns) using Http as the communication protocol between the client apps and the microservices and supports asynchronous communication for data updates propagation across multiple services based on Integration Events and an Event Bus (a light message broker, to choose between RabbitMQ or Azure Service Bus, underneath) plus other features defined at the <a href='https://github.com/dotnet/eShopOnContainers/wiki/01.-Roadmap-and-Milestones-for-future-releases'>roadmap</a>. The architecture proposes a microservice oriented architecture implementation with multiple autonomous microservices (each one owning its own data/db) and implementing different approaches within each microservice (simple CRUD vs. DDD/CQRS patterns) using Http as the communication protocol between the client apps and the microservices and supports asynchronous communication for data updates propagation across multiple services based on Integration Events and an Event Bus (a light message broker, to choose between RabbitMQ or Azure Service Bus, underneath) plus other features defined at the <a href='https://github.com/dotnet-architecture/eShopOnContainers/wiki/Roadmap'>roadmap</a>.
<p> <p>
<img src="img/eshop_logo.png"> <img src="img/eshop_logo.png">
<img src="https://user-images.githubusercontent.com/1712635/38758862-d4b42498-3f27-11e8-8dad-db60b0fa05d3.png"> <img src="https://user-images.githubusercontent.com/1712635/38758862-d4b42498-3f27-11e8-8dad-db60b0fa05d3.png">
@ -83,8 +92,8 @@ The architecture proposes a microservice oriented architecture implementation wi
> ### Important Note on EventBus > ### Important Note on EventBus
> In this solution's current EventBus is a simplified implementation, mainly used for learning purposes (development and testing), so it doesn't handle all production scenarios, most notably on error handling. <p> > In this solution's current EventBus is a simplified implementation, mainly used for learning purposes (development and testing), so it doesn't handle all production scenarios, most notably on error handling. <p>
> The following forks provide production environment level implementation examples with eShopOnContainers : > The following forks provide production environment level implementation examples with eShopOnContainers :
> * Implementation with [CAP](https://github.com/dotnetcore/CAP) : https://github.com/yang-xiaodong/eShopOnContainers
> * Implementation with [NServiceBus](https://github.com/Particular/NServiceBus) : https://github.com/Particular/eShopOnContainers > * Implementation with [NServiceBus](https://github.com/Particular/NServiceBus) : https://github.com/Particular/eShopOnContainers
> * Implementation with [CAP](https://github.com/dotnetcore/CAP) : https://github.com/yang-xiaodong/eShopOnContainers
## Related documentation and guidance ## Related documentation and guidance
While developing this reference application, we've been creating a reference <b>Guide/eBook</b> focusing on <b>architecting and developing containerized and microservice based .NET Applications</b> (download link available below) which explains in detail how to develop this kind of architectural style (microservices, Docker containers, Domain-Driven Design for certain microservices) plus other simpler architectural styles, like monolithic apps that can also live as Docker containers. While developing this reference application, we've been creating a reference <b>Guide/eBook</b> focusing on <b>architecting and developing containerized and microservice based .NET Applications</b> (download link available below) which explains in detail how to develop this kind of architectural style (microservices, Docker containers, Domain-Driven Design for certain microservices) plus other simpler architectural styles, like monolithic apps that can also live as Docker containers.
@ -95,8 +104,8 @@ You can download them and start reviewing these Guides/eBooks here:
| Architecting & Developing | Containers Lifecycle & CI/CD | App patterns with Xamarin.Forms | | Architecting & Developing | Containers Lifecycle & CI/CD | App patterns with Xamarin.Forms |
| ------------ | ------------| ------------| | ------------ | ------------| ------------|
| <a href='https://aka.ms/microservicesebook'><img src="img/ebook_arch_dev_microservices_containers_cover.png"> </a> | <a href='https://aka.ms/dockerlifecycleebook'> <img src="img/ebook_containers_lifecycle.png"> </a> | <a href='https://aka.ms/xamarinpatternsebook'> <img src="img/xamarin-enterprise-patterns-ebook-cover-small.png"> </a> | | <a href='https://aka.ms/microservicesebook'><img src="img/Microservices-cover-small.png"> </a> | <a href='https://aka.ms/dockerlifecycleebook'> <img src="img/DevOps-Cover-small.png"> </a> | <a href='https://aka.ms/xamarinpatternsebook'> <img src="img/xamarin-enterprise-patterns-ebook-cover-small.png"> </a> |
| <sup> <a href='https://aka.ms/microservicesebook'>**Download .PDF** (v2.2 Edition)</a> </sup> | <sup> <a href='https://aka.ms/dockerlifecycleebook'>**Download** </a> </sup> | <sup> <a href='https://aka.ms/xamarinpatternsebook'>**Download** </a> </sup> | | <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). Download in other formats (**eReaders** like **MOBI**, **EPUB**) and other eBooks at the [.NET Architecture center](http://dot.net/architecture).
@ -129,25 +138,20 @@ Finally, those microservices are consumed by multiple client web and mobile apps
<img src="img/xamarin-mobile-App.png"> <img src="img/xamarin-mobile-App.png">
## Setting up your development environment for eShopOnContainers ## Setting up your development environment for eShopOnContainers
### Visual Studio 2017 (or above) and Windows based
This is the more straightforward way to get started:
https://github.com/dotnet-architecture/eShopOnContainers/wiki/02.-Setting-eShopOnContainers-in-a-Visual-Studio-2017-environment
### CLI and Windows based ### Windows based (CLI and Visual Studio)
For those who prefer the CLI on Windows, using dotnet CLI, docker CLI and VS Code for Windows:
https://github.com/dotnet/eShopOnContainers/wiki/03.-Setting-the-eShopOnContainers-solution-up-in-a-Windows-CLI-environment-(dotnet-CLI,-Docker-CLI-and-VS-Code)
### CLI and Mac based <https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup>
For those who prefer the CLI on a Mac, using dotnet CLI, docker CLI and VS Code for Mac:
https://github.com/dotnet-architecture/eShopOnContainers/wiki/04.-Setting-eShopOnContainer-solution-up-in-a-Mac,-VS-for-Mac-or-with-CLI-environment--(dotnet-CLI,-Docker-CLI-and-VS-Code) ### Mac based (CLI ans Visual Studio for Mac)
<https://github.com/dotnet-architecture/eShopOnContainers/wiki/Mac-setup>
## Orchestrators: Kubernetes and Service Fabric ## Orchestrators: Kubernetes and Service Fabric
See at the [Wiki](https://github.com/dotnet-architecture/eShopOnContainers/wiki) the posts on setup/instructions about how to deploy to Kubernetes or Service Fabric in Azure (although you could also deploy to any other cloud or on-premises). See at the [Wiki](https://github.com/dotnet-architecture/eShopOnContainers/wiki) the posts on setup/instructions about how to deploy to Kubernetes or Service Fabric in Azure (although you could also deploy to any other cloud or on-premises).
## Sending feedback and pull requests ## Sending feedback and pull requests
As mentioned, we'd appreciate your feedback, improvements and ideas. As mentioned, we'd appreciate your feedback, improvements and ideas.
You can create new issues at the issues section, do pull requests and/or send emails to **eshop_feedback@service.microsoft.com** You can create new issues at the issues section, do pull requests and/or send emails to **eshop_feedback@service.microsoft.com**
## Questions
[QUESTION] Answer +1 if the solution is working for you (Through VS or CLI environment):
https://github.com/dotnet/eShopOnContainers/issues/107

View File

@ -16,37 +16,14 @@ trigger:
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/* - src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
- src/ApiGateways/Web.Bff.Shopping/aggregator/* - src/ApiGateways/Web.Bff.Shopping/aggregator/*
jobs: jobs:
- job: BuildLinux - template: ../buildimages.yaml
pool: parameters:
vmImage: 'ubuntu-16.04' services: mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw
steps: registryEndpoint: $(registryEndpoint)
- task: DockerCompose@0 helmfrom: $(Build.SourcesDirectory)/k8s/helm
displayName: Compose build apigws helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
inputs: - template: ../multiarch.yaml
dockerComposeCommand: 'build mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw' parameters:
containerregistrytype: Container Registry image: ocelotapigw
dockerRegistryEndpoint: $(registryEndpoint) branch: $(Build.SourceBranchName)
dockerComposeFile: docker-compose.yml registryEndpoint: $(registryEndpoint)
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

View File

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

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:10
- 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:10
- 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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger: trigger:
@ -11,34 +9,16 @@ trigger:
include: include:
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/* - src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
- k8s/helm/mobileshoppingagg/* - k8s/helm/mobileshoppingagg/*
steps: jobs:
- task: DockerCompose@0 - template: ../buildimages.yaml
displayName: Compose build mobileshoppingagg parameters:
inputs: services: mobileshoppingagg
dockerComposeCommand: 'build mobileshoppingagg' registryEndpoint: $(registryEndpoint)
containerregistrytype: Container Registry helmfrom: $(Build.SourcesDirectory)/k8s/helm
dockerRegistryEndpoint: $(registryEndpoint) helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
dockerComposeFile: docker-compose.yml - template: ../multiarch.yaml
qualifyImageNames: true parameters:
projectName: "" image: mobileshoppingagg
dockerComposeFileArgs: | branch: $(Build.SourceBranchName)
TAG=$(Build.SourceBranchName) registryEndpoint: $(registryEndpoint)
- 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

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

View File

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

View File

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

View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger: trigger:
@ -11,34 +9,15 @@ trigger:
include: include:
- src/ApiGateways/Web.Bff.Shopping/aggregator/* - src/ApiGateways/Web.Bff.Shopping/aggregator/*
- k8s/helm/webshoppingagg/* - k8s/helm/webshoppingagg/*
steps: jobs:
- task: DockerCompose@0 - template: ../buildimages.yaml
displayName: Compose build webshoppingagg parameters:
inputs: services: webshoppingagg
dockerComposeCommand: 'build webshoppingagg' registryEndpoint: $(registryEndpoint)
containerregistrytype: Container Registry helmfrom: $(Build.SourcesDirectory)/k8s/helm
dockerRegistryEndpoint: $(registryEndpoint) helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
dockerComposeFile: docker-compose.yml - template: ../multiarch.yaml
qualifyImageNames: true parameters:
projectName: "" image: webshoppingagg
dockerComposeFileArgs: | branch: $(Build.SourceBranchName)
TAG=$(Build.SourceBranchName) registryEndpoint: $(registryEndpoint)
- 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

View File

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

View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger: trigger:
@ -12,34 +10,15 @@ trigger:
- src/BuildingBlocks/* - src/BuildingBlocks/*
- src/Web/WebhookClient/* - src/Web/WebhookClient/*
- k8s/helm/webhooks-web/* - k8s/helm/webhooks-web/*
steps: jobs:
- task: DockerCompose@0 - template: ../buildimages.yaml
displayName: Compose build webhooks.client parameters:
inputs: services: webhooks.client
dockerComposeCommand: 'build webhooks.client' registryEndpoint: $(registryEndpoint)
containerregistrytype: Container Registry helmfrom: $(Build.SourcesDirectory)/k8s/helm
dockerRegistryEndpoint: $(registryEndpoint) helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
dockerComposeFile: docker-compose.yml - template: ../multiarch.yaml
qualifyImageNames: true parameters:
projectName: "" image: webhooks.client
dockerComposeFileArgs: | branch: $(Build.SourceBranchName)
TAG=$(Build.SourceBranchName) registryEndpoint: $(registryEndpoint)
- 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

View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger: trigger:
@ -12,34 +10,15 @@ trigger:
- src/BuildingBlocks/* - src/BuildingBlocks/*
- src/Web/WebMVC/* - src/Web/WebMVC/*
- k8s/helm/webmvc/* - k8s/helm/webmvc/*
steps: jobs:
- task: DockerCompose@0 - template: ../buildimages.yaml
displayName: Compose build webmvc parameters:
inputs: services: webmvc
dockerComposeCommand: 'build webmvc' registryEndpoint: $(registryEndpoint)
containerregistrytype: Container Registry helmfrom: $(Build.SourcesDirectory)/k8s/helm
dockerRegistryEndpoint: $(registryEndpoint) helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
dockerComposeFile: docker-compose.yml - template: ../multiarch.yaml
qualifyImageNames: true parameters:
projectName: "" image: webmvc
dockerComposeFileArgs: | branch: $(Build.SourceBranchName)
TAG=$(Build.SourceBranchName) registryEndpoint: $(registryEndpoint)
- 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

View File

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

View File

@ -1,5 +1,3 @@
pool:
vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger: trigger:
@ -12,34 +10,15 @@ trigger:
- src/BuildingBlocks/* - src/BuildingBlocks/*
- src/Web/WebStatus/* - src/Web/WebStatus/*
- k8s/helm/webstatus/* - k8s/helm/webstatus/*
steps: jobs:
- task: DockerCompose@0 - template: ../buildimages.yaml
displayName: Compose build webstatus parameters:
inputs: services: webstatus
dockerComposeCommand: 'build webstatus' registryEndpoint: $(registryEndpoint)
containerregistrytype: Container Registry helmfrom: $(Build.SourcesDirectory)/k8s/helm
dockerRegistryEndpoint: $(registryEndpoint) helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
dockerComposeFile: docker-compose.yml - template: ../multiarch.yaml
qualifyImageNames: true parameters:
projectName: "" image: webstatus
dockerComposeFileArgs: | branch: $(Build.SourceBranchName)
TAG=$(Build.SourceBranchName) registryEndpoint: $(registryEndpoint)
- 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

View File

@ -110,6 +110,8 @@ services:
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE} - OrchestratorType=${ORCHESTRATOR_TYPE}
- UseLoadTest=${USE_LOADTEST:-False} - UseLoadTest=${USE_LOADTEST:-False}
- Serilog__MinimumLevel__Override__Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ=Verbose
- Serilog__MinimumLevel__Override__Ordering.API=Verbose
ports: ports:
- "5102:80" # Important: In a production environment your should remove the external port (5102) kept here for microservice debugging purposes. - "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). # The API Gateway redirects and access through the internal port (80).
@ -130,6 +132,7 @@ services:
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE} - OrchestratorType=${ORCHESTRATOR_TYPE}
- UseLoadTest=${USE_LOADTEST:-False} - UseLoadTest=${USE_LOADTEST:-False}
- Serilog__MinimumLevel__Override__Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ=Verbose
ports: ports:
- "5111:80" - "5111:80"
@ -168,6 +171,8 @@ services:
- AzureServiceBusEnabled=False - AzureServiceBusEnabled=False
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE} - OrchestratorType=${ORCHESTRATOR_TYPE}
- Serilog__MinimumLevel__Override__Payment.API.IntegrationEvents.EventHandling=Verbose
- Serilog__MinimumLevel__Override__Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ=Verbose
ports: ports:
- "5108:80" # Important: In a production environment your should remove the external port (5108) kept here for microservice debugging purposes. - "5108:80" # Important: In a production environment your should remove the external port (5108) kept here for microservice debugging purposes.
# The API Gateway redirects and access through the internal port (80). # The API Gateway redirects and access through the internal port (80).
@ -326,40 +331,40 @@ services:
environment: environment:
- ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://0.0.0.0:80 - ASPNETCORE_URLS=http://0.0.0.0:80
- HealthChecks-UI__HealthChecks__1__Name=WebMVC HTTP Check - HealthChecksUI__HealthChecks__0__Name=WebMVC HTTP Check
- HealthChecks-UI__HealthChecks__1__Uri=http://webmvc/hc - HealthChecksUI__HealthChecks__0__Uri=http://webmvc/hc
- HealthChecks-UI__HealthChecks__2__Name=WebSPA HTTP Check - HealthChecksUI__HealthChecks__1__Name=WebSPA HTTP Check
- HealthChecks-UI__HealthChecks__2__Uri=http://webspa/hc - HealthChecksUI__HealthChecks__1__Uri=http://webspa/hc
- HealthChecks-UI__HealthChecks__3__Name=Web Shopping Aggregator GW HTTP Check - HealthChecksUI__HealthChecks__2__Name=Web Shopping Aggregator GW HTTP Check
- HealthChecks-UI__HealthChecks__3__Uri=http://webshoppingagg/hc - HealthChecksUI__HealthChecks__2__Uri=http://webshoppingagg/hc
- HealthChecks-UI__HealthChecks__4__Name=Mobile Shopping Aggregator HTTP Check - HealthChecksUI__HealthChecks__3__Name=Mobile Shopping Aggregator HTTP Check
- HealthChecks-UI__HealthChecks__4__Uri=http://mobileshoppingagg/hc - HealthChecksUI__HealthChecks__3__Uri=http://mobileshoppingagg/hc
- HealthChecks-UI__HealthChecks__5__Name=Mobile Shopping API GW HTTP Check - HealthChecksUI__HealthChecks__4__Name=Mobile Shopping API GW HTTP Check
- HealthChecks-UI__HealthChecks__5__Uri=http://mobileshoppingapigw/hc - HealthChecksUI__HealthChecks__4__Uri=http://mobileshoppingapigw/hc
- HealthChecks-UI__HealthChecks__6__Name=Mobile Marketing API GW HTTP Check - HealthChecksUI__HealthChecks__5__Name=Mobile Marketing API GW HTTP Check
- HealthChecks-UI__HealthChecks__6__Uri=http://mobilemarketingapigw/hc - HealthChecksUI__HealthChecks__5__Uri=http://mobilemarketingapigw/hc
- HealthChecks-UI__HealthChecks__7__Name=Web Shopping API GW HTTP Check - HealthChecksUI__HealthChecks__6__Name=Web Shopping API GW HTTP Check
- HealthChecks-UI__HealthChecks__7__Uri=http://webshoppingapigw/hc - HealthChecksUI__HealthChecks__6__Uri=http://webshoppingapigw/hc
- HealthChecks-UI__HealthChecks__8__Name=Web Marketing API GW HTTP Check - HealthChecksUI__HealthChecks__7__Name=Web Marketing API GW HTTP Check
- HealthChecks-UI__HealthChecks__8__Uri=http://webmarketingapigw/hc - HealthChecksUI__HealthChecks__7__Uri=http://webmarketingapigw/hc
- HealthChecks-UI__HealthChecks__9__Name=Ordering HTTP Check - HealthChecksUI__HealthChecks__8__Name=Ordering HTTP Check
- HealthChecks-UI__HealthChecks__9__Uri=http://ordering.api/hc - HealthChecksUI__HealthChecks__8__Uri=http://ordering.api/hc
- HealthChecks-UI__HealthChecks__10__Name=Ordering HTTP Background Check - HealthChecksUI__HealthChecks__9__Name=Ordering HTTP Background Check
- HealthChecks-UI__HealthChecks__10__Uri=http://ordering.backgroundtasks/hc - HealthChecksUI__HealthChecks__9__Uri=http://ordering.backgroundtasks/hc
- HealthChecks-UI__HealthChecks__11__Name=Basket HTTP Check - HealthChecksUI__HealthChecks__10__Name=Basket HTTP Check
- HealthChecks-UI__HealthChecks__11__Uri=http://basket.api/hc - HealthChecksUI__HealthChecks__10__Uri=http://basket.api/hc
- HealthChecks-UI__HealthChecks__12__Name=Catalog HTTP Check - HealthChecksUI__HealthChecks__11__Name=Catalog HTTP Check
- HealthChecks-UI__HealthChecks__12__Uri=http://catalog.api/hc - HealthChecksUI__HealthChecks__11__Uri=http://catalog.api/hc
- HealthChecks-UI__HealthChecks__13__Name=Identity HTTP Check - HealthChecksUI__HealthChecks__12__Name=Identity HTTP Check
- HealthChecks-UI__HealthChecks__13__Uri=http://identity.api/hc - HealthChecksUI__HealthChecks__12__Uri=http://identity.api/hc
- HealthChecks-UI__HealthChecks__14__Name=Marketing HTTP Check - HealthChecksUI__HealthChecks__13__Name=Marketing HTTP Check
- HealthChecks-UI__HealthChecks__14__Uri=http://marketing.api/hc - HealthChecksUI__HealthChecks__13__Uri=http://marketing.api/hc
- HealthChecks-UI__HealthChecks__15__Name=Locations HTTP Check - HealthChecksUI__HealthChecks__14__Name=Locations HTTP Check
- HealthChecks-UI__HealthChecks__15__Uri=http://locations.api/hc - HealthChecksUI__HealthChecks__14__Uri=http://locations.api/hc
- HealthChecks-UI__HealthChecks__16__Name=Payments HTTP Check - HealthChecksUI__HealthChecks__15__Name=Payments HTTP Check
- HealthChecks-UI__HealthChecks__16__Uri=http://payment.api/hc - HealthChecksUI__HealthChecks__15__Uri=http://payment.api/hc
- HealthChecks-UI__HealthChecks__17__Name=Ordering SignalRHub HTTP Check - HealthChecksUI__HealthChecks__16__Name=Ordering SignalRHub HTTP Check
- HealthChecks-UI__HealthChecks__17__Uri=http://ordering.signalrhub/hc - HealthChecksUI__HealthChecks__16__Uri=http://ordering.signalrhub/hc
- OrderingBackgroundTasksUrl=http://ordering.backgroundtasks/hc - OrderingBackgroundTasksUrl=http://ordering.backgroundtasks/hc
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE} - OrchestratorType=${ORCHESTRATOR_TYPE}

View File

@ -20,17 +20,17 @@ services:
identity.api: identity.api:
build: build:
args: args:
NODE_IMAGE: stefanscherer/node-windows:8.11 NODE_IMAGE: stefanscherer/node-windows:10
webspa: webspa:
build: build:
args: args:
NODE_IMAGE: stefanscherer/node-windows:8.11 NODE_IMAGE: stefanscherer/node-windows:10
webmvc: webmvc:
build: build:
args: args:
NODE_IMAGE: stefanscherer/node-windows:8.11 NODE_IMAGE: stefanscherer/node-windows:10
networks: networks:

View File

@ -6,7 +6,7 @@ services:
image: datalust/seq:latest image: datalust/seq:latest
sql.data: sql.data:
image: microsoft/mssql-server-linux:2017-latest image: mcr.microsoft.com/mssql/server:2017-latest
nosql.data: nosql.data:
image: mongo image: mongo
@ -214,6 +214,8 @@ services:
build: build:
context: . context: .
dockerfile: src/Web/WebSPA/Dockerfile dockerfile: src/Web/WebSPA/Dockerfile
args:
NODE_IMAGE: ${NODE_IMAGE:-node:8.11}
# depends_on: # depends_on:
# - webshoppingagg # - webshoppingagg
# - webshoppingapigw # - webshoppingapigw

View File

@ -1,6 +0,0 @@
eShopOnContainers Knowledge Base
================================
This folder contains a set of posts created mostly from [issues on the repo](https://github.com/dotnet-architecture/eShopOnContainers/issues), in order to offer a brief introduction as well as links to deepen the knowledge on a given subject related to the application.
[Simplified CQRS and DDD](simplified-cqrs-ddd/post.md)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@ -1,93 +0,0 @@
Simplified CQRS and DDD
=======================
CQRS, for Command and Query Responsibility Segregation, is an architectural pattern that, in very simple terms, has two different ways to handle the application model.
**Commands** are responsible for **changing** the application state, i.e. creating, updating and deleting entities (data).
**Queries** are responsible for **reading** the application state, e.g. to display information to the user.
**Commands** are made thinking about the Domain rules, restrictions and transaction boundaries.
**Queries** are made thinking about the presentation layer, the client UI.
When handling **commands**, the application model is usually represented by DDD constructs, e.g. Root aggregates, entities, value objects, etc., and there are usually some sort of rules that restrict the allowed state changes, e.g. An order has to be paid before dispatching.
When handling **queries**, the application model is usually represented by entities and relations and can be read much like SQL queries to display information.
Queries don't change state, so they can be run as much as required and will always return the same values (as long as the application state hasn't changed), i.e. queries are "idempotent".
Why the separation? because the rules for **changing** the model can impose unnecessary constraints for **reading** the model, e.g. you might allow to change order items only before dispatching so the order is like the gate-keeper (root aggregate) to access the order items, but you might also want to view all orders for some catalog item, so you have to be able to access the order items first (in a read only way).
In this simplified CQRS approach both the DDD model and the query model use the same database.
**Commands** and **Queries** are located in the Application layer, because:
1. It's where the composition of domain root aggregates occur (commands) and
2. It's close to the UI requirements and has access to the whole database of the microservice (queries).
Ideally, root aggregates are ignorant of each other and it's the Application layer's responsibility to compose coordinated actions by means of domain events, because it knows about all root aggregates.
Regarding **queries**, in a similar analysis, the Application layer knows about all entities and relationships in the database, beyond the restrictions of the root aggregates.
Code
----
### CQRS
The CQRS pattern can be checked in the Ordering service:
Commands and queries are clearly separated in the application layer (Ordering.API).
**Solution Explorer [Ordering.API]:**
![](devenv_2018-05-22_18-00-24.png)
Commands are basically read only Data Transfer Objects (DTO) that contain all data that's required to execute the operation.
**CreateOrderCommand:**
![](devenv_2018-05-22_18-13-35.png)
Each command has a specific command handler that's responsible for executing the operations intended for the command.
**CreateOrderCommandHandler:**
![](devenv_2018-05-22_18-22-23.png)
In this case:
1. Creates an Order object (root aggregate)
2. Adds the order items using the root aggregate method
3. Adds the order through the repository
4. Saves the order
Queries, on the other hand, just return whatever the UI needs, could be a domain object or collections of specific DTOs.
**IOrderQueries:**
![](devenv_2018-05-22_18-40-25.png)
And they are implemented as plain SQL queries, in this case using [Dapper](http://dapper-tutorial.net/ as the ORM.
**OrderQueries:**
![](devenv_2018-05-22_18-48-36.png)
There can even be specific ViewModels or DTOs just to get the query results.
**OrderViewModel:**
![](devenv_2018-05-22_19-11-30.png)
### DDD
The DDD pattern can be checked in the domain layer (Ordering.Domain)
**Solution Explorer [Ordering.Domain + Ordering.Infrastructure]:**
![](devenv_2018-05-22_18-52-58.png)
There you can see the Buyer aggregate and the Order aggregate, as well as the repository implementations in Ordering.Infrastructure.
Command handlers from the application layer use the root aggregates from the Domain layer and the repository implementations from the Infrastructure layer, the latter through Dependency Injection.
Further reading
---------------
* **Issue #592 - [Question] Ordering Queries** <br/> https://github.com/dotnet-architecture/eShopOnContainers/issues/592
* **Applying simplified CQRS and DDD patterns in a microservice** <br/>
https://docs.microsoft.com/en-us/dotnet/standard/microservices-architecture/microservice-ddd-cqrs-patterns/apply-simplified-microservice-cqrs-ddd-patterns

Binary file not shown.

View File

@ -161,6 +161,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mobile.Shopping.HttpAggrega
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web.Shopping.HttpAggregator", "src\ApiGateways\Web.Bff.Shopping\aggregator\Web.Shopping.HttpAggregator.csproj", "{E39BD762-BC86-459D-B818-B6BF2D9F1352}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web.Shopping.HttpAggregator", "src\ApiGateways\Web.Bff.Shopping\aggregator\Web.Shopping.HttpAggregator.csproj", "{E39BD762-BC86-459D-B818-B6BF2D9F1352}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Devspaces.Support", "Devspaces.Support", "{ABBA561B-499B-48C0-8299-85D41E6E9E98}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devspaces.Support", "src\BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj", "{CB6D01A4-E597-4348-9570-FC8DB03B4267}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
@ -2039,6 +2043,54 @@ Global
{E39BD762-BC86-459D-B818-B6BF2D9F1352}.Release|x64.Build.0 = Release|Any CPU {E39BD762-BC86-459D-B818-B6BF2D9F1352}.Release|x64.Build.0 = Release|Any CPU
{E39BD762-BC86-459D-B818-B6BF2D9F1352}.Release|x86.ActiveCfg = Release|Any CPU {E39BD762-BC86-459D-B818-B6BF2D9F1352}.Release|x86.ActiveCfg = Release|Any CPU
{E39BD762-BC86-459D-B818-B6BF2D9F1352}.Release|x86.Build.0 = Release|Any CPU {E39BD762-BC86-459D-B818-B6BF2D9F1352}.Release|x86.Build.0 = Release|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.AppStore|ARM.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.AppStore|ARM.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.AppStore|iPhone.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.AppStore|x64.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.AppStore|x64.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.AppStore|x86.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.AppStore|x86.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Debug|ARM.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Debug|ARM.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Debug|iPhone.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Debug|x64.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Debug|x64.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Debug|x86.ActiveCfg = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Debug|x86.Build.0 = Debug|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Release|Any CPU.Build.0 = Release|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Release|ARM.ActiveCfg = Release|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Release|ARM.Build.0 = Release|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Release|iPhone.ActiveCfg = Release|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Release|iPhone.Build.0 = Release|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Release|x64.ActiveCfg = Release|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Release|x64.Build.0 = Release|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Release|x86.ActiveCfg = Release|Any CPU
{CB6D01A4-E597-4348-9570-FC8DB03B4267}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -2111,6 +2163,8 @@ Global
{0A328C44-4C4E-49BE-9FB4-9D851CEC28AC} = {56AD1FCA-6E16-4798-BF29-941C5B3277D2} {0A328C44-4C4E-49BE-9FB4-9D851CEC28AC} = {56AD1FCA-6E16-4798-BF29-941C5B3277D2}
{98E0B3BA-6601-4C59-A9AA-24A00A17D835} = {A32A5254-BA36-46FC-8C75-F7B8FFE8FCD0} {98E0B3BA-6601-4C59-A9AA-24A00A17D835} = {A32A5254-BA36-46FC-8C75-F7B8FFE8FCD0}
{E39BD762-BC86-459D-B818-B6BF2D9F1352} = {424BC53E-17EA-4E12-BC07-64BAA927ABCB} {E39BD762-BC86-459D-B818-B6BF2D9F1352} = {424BC53E-17EA-4E12-BC07-64BAA927ABCB}
{ABBA561B-499B-48C0-8299-85D41E6E9E98} = {DB0EFB20-B024-4E5E-A75C-52143C131D25}
{CB6D01A4-E597-4348-9570-FC8DB03B4267} = {ABBA561B-499B-48C0-8299-85D41E6E9E98}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9} SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9}

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
img/DevOps-Cover-small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
img/Microservices-cover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
img/eShopScreen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 KiB

2
k8s/deploy-nodeports.ps1 Normal file
View File

@ -0,0 +1,2 @@
kubectl apply -f .\nodeports\rabbitmq-admin.yaml
kubectl apply -f .\nodeports\sql-services.yaml

View File

@ -15,5 +15,5 @@ data:
urls__IdentityUrl: http://{{ $identity }} urls__IdentityUrl: http://{{ $identity }}
basket__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" basket__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} 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__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

View File

@ -16,5 +16,5 @@ data:
catalog__PicBaseUrl: http://{{ $webshoppingapigw }}/api/v1/c/catalog/items/[0]/pic/ catalog__PicBaseUrl: http://{{ $webshoppingapigw }}/api/v1/c/catalog/items/[0]/pic/
catalog__AzureStorageEnabled: "{{ .Values.inf.misc.useAzureStorage }}" catalog__AzureStorageEnabled: "{{ .Values.inf.misc.useAzureStorage }}"
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} 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__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

View File

@ -10,7 +10,8 @@ Param(
[parameter(Mandatory=$false)][string]$aksName="", [parameter(Mandatory=$false)][string]$aksName="",
[parameter(Mandatory=$false)][string]$aksRg="", [parameter(Mandatory=$false)][string]$aksRg="",
[parameter(Mandatory=$false)][string]$imageTag="latest", [parameter(Mandatory=$false)][string]$imageTag="latest",
[parameter(Mandatory=$false)][bool]$useLocalk8s=$false [parameter(Mandatory=$false)][bool]$useLocalk8s=$false,
[parameter(Mandatory=$false)][bool]$useLocalImages=$false
) )
$dns = $externalDns $dns = $externalDns
@ -22,6 +23,12 @@ if ($useLocalk8s -eq $true) {
$dns="localhost" $dns="localhost"
} }
$pullPolicy = "Always"
if ($useLocalImages -eq $true) {
$pullPolicy = "IfNotPresent"
}
if ($externalDns -eq "aks") { if ($externalDns -eq "aks") {
if ([string]::IsNullOrEmpty($aksName) -or [string]::IsNullOrEmpty($aksRg)) { if ([string]::IsNullOrEmpty($aksName) -or [string]::IsNullOrEmpty($aksRg)) {
Write-Host "Error: When using -dns aks, MUST set -aksName and -aksRg too." -ForegroundColor Red Write-Host "Error: When using -dns aks, MUST set -aksName and -aksRg too." -ForegroundColor Red
@ -45,7 +52,7 @@ if ([string]::IsNullOrEmpty($dns)) {
if ($clean) { if ($clean) {
Write-Host "Cleaning previous helm releases..." -ForegroundColor Green Write-Host "Cleaning previous helm releases..." -ForegroundColor Green
helm delete --purge $(helm ls -q) helm delete --purge $(helm ls -q eshop)
Write-Host "Previous releases deleted" -ForegroundColor Green Write-Host "Previous releases deleted" -ForegroundColor Green
} }
@ -67,7 +74,7 @@ $charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-a
if ($deployInfrastructure) { if ($deployInfrastructure) {
foreach ($infra in $infras) { foreach ($infra in $infras) {
Write-Host "Installing infrastructure: $infra" -ForegroundColor Green 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 { else {
@ -78,11 +85,11 @@ if ($deployCharts) {
foreach ($chart in $charts) { foreach ($chart in $charts) {
Write-Host "Installing: $chart" -ForegroundColor Green Write-Host "Installing: $chart" -ForegroundColor Green
if ($useCustomRegistry) { 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 { else {
if ($chart -ne "eshop-common") { # eshop-common is ignored when no secret must be deployed 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=$pullPolicy --name="$appName-$chart" $chart
} }
} }
} }

View File

@ -14,30 +14,32 @@ Parameters:
The resource group for the AKS cluster. Required when the registry (using the -r parameter) is set to "aks". The resource group for the AKS cluster. Required when the registry (using the -r parameter) is set to "aks".
-b | --build-solution -b | --build-solution
Force a solution build before deployment (default: false). Force a solution build before deployment (default: false).
-d | --dns <dns or ip address> -d | --dns <dns or ip address> | --dns aks
Specifies the external DNS/ IP address of the Kubernetes cluster. Specifies the external DNS/ IP address of the Kubernetes cluster.
If 'aks' is set as value, the DNS value is retrieved from the AKS. --aks-name and --aks-rg are needed.
When --use-local-k8s is specified the external DNS is automatically set to localhost. When --use-local-k8s is specified the external DNS is automatically set to localhost.
-h | --help -h | --help
Displays this help text and exits the script. Displays this help text and exits the script.
--image-build
Build images (default is to not build all images).
--image-push
Upload images to the container registry (default is not pushing to the custom registry)
-n | --app-name <the name of the app> -n | --app-name <the name of the app>
Specifies the name of the application (default: eshop). Specifies the name of the application (default: eshop).
--namespace <namespace name>
Specifies the namespace name to deploy the app. If it doesn't exists it will be created (default: eshop).
-p | --docker-password <docker password> -p | --docker-password <docker password>
The Docker password used to logon to the custom registry, supplied using the -r parameter. The Docker password used to logon to the custom registry, supplied using the -r parameter.
-r | --registry <container registry> -r | --registry <container registry>
Specifies the container registry to use (required), e.g. myregistry.azurecr.io. Specifies the container registry to use (required), e.g. myregistry.azurecr.io.
--skip-clean --skip-clean
Do not clean the Kubernetes cluster (default is to clean the cluster). Do not clean the Kubernetes cluster (default is to clean the cluster).
--skip-image-build
Do not build images (default is to build all images).
--skip-image-push
Do not upload images to the container registry (just run the Kubernetes deployment portion).
Default is to push the images to the container registry.
--skip-infrastructure --skip-infrastructure
Do not deploy infrastructure resources (like sql-data, no-sql or redis). Do not deploy infrastructure resources (like sql-data, no-sql or redis).
This is useful for production environments where infrastructure is hosted outside the Kubernetes cluster. This is useful for production environments where infrastructure is hosted outside the Kubernetes cluster.
-t | --tag <docker image tag> -t | --tag <docker image tag>
The tag used for the newly created docker images. Default: newly created, date-based timestamp, with 1-minute resolution. The tag used for the newly created docker images. Default: latest.
-u | --docker-user <docker username> -u | --docker-username <docker username>
The Docker username used to logon to the custom registry, supplied using the -r parameter. The Docker username used to logon to the custom registry, supplied using the -r parameter.
--use-local-k8s --use-local-k8s
Deploy to a locally installed Kubernetes (default: false). Deploy to a locally installed Kubernetes (default: false).
@ -47,11 +49,10 @@ If using AKS and ACR see link for more info:
https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-aks https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-aks
WARNING! THE SCRIPT WILL COMPLETELY DESTROY ALL DEPLOYMENTS AND SERVICES VISIBLE WARNING! THE SCRIPT WILL COMPLETELY DESTROY ALL DEPLOYMENTS AND SERVICES VISIBLE
FROM THE CURRENT CONFIGURATION CONTEXT. FROM THE CURRENT CONFIGURATION CONTEXT AND NAMESPACE.
It is recommended that you create a separate namespace and confguration context It is recommended that you check your selected namespace, 'eshop' by default, is already in use.
for the $app_name application, to isolate it from other applications on the cluster. Every deployment and service done in the namespace will be deleted.
For more information see https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ For more information see https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
You can use namespace.yaml file (in the same directory) to create the namespace.
END END
} }
@ -59,17 +60,18 @@ END
app_name='eshop' app_name='eshop'
aks_name='' aks_name=''
aks_rg='' aks_rg=''
build_images='yes' build_images=''
clean='yes' clean='yes'
build_solution='' build_solution=''
container_registry='' container_registry=''
docker_password='' docker_password=''
docker_username='' docker_username=''
dns='' dns=''
image_tag=$(date '+%Y%m%d%H%M') image_tag='latest'
push_images='yes' push_images=''
skip_infrastructure='' skip_infrastructure=''
use_local_k8s='' use_local_k8s=''
namespace='eshop'
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
case "$1" in case "$1" in
@ -86,15 +88,15 @@ while [[ $# -gt 0 ]]; do
-n | --app-name ) -n | --app-name )
app_name="$2"; shift 2;; app_name="$2"; shift 2;;
-p | --docker-password ) -p | --docker-password )
docker_password="$2"; shift;; docker_password="$2"; shift 2;;
-r | --registry ) -r | --registry )
container_registry="$2"; shift 2;; container_registry="$2"; shift 2;;
--skip-clean ) --skip-clean )
clean=''; shift ;; clean=''; shift ;;
--skip-image-build ) --image-build )
build_images=''; shift ;; build_images='yes'; shift ;;
--skip-image-push ) --image-push )
push_images=''; shift ;; push_images='yes'; shift ;;
--skip-infrastructure ) --skip-infrastructure )
skip_infrastructure='yes'; shift ;; skip_infrastructure='yes'; shift ;;
-t | --tag ) -t | --tag )
@ -103,6 +105,8 @@ while [[ $# -gt 0 ]]; do
docker_username="$2"; shift 2;; docker_username="$2"; shift 2;;
--use-local-k8s ) --use-local-k8s )
use_local_k8s='yes'; shift ;; use_local_k8s='yes'; shift ;;
--namespace )
namespace="$2"; shift 2;;
*) *)
echo "Unknown option $1" echo "Unknown option $1"
usage; exit 2 ;; usage; exit 2 ;;
@ -124,10 +128,26 @@ if [[ $build_images ]]; then
docker rmi $(docker images -qf "dangling=true") docker rmi $(docker images -qf "dangling=true")
fi fi
use_custom_registry=''
if [[ -n $container_registry ]]; then
echo "################ Log into custom registry $container_registry ##################"
use_custom_registry='yes'
if [[ -z $docker_username ]] || [[ -z $docker_password ]]; then
echo "Error: Must use -u (--docker-username) AND -p (--docker-password) if specifying custom registry"
exit 1
fi
docker login -u $docker_username -p $docker_password $container_registry
fi
if [[ $push_images ]]; then if [[ $push_images ]]; then
echo "#################### Pushing images to the container registry ####################" echo "#################### Pushing images to the container registry ####################"
services=(basket.api catalog.api identity.api ordering.api marketing.api payment.api locations.api webmvc webspa webstatus) services=(basket.api catalog.api identity.api ordering.api marketing.api payment.api locations.api webmvc webspa webstatus)
if [[ -z "$(docker image ls -q --filter=reference=eshop/$service:$image_tag)" ]]; then
image_tag=linux-$image_tag
fi
for service in "${services[@]}" for service in "${services[@]}"
do do
echo "Pushing image for service $service..." echo "Pushing image for service $service..."
@ -152,14 +172,23 @@ if [[ $dns == "aks" ]]; then
exit 1 exit 1
fi fi
echo "Getting DNS of AKS of AKS $aks_name (in resource group $aks_rg)" echo "Getting AKS cluster $aks_name AKS (in resource group $aks_rg)"
dns="$(az aks show -n $aks_name -g $aks_rg --query addonProfiles.httpApplicationRouting.config.HTTPApplicationRoutingZoneName)" # JMESPath queries are case sensitive and httpapplicationrouting can be lowercase sometimes
if [[ -z dns ]]; then jmespath_dnsqueries=(\
addonProfiles.httpApplicationRouting.config.HTTPApplicationRoutingZoneName \
addonProfiles.httpapplicationrouting.config.HTTPApplicationRoutingZoneName \
)
for q in "${jmespath_dnsqueries[@]}"
do
dns="$(az aks show -n $aks_name -g $aks_rg --query $q -o tsv)"
if [[ -n $dns ]]; then break; fi
done
if [[ -z $dns ]]; then
echo "Error: when getting DNS of AKS $aks_name (in resource group $aks_rg). Please ensure AKS has httpRouting enabled AND Azure CLI is logged in and is of version 2.0.37 or higher." echo "Error: when getting DNS of AKS $aks_name (in resource group $aks_rg). Please ensure AKS has httpRouting enabled AND Azure CLI is logged in and is of version 2.0.37 or higher."
exit 1 exit 1
fi fi
$dns=${dns//[\"]/""}
echo "DNS base found is $dns. Will use $aks_name.$dns for the app!" echo "DNS base found is $dns. Will use $aks_name.$dns for the app!"
dns="$aks_name.$dns"
fi fi
# Initialization & check commands # Initialization & check commands
@ -169,17 +198,12 @@ fi
if [[ $clean ]]; then if [[ $clean ]]; then
echo "Cleaning previous helm releases..." echo "Cleaning previous helm releases..."
helm delete --purge $(helm ls -q) if [[ -z $(helm ls -q --namespace $namespace) ]]; then
echo "No previous releases found"
else
helm delete --purge $(helm ls -q --namespace $namespace)
echo "Previous releases deleted" echo "Previous releases deleted"
fi waitsecs=10; while [ $waitsecs -gt 0 ]; do echo -ne "$waitsecs\033[0K\r"; sleep 1; : $((waitsecs--)); done
use_custom_registry=''
if [[ -n $container_registry ]]; then
use_custom_registry='yes'
if [[ -z $docker_user ]] || [[ -z $docker_password ]]; then
echo "Error: Must use -u (--docker-username) AND -p (--docker-password) if specifying custom registry"
exit 1
fi fi
fi fi
@ -191,7 +215,7 @@ if [[ !$skip_infrastructure ]]; then
for infra in "${infras[@]}" for infra in "${infras[@]}"
do do
echo "Installing infrastructure: $infra" echo "Installing infrastructure: $infra"
helm install --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --name="$app_name-$infra" $infra helm install --namespace $namespace --set "ingress.hosts={$dns}" --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --name="$app_name-$infra" $infra
done done
fi fi
@ -199,9 +223,9 @@ for chart in "${charts[@]}"
do do
echo "Installing: $chart" echo "Installing: $chart"
if [[ $use_custom_registry ]]; then if [[ $use_custom_registry ]]; then
helm install --set inf.registry.server=$container_registry --set inf.registry.login=$docker_username --set inf.registry.pwd=$docker_password --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always --name="$app_name-$chart" $chart helm install --namespace $namespace --set "ingress.hosts={$dns}" --set inf.registry.server=$container_registry --set inf.registry.login=$docker_username --set inf.registry.pwd=$docker_password --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always --name="$app_name-$chart" $chart
elif [[ $chart != "eshop-common" ]]; then # eshop-common is ignored when no secret must be deployed elif [[ $chart != "eshop-common" ]]; then # eshop-common is ignored when no secret must be deployed
helm install --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always --name="$app_name-$chart" $chart helm install --namespace $namespace --set "ingress.hosts={$dns}" --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always --name="$app_name-$chart" $chart
fi fi
done done

View File

@ -24,7 +24,7 @@ metadata:
data: 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__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 }} identity__keystore: {{ .Values.inf.redis.keystore.constr }}
all__InstrumentationKey: {{ .Values.inf.appinsights.key }} all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
mvc_e: http://{{ $mvc_url }} mvc_e: http://{{ $mvc_url }}
spa_e: http://{{ $spa_url }} spa_e: http://{{ $spa_url }}
locations_e: http://{{ $locations_url }} locations_e: http://{{ $locations_url }}

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 # It is used on all charts, so ** MUST BE INCLUDED ** on every deployment
inf: inf:

View File

@ -13,7 +13,7 @@ metadata:
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
data: data:
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} 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__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }} internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }}

View File

@ -15,7 +15,7 @@ metadata:
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
data: data:
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} 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__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }} internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }}

View File

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

View File

@ -16,5 +16,5 @@ data:
ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
urls__IdentityUrl: http://{{ $identity }} urls__IdentityUrl: http://{{ $identity }}
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} 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__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

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__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 }}" ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} 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__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
graceperiodmanager__CheckUpdateTime: "{{ .Values.cfg.checkUpdateTime }}" graceperiodmanager__CheckUpdateTime: "{{ .Values.cfg.checkUpdateTime }}"
graceperiodmanager__GracePeriodTime: "{{ .Values.cfg.gracePeriodTime }}" graceperiodmanager__GracePeriodTime: "{{ .Values.cfg.gracePeriodTime }}"

View File

@ -12,7 +12,7 @@ metadata:
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
data: data:
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} 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__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
signalr__StoreConnectionString: {{ .Values.inf.redis.keystore.constr }} signalr__StoreConnectionString: {{ .Values.inf.redis.keystore.constr }}
urls__IdentityUrl: http://{{ $identity }} urls__IdentityUrl: http://{{ $identity }}

View File

@ -11,5 +11,5 @@ metadata:
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
data: data:
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} 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__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

View File

@ -16,5 +16,5 @@ data:
urls__IdentityUrl: http://{{ $identity }} urls__IdentityUrl: http://{{ $identity }}
urls__IdentityUrlExternal: http://{{ $identity }} urls__IdentityUrlExternal: http://{{ $identity }}
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} 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__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

View File

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

View File

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

View File

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

View File

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

View File

@ -34,73 +34,73 @@ env:
configmap: configmap:
- name: ApplicationInsights__InstrumentationKey - name: ApplicationInsights__InstrumentationKey
key: all__InstrumentationKey key: all__InstrumentationKey
- name: HealthChecks-UI__HealthChecks__0__Name - name: HealthChecksUI__HealthChecks__0__Name
key: name__mvc__hc key: name__mvc__hc
- name: HealthChecks-UI__HealthChecks__0__Uri - name: HealthChecksUI__HealthChecks__0__Uri
key: internalurls__mvc__hc key: internalurls__mvc__hc
- name: HealthChecks-UI__HealthChecks__1__Name - name: HealthChecksUI__HealthChecks__1__Name
key: name__spa__hc key: name__spa__hc
- name: HealthChecks-UI__HealthChecks__1__Uri - name: HealthChecksUI__HealthChecks__1__Uri
key: internalurls__spa__hc key: internalurls__spa__hc
- name: HealthChecks-UI__HealthChecks__2__Name - name: HealthChecksUI__HealthChecks__2__Name
key: name__apigwws__hc key: name__apigwws__hc
- name: HealthChecks-UI__HealthChecks__2__Uri - name: HealthChecksUI__HealthChecks__2__Uri
key: internalurls__apigwws__hc key: internalurls__apigwws__hc
- name: HealthChecks-UI__HealthChecks__3__Name - name: HealthChecksUI__HealthChecks__3__Name
key: name__apigwwm__hc key: name__apigwwm__hc
- name: HealthChecks-UI__HealthChecks__3__Uri - name: HealthChecksUI__HealthChecks__3__Uri
key: internalurls__apigwwm__hc key: internalurls__apigwwm__hc
- name: HealthChecks-UI__HealthChecks__4__Name - name: HealthChecksUI__HealthChecks__4__Name
key: name__apigwms__hc key: name__apigwms__hc
- name: HealthChecks-UI__HealthChecks__4__Uri - name: HealthChecksUI__HealthChecks__4__Uri
key: internalurls__apigwms__hc key: internalurls__apigwms__hc
- name: HealthChecks-UI__HealthChecks__5__Name - name: HealthChecksUI__HealthChecks__5__Name
key: name__apigwmm__hc key: name__apigwmm__hc
- name: HealthChecks-UI__HealthChecks__5__Uri - name: HealthChecksUI__HealthChecks__5__Uri
key: internalurls__apigwmm__hc key: internalurls__apigwmm__hc
- name: HealthChecks-UI__HealthChecks__6__Name - name: HealthChecksUI__HealthChecks__6__Name
key: name__apigwwsagg__hc key: name__apigwwsagg__hc
- name: HealthChecks-UI__HealthChecks__6__Uri - name: HealthChecksUI__HealthChecks__6__Uri
key: internalurls__apigwwsagg__hc key: internalurls__apigwwsagg__hc
- name: HealthChecks-UI__HealthChecks__7__Name - name: HealthChecksUI__HealthChecks__7__Name
key: name__apigwmsagg__hc key: name__apigwmsagg__hc
- name: HealthChecks-UI__HealthChecks__7__Uri - name: HealthChecksUI__HealthChecks__7__Uri
key: internalurls__apigwmsagg__hc key: internalurls__apigwmsagg__hc
- name: HealthChecks-UI__HealthChecks__8__Name - name: HealthChecksUI__HealthChecks__8__Name
key: name__ordering__hc key: name__ordering__hc
- name: HealthChecks-UI__HealthChecks__8__Uri - name: HealthChecksUI__HealthChecks__8__Uri
key: internalurls__ordering__hc key: internalurls__ordering__hc
- name: HealthChecks-UI__HealthChecks__9__Name - name: HealthChecksUI__HealthChecks__9__Name
key: name__orderingbackground__hc key: name__orderingbackground__hc
- name: HealthChecks-UI__HealthChecks__9__Uri - name: HealthChecksUI__HealthChecks__9__Uri
key: internalurls__orderingbackground__hc key: internalurls__orderingbackground__hc
- name: HealthChecks-UI__HealthChecks__10__Name - name: HealthChecksUI__HealthChecks__10__Name
key: name__signalrhub__hc key: name__signalrhub__hc
- name: HealthChecks-UI__HealthChecks__10__Uri - name: HealthChecksUI__HealthChecks__10__Uri
key: internalurls__signalrhub__hc key: internalurls__signalrhub__hc
- name: HealthChecks-UI__HealthChecks__11__Name - name: HealthChecksUI__HealthChecks__11__Name
key: name__basket__hc key: name__basket__hc
- name: HealthChecks-UI__HealthChecks__11__Uri - name: HealthChecksUI__HealthChecks__11__Uri
key: internalurls__basket__hc key: internalurls__basket__hc
- name: HealthChecks-UI__HealthChecks__12__Name - name: HealthChecksUI__HealthChecks__12__Name
key: name__catalog__hc key: name__catalog__hc
- name: HealthChecks-UI__HealthChecks__12__Uri - name: HealthChecksUI__HealthChecks__12__Uri
key: internalurls__catalog__hc key: internalurls__catalog__hc
- name: HealthChecks-UI__HealthChecks__13__Name - name: HealthChecksUI__HealthChecks__13__Name
key: name__identity__hc key: name__identity__hc
- name: HealthChecks-UI__HealthChecks__13__Uri - name: HealthChecksUI__HealthChecks__13__Uri
key: internalurls__identity__hc key: internalurls__identity__hc
- name: HealthChecks-UI__HealthChecks__14__Name - name: HealthChecksUI__HealthChecks__14__Name
key: name__marketing__hc key: name__marketing__hc
- name: HealthChecks-UI__HealthChecks__14__Uri - name: HealthChecksUI__HealthChecks__14__Uri
key: internalurls__marketing__hc key: internalurls__marketing__hc
- name: HealthChecks-UI__HealthChecks__15__Name - name: HealthChecksUI__HealthChecks__15__Name
key: name__locations__hc key: name__locations__hc
- name: HealthChecks-UI__HealthChecks__15__Uri - name: HealthChecksUI__HealthChecks__15__Uri
key: internalurls__locations__hc key: internalurls__locations__hc
- name: HealthChecks-UI__HealthChecks__16__Name - name: HealthChecksUI__HealthChecks__16__Name
key: name__payment__hc key: name__payment__hc
- name: HealthChecks-UI__HealthChecks__16__Uri - name: HealthChecksUI__HealthChecks__16__Uri
key: internalurls__payment__hc key: internalurls__payment__hc
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values: values:

View File

@ -0,0 +1,12 @@
kind: Service
apiVersion: v1
metadata:
name: rabbitmq-admin
spec:
type: NodePort
selector:
app: rabbitmq
ports:
- port: 15672
nodePort: 31672
name: rabbitmq-port

View File

@ -0,0 +1,12 @@
kind: Service
apiVersion: v1
metadata:
name: sql-service
spec:
type: NodePort
selector:
app: sql-data
ports:
- port: 1433
nodePort: 31433
name: sql-port

View File

@ -7,7 +7,7 @@ This file contains links to the documentation of the project.
## Documentation included in files ## Documentation included in files
* [Branch Guide](../branch-guide.md): List of branches used and their purpose. * [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 * [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. * [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) * [.env file](./README.ENV.md): What is the `.env` file and how to use it to configure eShopOnContainers to use external resources (like Azure)

View File

@ -1,3 +1 @@
#!/bin/bash echo RESTORING ALL PACKAGES...; for f in /src/csproj-files/*.csproj; do dotnet restore $f; done
for f in /src/csproj-files/*.csproj; do dotnet restore $f; done

View File

@ -5,20 +5,51 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src WORKDIR /src
COPY scripts scripts/ # Keep the project list and command dotnet restore identical in all Dockfiles to maximize image cache utilization
COPY eShopOnContainers-ServicesAndWebApps.sln .
COPY docker-compose.dcproj /src/
COPY src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj src/ApiGateways/ApiGw-Base/
COPY src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj src/ApiGateways/Mobile.Bff.Shopping/aggregator/
COPY src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj src/ApiGateways/Web.Bff.Shopping/aggregator/
COPY src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj src/BuildingBlocks/Devspaces.Support/
COPY src/BuildingBlocks/EventBus/EventBus/EventBus.csproj src/BuildingBlocks/EventBus/EventBus/
COPY src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj src/BuildingBlocks/EventBus/EventBus.Tests/
COPY src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj src/BuildingBlocks/EventBus/EventBusRabbitMQ/
COPY src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj src/BuildingBlocks/EventBus/EventBusServiceBus/
COPY src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj src/BuildingBlocks/EventBus/IntegrationEventLogEF/
COPY src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj src/BuildingBlocks/WebHostCustomization/WebHost.Customization/
COPY src/Services/Basket/Basket.API/Basket.API.csproj src/Services/Basket/Basket.API/
COPY src/Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj src/Services/Basket/Basket.FunctionalTests/
COPY src/Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj src/Services/Basket/Basket.UnitTests/
COPY src/Services/Catalog/Catalog.API/Catalog.API.csproj src/Services/Catalog/Catalog.API/
COPY src/Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj src/Services/Catalog/Catalog.FunctionalTests/
COPY src/Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj src/Services/Catalog/Catalog.UnitTests/
COPY src/Services/Identity/Identity.API/Identity.API.csproj src/Services/Identity/Identity.API/
COPY src/Services/Location/Locations.API/Locations.API.csproj src/Services/Location/Locations.API/
COPY src/Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj src/Services/Location/Locations.FunctionalTests/
COPY src/Services/Marketing/Marketing.API/Marketing.API.csproj src/Services/Marketing/Marketing.API/
COPY src/Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj src/Services/Marketing/Marketing.FunctionalTests/
COPY src/Services/Ordering/Ordering.API/Ordering.API.csproj src/Services/Ordering/Ordering.API/
COPY src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj src/Services/Ordering/Ordering.BackgroundTasks/
COPY src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj src/Services/Ordering/Ordering.Domain/
COPY src/Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj src/Services/Ordering/Ordering.FunctionalTests/
COPY src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj src/Services/Ordering/Ordering.Infrastructure/
COPY src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj src/Services/Ordering/Ordering.SignalrHub/
COPY src/Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj src/Services/Ordering/Ordering.UnitTests/
COPY src/Services/Payment/Payment.API/Payment.API.csproj src/Services/Payment/Payment.API/
COPY src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj src/Services/Webhooks/Webhooks.API/
COPY src/Web/WebhookClient/WebhookClient.csproj src/Web/WebhookClient/
COPY src/Web/WebMVC/WebMVC.csproj src/Web/WebMVC/
COPY src/Web/WebSPA/WebSPA.csproj src/Web/WebSPA/
COPY src/Web/WebStatus/WebStatus.csproj src/Web/WebStatus/
COPY test/ServicesTests/Application.FunctionalTests/Application.FunctionalTests.csproj test/ServicesTests/Application.FunctionalTests/
COPY test/ServicesTests/LoadTest/LoadTest.csproj test/ServicesTests/LoadTest/
COPY src/ApiGateways/*/*.csproj /src/csproj-files/ RUN dotnet restore eShopOnContainers-ServicesAndWebApps.sln
COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
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 . .
WORKDIR /src/src/ApiGateways/ApiGw-Base/ WORKDIR /src/src/ApiGateways/ApiGw-Base/
RUN dotnet publish -c Release -o /app RUN dotnet publish --no-restore -c Release -o /app
FROM build AS publish FROM build AS publish

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