EAP 8 Galleon legacy vs non-legacy build
Environment
- Red Hat JBoss Enterprise Application Platform
- 8.x
Issue
- EAP 8 Galleon legacy vs non-legacy build
Resolution
User activates legacy s2i workflow by setting GALLEON_PROVISION_FEATURE_PACKS or GALLEON_USE_LOCAL_FILE environment variable.
EAP 8 Galleon legacy vs non-legacy build
Legacy build:
Using a build container with Dockerfile settings GALLEON_PROVISION_FEATURE_PACKS for example, the legacy build will be triggered as below:
+++ GALLEON_GENERIC_LAYERS_DEFINITION=/opt/jboss/container/wildfly/s2i/galleon/provisioning/generic_layers
+++ GALLEON_GENERIC_PROVISIONING_DEFINITION=/opt/jboss/container/wildfly/s2i/galleon/provisioning/generic_provisioning
++ '[' -n org.jboss.eap:wildfly-ee-galleon-pack,org.jboss.eap.cloud:eap-cloud-galleon-pack ']'
++ log_info 'You have activated legacy s2i workflow by setting GALLEON_PROVISION_FEATURE_PACKS or GALLEON_USE_LOCAL_FILE env variable.'
++ local 'message=You have activated legacy s2i workflow by setting GALLEON_PROVISION_FEATURE_PACKS or GALLEON_USE_LOCAL_FILE env variable.'
++ echo -e 'INFO You have activated legacy s2i workflow by setting GALLEON_PROVISION_FEATURE_PACKS or GALLEON_USE_LOCAL_FILE env variable.'
INFO You have activated legacy s2i workflow by setting GALLEON_PROVISION_FEATURE_PACKS or GALLEON_USE_LOCAL_FILE env variable.
++ '[' -z org.jboss.eap.plugins ']'
++ '[' -z eap-maven-plugin ']'
++ '[' -z 1.0.1.Final-redhat-00019 ']'
++ galleon_legacy=true
Example:
# Use EAP 8 Builder image to create a JBoss EAP 8 server with its default configuration
FROM registry.redhat.io/jboss-eap-8/eap8-openjdk17-builder-openshift-rhel8:latest AS builder
ENV GALLEON_PROVISION_FEATURE_PACKS=org.jboss.eap:wildfly-ee-galleon-pack,org.jboss.eap.cloud:eap-cloud-galleon-pack
ENV GALLEON_PROVISION_LAYERS=jaxrs-server,cloud-default-config,-jpa
ENV GALLEON_PROVISION_CHANNELS=org.jboss.eap.channels:eap-8.0
ENV GALLEON_MAVEN_ARGS="-X -e -Dverbose -Dmaven.repo.local=/tmp/artifacts/banana/m2 -Dverbose -gs ../jboss-settings.xml"
#ENV GALLEON_MAVEN_ARGS="-X -e -Dverbose -gs ../apple-setting.xml"
#ENV MAVEN_ARGS_APPEND="-s ../apple-setting.xml"
ENV SCRIPT_DEBUG true
Non-Legacy
Using a build container with Dockerfile/or via Helm charts without settings GALLEON_PROVISION_FEATURE_PACKS for example - the non-legacy framework is used:
++ source /opt/jboss/container/wildfly/s2i/galleon/s2i_galleon
+++ GALLEON_GENERIC_LAYERS_DEFINITION=/opt/jboss/container/wildfly/s2i/galleon/provisioning/generic_layers
+++ GALLEON_GENERIC_PROVISIONING_DEFINITION=/opt/jboss/container/wildfly/s2i/galleon/provisioning/generic_provisioning
++ '[' -n '' ']'
++ '[' -n '' ']'
++ source /opt/jboss/container/wildfly/s2i/s2i-core-hooks
+++ source /opt/jboss/container/util/logging//logging.sh
Example:
build:
uri: https://github.com/FranciscoMeloJr/eap-offline-example
ref: maven-assembly
contextDir: server
env:
- name: MAVEN_OPTS_APPEND
value: '-XX:MetaspaceSize=251m -XX:MaxMetaspaceSize=256m'
- name: SCRIPT_DEBUG
value: 'true'
deploy:
replicas: 1
env:
- name: JAVA_OPTS_APPEND
value: -XX:MetaspaceSize=251m -XX:MaxMetaspaceSize=256m
Root Cause
Legacy S2I uses a set of scripts whereas non-legacy uses another set, the usage of environment variables such as GALLEON_PROVISION_FEATURE_PACKS or GALLEON_USE_LOCAL_FILE trigger the non-legacy build.
The type of build has everything to do with the environment variables for example, where GALLEON_MAVEN_ARGS are only useful if GALLEON_PROVISION_LAYERS are set, otherwise only Maven environment variables.
Diagnostic Steps
- Enable
SCRIPT_DEBUGfortrueto verify the legacy or non-legacy build is being used. - Verify the flag
galleon_legacyto track if legacy is being used. - Note that
GALLEON_PROVISION_FEATURE_PACKScan only be used whenGALLEON_PROVISION_LAYERSis set
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.