Chapter 4. Preparing a Red Hat JBoss BRMS Project Repository for OpenShift
4.1. Stateless Sessions
The Red Hat JBoss BRMS project must be configured to be stateless. OpenShift does not support stateful sessions on KIE servers.
A Red Hat JBoss BRMS project running in Red Hat JBoss BRMS could be configured to be stateless of stateful. A project that has already been deployed on a Decision Server xPaaS image will be configured to be stateless.
Ensuring a Red Hat JBoss BRMS project is stateless:
The Knowledge Session (in the web console, Open Project Editor
4.2. Configuring the Project Remote Repository
The project must be configured to use a remote repository so that Red Hat JBoss BRMS can push changes and OpenShift can pull the repository to build the application.
In the application repository files:
The pom.xml must be configured to use a remote repository so that OpenShift can access it.
... <distributionManagement> <repository> <id>deployment</id> <name>OpenShift Maven repo</name> <url>http://maven.example/deployment/filepath/</url> </repository> <snapshotRepository> <id>deployment</id> <name>OpenShift Maven repo</name> <url>http://maven.example/snapshots/filepath/</url> </snapshotRepository> </distributionManagement> ...
For more information, see the Red Hat JBoss BRMS Administration and Configuration Guide.
The configuration/settings.xml file must have the remote repository defined so that OpenShift can download the application artifacts.
... <profiles> <profile> <id>openshift-mirror-repositories</id> <repositories> <repository> <id>openshift-mirror</id> <url>http://maven.example/public/filepath/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>openshift-mirror</id> <url>http://maven.example/public/filepath/</url> </pluginRepository> </pluginRepositories> </profile> </profiles> ...
For more information, see the Red Hat JBoss BRMS Installation Guide.
The hidden .s2i/environment file defines the KIE container deployment, including which KIE jars to use and the location from which to retrieve them. When OpenShift deploys the built image, the pod name is derived from the deployment alias defined in this file:
KIE_CONTAINER_DEPLOYMENT=<alias>=<group_id>:<artifact_id>:<version>
For example:
KIE_CONTAINER_DEPLOYMENT=RulesTest=com.example.openshift:example_workflow:1.0
NoteDefining the container name here is necessary because the default behavior of the KIE server is to search for the default stateful session and fail if it does not find one.