Table of Contents
- Chapter-1: Getting Started with Microservices
- What are Microservices?
- Microservices vs Monolithic Architectures
- Advantages of Microservices
- Challenges and Considerations
- Key Technologies and Tools
- Microservices Communication
- Domain-Driven Design (DDD)
- Domain-Driven Design (DDD) Example
- The Store We Will Build
- Task-1: Identify Microservices for the book
- Task-2: Identify the List of Git Repositories Needed
- Task-3: Create new Azure DevOps Organization
- Task-4: Create new Azure DevOps Project
- Chapter-2: Docker Fundamentals
- Chapter-3: Getting Started with Docker
- Chapter-4: Build the Product API with .NET
- Step-1: Create a new repo in Azure DevOps
- Step-2: Clone the repo from Azure DevOps
- Step-3: Create a new .NET Web API project
- Step-4: Add the product endpoints
- Step-5: Run and test the Product API
- Step-6: Containerize the Product API
- Step-7: Push docker container to ACR
- Step-8: Pull docker container from ACR
- Chapter-5: Build the Order API with Node.js
- Chapter-6: Build the Admin Site with ASP.NET Core MVC
- Chapter-7: Build the Storefront with React
- Chapter-8: Create Your First Database with SQL Server
- Step-1: Setup Git Repository for SQL Server database
- Step-2: Create Folder Structure for SQL Server database
- Step-3: Add the database scripts
- Step-4: Add the Dockerfile and the entrypoint script
- Step-5: Test the SQL Server database connection using sqlcmd
- Step-6: Test the SQL Server database connection using SSMS
- Step-7: Test the SQL Server database connection using Azure Data Studio
- Step-8: Push Docker Container to ACR
- Chapter-9: Create Your Second Database with PostgreSQL
- Step-1: Setup Git Repository for PostgreSQL database
- Step-2: Create Folder Structure for PostgreSQL database
- Step-3: Add the database scripts
- Step-4: Add Dockerfiles to the Database Project
- Step-5: Create Docker Compose file
- Step-6: Test the PostgreSQL database connection from psql tool
- Step-7: Test the PostgreSQL database from pgadmin4 tool
- Step-8: Push Docker Container to ACR
- Chapter-10: Setting up Keycloak in a Docker Container
- Step-1: Setup repository for Keycloak in Azure DevOps
- Step-2: Create Keycloak project
- Step-3: Keycloak setup with docker compose
- Step-3.1: Setup Keycloak Service
- Step-3.2: Setup Keycloak Service with PostgreSQL database
- Step-4: Keycloak setup with Dockerfile
- Step-4.1: Create Dockerfile
- Step-4.2: Docker build locally
- Step-4.3: Docker run locally
- Step-5: Publish the Keycloak docker container to container registry
- Chapter-11: Setting up Drupal in a Docker Container
- Chapter-12: Data per Service
- Step-1: Keep the schema in numbered scripts
- Step-2: Connect the Product API to SQL Server
- Step-3: Connect the Order API to PostgreSQL
- Step-4: Keep passwords out of images and Git
- Step-5: Run the Product API with its database
- Step-6: Run the Order API with its database
- Step-7: Restart without losing data
- Step-8: Stop a database and watch the readiness check
- Production note
- What not to do
- Chapter-13: Compose the Whole System
- Step-1: Understand why one compose file
- Step-2: Create the
.envfile - Step-3: Write the compose file for the whole store
- Step-4: Start the store
- Step-5: Use service names to reach other services
- Step-6: Add temporary development ports
- Step-7: Use the everyday compose commands
- Step-8: Try it: stop one database
- Step-9: Start again from scratch
- Troubleshooting
- Chapter-14: Service Communication
- Step-1: Understand synchronous calls and what they cost
- Step-2: Call the Product API from the Order API
- Step-3: Pass a request id from service to service
- Step-4: Configure the calls in the compose file
- Step-5: Read and add products in the Admin site
- Step-6: Connect the Storefront to the APIs
- Step-7: Try it: place an order and see the snapshot
- Step-8: Try it: order a product that doesn't exist
- Step-9: Try it: stop the Product API
- Troubleshooting
- Chapter-15: API Gateway
- Step-1: Understand what an API gateway does
- Step-2: Write the gateway's nginx configuration
- Step-3: Add the gateway's Dockerfile
- Step-4: Put the gateway in the compose file
- Step-5: Remove the temporary ports and proxies
- Step-6: Start the store behind the gateway
- Step-7: Try it: everything through one address
- Step-8: Try it: follow a request id and see the forwarded headers
- Step-9: Try it: stop the Product API
- Step-10: Try it: hit the rate limit
- Troubleshooting
- Chapter-16: Securing Services with Keycloak
- Step-1: Understand authentication, authorization and tokens
- Step-2: Design the store realm
- Step-3: Write the realm file
- Step-4: Add Keycloak to the compose file
- Step-5: Use one issuer for browsers and containers
- Step-6: Protect the Product API (.NET)
- Step-7: Protect the Order API (Node.js)
- Step-8: Sign in to the Admin site (ASP.NET Core MVC)
- Step-9: Sign in to the Storefront (React)
- Step-10: Start the store
- Step-11: Try it: tokens against the APIs
- Step-12: Try it: sign in as alice and bob in the browser
- Going to production
- Troubleshooting
- Chapter-17: Events and Messaging with RabbitMQ
- Step-1: Understand asynchronous messaging and events
- Step-2: Understand exchanges, queues and bindings in RabbitMQ
- Step-3: Design the
OrderPlacedevent - Step-4: Save the order and its event in one transaction (the outbox)
- Step-5: Publish the outbox to RabbitMQ
- Step-6: Build the notification worker
- Step-7: Add RabbitMQ and the worker to the compose file
- Step-8: Start the store
- Step-9: Try it: place an order and watch the worker
- Step-10: Try it: stop the worker and watch the queue grow
- Step-11: Try it: send a poison message and a duplicate
- Step-12: Try it: stop RabbitMQ
- Step-13: Try it: prove the outbox transaction
- Going to production
- Troubleshooting
- Appendix: