How to provision datasource feature packs in EAP 8 image

Solution Verified - Updated

Environment

Red Hat JBoss Enterprise Application Platform (EAP) 8

Issue

  • How to provision datasource feature packs in EAP 8
  • How to provision datasource feature packs in EAP 8

Resolution

The *-driver adds the JDBC driver into a module. The *-datasource layer adds the JDBC driver and the datasource in the datasources subsystem.
For provisioning in Galleon, one needs to select the respective deployment layers one would like to deploy and then set the properties, which is done via environment variables, in case of deployment in EAP 8.
EAP 8 relies on Helm Charts for the OCP 4, so the helm chart should contain the environment variables needed for deployment and building.

DataSourceLayer/DriverExample Galleon
Content from github.com is not included.PostgreSQLpostgresql-driver, postgresql-datasourceexport POSTGRESQL_DRIVER_VERSION=42.6.0.redhat-00001
Content from github.com is not included.Microsoft SQL Servermssqlserver-datasource, mssqlserver-driverexport MSSQLSERVER_DRIVER_VERSION=12.6.1.jre11
Content from github.com is not included.Oracle SQLoracle-datasource, oracle-driverORACLE_DRIVER_VERSION=23.3.0.23.09

postgres

Layers

  • postgresql-driver
  • postgresql-datasource

Example

export POSTGRESQL_DRIVER_VERSION=42.6.0.redhat-00001
./bin/jboss-eap-installation-manager.sh feature-pack add --fpl=org.jboss.eap:eap-datasources-galleon-pack --layers=postgresql-driver

MS SQL

Layers

  • mssqlserver-datasource
  • mssqlserver-driver

Example

Example showing specifying another maven repository to look for the driver

export MSSQLSERVER_DRIVER_VERSION=12.6.1.jre11
./bin/jboss-eap-installation-manager.sh feature-pack add --fpl=org.jboss.eap:eap-datasources-galleon-pack --layers=mssqlserver-driver --repositories=central::https://repo1.maven.org/maven2/,mrrc::https://maven.repository.redhat.com/ga/

Oracle

Layers

  • oracle-datasource
  • oracle-driver

Example

Example showing specifying another maven repository to look for the driver

export ORACLE_DRIVER_VERSION=23.3.0.23.09
./bin/jboss-eap-installation-manager.sh feature-pack add --fpl=org.jboss.eap:eap-datasources-galleon-pack --layers=oracle-driver --repositories=central::https://repo1.maven.org/maven2/,mrrc::https://maven.repository.redhat.com/ga/

Root Cause

Different than EAP 7, which relies on template deployment for calling Galleon, EAP 8 relies on a Helm chart, where the values are passed via a value file. For more details on EAP 7 see How to configure datasource settings in EAP 7 for OpenShift.

Diagnostic Steps

For Galleon debug use: ENV SCRIPT_DEBUG true and ENV GALLEON_MAVEN_ARGS="-X -e -Dverbose", as detailed on the solution Interpreting Galleon Maven debug build logs:

[1/2] STEP 2/13: ENV GALLEON_PROVISION_FEATURE_PACKS org.jboss.eap:wildfly-ee-galleon-pack,org.jboss.eap.cloud:eap-cloud-galleon-pack,org.jboss.eap:eap-datasources-galleon-pack:8.0.0.Final-redhat-00023
--> Using cache cfae78958e731fa082c26037c7848c19d47315609a54585d6b23c413baeacb04
--> cfae78958e73
[1/2] STEP 3/13: ENV GALLEON_PROVISION_LAYERS cloud-default-config,datasources-web-server,mssqlserver-datasource,mssqlserver-driver
--> Using cache 1d42cba7cf2935972aedf486f06f62065506c1903e603f641fb2f493ce2d9bc3
--> 1d42cba7cf29
[1/2] STEP 4/13: ENV GALLEON_PROVISION_CHANNELS org.jboss.eap.channels:eap-8.0
--> Using cache 5f72b151d535dd147e8c758cacdd4e09760a7b430c6f9986992eee0baef795da
--> 5f72b151d535
[1/2] STEP 5/13: ENV MSSQLSERVER_DRIVER_VERSION=12.8.1.jre11-redhat-00001
--> Using cache 7855752e3184053dda5ac136c31c1dd0cb15b3253f326cf2dc5a68a69c99e7f1
--> 7855752e3184
[1/2] STEP 6/13: ENV MSSQLSERVER_DATABASE=mydb
--> Using cache 3fe34fed187d168f3c63862f13838931a921c96c6588adc603de091940ca670a
--> 3fe34fed187d
[1/2] STEP 7/13: ENV MSSQLSERVER_USER=myuser
--> Using cache 6008c3143f7ef3a48734c47621480d785329ecff34dcea257005de2d0ead9ffb
--> 6008c3143f7e
[1/2] STEP 8/13: ENV MSSQLSERVER_PASSWORD=mypassword
--> Using cache 049c0cf849e9602dfa37388a3df2d4512e0691f6b9910301b9c2e8d0bc3a03f2
--> 049c0cf849e9
[1/2] STEP 9/13: ENV MSSQLSERVER_JNDI=java:/jdbc/MSSQLDS
--> Using cache b0da7c1ff82e1b1941aab13c5e2c076e2c2dd6bd39867616f9dea61d853c093f
--> b0da7c1ff82e
[1/2] STEP 10/13: ENV MSSQLSERVER_HOST=mssql
--> Using cache 17c8c4287ce55783485db92e4244369007d35733823ff54c149409731da6c06a
--> 17c8c4287ce5
[1/2] STEP 11/13: ENV MSSQLSERVER_PORT=1433
--> Using cache 31a1cf0e65c08818aa7a9544023b83f12dcd1d679f865c4a27aa93cbf1494191
--> 31a1cf0e65c0
[1/2] STEP 12/13: ENV SCRIPT_DEBUG true 
Components
Category

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.