Deploy custom configuration files, modules, and source deployments on JBoss EAP for Openshift
Environment
- Red Hat OpenShift Container Platform (Openshift)
- 4
- 3
- Red Hat JBoss Enterprise Application Platform (JBoss EAP)
- 8
- 7
- Custom modules
- Source-based WAR deployments
Issue
- Deploy modules
- Deploy
wardeployments that aren't This page is not included, but the link has been rewritten to point to the nearest parent document.binary deployments - Replace configuration files
Resolution
-
Create a source repository for the deployment
-
Place
configuration/standalone-openshift.xmlwithin theconfigurationdirectory. Anything in that directory will be copied toJBOSS_ROOT/standalone/configuration. -
Place custom modules under the
modulesdirectory within your source repository. The modules directory will be recursively copied toJBOSS_ROOT/modulesso they need to have the correct directory structure.Note: some modules like mysql modules are already included in the base image and there is a template to support the configuration, Content from github.com is not included.eap6-mysql-sti.json
$ find /opt/eap/modules/ |grep mysql ./system/layers/openshift/com/mysql ./system/layers/openshift/com/mysql/main ./system/layers/openshift/com/mysql/main/mysql-connector-java.jar ./system/layers/openshift/com/mysql/main/module.xml $ find /opt/eap/modules/ |grep postgres ./system/layers/openshift/org/postgresql ./system/layers/openshift/org/postgresql/main ./system/layers/openshift/org/postgresql/main/postgresql-jdbc.jar ./system/layers/openshift/org/postgresql/main/module.xmlNOTE: Here is a list of Included JBoss Modules
-
Add any deployments under the
deploymentsdirectory in your source repository. If you want to build the deployment, you can put apom.xmlfile at the root of the source. Openshift will use the Maven goalpackage.
Root Cause
Openshift deployments use the the S2I process (Source to Image) to generate an image from a base image and source repository. For more information and details, see How the JBoss EAP for OpenShift S2I Process Works
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.