Cloud Native Spring in action with Spring Boot and Kubernetes

Build and deliver production-grade cloud-native apps with Spring framework and Kubernetes. In Cloud Native Spring in Action you'll learn: Cloud native best practices and design patterns Build and test cloud native apps with Spring Boot and Spring Cloud Handle security, resilience, and scalabili...

Descripción completa

Detalles Bibliográficos
Otros Autores: Vitale, Thomas, author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: Shelter Island, New York : Manning Publications Co. LLC [2023]
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009714830306719
Tabla de Contenidos:
  • Intro
  • Cloud Native Spring in Action
  • Copyright
  • dedication
  • contents
  • front matter
  • foreword
  • preface
  • acknowledgments
  • about this book
  • Who should read this book?
  • How this book is organized: A road map
  • About the code
  • liveBook discussion forum
  • Other online resources
  • about the author
  • about the cover illustration
  • Part 1 Cloud native fundamentals
  • 1 Introduction to cloud native
  • 1.1 What is cloud native?
  • 1.1.1 The Three Ps of Cloud Native
  • 1.2 The cloud and the cloud computing model
  • 1.2.1 Infrastructure as a Service (IaaS)
  • 1.2.2 Container as a Service (CaaS)
  • 1.2.3 Platform as a Service (PaaS)
  • 1.2.4 Function as a Service (FaaS)
  • 1.2.5 Software as a Service (SaaS)
  • 1.3 Properties of cloud native applications
  • 1.3.1 Scalability
  • 1.3.2 Loose coupling
  • 1.3.3 Resilience
  • 1.3.4 Observability
  • 1.3.5 Manageability
  • 1.4 Culture and practices supporting cloud native
  • 1.4.1 Automation
  • 1.4.2 Continuous delivery
  • 1.4.3 DevOps
  • 1.5 Is the cloud your best option?
  • 1.5.1 Speed
  • 1.5.2 Resilience
  • 1.5.3 Scale
  • 1.5.4 Cost
  • 1.6 Cloud native topologies
  • 1.6.1 Containers
  • 1.6.2 Orchestration
  • 1.6.3 Serverless
  • 1.7 Architectures for cloud native applications
  • 1.7.1 From multi-tiered to microservices architectures and beyond
  • 1.7.2 Service-based architecture for cloud native applications
  • Summary
  • 2 Cloud native patterns and technologies
  • 2.1 Cloud native development principles: 12 Factors and beyond
  • 2.1.1 One codebase, one application
  • 2.1.2 API first
  • 2.1.3 Dependency management
  • 2.1.4 Design, build, release, run
  • 2.1.5 Configuration, credentials, and code
  • 2.1.6 Logs
  • 2.1.7 Disposability
  • 2.1.8 Backing services
  • 2.1.9 Environment parity
  • 2.1.10 Administrative processes
  • 2.1.11 Port binding
  • 2.1.12 Stateless processes.
  • 2.1.13 Concurrency
  • 2.1.14 Telemetry
  • 2.1.15 Authentication and authorization
  • 2.2 Building cloud native applications with Spring
  • 2.2.1 Overview of the Spring landscape
  • 2.2.2 Building a Spring Boot application
  • 2.3 Containerizing applications with Docker
  • 2.3.1 Introducing Docker: Images and containers
  • 2.3.2 Running a Spring application as a container
  • 2.4 Managing containers with Kubernetes
  • 2.4.1 Introducing Kubernetes: Deployments, Pods, and Services
  • 2.4.2 Running a Spring application on Kubernetes
  • 2.5 Polar Bookshop: A cloud native application
  • 2.5.1 Understanding the requirements of the system
  • 2.5.2 Exploring patterns and technologies used in the project
  • Summary
  • Part 2 Cloud native development
  • 3 Getting started with cloud native development
  • 3.1 Bootstrapping a cloud native project
  • 3.1.1 One codebase, one application
  • 3.1.2 Dependency management with Gradle and Maven
  • 3.2 Working with embedded servers
  • 3.2.1 Executable JARs and embedded servers
  • 3.2.2 Understanding the thread-per-request model
  • 3.2.3 Configuring the embedded Tomcat
  • 3.3 Building a RESTful application with Spring MVC
  • 3.3.1 REST API first, business logic later
  • 3.3.2 Implementing a REST API with Spring MVC
  • 3.3.3 Data validation and error handling
  • 3.3.4 Evolving APIs for future requirements
  • 3.4 Testing a RESTful application with Spring
  • 3.4.1 Unit tests with JUnit 5
  • 3.4.2 Integration tests with @SpringBootTest
  • 3.4.3 Testing REST controllers with @WebMvcTest
  • 3.4.4 Testing the JSON serialization with @JsonTest
  • 3.5 Deployment pipeline: Build and test
  • 3.5.1 Understanding the commit stage of the deployment pipeline
  • 3.5.2 Implementing the commit stage with GitHub Actions
  • Summary
  • 4 Externalized configuration management
  • 4.1 Configuration in Spring: Properties and profiles.
  • 4.1.1 Properties: Key/value pairs for configuration
  • 4.1.2 Profiles: Feature flags and configuration groups
  • 4.2 Externalized configuration: One build, multiple configurations
  • 4.2.1 Configuring an application through command-line arguments
  • 4.2.2 Configuring an application through JVM system properties
  • 4.2.3 Configuring an application through environment variables
  • 4.3 Centralized configuration management with Spring Cloud Config Server
  • 4.3.1 Using Git to store your configuration data
  • 4.3.2 Setting up a configuration server
  • 4.3.3 Making the configuration server resilient
  • 4.3.4 Understanding the configuration server REST API
  • 4.4 Using a configuration server with Spring Cloud Config Client
  • 4.4.1 Setting up a configuration client
  • 4.4.2 Making the configuration client resilient
  • 4.4.3 Refreshing configuration at runtime
  • Summary
  • 5 Persisting and managing data in the cloud
  • 5.1 Databases for cloud native systems
  • 5.1.1 Data services in the cloud
  • 5.1.2 Running PostgreSQL as a container
  • 5.2 Data persistence with Spring Data JDBC
  • 5.2.1 Connecting to a database with JDBC
  • 5.2.2 Defining persistent entities with Spring Data
  • 5.2.3 Enabling and configuring JDBC auditing
  • 5.2.4 Data repositories with Spring Data
  • 5.3 Testing data persistence with Spring and Testcontainers
  • 5.3.1 Configuring Testcontainers for PostgreSQL
  • 5.3.2 Testing data persistence with @DataJdbcTest and Testcontainers
  • 5.3.3 Integration tests with @SpringBootTest and Testcontainers
  • 5.4 Managing databases in production with Flyway
  • 5.4.1 Understanding Flyway: Version control for your database
  • 5.4.2 Initializing a database schema with Flyway
  • 5.4.3 Evolving a database with Flyway
  • Summary
  • 6 Containerizing Spring Boot
  • 6.1 Working with container images on Docker
  • 6.1.1 Understanding container images.
  • 6.1.2 Creating images with Dockerfiles
  • 6.1.3 Publishing images on GitHub Container Registry
  • 6.2 Packaging Spring Boot applications as container images
  • 6.2.1 Preparing Spring Boot for containerization
  • 6.2.2 Containerizing Spring Boot with Dockerfiles
  • 6.2.3 Building container images for production
  • 6.2.4 Containerizing Spring Boot with Cloud Native Buildpacks
  • 6.3 Managing Spring Boot containers with Docker Compose
  • 6.3.1 Using Docker Compose to manage the container life cycle
  • 6.3.2 Debugging Spring Boot containers
  • 6.4 Deployment pipeline: Package and publish
  • 6.4.1 Building release candidates in the commit stage
  • 6.4.2 Publishing container images with GitHub Actions
  • Summary
  • 7 Kubernetes fundamentals for Spring Boot
  • 7.1 Moving from Docker to Kubernetes
  • 7.1.1 Working with a local Kubernetes cluster
  • 7.1.2 Managing data services in a local cluster
  • 7.2 Kubernetes Deployments for Spring Boot
  • 7.2.1 From containers to Pods
  • 7.2.2 Controlling Pods with Deployments
  • 7.2.3 Creating a Deployment for a Spring Boot application
  • 7.3 Service discovery and load balancing
  • 7.3.1 Understanding service discovery and load balancing
  • 7.3.2 Client-side service discovery and load balancing
  • 7.3.3 Server-side service discovery and load balancing
  • 7.3.4 Exposing Spring Boot applications with Kubernetes Services
  • 7.4 Scalability and disposability
  • 7.4.1 Ensuring disposability: Fast startup
  • 7.4.2 Ensuring disposability: Graceful shutdown
  • 7.4.3 Scaling Spring Boot applications
  • 7.5 Local Kubernetes development with Tilt
  • 7.5.1 Inner development loop with Tilt
  • 7.5.2 Visualizing your Kubernetes workloads with Octant
  • 7.6 Deployment pipeline: Validate Kubernetes manifests
  • 7.6.1 Validating Kubernetes manifests in the commit stage.
  • 7.6.2 Automating Kubernetes manifests validation with GitHub Actions
  • Summary
  • Part 3 Cloud native distributed systems
  • 8 Reactive Spring: Resilience and scalability
  • 8.1 Asynchronous and non-blocking architectures with Reactor and Spring
  • 8.1.1 From thread-per-request to event loop
  • 8.1.2 Project Reactor: Reactive streams with Mono and Flux
  • 8.1.3 Understanding the Spring reactive stack
  • 8.2 Reactive servers with Spring WebFlux and Spring Data R2DBC
  • 8.2.1 Bootstrapping a reactive application with Spring Boot
  • 8.2.2 Persisting data reactively with Spring Data R2DBC
  • 8.2.3 Implementing the business logic with reactive streams
  • 8.2.4 Exposing a REST API with Spring WebFlux
  • 8.3 Reactive clients with Spring WebClient
  • 8.3.1 Service-to-service communication in Spring
  • 8.3.2 Understanding how to exchange data
  • 8.3.3 Implementing REST clients with WebClient
  • 8.4 Resilient applications with Reactive Spring
  • 8.4.1 Timeouts
  • 8.4.2 Retries
  • 8.4.3 Fallbacks and error handling
  • 8.5 Testing reactive applications with Spring, Reactor, and Testcontainers
  • 8.5.1 Testing REST clients with a mock web server
  • 8.5.2 Testing data persistence with @DataR2dbcTest and Testcontainers
  • 8.5.3 Testing REST controllers with @WebFluxTest
  • Summary
  • 9 API gateway and circuit breakers
  • 9.1 Edge servers and Spring Cloud Gateway
  • 9.1.1 Bootstrapping an edge server with Spring Cloud Gateway
  • 9.1.2 Defining routes and predicates
  • 9.1.3 Processing requests and responses through filters
  • 9.2 Fault tolerance with Spring Cloud Circuit Breaker and Resilience4J
  • 9.2.1 Introducing circuit breakers with Spring Cloud Circuit Breaker
  • 9.2.2 Configuring a circuit breaker with Resilience4J
  • 9.2.3 Defining fallback REST APIs with Spring WebFlux
  • 9.2.4 Combining circuit breakers, retries, and time limiters.
  • 9.3 Request rate limiting with Spring Cloud Gateway and Redis.