Visão Geral
O Curso Microservices with SpringBoot Docker Kubernetes, ajudará na compreensão da arquitetura de microsserviços e como construí-la usando SpringBoot, componentes Spring Cloud, Docker e Kubernetes. Ao final deste curso, os alunos compreenderão todos os tópicos abaixo,
- O que é arquitetura de microsserviços e como ela difere das arquiteturas monolíticas e SOA
- Como construir microsserviços prontos para produção usando Java, Spring , SpringBoot e Spring Cloud
- Como documentar microsserviços usando Open API Specification e Swagger
- Como dimensionar microsserviços corretamente e identificar limites de serviço
- Papel do Docker em microsserviços e como construir imagens e contêineres do Docker
- Função do Docker compose e como usá-lo para executar todos os microsserviços dentro de um aplicativo
- O que são aplicativos nativos da nuvem e metodologia de 15 fatores por trás deles
- Gerenciamento de configuração em microsserviços usando Spring Cloud Config Server
- Padrão de descoberta e registro de serviço dentro de microsserviços e como implementar usando o servidor Spring Eureka
- Lidando com preocupações transversais e roteamento dentro de microsserviços usando Spring Cloud Gateway
- Construindo microsserviços resilientes usando a estrutura RESILIENCE4J
- Implementando observabilidade e monitoramento usando Prometheus , Loki , Promtail , Tempo e Grafana
- Protegendo microsserviços usando OAuth2 , OpenID connect e Spring Security
- Como construir microsserviços orientados a eventos usando RabbitMQ , Kafka , Spring Cloud Functions e Spring Cloud Stream
- Papel do Kubernetes em microsserviços como estrutura de orquestração de contêineres.
- Como configurar um cluster Kubernetes dentro do GCP usando o Google Kubernetes Engine e implantar microsserviços dentro dele
- O que é Helm e seu papel no mundo dos microsserviços
- Comandos Docker, Kubernetes e Helm mais comumente usados
Conteúdo Programatico
Introduction to Microservices Architecture
- Introduction to the course & Agenda
- Details of Source Code, PDF Content & other instructions for the course
- Evolution of Microservices architecture
- Comparisons between Monolithic, SOA & Microservices architecture
- Definition of Microservices
Building microservices using Spring Boot
- How to build microservices
- Introduction to SpringBoot framework
- Funny memes of SpringBoot framework
- Introduction to REST APIs & best practices
- Creating a Spring Boot project
- Creating Hello World REST API using @RestController
- Configuring H2 DB & YAML properties
- Writing Spring Data JPA entities & repositories to interact with DB tables
- Introduction to DTO (Data Transfer Object) pattern
- Creating DTOs inside accounts microservice
- CREATE API inside accounts microservice - Part 1
- CREATE API inside accounts microservice - Part 2
- READ API inside accounts microservice
- UPDATE API inside accounts microservice
- DELETE API inside accounts microservice
- Handle all types of runtime exceptions using global logic inside accounts
- Perform input data validations inside accounts microservice
- Update audit columns using Spring Data
- Introduction to documentation of REST APIs using springdoc openapi
- Enhancing documentation of REST APIs using @OpenAPIDefinition
- Enhancing documentation of REST APIs using @Tag, @Operation, @ApiResponse
- Enhancing documentation of REST APIs using @Schema & example data - Part 1
- Enhancing documentation of REST APIs using @Schema & example data - Part 2
- Important Annotations & Classes that supports building REST services
- Assignment to build Loans & Cards microservices
- Deep dive and demo of Loans microservice
- Deep dive and demo of Cards microservice
How do we right size our microservices & identify boundaries
- Approaches to identify boundaries & right size microservices
- Sizing & identifying boundaries with a Bank App use case
- Sizing & identifying boundaries with a ecommerce migration use case
- Handle deployment, portability & scalability of microservices using Docker
- Introduction to challenges while building, deploying microservices
- What are Containers & how they are different from VMs
- Definition of Containers, Containerization, Docker
- Introduction to Docker components & its architecture
- Docker installation & docker hub introduction
- Introduction to the three approaches for Docker image generation
- Generate Docker Image of Accounts microservice with Dockerfile - Part 1
- Generate Docker Image of Accounts microservice with Dockerfile - Part 2
- Generate Docker Image of Accounts microservice with Dockerfile - Part 3
- Running accounts microservice as a Docker container
- Challenges with Dockerfile approach to generate a Docker image
- Generate Docker Image of Loans microservice with Buildpacks
- Generate Docker Image of Cards microservice with Google Jib
- Compare Dockerfile, Buildpacks, Jib approaches
- Pushing Docker images from your local to remote Docker hub repository
- Introduction to Docker Compose
- Running all microservice containers using Docker Compose command
- Demo of docker compose commands
- Deep dive on Docker commands
- Introduction to Docker extensions and LogsExplorer
- Funny memes of Docker
Deep Dive on Cloud Native Apps & 15-Factor methodology
- Introduction to Cloud-native applications
- Important characteristics of cloud-native applications
- Differences between cloud-native Apps & Traditional enterprise Apps
- Introduction to 12-factor & 15-factor methodologies
- Deepdive on 15-factor methodology - Part 1
- Deepdive on 15-factor methodology - Part 2
- Deepdive on 15-factor methodology - Part 3
Configurations Management in Microservices
- Introduction to Configurations Management challenges inside microservices
- How Configurations work in Spring Boot
- Reading configurations using @Value annotation
- Reading configurations using Environment interface
- Reading configurations using @ConfigurationProperties
- Introduction to Spring Boot profiles
- Demo of Spring Boot profiles inside accounts microservice
- Externalizing configurations using command-line, JVM & environment options
- Activating the profile using command-line, JVM & environment options
- Assignment to make SpringBoot profile changes inside loans & cards microservices
- Demo of Spring Boot profile changes inside loans & cards microservices
- Drawbacks of externalized configurations using SpringBoot alone
- Introduction to Spring Cloud Config
- Building Config Server using Spring Cloud Config
- Reading configurations from the class path location of Config Server
- Updating Accounts Microservice to read properties from Config Server
- Updating Loans & Cards Microservice to read properties from Config Server
- Reading configurations from a file system location
- Reading configurations from a GitHub repository
- Encryption & Decryption of properties inside Config server
- Refresh configurations at runtime using refresh actuator path
- Refresh configurations at runtime using Spring Cloud Bus
- Refresh config at runtime using Spring Cloud Bus & Spring Cloud Config monitor
- Updating Docker Compose file to adapt Config Server changes - Part 1
- Introduction to Liveness and Readiness probes
- Updating Docker Compose file to adapt Config Server changes - Part 2
- Optimizing Docker Compose file
- Generating Docker images and pushing them into Docker Hub
- Testing Config Server changes end to end using Docker compose & default profile
- Preparing Docker Compose files for QA & prod profiles
Using MySQL Database inside microservices
- Create MySQL DB containers for microservices
- Update microservices code to replace H2 DB with MySQL DB
- Update docker compose file to create & use MySQL DB
- Running microservices & MySQL DB containers using docker compose file
- Demo of Docker network concept
Service Discovery & Service Registration in microservices
- Brief introduction about microservices traffic
- Introduction to the Service Discovery & Registration inside microservices
- Why not traditional load balancers for Microservices
- Service Discovery & Registration inside microservices
- How Client side Service Discovery & Load-balancing works
- Spring Cloud support for Service Discovery & Registration
- Setup Service Discovery agent using Eureka server
- Make code changes in Accounts microservice to connect Eureka Server
- Make code changes in Loans & Cards microservice to connect Eureka Server
- De-registration from Eureka server when microservices shutdown
- Demo of heartbeats mechanism to Eureka server from clients
- Feign Client code changes to invoke other microservices - Part 1
- Feign Client code changes to invoke other microservices - Part 2
- Eureka Self-Preservation mode to avoid network trap issues
- Generating Docker images with Service Discovery changes & push them into Dock
- Updating Docker Compose file to adapt Service Discovery changes
- Starting all the microservices using docker compose file
- Demo of Client Side Service Discovery & Load balancing
Gateway, Routing & Cross cutting concerns in Microservices
- Challenges while dealing external communication in microservices
- Why we need a Edge Server or API Gateway inside microservices
- Introduction to Spring Cloud Gateway
- Deep dive on Spring Cloud Gateway internal architecture
- Building Edge Server using Spring Cloud Gateway
- Demo of Edge Server with default routing configs
- Make changes inside Gateway server to accept service names with lower case
- Implementing Custom Routing using Spring Cloud Gateway
- Demo of addResponseHeader filter
- Implementing Cross cutting concerns Tracing & Logging using Gateway - Part 1
- Implementing Cross cutting concerns Tracing & Logging using Gateway - Part 2
- Generating and pushing Docker images with Spring Cloud Gateway changes
- Updating Docker Compose file to adapt Spring Cloud Gateway changes
Making Microservices Resilient
- Introduction to the need of Resiliency inside microservices
- Typical use case or scenario for the need of Resiliency
- Deepdive on Circuit Breaker pattern
- Three states of Circuit Breaker pattern
- Implementing Circuit Breaker pattern in Gateway - Part 1
- Implementing Circuit Breaker pattern in Gateway - Part 2
- Implementing Circuit Breaker pattern with Feign Client - Part 1
- Implementing Circuit Breaker pattern with Feign Client - Part 2
- Http timeout configurations
- Introduction to Retry pattern
- Implementing Retry pattern in Gateway
- Implementing Retry pattern in accounts - Part 1
- Implementing Retry pattern in accounts - Part 2
- Introduction to Rate Limitter pattern
- Introduction to Redis RateLimiter in Gateway Server
- Implementing Redis RateLimiter in Gateway Server
- Implementing RateLimiter pattern in accounts
- Introduction to Bulkhead pattern
- Aspect order of Resiliency patterns
- Demo of Resiliency patterns using Docker containers & Docker compose
Observability and monitoring of microservices
- Introduction to Observability And Monitoring Of Microservices
- Observability vs. Monitoring
- Introduction to centralized logging or Log Aggregation in microservices
- Introduction to managing logs with Grafana, Loki & Promtail
- Sample demo of logging using Grafana, Loki & promotail - Theory
- Implementing logging using Grafana, Loki & promotail - Part 1
- Implementing logging using Grafana, Loki & promotail - Part 2
- Implementing logging using Grafana, Loki & promotail - Part 3
- Managing metrics & monitoring with Actuator, Micrometer, Prometheus & Grafana
- Setup of micrometer inside microservices
- Setup of prometheus inside microservices
- Demo of Prometheus
- Demo of Prometheus & Grafana integration
- Demo of Grafana inbuilt & custom Dashboards
- Create Alerts & Send notifications using Grafana - Approach 1
- Create Alerts & Send notifications using Grafana - Approach 2
- Introduction to Distributed Tracing in microservices
- Introduction to OpenTelemetry
- Implement OpenTelemetry changes inside microservices
- Implementing Tracing using Grafana, Tempo & OpenTelemetry - Part 1
- Implementing Tracing using Grafana, Tempo & OpenTelemetry - Part 2
- Implementing Tracing using Grafana, Tempo & OpenTelemetry - Part 3
- Navigating to Tempo from Loki logs
- Conclusion of Observability and Monitoring
Microservices Security
- Introduction to Microservices Security
- Problems that OAuth2 solves
- Introduction to OAuth2
- OAuth2 jargons or terminologies or roles
- What is OpenID Connect & why it is important
- Introduction to IAM products & why KeyCloak
- Deep dive of Client Credentials grant type flow
- Securing Gateway server using Client Credentials grant type flow - Theory
- Setup Auth server using KeyCloak
- Register client details inside KeyCloak for Client credentials grant flow
- Getting Access token from Auth Server in Client credentials grant flow
- Securing Gateway server as a Resource server - Part 1
- Securing Gateway server as a Resource server - Part 2
- Implement Authorization inside Gateway server using Roles - Part 1
- Implement Authorization inside Gateway server using Roles - Part 2
- Deep dive of Authorization Code grant type flow
- Securing Gateway server using Authorization Code grant type flow - Theory
- Register client & end user inside KeyCloak for Authorization code grant flow
- Demo of Authorization code grant type flow
- Demo of Microservices Security using Docker containers & Docker compose - Part 1
- Demo of Microservices Security using Docker containers & Docker compose - Part 2
Event Driven microservices using RabbitMQ,Spring Cloud Functions & Stream
- Introduction to Event-driven microservices
- Introduction to Event-driven models
- What we are going to build using a pub sub model
- Introduction to RabbitMQ
- Why to use Spring Cloud Function
- Develop message microservice using Spring Cloud Functions - Part 1
- Develop message microservice using Spring Cloud Functions - Part 2
- Develop message microservice using Spring Cloud Functions - Part 3
- Why to use Spring Cloud Stream
- Update message & accounts microservices to stream & process the events - Part 1
- Demo of Async communication or event streaming using Rabbit MQ - Part 1
- Update message & accounts microservices to stream & process the events - Part 2
- Demo of Async communication or event streaming using Rabbit MQ - Part 2
- Demo of Async comm or event streaming using Docker containers & Docker compose
Event Driven microservices using Kafka, Spring Cloud Functions & Stream
- Apache Kafka Vs RabbitMQ
- Introduction to Apache Kafka
- Producer and Consumer side stories
- Installation of Apache Kafka
- Implement & Demo of Async communication or event streaming using Kafka
- Demo of Async comm or event streaming using Docker containers & Docker Compose
Container Orchestration using Kubernetes
- Introduction to the challenges related to container orchestration
- Introduction to Kubernetes
- Deep dive on Kubernetes internal architecture
- Setup a local Kubernetes cluster using Docker Desktop
- Deploying the Kubernetes Dashboard UI
- Deep dive on Kubernetes YAML configurations to deploy a microservice
- Deploying ConfigServer into Kubernetes Cluster
- Create environment variables inside Kubernetes Cluster using ConfigMap
- Preparing Kubernetes manifest files for remaining microservices
- Deploying remaining microservices into Kubernetes Cluster
- Automatic Self healing inside Kubernetes cluster
- Automatic Rollout & Rollback inside Kubernetes cluster
- Introduction to Kubernetes Service types
- Demo of Kubernetes Service types
- Problems with manually created Kubernetes manifest files
Deep dive on Helm
- Introduction to Helm & the problems that it solves
- Installing Helm
- Installing a sample Helm Chart
- Understanding Helm Chart structure
- Creating our own Helm chart & template files
- Creating Helm chart for Accounts microservice
- Creating Helm charts for other microservices
- Creating Helm charts for Dev, QA and Prod environment
- Demo of helm template command
- Install KeyCloak in Kubernetes Cluster using Helm Chart
- Install Kafka in Kubernetes Cluster using Helm Chart
- Install Prometheus in Kubernetes Cluster using Helm Chart
- Install Grafana Loki & Tempo in Kubernetes Cluster using Helm Chart
- Install Grafana in Kubernetes Cluster using Helm Chart
- Install eazybank microservices in Kubernetes Cluster using Helm Chart
- Demo of helm upgrade command
- Demo of helm history and rollback commands
- Demo of helm uninstall command
- Quick revision of important helm commands
Server-side service discovery and load balancing using Kubernetes
- Introduction to Server-side service discovery and load balancing
- How to setup discovery server in K8s cluster using spring cloud kubernetes
- Install spring cloud kubernetes discovery server in K8s cluster
- Making Kubernetes Discovery Client changes in microservices - Part 1
- Making Kubernetes Discovery Client changes in microservices - Part 2
- Updating Helm charts for Kubernetes Discovery Server changes
Demo of Server-side service discovery and load balancing
Deploying microservices into cloud Kubernetes cluster
- Kubernetes support by Cloud providers
- Set up Google Cloud account & install Google Cloud SDK
- Create a Kubernetes cluster in Google Cloud
- Installing all our microservices and supporting components in Google Cloud K8s
- Demo of eazybank microservices using Google Cloud Kubernetes Cluster
- Validate Grafana components in Google Cloud Kubernetes Cluster
- Deleting the Google Cloud Kubernetes Cluster
Introduction to Kubernetes Ingress, Service Mesh (Istio) & mTLS
- Quick introduction to Kubernetes Ingress
- Deep dive on Kubernetes Ingress & Ingress Controller
- Benefits of Kubernetes Ingress & the kind of traffic it handles
- Introduction to Service Mesh & it's capabilities
- Introduction to Service mesh components
- Introduction to mTLS & deep dive on how TLS works
- How does mTLS works
- Quiz related to "Introduction to K8s Ingress & Service Mesh (Istio)"