-
Language:
English
-
Language:
English
Chapter 4. Migrating to JBoss EAP CD 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 CD for OpenShift JDK 11 image stream and templates into your OpenShift project’s namespace:
for resource in \ eap73-openjdk11-image-stream.json \ eap73-openjdk11-amq-persistent-s2i.json \ eap73-openjdk11-amq-s2i.json \ eap73-openjdk11-basic-s2i.json \ eap73-openjdk11-https-s2i.json \ eap73-openjdk11-sso-s2i.json \ eap73-openjdk11-starter-s2i.json \ eap73-openjdk11-third-party-db-s2i.json \ eap73-openjdk11--tx-recovery-s2i.json do oc replace --force -f \ https://raw.githubusercontent.com/jboss-container-images/jboss-eap-7-openshift-image/eap73-openjdk11-ubi8/templates/${resource} done
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 eap73-openjdk11-basic-s2i
for S2I builds, instead of the eap73-basic-s2i
template used in JDK 8.
To deploy the kitchensink
quickstart, use the following command to use the eap73-openjdk11-basic-s2i
template with the kitchensink
source code on GitHub:
oc new-app --template=eap73-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 eap73-openjdk11-basic-s2i
template in the eap-demo
project was created in Prepare OpenShift for Application Deployment.
4.4. Configure JBoss EAP CD for OpenShift Using Environment Variables for JDK 11 Image
Configuring JBoss EAP CD for OpenShift using environment variables for JDK 11 follows the same procedures as described in Configuring JBoss EAP for OpenShift Using Environment Variables.
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=eap73-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