Chapter 4. Migrating to JBoss EAP for OpenShift JDK 11 Image

4.1. Prepare OpenShift for Application Deployment using JDK 11 Image

Preparing OpenShift for application deployment using the JDK 11 image stream follows the same procedure as described in Prepare OpenShift for Application Deployment.

4.2. Import JDK 11 Image

Use the following command to import the JBoss EAP for OpenShift JDK 11 image stream and templates into your OpenShift project’s namespace:

for resource in \
  eap72-openjdk11-image-stream.json \
  eap72-openjdk11-amq-persistent-s2i.json \
  eap72-openjdk11-amq-s2i.json \
  eap72-openjdk11-basic-s2i.json \
  eap72-openjdk11-https-s2i.json \
  eap72-openjdk11-sso-s2i.json \
  eap72-openjdk11-starter-s2i.json \
  eap72-openjdk11-third-party-db-s2i.json \
  eap72-openjdk11-tx-recovery-s2i.json
do
 oc replace --force -f \
https://raw.githubusercontent.com/jboss-container-images/jboss-eap-7-openshift-image/eap72-openjdk11-ubi8/templates/${resource}
done
Important

The following internal datasources and drivers are not provided with the JBoss EAP for OpenShift JDK 11 image:

  • MySQL
  • PostgreSQL
  • MongoDB

It is recommended that you use JDBC drivers obtained from your database vendor for your JBoss EAP applications.

For more information about installing drivers, see Modules, Drivers, and Generic Deployments.

4.3. Deploy a JBoss EAP S2I Application to OpenShift using JDK 11 Image

Deploying a JBoss EAP S2I application to OpenShift follows the same procedures as described in Deploy a JBoss EAP Source-to-Image (S2I) Application to OpenShift.

The JDK 11 stream uses the eap72-openjdk11-basic-s2i for S2I builds, instead of the eap72-basic-s2i template used in JDK 8.

To deploy the kitchensink quickstart, use the following command to use the eap72-openjdk11-basic-s2i template with the kitchensink source code on GitHub:

oc new-app --template=eap72-openjdk11-basic-s2i \
 -p IMAGE_STREAM_NAMESPACE=eap-demo \
 -p SOURCE_REPOSITORY_URL=https://github.com/jboss-developer/jboss-eap-quickstarts.git \
 -p SOURCE_REPOSITORY_REF=openshift \
 -p CONTEXT_DIR=kitchensink \

The eap72-openjdk11-basic-s2i template in the eap-demo project was created in Prepare OpenShift for Application Deployment.

4.4. Configure JBoss EAP for OpenShift Using Environment Variables for JDK 11 Image

Configuring JBoss EAP for OpenShift using environment variables for JDK 11 follows the same procedures as described in Configuring JBoss EAP for OpenShift Using Environment Variables.

The JDK 11 image stream uses the eap72-openjdk11-basic-s2i template, instead of the eap72-basic-s2i template used in JDK 8.

To set the JBoss EAP instance’s management username and password using environment variables, use the following command when creating your OpenShift application.

oc new-app --template=eap72-openjdk11-basic-s2i \
-p IMAGE_STREAM_NAMESPACE=eap-demo \
-p SOURCE_REPOSITORY_URL=https://github.com/jboss-developer/jboss-eap-quickstarts \
-p SOURCE_REPOSITORY_REF=openshift \
-p CONTEXT_DIR=kitchensink \
-e ADMIN_USERNAME=myspecialuser \
-e ADMIN_PASSWORD=myspecialp@ssw0rd