Playing with Java Microservices on Kubernetes and OpenShift
Playing with Java Microservices on Kubernetes and OpenShift
$29.99
Minimum price
$34.99
Suggested price
Playing with Java Microservices on Kubernetes and OpenShift

This book is 90% complete

Last updated on 2019-01-20

About the Book

Playing with Java Microservices on Kubernetes and OpenShift will teach you how to build and design microservices using Java and the Spring platform.

This book covers topics related to creating Java microservices and deploy them to Kubernetes and OpenShift.

Traditionally, Java developers have been used to developing large, complex monolithic applications. The experience of developing and deploying monoliths has been always slow and painful. This book will help Java developers to quickly get started with the features and the concerns of the microservices architecture. It will introduce Docker, Kubernetes and OpenShift to help them deploying their microservices.

The book is written for Java developers who wants to build microservices using the Spring Boot/Cloud stack and who wants to deploy them to Kubernetes and OpenShift.

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

The following are some of the key challenges that we will address in this book:

  • Introducing Spring Boot/Cloud for beginners
  • Splitting a monolith using the Domain Driven Design approach
  • Implementing the cloud & microservices patterns
  • Rethinking the deployment process
  • Introducing containerization, Docker, Kubernetes and OpenShift

By the end of reading this book, you will have practical hands-on experience of building microservices using Spring Boot/Cloud and you will master deploying them as containers to Kubernetes and OpenShift.

About the Author

Nebrass Lamouchi
Nebrass Lamouchi

Nebrass is a passionate Java developer, Apache NetBeans Committer since January 2018 and a former NetBeans Dream Team member until December 2017.

He is also working as a Project Leader in the OWASP Foundation, since March 2013, on the Barbarus Project.

He is the author of the books

Nebrass is graduated with a M.Sc Degree in Information Systems Security and a Bachelor's Degree in Management & Computing sciences from the Higher Institute of Management of Tunis, Tunisia.

Over the past 7 years, he has been working on Java SE/EE projects, in many sectors, including Business Management, Petroleum, Finance & Banking, Medical & healthcare, and Defence & Space. He has developed applications using many frameworks and Java-related technologies, such as native Java EE APIs and 3rd-party frameworks & tools (Spring, Hibernate, Primefaces, JBoss Forge). He has been managing and using infrastructure and programming tools such as DBMS, Java EE servers (Glassfish and JBoss), Quality & Continuous integration tools (Sonar, Jenkins, and Husdon), Docker & Kubernetes & Openshift..

Packages

The Book
  • English

  • PDF

  • EPUB

  • MOBI

  • APP

$29.99
Minimum price
$34.99
Suggested price
The Book + 1 Hour Training

This package contains the book with a one hour of live assistance & training using Skype or Zoom or any video chat solution you choose.

  • English

  • PDF

  • EPUB

  • MOBI

  • APP

$289.99
Minimum price
$299.99
Suggested price

