Slide 1

Slide 1 text

@kevindubois Java, Life is Short! Kevin Dubois, Principal Developer Advocate, Red Hat @kevindubois

Slide 2

Slide 2 text

@kevindubois Kevin Dubois ★ Principal Developer Advocate at Red Hat ★ Based in Belgium 󰎐 ★ 🗣 Speak English, Dutch, French, Italian ★ Open Source Contributor (Quarkus, Camel, Knative, ..) @[email protected] youtube.com/@thekevindubois linkedin.com/in/kevindubois github.com/kdubois @kevindubois.com

Slide 3

Slide 3 text

@kevindubois https://openjdk.org/projects/amber/ + https://openjdk.org/jeps/445

Slide 4

Slide 4 text

@kevindubois $ javac HelloWorld.java * $ java HelloWorld Hello World * https://openjdk.org/jeps/330

Slide 5

Slide 5 text

@kevindubois $ jbang init Main.java $ jbang Main.java https://jbang.dev

Slide 6

Slide 6 text

@kevindubois $ jbang init --template=cli hello.java https://jbang.dev

Slide 7

Slide 7 text

@kevindubois GPT jbang --preview init cat.java “Print a cat” jbang --preview init cli.java "create a currency converter from Euro to Dollars" https://jbang.dev

Slide 8

Slide 8 text

@kevindubois Managing multiple (Java) versions Legacy project running Java 8 “Newer projects”: Java 11 “State of the art”: Java 17 “YOLO”: Java 21 or *gasp* 22/23ea Vendor supported: Java 21 Temurin GraalVM: 21

Slide 9

Slide 9 text

@kevindubois https://sdkman.io $ sdk list java $ sdk install java 21.0.3-tem $ sdk install java 23.ea.23-open $ sdk use java 21.0.3-tem …. $ sdk install maven $ sdk install jbang $ sdk upgrade jbang $ sdk install quarkus

Slide 10

Slide 10 text

@kevindubois Code. Compile. Deploy. Run & Test. Repeat.

Slide 11

Slide 11 text

@kevindubois https://quarkus.io/get-started/

Slide 12

Slide 12 text

@kevindubois https://testcontainers.org

Slide 13

Slide 13 text

@kevindubois Dev Services https://quarkus.io/guides/dev-services ❤

Slide 14

Slide 14 text

@kevindubois Developer Flow Outer loop Inner loop Pull/Merge Request Production Build / Package Code Push Debug Code Review Build Deploy Security Tests Compliance Inner loop Outer loop Developer Test

Slide 15

Slide 15 text

@kevindubois Containers! Cloud! Kubernetes! Serverless!

Slide 16

Slide 16 text

@kevindubois

Slide 17

Slide 17 text

@kevindubois $ quarkus image build https://www.kevindubois.com/2023/04/25/build-java-container-images-in-seconds-using-quarkus-cli/ podman-desktop.io

Slide 18

Slide 18 text

@kevindubois Run Containers (and AI Models!) Locally with Ease Podman Desktop https://youtu.be/Zogg2c1z1P0

Slide 19

Slide 19 text

@kevindubois https://developers.redhat.com/developer-sandbox

Slide 20

Slide 20 text

@kevindubois apiVersion: v1 kind: Service metadata: name: code-with-quarkus spec: ports: - name: https port: 443 protocol: TCP targetPort: 8443 - name: http port: 80 protocol: TCP targetPort: 8080 selector: app.kubernetes.io/name: code-with-quarkus app.kubernetes.io/version: 1.0.0-SNAPSHOT type: ClusterIP apiVersion: apps/v1 kind: Deployment metadata: name: code-with-quarkus spec: replicas: 1 selector: matchLabels: app.kubernetes.io/version: 1.0.0-SNAPSHOT app.kubernetes.io/name: code-with-quarkus template: spec: containers: - env: - name: KUBERNETES_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace image: quay.io/kevindubois/code-with-quarkus:1.0.0 imagePullPolicy: Always name: code-with-quarkus ports: - containerPort: 8080 name: http protocol: TCP - containerPort: 8443 name: https protocol: TCP serviceAccountName: code-with-quarkus

Slide 21

Slide 21 text

@kevindubois “Regular Kubernetes” $ quarkus extension add kubernetes $ quarkus deploy Serverless with Knative $ quarkus deploy knative or functions: quarkus ext add funky || kn func create

Slide 22

Slide 22 text

@kevindubois https://microprofile.io/

Slide 23

Slide 23 text

@kevindubois Release aftercare

Slide 24

Slide 24 text

@kevindubois Observability

Slide 25

Slide 25 text

@kevindubois https://opentelemetry.io/ https://github.com/kdubois/quarkus-observability

Slide 26

Slide 26 text

@kevindubois Metrics https://micrometer.io/ https://github.com/kdubois/quarkus-observability

Slide 27

Slide 27 text

@kevindubois Releasing Distributed Apps

Slide 28

Slide 28 text

@kevindubois JReleaser https://jreleaser.org https://github.com/kdubois/quarkus-jreleaser

Slide 29

Slide 29 text

@kevindubois $ jreleaser init $ jreleaser assemble $ jreleaser full-release https://jreleaser.org https://github.com/kdubois/quarkus-jreleaser mvn -Pnative,dist package mvn -Prelease jreleaser:full-release

Slide 30

Slide 30 text

@kevindubois

Slide 31

Slide 31 text

@kevindubois tomorrow at 10am: Hands-on Lab: Build AI-powered applications with Java (and Quarkus)

Slide 32

Slide 32 text

@kevindubois Free Developer e-Books! https://developers.redhat.com/eventtutorials

Slide 33

Slide 33 text

@kevindubois Start exploring in the OpenShift Sandbox. Learn containers, Kubernetes, and OpenShift in your browser. developers.redhat.com/developer-sandbox Try Red Hat's products and technologies without setup or configuration.

Slide 34

Slide 34 text

@kevindubois Thank you! @[email protected] youtube.com/@thekevindubois linkedin.com/in/kevindubois github.com/kdubois @kevindubois.com