Upgrade to Pro — share decks privately, control downloads, hide ads and more …

jPrime - Java, Life is Short!

jPrime - Java, Life is Short!

Kevin Dubois

May 28, 2024
Tweet

More Decks by Kevin Dubois

Other Decks in Programming

Transcript

  1. @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
  2. @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
  3. @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
  4. @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
  5. @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
  6. @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
  7. @kevindubois “Regular Kubernetes” $ quarkus extension add kubernetes $ quarkus

    deploy Serverless with Knative $ quarkus deploy knative or functions: quarkus ext add funky || kn func create
  8. @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
  9. @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.