Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-1475

Openshift Non-s2i deployment with JDK17 Doc

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 2.2.5.GA
    • 2.2.5.GA
    • team/docs
    • None
    • Quarkus Docs Sprint 2, Quarkus Docs Sprint 3, Quarkus Docs Sprint 4, Quarkus Docs Sprint 5

      Deploying a JDK17 Quarkus application into OpenShift requires some manual changes that must be documented.

      Currently, the provided Dockerfile that is located under `src/main/docker` is pointing to JDK11. If we want to deploy a Quarkus JDK17 application into Openshift through Non-s2i we should set `ARG JAVA_PACKAGE=java-17-openjdk-headless` in the dockerfile.

      The rest of the steps remains the same. 

       

      Please let me know If you need anything else in order to understand or reproduce this scenario. 

      See QUARKUS-1382 related issue to know more, and QUARKUS-728 especially "CLARIFICATION OF REQUIREMENTS".

      Please make the following changes to the guide:

      • check that the release version is updated to 2.2.3.Final-redhat-00013
      • Move Chapter 7 up in the TOC so that it follows chapter 2
      • Add a section after Chapter 4 (Deploying Quarkus Java applications to OpenShift):

      = Setting the Java version in the Dockerfile

      You can set the Java verrsion that you want to use in your application in the dockerfiles that correspond to your docker build configurations that are located in the `src/docker` subdirectory of your Maven project

      • Doeckerfile.jvm
      • Dockerfile.native

      The default OpenJDK version in the Dockerfile is set to Java 11.
      You can change the Java version by updating the `ARG JAVA_PACKAGE` variable:

      1. Navigate to the `src/docker` subdirectory
      2. Open the dockerfile for the container type that you want to edit and set the value of the `ARG JAVA_PACKAGE` variable to `
      java-17-openjdk-headless`:

      .src/docker/Dockerfile.jvm

      FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5
      
      ARG JAVA_PACKAGE=java-17-openjdk-headless
      ...
      
      • In Chapter 7, Steps 6 and 7 add alternative command examples that contain the name of the OpenJDK-17 base image

      Step 6:

      oc import-image --confirm ubi8/openjdk-17 --from=registry.access.redhat.com/ubi8/openjdk-17
      

      Step 7:

      oc new-app ubi8/openjdk-17 <git_path> --name=<project_name>
      
      • Change the link caption that follows Step 6 to Red Hat Eclipse OpenJ9 11 Java Applications on RHEL8 (Not directly connected to Java 17, but still necessary, because we are legally required to include the Eclipse part in the name of OpenJ9)

        1. image-2021-12-13-13-43-16-580.png
          100 kB
          Michelle Purcell
        2. image-2021-12-13-13-45-03-916.png
          99 kB
          Michelle Purcell
        3. JDKversion-attribute-in-doc-source.png
          35 kB
          Michelle Purcell

              mpurcell@redhat.com Michelle Purcell
              rhn-support-pagonzal Pablo Gonzalez Granados (Inactive)
              Clement Escoffier, Georgios Andrianakis, Guillaume Smet
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: