Browse Source

Merge pull request #56 from dotnet-architecture/dev

eShopOnContainers fork
pull/1934/head
Taras Kovalenko 5 years ago
committed by GitHub
parent
commit
ec3063c23f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 63 additions and 5 deletions
  1. +2
    -2
      README.md
  2. +0
    -0
      docs/Containerized-Docker-Application-Lifecycle-with-Microsoft-Platform-and-Tools-(eBook)-White-paper.pdf
  3. +0
    -0
      docs/Containerized-Docker-Application-Lifecycle-with-Microsoft-Platform-and-Tools-(eBook)-v1.1.pdf
  4. +0
    -0
      docs/Containerized-Docker-Application-Lifecycle-with-Microsoft-Platform-and-Tools-(eBook)-v2.0.pdf
  5. BIN
      docs/Containerized-Docker-Application-Lifecycle-with-Microsoft-Platform-and-Tools-(eBook).pdf
  6. BIN
      docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook)-v2.2.0.pdf
  7. BIN
      docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook).pdf
  8. +54
    -0
      eShopOnContainers.sln
  9. BIN
      img/Containerized-Docker-Application-Lifecycle-cover-large.png
  10. BIN
      img/Containerized-Docker-Application-Lifecycle-cover-small.png
  11. BIN
      img/DevOps-Cover-small.png
  12. BIN
      img/Microservices-cover-small.png
  13. BIN
      img/Microservices-cover.png
  14. +4
    -0
      src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs
  15. +3
    -3
      test/readme.md

+ 2
- 2
README.md View File

@ -95,8 +95,8 @@ You can download them and start reviewing these Guides/eBooks here:
| 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> |
| <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> |
| <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**</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).


docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook).pdf → docs/Containerized-Docker-Application-Lifecycle-with-Microsoft-Platform-and-Tools-(eBook)-White-paper.pdf View File


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


docs/Containerized-Docker-Application-Lifecycle-with-Microsoft-Platform-and-Tools-(eBook)_v1.1.pdf → docs/Containerized-Docker-Application-Lifecycle-with-Microsoft-Platform-and-Tools-(eBook)-v2.0.pdf View File


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


BIN
docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook)-v2.2.0.pdf View File


BIN
docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook).pdf View File


+ 54
- 0
eShopOnContainers.sln View File

@ -161,6 +161,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mobile.Shopping.HttpAggrega
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}"
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
GlobalSection(SolutionConfigurationPlatforms) = preSolution
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|x86.ActiveCfg = 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
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -2111,6 +2163,8 @@ Global
{0A328C44-4C4E-49BE-9FB4-9D851CEC28AC} = {56AD1FCA-6E16-4798-BF29-941C5B3277D2}
{98E0B3BA-6601-4C59-A9AA-24A00A17D835} = {A32A5254-BA36-46FC-8C75-F7B8FFE8FCD0}
{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
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9}


BIN
img/Containerized-Docker-Application-Lifecycle-cover-large.png View File

Before After
Width: 816  |  Height: 1056  |  Size: 80 KiB

BIN
img/Containerized-Docker-Application-Lifecycle-cover-small.png View File

Before After
Width: 260  |  Height: 336  |  Size: 22 KiB

BIN
img/DevOps-Cover-small.png View File

Before After
Width: 260  |  Height: 336  |  Size: 22 KiB

BIN
img/Microservices-cover-small.png View File

Before After
Width: 259  |  Height: 336  |  Size: 32 KiB

BIN
img/Microservices-cover.png View File

Before After
Width: 555  |  Height: 720  |  Size: 82 KiB

+ 4
- 0
src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs View File

@ -274,6 +274,8 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ
var handler = scope.ResolveOptional(subscription.HandlerType) as IDynamicIntegrationEventHandler;
if (handler == null) continue;
dynamic eventData = JObject.Parse(message);
await Task.Yield();
await handler.Handle(eventData);
}
else
@ -283,6 +285,8 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ
var eventType = _subsManager.GetEventTypeByName(eventName);
var integrationEvent = JsonConvert.DeserializeObject(message, eventType);
var concreteType = typeof(IIntegrationEventHandler<>).MakeGenericType(eventType);
await Task.Yield();
await (Task)concreteType.GetMethod("Handle").Invoke(handler, new object[] { integrationEvent });
}
}


+ 3
- 3
test/readme.md View File

@ -12,7 +12,7 @@ The tests in eShopOnContainers are structured in the following structure, per ty
# Unit and Functional tests per microservice
Within each microservice's folder there are multiple tests (Unit Tests and Functional Tests) available to validate its behaviour.
The test projects are positioned within each microservice's physical folder because that helps on the goal of maitanining maximum development autonomy per microservice. Doing it this way and in a more advance scenario, you could even move each microservice to a different GitHub repo per microservice, along with its test projects.
The test projects are positioned within each microservice's physical folder because that helps on the goal of maintaining maximum development autonomy per microservice. Doing it this way and in a more advance scenario, you could even move each microservice to a different GitHub repo per microservice, along with its test projects.
For instance, this is the way you see the project folders for the *Ordering* microservice, where you also have the *Ordering.FunctionalTests* y *Ordering.UnitTests* within that folder structure.
@ -43,7 +43,7 @@ These Unit Tests have no any dependency with any external infrastructure or any
In this case, the Functional Tests do have dependencies with additional infrastructure. For instance, they might have dependencies with the microservices's database in the SQL Server container, the messaging broker (RabbitMQ container), etc.
Therefore, in order to run the Functional Tests you first need to have the needed inrastructure, in this case to spin-up the infrastructure containers.
Therefore, in order to run the Functional Tests you first need to have the needed infrastructure, in this case to spin-up the infrastructure containers.
In order to facilitate how you can have the infrastructure containers up and running, you have certain docker-compose files you can use with `docker-compose up`. These files are available here:
@ -95,7 +95,7 @@ You can, for instance, run the Functional Tests for the Catalog Microservice, wh
So far, we've been focusing on isolated Unit Tests or Functional Tests that were related to single/isolated microservices, although taking into account the infrastructure for the functional tests per microservice.
However, in a microservice-based application you also need how the multiple microservices interact with the whole application. For instance, you might raise an envent from one microservice by publishing it on the Event Bus (based on RabbitMQ) and test/validate that you received that same event into another microservice because it was subscribed to it.
However, in a microservice-based application you also need how the multiple microservices interact with the whole application. For instance, you might raise an event from one microservice by publishing it on the Event Bus (based on RabbitMQ) and test/validate that you received that same event into another microservice because it was subscribed to it.
These global Functional/Integration tests for the services need to be placed in a common place instead within specific microservice's folders, as it needs to deal with multiple microservices.


Loading…
Cancel
Save