Quarkus Run Modes Understanding the JVM and Native Run Modes JVM A Quarkus application running as bytecode on a JVM Native A Quarkus application as a native binary
Building a Quarkus Image in OpenShift A High-Level Abstraction of OCP BuildConfigs Git Repo ImageStream BuildConfig OpenShift Project 1 2 3 1 Clone the application from Git 2 Build the application in OCP 3 Publish the image to an ImageStream
BuildConfigs Can Be Challenging to Create Builds Require Both OpenShift and Quarkus Expertise ▸ An understanding of Source and Docker strategies is key ・ Which s2i builder should you use? ・ How should your Dockerfile be written? ▸ Need to know how to configure a BuildConfig ▸ JVM and Native modes require different configurations
Building Is Only the First Part...Now You Need to Deploy Here’s a Few Resources to Consider Each resource has its own configuration. ▸ OpenShift expertise is required to understand the available options. ▸ Quarkus expertise is required to understand the best practices behind deploying a Quarkus app.
Helm at a Glance ● 2016 - Joined CNCF ● 2020 - Graduated status Active development community Top level CNCF Project ● 13,000+ contributors ● 1,700+ contributing companies ● 9,500+ code commits Project Overview ● https://helm.sh/ ● https://github.com/helm/helm
Installing Charts From Helm Chart Repositories Using the Helm CLI Users can easily install Helm charts by first adding a Helm chart repository using the Helm CLI. $ helm repo add redhat-charts https://redhat-developer.github.io/re dhat-helm-charts/index.yaml Then, users can install charts under the chart repository they added. $ helm install quarkus-app redhat-charts/quarkus --values values.yaml 1 2
Installing Charts From Helm Chart Repositories Using the OpenShift UI The Red Hat Helm Chart Repository is already configured OOTB. Optionally, admins can add additional repos by creating a HelmChartRepository resource $ cat <apiVersion: helm.openshift.io/v1beta1 kind: HelmChartRepository metadata: name: redhat-charts spec: name: redhat-charts connectionConfig: url: https://redhat-developer.github.io/re dhat-helm-charts/index.yaml EOF Users can install charts using the OpenShift UI
The Quarkus Helm Chart + ▸ A Red Hat Runtimes initiative ▸ Released to the Red Hat Helm Chart Repository as Alpha ・ https://github.com/redhat-developer/re dhat-helm-charts
JVM and Native Builds JVM Creates an s2i build, using the java:11 s2i builder by default build: mode: jvm . . . Build mode is determined by the build.mode value Native Creates a Docker build, using a default inline Dockerfile If build.mode is jvm (default) If build.mode is native
Externalized Application Properties deploy: applicationProperties: enabled: true mountPath: /deployments/config/ properties: |- quarkus.http.port=8081 greeting.message=Hello! Application properties can be externalized by leveraging the deploy.applicationProperties values Creates A ConfigMap with the specified application properties A volume mount at /deployments/config/
ConfigChange and ImageChange Triggers $ helm install quarkus-app redhat-charts/quarkus --values values.yaml Install the Helm chart Build automatically starts Pods automatically roll out Build is finished
The End Result BuildConfig ImageStream Optional build: uri: https:/my-repo.com/quarkus-app And this can all be configured with a single value, at a minimum!
Example Quarkus Project Structure .helm/ values.yaml src/ mvnw pom.xml # Other project files Used to configure the Quarkus Helm chart Very useful for CI/CD tooling and creating repeatable builds and deployments Alternatively, these values can be configured in the UI for short-term use cases
linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHat 26 Red Hat is the world’s leading provider of enterprise open source software solutions. Award-winning support, training, and consulting services make Red Hat a trusted adviser to the Fortune 500. Thank you