diff --git a/samples/MicroserviceDemo/MicroserviceDemo.sln b/samples/MicroserviceDemo/MicroserviceDemo.sln new file mode 100644 index 0000000000..a7d77ae029 --- /dev/null +++ b/samples/MicroserviceDemo/MicroserviceDemo.sln @@ -0,0 +1,13 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.168 +MinimumVisualStudioVersion = 10.0.40219.1 +Global + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {37474F0D-2E52-4D2F-B39B-7FE3FF31B4EC} + EndGlobalSection +EndGlobal diff --git a/samples/MicroserviceDemo/docs/design/Overall.md b/samples/MicroserviceDemo/docs/design/Overall.md new file mode 100644 index 0000000000..10b1c74830 --- /dev/null +++ b/samples/MicroserviceDemo/docs/design/Overall.md @@ -0,0 +1,51 @@ +# Microservice Demo Overall + +## Introduction + +The goal of this work is to show how to create a complete microservice solution based on the ABP framework. + +## Tooling + +* **[ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-2.2)** as the web framework. +* **[ABP](https://abp.io)** as the application framework. +* **[Ocelot](https://github.com/ThreeMammals/Ocelot)** as the API Gateway. +* **[IdentityServer4](https://identityserver.io/)** as the authentication server/framework. +* [**Redis**](https://redis.io/) for distributed cache. +* [**RabbitMQ**](https://www.rabbitmq.com/) for distributed messaging. + +## The Solution + +The solution consists of; + +* **MVC applications**: + * **AuthServer Application** + * Hosts the [IdentityServer4](https://github.com/abpframework/abp/tree/master/modules/identityserver) module for authentication. + * Uses an SQL server database and [EF Core](https://abp.io/documents/abp/latest/Entity-Framework-Core) as the ORM. + * **Public Site Application** + * "Our products" page to list the products using the products microservice. + * Hosts the [blogging](https://github.com/abpframework/abp/tree/master/modules/blogging) module UI. Uses the blogging microservice as backend. + * Authenticates from the AuthServer. + * **Backend Admin Application** + * Hosts the [Identity](https://github.com/abpframework/abp/tree/master/modules/identity) module UI for user/role/permission management. Uses the identity microservice as backend. + * A CRUD page to manage products using the products microservice. +* **Microservices**: + * **Blogging Microservice** + * Hosts the [blogging](https://github.com/abpframework/abp/tree/master/modules/blogging) module API. + * Uses its own [MongoDB](https://abp.io/documents/abp/latest/MongoDB) database. + * Listens user update events (of the Identity microservice) to update the users stored in its own database. + * **Identity Microservice** + * Hosts the [identity](https://github.com/abpframework/abp/tree/master/modules/identity) module API. + * Shares the same SQL Server database with the AuthServer application. + * **Product Microservice** + * A simple microservice that is used to manage products (simple CRUD API). + * Uses its own SQL Server database. +* **API Gateways** + * **Public Site Gateway**: Used by the public site application. + * **Backend Gateway**: Used by the Backend admin application. + +## Notes + +* Microservices and the AuthServer application use Redis for caching and RabbitMQ for distributed messaging. +* Every microservice is configured for auditing. +* Uses docker-compose. +* Will create sample background jobs for demonstration. \ No newline at end of file diff --git a/templates/service/host/IdentityServerHost/IdentityServerHostModule.cs b/templates/service/host/IdentityServerHost/IdentityServerHostModule.cs index 8883c8848b..5cf1b7e511 100644 --- a/templates/service/host/IdentityServerHost/IdentityServerHostModule.cs +++ b/templates/service/host/IdentityServerHost/IdentityServerHostModule.cs @@ -17,6 +17,7 @@ namespace IdentityServerHost [DependsOn( typeof(AbpAutofacModule), typeof(AbpAspNetCoreMvcModule), + typeof(AbpIdentityAspNetCoreModule), typeof(AbpIdentityServerEntityFrameworkCoreModule), typeof(AbpIdentityEntityFrameworkCoreModule), typeof(AbpEntityFrameworkCoreSqlServerModule)