Skip to content

Microservices on .Net platforms which used Asp.Net Web API, Docker, Kubernetes, RabbitMQ, MassTransit, Grpc, Ocelot API Gateway, MongoDB, Redis, SqlServer, Dapper, Entity Framework Core, CQRS and Clean Architecture implementation, Azure Pipelines, Azure Devops, AKS, ACR, Docker-Compose.

mkhalesi/.NET-Microservices-Sample

Repository files navigation

.NET Microservices Sample Project

There is a couple of microservices which implemented e-commerce modules over Payment, Product, Basket, Discount, Ordering and Identity microservices with NoSQL (MongoDB, Redis) and Relational databases (Sql Server) with communicating over RabbitMQ Event Driven Communication and using Ocelot API Gateway.

Deploying .Net Microservices into Kubernetes and moving deployments to the cloud Azure Kubernetes Services (AKS) with using Azure Container Registry (ACR)


Whats Including In This Repository

Identity microservice which includes:

  • Implement Identity Server - Duenede Server
  • Implement ASP.Net Identity
  • SqlServer database

API Gateway Web & Admin Microservice which includes:

  • Implement API Gateways with Ocelot
  • Implement Authentication with JWT Bearer
  • Sample microservices/containers to reroute through the API Gateways

Product Microservice which includes:

  • REST API principles, CRUD operations
  • Implement Authentication with JWT Bearer
  • Consuming RabbitMQ Messages
  • Swagger Open API implementation
  • SqlServer database

Ordering Microservice which includes:

  • MongoDB database connection and containerization
  • REST API principles, CRUD operations
  • Implement Authentication with JWT Bearer
  • Consuming RabbitMQ Messages
  • Swagger Open API implementation

Discount Microservice which includes:

  • ASP.NET Grpc Server applicatios
  • Exposing Grpc Services with creating Protobuf messages
  • SqlServer database

Basket Microservice which includes:

  • Redis database connection and containerization
  • REST API principles, CRUD operations
  • Implement Authentication with JWT Bearer
  • Consuming RabbitMQ Messages
  • Swagger Open API implementation

Payment Microservice which includes:

  • REST API principles
  • Implement Clean Architecture
  • Implement Authentication with JWT Bearer
  • Consuming RabbitMQ Messages
  • Swagger Open API implementation
  • SqlServer database

Microservices Communication :

  • Sync inter-service gRPC Communication
  • Async Microservices Communication with RabbitMQ Message-Broker Service
  • Using RabbitMQ Publish/Subscribe Topic Exchange Model

Web & Admin Frontend Microservice :

  • Implement Authentication with OpenIdConnect
  • Call Ocelot APIs with HttpClientFactory and RestClient

Docker Compose establishment with all microservices on docker :

  • Containerization of microservices
  • Containerization of databases
  • Override Environment variables

Installing

docker-compose up --build

You can launch microservices as below urls:

you can replace Your IP Address in .env file with host.docker.internal

Apply Kubernetes clusters with command:

kubectl apply /k8s

you can find Port or NodePort of services in k8s yaml files

Currently working on Deploy to Azure Kubernetes Services through CI/CD Azure Pipelines


Authors

About

Microservices on .Net platforms which used Asp.Net Web API, Docker, Kubernetes, RabbitMQ, MassTransit, Grpc, Ocelot API Gateway, MongoDB, Redis, SqlServer, Dapper, Entity Framework Core, CQRS and Clean Architecture implementation, Azure Pipelines, Azure Devops, AKS, ACR, Docker-Compose.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published