Microservices
© Elephant Scale March 30, 2022
-
A very important part of modern software development is the new discipline of Cloud-enabled microservices, and part of this is PAAS (Platform as a Service) which allows deploying such apps into production with the minimum effort. This course will introduce the participants into microservices and to its implementation with various frameworks.
-
The course is intended for software architects and engineers. It gives them a practical level of experience, achieved through a combination of about 50% lecture, 50% demo work with student’s participation.
Course objectives
- Understand modern software development for stable fault-tolerant and scalable applications using microservices
- Learn about the 12 Factor App and how microservices enable it.
- Implement Microservices using containerization and container orchestration Technologies
- Learn Microservices Architectural Patterns
Duration
- 3-5 days (scope can be customized)
Audience
- Developers, architects
- Format: 50% lectures, 50% hands-on labs
Prerequisites:
- Comfortable with command-line operations
- Familiar with software development
Lab environment:
- Zero Install: There is no need to install any software on students’ machines! (although it is possible)
Outline
Introduction to Microservices
What is a Microservice?
- Monolithic apps vs. microservices
- Definition of Microservice
- Microservice Architecture
- Lab: Testing a simple microservice
Twelve Factor App
- What are the Twelve Factors?
- Twelve Factors and Microservices
Microservice and Containers
- Deploy issues faced by developers
- Virtual machines vs containers
- Containerization technologies
- Containerization and Microservices
- Lab: Running a Container
Microservices and Kubernetes
- What is container orchestration?
- Kubernetes and Microservices
Microservices and Spring Boot
- Introduction to Spring Boot
- Spring Boot Advantages for Microservices
- Lab: Making a Simple Microservice in Spring Boot
Spring Boot Services
- REST
- How to Build a RESTful Microservice in Spring Boot
- Lab: A Microservice Implementation in Spring Boot
Cloud and Microservices
- Introducing Cloud Microservices
- How to deploy Microservices to the cloud
- Managed Services vs Unmanaged Services
Deeper look into Docker and Microservices
Docker Overview
- Docker architecture
- Docker internals
- Running docker
- Docker concepts: images, containers, registries
- Introduction to Dockerhub
- Labs
Working with Docker Containers
- Downloading Docker images
- Running docker containers
- Managing container life cycle
- Labs
Building Custom Docker Images
- Bundling our applications in a container
- Introducing the Dockerfile
- Building an image from a Dockerfile
- Understanding layers and commands
- Labs
Working with the Registry
- Introduction to container registries
- Introduction to DockerHub
- Creating a repository on DockerHub,
- Publishing custom images to registry
- Dev setup with a private container registry
- Wrap-up
- Labs
Networking
- Understanding Docker networking
- Various networking options for Docker
- Bridge vs Host networking
- Exposing ports
- Labs
Storage
- Persistent storage in Docker
- Using binds and volumes
- Defining and using storage volumes
- Storage backup and restore
- Labs
Deeper Look Kubernetes and Microservices
Kubernetes Overview
- Evolution of orchestration systems
- Kubernetes features
- Benefits
- Design principles
- Case studies
Kubernetes Architecture
- Kubernetes architecture
- Controllers and workers
- Namespaces
- Controller, Scheduler, etcd, kubelet
- Managing state in etcd
- Pods and containers
- Replicasets
- Daemonsets
- Labs
Kubernetes Resources
- Labels and annotations
- Node selectors
- Pod assignments
- Resource requirements and limits
- Scheduling and resource allocations
- Labs
Networking
- Docker networking
- Kubernetes networking
- Networking of pods and containers
- DNS service
- Exposing services
- Labs
Kubernetes Storage
- Kubernetes volumes
- Provisioning and using persistent volumes
- Dynamic volume allocation
- Labs
Deploying Scalable MicroServices
- Deployments and Replica Sets
- Services
- Deployment strategies
- Rolling out deployments
- Blue/green deployments
- Deploying services
- Ingress
- Labs
Kubernetes Ecosystem
- Developer tools
- Monitoring tools
- Testing tools
- Helm
- Labs
Industrial-Strength Microservices Architecture
Data Management for Microservices
- Database Per Services
- CQRS Pattern
- CAP Theorem
- Transactions
- Labs
Planning and Analysis
- Design Layers
- Domains and SubDomains
- Labs
Contexts and Interfaces
- Context
- Schema Registry
- Boundaries
- REST and Microservices
- Labs
Microservice Decomposition
- Intro to Decomposition
- Strangler Pattern
- Labs
Security and Microservices
- STRIDE Attack Classification
- Security Principles
- Authentication and Authorization
- Secrets Management
- Labs
Testing
- Testing and Microservices
- The “V” Model
- TDD (Test Driven Development)
- Testing and Quality: ATTD/BDD
- Labs
Messaging
- Messaging Architecture
- Point to Point
- Pub/Sub
- Streams
- Message Queues
- Apache Kafka
- Labs
Monitoring
- About Monitoring
- Monitoring Tools
- Labs
MicroServices Design Patterns
- Aggregator
- Branch
- Proxy
- Chain
- Shared Resources
- Asynchronous Messaging
- Bulkhead Isolation
- Labs
Workshops (time permitting)
- Students will work on end to end scenarios using Spring Boot Docker and Kubernetes
References
- ./es-training/microservices/rod-jason/Microservices-VMWare-2022.pptx
- ./es-training/microservices/rod-jason/Microservices-VMWare.pptx
- ./es-training/kubernetes/slides/Microservices.md
- ./es-training-new/kubernetes/slides/Microservices.md