Table of Contents

  •  
    • Acknowledgements
    • Preface
      • What this book covers
  • Part One: The Monolithics Era
    • Chapter 1: Introduction to the Monolithic architecture
      • Introduction to an actual situation
      • Presenting the context
      • How to solve these issues ?
    • Chapter 2: Coding the Monolithic application
      • Presenting our domain
        • Use Case Diagram
        • Class Diagram
        • Sequence Diagram
      • Coding the application
        • Presenting the technology stack
          • Java 8
          • Maven
          • Spring Boot
          • NetBeans IDE
        • Implementing the Boutique
          • 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
            • Maven Dependencies
            • Java Configuration
            • Hello World Swagger !
    • Chapter 3 : Upgrading the Monolithic application
      • Refactoring the database
    • Chapter 4: Building & Deploying the Monolithic application
      • Building the monolith
        • Which package type: WAR vs JAR
        • Build a JAR
        • Build WAR if you
          • Step 1: Adding the Servlet Initializer Class
          • Step 2: Exclude the embedded container from the WAR
          • Step 3: Change the package type to war in pom.xml
          • Step 4: Package your application
      • Deploying the monolith
        • Deploying the JAR
        • Deploying the WAR
  • Part Two: The Microservices Era
    • Chapter 5: Microservices Architecture Pattern
      • The Monolithic Architecture
        • What is a Monolithic Architecture ?
      • Microservices Architecture
        • What is a Microservices Architecture ?
        • What is really a Microservice?
      • Making the Switch
    • Chapter 6: Splitting the Monolith: Bombarding the domain
      • What is Domain-Driven Design ?
        • Context
        • Domain
        • Model
        • Ubiquitous Language
        • Strategic Design
          • Bounded context
      • Bombarding La Boutique
        • Codebase
      • Dependencies and Commons
      • Entities
        • Example: Breaking Foreign Key Relationships
      • Refactoring Databases
        • Staging the Break
      • Transactional Boundaries
        • Try Again Later
        • Abort the Entire Operation
        • Distributed Transactions
        • So What to Do?
      • Summary
    • Chapter 7: Applying DDD to the code
      • Introduction
      • Applying Bounded Contexts to Java Packages
        • The birth of the commons package
        • The birth of the configuration package
      • Locating & breaking the BC Relationships
        • Locating the BC Relationships
        • Breaking the BC Relationships
    • Chapter 8: Meeting the microservices concerns and patterns
      • Introduction
      • Cloud Patterns
        • Service discovery and registration
        • Externalized configuration
        • Circuit Breaker
        • Database per service
        • API gateway
        • CQRS
        • Event sourcing
        • Log aggregation
        • Distributed tracing
        • Audit logging
        • Application metrics
        • Health check API
        • Security between services: Access Token
      • What’s next?
    • Chapter 9: Implementing the patterns
      • Introduction
      • Externalized configuration
        • Step 1: Generating the Config Server project skull
        • Step 2: Defining the properties of the Config Server
        • Step 3: Creating a centralized configuration
        • Step 4: Enabling the Config Server engine
        • Step 5: Run it !
        • Step 6: Spring Cloud Config Client
      • Service Discovery and Registration
        • Step 1: Generating the Eureka Server project skull
        • Step 2: Defining the properties of the Eureka Server
        • Step 3: Creating the main configuration of the Eureka Server
        • Step 4: Enabling the Eureka Server engine
        • Step 5: Update the global application.yml of the Config Server
        • Step 6: Run it !
        • Step 7: Client Side Load Balancer with Ribbon
      • Distributed tracing
        • Step 1: Getting the Zipkin Server
        • Step 2: Listing the dependencies to add to our microservices
          • Sleuth
          • Zipkin Client
      • Health check API
      • Circuit Breaker
        • Step 1: Add the Maven dependency to your project
        • Step 2: Enable the circuit beaker
        • Step 3: Apply timeout and fallback method
        • Step 4: Enable the Hystrix Stream in the Actuator Endpoint
        • Step 5: Monitoring Circuit Breakers using Hystrix Dashboard
      • API Gateway
        • Step 1: Generating the API Gateway project skull
        • Step 2: Enable the Zuul Capabilities
        • Step 3: Defining the route rules
        • Step 4: Enabling API specification on gateway using Swagger2
        • Step 5: Run it!
      • Log aggregation and analysis
        • Step 1: Installing Elasticsearch
        • Step 2: Installing Kibana
        • Step 3: Installing & Configuring Logstash
          • Installing Logstash
          • Configuring Logstash
          • Run it !
        • Step 4: Enabling the Logback features
          • Adding Logback libraries to our microservices
          • Adding Logback configuration file to our microservices
        • Step 5: Adding the Logstash properties to the Config Server
        • Step 6: Attending the Kibana party
      • Conclusion
    • Chapter 10: Building the standalone microservices
      • Introduction
      • Global Architecture Big Picture
      • Implementing the µServices
        • Before starting
          • Step 1: Generating the Commons project skull
          • Step 2: Moving Code from our monolith
          • Step 3: Moving Code from our monolith
          • Step 4: Building the project
        • The Product Service
          • Step 1: Generating the Product Service project skull
          • Step 2: Swagger 2
          • Step 3: Application Configuration
          • Step 4: Logback
          • Step 5: Activating the Circuit Beaker capability
          • Step 6: Moving Code from our monolith
        • The Order Service
          • Step 1: Generating the Order Service project skull
          • Step 2: Swagger 2
          • Step 3: Application Configuration
          • Step 4: Logback
          • Step 5: Activating the Circuit Beaker capability
          • Step 6: Moving Code from our monolith
        • The Customer Service
          • Step 1: Generating the Customer Service project skull
          • Step 2: Swagger 2
          • Step 3: Application Configuration
          • Step 4: Logback
          • Step 5: Activating the Circuit Beaker capability
          • Step 6: Moving Code from our monolith
      • Conclusion
  • Part Three: Containers & Cloud Era
    • Chapter 11. Getting started with Docker
      • Introduction to containerization
      • Introducing Docker
        • What is Docker ?
        • Images and containers
      • Installation and first hands-on
        • Installation
        • Run your first container
      • Docker Architecture
        • The Docker daemon
        • The Docker client
        • Docker registries
        • Docker objects
          • Images
          • Containers
        • Docker Machine
        • Why should I use it?
          • Using Docker on older machines
          • Provision remote Docker instances
      • Diving into Docker Containers
        • Introduction
        • Your new development environment
        • Define a container with Dockerfile
          • Create sample application
            • Run the app
            • Share your image
          • Log in with your Docker ID
            • Automating the Docker image build
      • Meeting the Docker Services
        • Your first docker-compose.yml file
        • Run your new load-balanced app
        • Scale the app
        • Remove the app and the swarm
      • Containerizing our microservices
    • Chapter 12. Getting started with Kubernetes
      • What is Kubernetes ?
        • Kubernetes Architecture
        • Kubernetes Core Concepts
          • Kubectl
          • Cluster
          • Namespace
          • Label
          • Annotation
          • Selector
          • Pod
          • ReplicationController
          • ReplicaSet
          • Deployment
          • StatefulSet
          • DaemonSet
          • Service
          • Ingress
          • Volume
          • PersistentVolume
          • PersistentVolumeClaim
          • StorageClass
          • Job
          • CronJob
          • ConfigMap
          • Secret
      • Run Kubernetes locally
    • Chapter 13: The Kubernetes style
      • Discovering the Kubernetes style
        • Create the ConfigMap
        • Create the Secret
        • Deploy PostgreSQL to Kubernetes
        • What is Spring Cloud Kubernetes
        • Deploy it to Kubernetes
        • It works ! Hakuna Matata !
      • Revisiting our Cloud Patterns after meeting Kubernetes
        • Service Discovery and Registration
          • Engaging the Kubernetes-enabled Discovery library
            • Step 1: Remove the Eureka Client dependency
            • Step 2: Add the Kubernetes-enabled Discovery library
            • Step 3: Defining the Kubernetes Service name:
        • Load Balancing
          • Server Side Load Balancing
          • Client Side Load Balancing
        • Externalized Configuration
          • Replacing the Config Server by ConfigMaps
            • Step 1: Removing the Spring Cloud Config footprints
            • Step 2: Adding the Maven Dependencies
            • Step 3: Creating ConfigMaps based on the Application properties files
            • Step 4: Authorizing the ServiceAccount access to ConfigMaps
            • Step 5: Boosting Spring Cloud Kubernetes Config
        • Log aggregation
          • Step 1: Prepare the Minikube
          • Step 2: Install EFK using Helm
            • Step 2.1: Prepare Helm
            • Step 2.2: Add the Chart repository
          • Step 3: Installing the Elasticsearch Operator
          • Step 4: Installing the EFK Stack using Helm
          • Step 5: Remove the broadcasting appenders
        • Health check API
        • API Gateway
          • Step 1: Delete the old ApiGateway microservice
          • Step 2: Create the ApiGateway Ingress
        • Distributed Tracing
          • Step 1: Deploy Zipkin to Kubernetes
          • Step 2: Forward Sleth traces to Zipkin
    • Chapter 14: Getting started with OpenShift
      • Introduction
      • What is really OpenShift ?
        • Run OpenShift locally
        • Free OpenShift cluster
      • What is the difference between OpenShift & Kubernetes
        • The OpenShift Web Console
        • Integrated Container Registry & ImageStreams
        • Native CI/CD factory
        • Logging and monitoring
        • Version Control Integration
        • Security
      • What is changing in OpenShift?
        • Common Kubernetes and OpenShift resources
        • OpenShift specific resources
    • Chapter 15: The Openshift style
  • Part four: Conclusions
    • Chapter 16: Conclusions
  • Part five: Bonus Chapters
    • Bonus 1: Istio

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub