Slide 1

Slide 1 text

Thomas Vitale Cloud Native Aarhus April 18th, 2024 Cloud Native Java With Spring Boot @vitalethomas

Slide 2

Slide 2 text

Systematic • Software Engineer • CNCF Ambassador, Oracle ACE Pro, Testcontainers Community Champion • Author of “Cloud Native Spring in Action” (Manning). • OSS contributor (Java, Spring, Cloud Native Technologies) Thomas Vitale thomasvitale.com @vitalethomas

Slide 3

Slide 3 text

@vitalethomas dev.java

Slide 4

Slide 4 text

From Traditional to Cloud Native Application Server, Embedded Server Runtime (JVM) Middleware (Application Server) Application (WAR/EAR) Runtime (JVM) Application (JAR) @vitalethomas

Slide 5

Slide 5 text

spring.io

Slide 6

Slide 6 text

Moving to Containers Application Server, Embedded Server, Container Runtime (OCI) Application (Container) Runtime (JVM) Middleware (Application Server) Application (WAR/EAR) Runtime (JVM) Application (JAR) @vitalethomas

Slide 7

Slide 7 text

Image pack build Cloud Native Buildpacks From source code to container image @vitalethomas Cloud Native Buildpacks https://buildpacks.io

Slide 8

Slide 8 text

Image pack build gradle bootBuildImage Cloud Native Buildpacks From source code to container image @vitalethomas Cloud Native Buildpacks https://buildpacks.io

Slide 9

Slide 9 text

Spring Boot and Native Executables The bene fi ts of GraalVM Instant Startup Low Resource Usage Instant Peak Performance @vitalethomas Reduced Surface Attack Compact Packaging

Slide 10

Slide 10 text

Spring Boot and Native Executables The downsides of GraalVM Slower Build Additional con fi guration might be needed @vitalethomas

Slide 11

Slide 11 text

Packaging Spring Boot JAR, Native, Container Image JAR OCI Image Gradle bootJar Maven package Gradle bootBuildImage Maven spring-boot:build-image @vitalethomas Native Gradle nativeCompile Maven -Pnative native:compile

Slide 12

Slide 12 text

Testcontainers Dev and Test Services OCI containers Run external dependencies as OCI containers, also at development time Data Layer Tests Ensure environment parity by testing the data layer with the real database Integration Tests Use containers for databases, message queues, and web servers @vitalethomas

Slide 13

Slide 13 text

Spring Observability Production-grade features Spring Boot Actuator ‣Health (liveness and readiness) ‣Management (loggers, con fi guration) ‣Flyway, Thread Dumps, Heap Dumps Micrometer ‣Uni fi ed Observation API ‣Instrumentation for metrics and traces ‣Prometheus, OpenTelemetry @vitalethomas

Slide 14

Slide 14 text

Moving to Kubernetes Application Server, Embedded Server, Container, Kubernetes Runtime (OCI) Middleware (Kubernetes) Application (Container) Runtime (JVM) Middleware (Application Server) Application (WAR/EAR) Runtime (JVM) Application (JAR) Runtime (OCI) Application (Container) @vitalethomas

Slide 15

Slide 15 text

Continuous Development Code, Run, Test, Debug Development Workflow gradle bootRun flask --debug run yarn dev Dev & Test Services @vitalethomas

Slide 16

Slide 16 text

Configuration: Workload API Crossplane Composition @vitalethomas

Slide 17

Slide 17 text

Project Bootstrapping Backstage Software Templates @vitalethomas

Slide 18

Slide 18 text

Configuration: Implementation Crossplane Composition Workload API Serverless Deployment Service Binding Application Conventions @vitalethomas

Slide 19

Slide 19 text

Kubernetes Native Spring Boot Workload con fi guration and management Liveness Probe Con fi gMaps @vitalethomas Readiness Probe Secrets Service Bindings Runtime Reload

Slide 20

Slide 20 text

Generative AI @vitalethomas

Slide 21

Slide 21 text

Resources @vitalethomas

Slide 22

Slide 22 text

Resources Cloud Native Java with Spring Boot • Presentation source code • Spring AI • Spring CLI • LangChain4j Spring Boot • Serverless Java with Spring Boot • Securing the Supply Chain for Your Java Applications • Building AI-Ready Platforms - Symphony for Developer and Platform Engineer @vitalethomas

Slide 23

Slide 23 text

Thomas Vitale Cloud Native Aarhus April 18th, 2024 Cloud Native Java With Spring Boot @vitalethomas