š”– Scriptorium
✦   LIBER   ✦

šŸ“

Pro Java Microservices with Quarkus and Kubernetes: A Hands-on Guide

āœ Scribed by Nebrass Lamouchi


Publisher
Apress
Year
2021
Tongue
English
Leaves
413
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Build and design microservices using Java and the Red Hat Quarkus Framework.Ā This book will help you quickly get started with the features and concerns of a microservices architecture. It will introduce Docker and Kubernetes to help you deploy your microservices.

You will be guided on how to install the appropriate tools to work properly. For those who are new to enterprise development using Quarkus, you will be introduced to its core principles and main features through a deep step-by-step tutorial. For experts, this book offers some recipes that illustrate how to split monoliths and implement microservices and deploy them as containers to Kubernetes.

By the end of reading this book, you will have practical hands-on experience of building microservices using Quarkus and you will master deploying them to Kubernetes.

What You Will Learn

  • Work with Quarkus and GraalVM
  • Split a monolith using the domain-driven design approach
  • Implement the cloud and microservices patterns
  • Rethink the deployment process
  • Introduce containerization, Docker, and Kubernetes to your toolkit
  • Boost microservices efficiency and performance with Azure
  • Play with Quarkus and distributed application runtimes

Who This Book Is For

Java developers who want to build microservices using Red Hat Quarkus and who want to deploy them in Kubernetes.

✦ Table of Contents


Table of Contents
About the Author
About the Technical Reviewer
Acknowledgments
Preface
Introduction
Chapter 1: Getting Started with Containerization
Introducing Containerization
Introducing Docker
The Dockerfile
Images andĀ Containers
Installing Docker
Running Your First Container
Understanding theĀ Docker Architecture
Docker Objects
Images
Containers
Docker Machine
Diving Into Docker Containers
Docker Containers inĀ Development Environments
Define aĀ Container withĀ Dockerfile
Create aĀ Sample Application
Run theĀ App
Publish Your Image
Log InĀ withĀ Your Docker ID
Tag theĀ Image
Publish theĀ Image
Pull andĀ Run theĀ Image fromĀ Docker Hub
Play withĀ Google Jib
Build withĀ Google Jib
Meeting theĀ Docker Services
Create theĀ First docker-compose.yml File
Achieving More withĀ Docker
Get theĀ Needed Tools Quickly
Get aĀ Dockerized PostgreSQL Instance
Get aĀ Dockerized SonarQube Instance
Unleash theĀ Requirements Chains
Containerization Is Not Docker Only
What Are Docker’s Limitations?
Meet Podman andĀ Buildah
Conclusion
Chapter 2: Introduction toĀ theĀ  Monolithic Architecture
Introduction toĀ anĀ Actual Situation
Presenting theĀ Context
Solving These Issues
Chapter 3: Coding aĀ Monolithic Application
Presenting theĀ Domain
Use Case Diagram
Class Diagram
Sequence Diagram
Coding theĀ Application
Presenting theĀ Technology Stack
The PostgreSQL Database
Java 11
Maven
The Quarkus Framework
JetBrains IntelliJ IDEA
Implementing theĀ QuarkuShop
Generating theĀ Project Skull
Creating theĀ Persistence Layer
Cart
CartStatus
Address
Category
Customer
Order
OrderItem
Payment
Product
ProductStatus
Review
Creating theĀ Service Layer
Typical Service: CartService
AddressService
CategoryService
CustomerService
OrderItemService
OrderService
PaymentService
Product Service
ReviewService
Creating theĀ Web Layer
Typical RestController: CartResource
CategoryResource
CustomerResource
OrderItemResource
OrderResource
PaymentResource
ProductResource
ReviewResource
Automated API Documentation
Hello World Swagger!
Customize theĀ Quarkus Banner
Conclusion
Chapter 4: Upgrading aĀ Monolithic Application
Implementing QuarkuShop Tests
Introducing Tests Libraries inĀ Quarkus
Writing theĀ First Tests
Discovering SonarQube
Building andĀ Running QuarkuShop
Building theĀ QuarkuShop
Packaging Modes inĀ Quarkus
Meeting theĀ Quarkus Native
Running theĀ Tests inĀ Native Mode
Packaging andĀ Running theĀ Native QuarkuShop
Differences Between theĀ JVM andĀ Native Modes
The Magic Behind GraalVM’s Power
Conclusion
Chapter 5: Building andĀ Deploying aĀ Monolithic Application
Introduction
Importing theĀ Project into Azure DevOps
Creating theĀ CI/CD Pipelines
Creating theĀ Continuous Integration Pipeline
Creating aĀ Maven-Based CI Pipeline
Creating aĀ Docker Multistage Based CI Pipeline
Making theĀ Continuous Deployment Pipeline
Create theĀ Virtual Machine
Create theĀ Continuous Deployment Pipeline
Conclusion
Chapter 6: AddingĀ Anti-Disaster Layers
Introduction
Implementing theĀ Security Layer
Analyzing Security Requirements andĀ Needs
Defining Authorization Matrices forĀ REST APIs
Implementing theĀ Security Layer
Preparing andĀ Configuring Keycloak
Implementing theĀ auth2 Java Components inĀ QuarkuShop
Java Configuration Side
Java Source Code Side
Update theĀ Integration Tests toĀ Support auth2
Adding Keycloak toĀ theĀ Production Environment
Implementing theĀ Monitoring Layer
Implementing Health Checks
Implementing theĀ Metrics Service
Conclusion
Chapter 7: Microservices Architecture Pattern
Introduction
Microservices Architecture
Benefits ofĀ aĀ Microservices Architecture
What Really Is aĀ Microservice?
Conclusion: Making theĀ Switch
Chapter 8: Splitting theĀ Monolith: Bombarding theĀ Domain
Introduction
What Is Domain-Driven Design?
Context
Domain
Model
Ubiquitous Language
Strategic Design
Bounded Context
Bombarding QuarkuShop
Codebase
Dependencies andĀ Commons
Entities
Example: Breaking Foreign Key Relationships
Conclusion
Chapter 9: Applying DDD toĀ theĀ Code
Applying Bounded Contexts toĀ Java Packages
The Birth ofĀ theĀ Commons Package
Locating theĀ Bounded Contexts Relationships
Breaking theĀ BC Relationships
Conclusion
Chapter 10: Meeting theĀ Microservices Concerns andĀ Patterns
Cloud Patterns
Service Discovery andĀ Registration
Context andĀ Problem
Solution
Externalized Configuration
Context andĀ Problem
Solution
Circuit Breaker
Context andĀ Problem
Solution
Database Per Service
Context andĀ Problem
Solution
API Gateway
Context andĀ Problem
Solution
CQRS
Context andĀ Problem
Solution
Event Sourcing
Context andĀ Problem
Solution
Log Aggregation
Context andĀ Problem
Solution
Distributed Tracing
Context andĀ Problem
Solution
Audit Logging
Context andĀ Problem
Solution
Application Metrics
Context andĀ Problem
Solution
Health Check API
Context andĀ Problem
Solution
Security Between Services: Access Token
Context andĀ Problem
Solution
Conclusion
Chapter 11: Getting Started with Kubernetes
Introduction
What Is Kubernetes?
The Kubernetes Architecture
Kubernetes Core Concepts
Kubectl
Cluster
Namespace
Label
Pod
ReplicaSet
Deployment
StatefulSet
DaemonSet
Service
Ingress
Volume
PersistentVolume
PersistentVolumeClaim
StorageClass
Job
CronJob
ConfigMap
Secret
Run Kubernetes Locally
Practical Summary andĀ Conclusion
Additional Reading
Chapter 12: Implementing the Cloud Patterns
Introduction
Bringing theĀ Monolithic Universe toĀ Kubernetes
Deploying PostgreSQL toĀ Kubernetes
Deploying Keycloak toĀ Kubernetes
Deploying theĀ Monolithic QuarkuShop toĀ Kubernetes
Conclusion
Chapter 13: Building theĀ Kubernetized Microservices
Introduction
Creating theĀ Commons Library
Implementing theĀ Product Microservice
Implementing theĀ Order Microservice
Implementing theĀ Customer Microservice
Implementing theĀ User Microservice
Conclusion
Chapter 14: Flying All Over the Sky with Quarkus and Kubernetes
Introduction
Implementing theĀ Circuit Breaker Pattern
Implementing theĀ Log Aggregation Pattern
Step 1: Deploying theĀ ELK Stack toĀ Kubernetes
Step 2: Configuring theĀ Microservices toĀ Log Into theĀ ELK Stack
Step 3: Collecting Logs
Implementing theĀ Distributed Tracing Pattern
Step 1: Deploying theĀ Jaeger All-in-One toĀ Kubernetes
Step 2: Enabling Jaeger Support inĀ Our Microservices
Step 3: Collecting Traces
Implementing theĀ API Gateway Pattern
Step 1: Enabling Ingress Support inĀ Minikube
Step 2: Creating theĀ API Gateway Ingress
Step 3: Testing Ingress
Conclusion
Afterword:
Final Words and Thoughts
Index


