JBoss EAP S2I build template options

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 8.x
    • 7.x

Issue

What are JBoss EAP S2I build template options?
What are JBoss EAP S2I build config options?
What are JBoss EAP S2I Galleon config options?

Resolution

Environment variablePurposeExample value
APPLICATION_IMAGEApplication nameany name
EAP_IMAGEEAP imagejboss-eap-xp1-openjdk11-openshift:1.0 \ 2
EAP_RUNTIME_IMAGERuntime imagejboss-eap-xp1-openjdk11-runtime-openshift:1.0
EAP_IMAGESTREAM_NAMESPACEset Image Stream namespace$(oc project -q)
SOURCE_REPOSITORY_URLGithub repo dirhttps://github.com/jboss-developer/jboss-eap-quickstarts.git
SOURCE_REPOSITORY_REFGithub branch or tagxp-1.0.x
CONTEXT_DIRContext directorymicroprofile-config
GALLEON_PROVISION_LAYERSGalleon Layersjaxrs-server,web-clustering,sso
GALLEON_PROVISION_FEATURE_PACKSFeature packsany feature packs
GALLEON_MAVEN_ARGSSet the Maven ArgumentsENV GALLEON_MAVEN_ARGS="-X -e -Dverbose -DcreateChecksum=true"
MAVEN_ARGS/MAVEN_ARGS_APPENDSet Maven settings and Maven arguments for buildMAVEN_ARGS_APPEND value: '-Dcom.redhat.xpaas.repo.jbossorg

Root Cause

As explained the main solution EAP 7 thin image, if one uses provisioning.xml file one cannot set any GALLEON_PROVISION_* environment variables, because the environment variables take precedence and the provisioning.xml will be ignored.
The options are either or:

  • Set any Galleon-related environment
  • Or set the file galleon/provisioning.xmlto provision the server

S2I artifacts can include several artifacts, for additional generic deployments that provide the necessary configuration infrastructure required for the deployment, one can use CUSTOM_INSTALL_DIRECTORIES variable, as detailed on JBoss EAP 7.4 Configuring EAP Openshift Image - S2I Artifacts.

In OCP, via S2I build via templates, as explained on Customizing EAP 7 Template buildconfig deployment in OCP 4 and Troubleshooting EAP 7 local BuildConfig in OCP 4 there will be two build configs: eap-app and eap-app-build-artifacts. The build eap-app-build-artifacts will provision EAP and use the GALLEON_PROVISION_* environment variables to build the EAP.
When Galleon is used the following logs show on the build pod:

[INFO] -------------< org.jboss.galleon.s2i:layers-provisioning >--------------
[INFO] Building Provision a set of Galleon layers from s2i feature-pack 1.0.0.Final
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- galleon-maven-plugin:4.2.9.Final:provision (wildfly-provisioning-layers jaxrs-server,postgresql-driver,postgresql-datasource) @ layers-provisioning ---
[INFO] Downloading from central: https://repo1.maven.org/maven2/org/jboss/eap/eap-datasources-galleon-pack/7.4.0.GA-redhat-00003/eap-datasources-galleon-pack-7.4.0.GA-redhat-00003.zip
[INFO] Downloading from redhat-ga-repository: https://maven.repository.redhat.com/ga/org/jboss/eap/eap-datasources-galleon-pack/7.4.0.GA-redhat-00003/eap-datasources-galleon-pack-7.4.0.GA-redhat-00003.zip
[INFO] Downloaded from redhat-ga-repository: https://maven.repository.redhat.com/ga/org/jboss/eap/eap-datasources-galleon-pack/7.4.0.GA-redhat-00003/eap-datasources-galleon-pack-7.4.0.GA-redhat-00003.zip (16 kB at 57 kB/s)
[INFO] Downloading from central: https://repo1.maven.org/maven2/org/postgresql/postgresql/42.2.5/postgresql-42.2.5.jar
[INFO] Downloaded from central: https://repo1.maven.org/maven2/org/postgresql/postgresql/42.2.5/postgresql-42.2.5.jar (826 kB at 5.8 MB/s)

Diagnostic Steps

IssueSolution
Deploy applications with EAP 7 OperatorHow to deploy an application in JBoss EAP 7 in OCP 4
Custom module in EAP 7Creating a custom module in EAP 7's OCP image
Custom configuration in EAP 7What are the options to use a custom runtime EAP configurations
EAP 7 trimming using GalleonAfter installing EAP openshift trimmed with Galleon cannot find openshift-launch.sh
EAP 7 Operator service creationJBoss EAP 7 Operator creates LoadBalancer service
Why EAP image doesn't have jars?JBoss EAP 7 thin client
Usage of provisioning.xml and pom.xml for eap-maven-pluginJBoss EAP 7 Galleon using provisioning.xml
BuildConfig and Galleon settings, such as ENV GALLEON_MAVEN_ARGS and build settings: MAVEN_OPTS and MAVEN_ARGS/MAVEN_ARGS_APPENDUsing Maven parameters on Buildconfig in OCP 4

Galleon layers-provisioning usage will result on the following logs on the build pod:

[INFO] -------------< org.jboss.galleon.s2i:layers-provisioning >--------------
[INFO] Building Provision a set of Galleon layers from s2i feature-pack 1.0.0.Final
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- galleon-maven-plugin:4.2.9.Final:provision (wildfly-provisioning-layers jaxrs-server,postgresql-driver,postgresql-datasource) @ layers-provisioning ---
[INFO] Downloading from central: https://repo1.maven.org/maven2/org/jboss/eap/eap-datasources-galleon-pack/7.4.0.GA-redhat-00003/eap-datasources-galleon-pack-7.4.0.GA-redhat-00003.zip
[INFO] Downloading from redhat-ga-repository: https://maven.repository.redhat.com/ga/org/jboss/eap/eap-datasources-galleon-pack/7.4.0.GA-redhat-00003/eap-datasources-galleon-pack-7.4.0.GA-redhat-00003.zip
[INFO] Downloaded from redhat-ga-repository: https://maven.repository.redhat.com/ga/org/jboss/eap/eap-datasources-galleon-pack/7.4.0.GA-redhat-00003/eap-datasources-galleon-pack-7.4.0.GA-redhat-00003.zip (16 kB at 57 kB/s)
[INFO] Downloading from central: https://repo1.maven.org/maven2/org/postgresql/postgresql/42.2.5/postgresql-42.2.5.jar
[INFO] Downloaded from central: https://repo1.maven.org/maven2/org/postgresql/postgresql/42.2.5/postgresql-42.2.5.jar (826 kB at 5.8 MB/s)
Components
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.