šŸ“œ SIMILAR VOLUMES


Pro Java Microservices with Quarkus and
āœ Nebrass Lamouchi šŸ“‚ Library šŸ“… 2021 šŸ› Apress 🌐 English

<p>Build and design microservices using Java and the Red Hat Quarkus Framework.Ā This book will help you quickly get started with the features and concerns of a microservices architecture. It will introduce Docker and Kubernetes to help you deploy your microservices.</p> <p>You will be guided on how

Hands-On Microservices with Kubernetes
āœ Gigi Sayfan šŸ“‚ Library šŸ“… 2019 šŸ› Packt Publishing 🌐 English

Apply design patterns to solve problems in software architecture and programming using C# 7.x and .NET Core 2 Key Features Enhance your programming skills by implementing efficient design patterns for C# and .NET Explore design patterns for functional and reactive programming to build robust and sca

Hands-On Microservices With Kubernetes:
āœ Gigi Sayfan šŸ“‚ Library šŸ“… 2019 šŸ› Packt Publishing 🌐 English

Kubernetes is an open source container management and orchestration platform. It has been giving a decent competition to spring cloud environment, claiming to be the best environment for developing and running Microservices. Hands-on Microservices with Kubernetes will help you successfully create or

Hands-On Microservices With Kubernetes:
āœ Gigi Sayfan šŸ“‚ Library šŸ“… 2019 šŸ› Packt Publishing 🌐 English

Kubernetes is an open source container management and orchestration platform. It has been giving a decent competition to spring cloud environment, claiming to be the best environment for developing and running Microservices. Hands-on Microservices with Kubernetes will help you successfully create or