Chapter 8. Example Workflow: Deploying a JBoss BPMS Project as Intelligent Process Server for OpenShift image
Business Central, the JBoss BPMS console that provides a unified web-based environment for managing projects, is not part of Intelligent Process Server for OpenShift. An external repository is required to integrate projects between Business Central and OpenShift. This tutorial presumes that a project has already been set up in Business Central.
8.1. Preparing the JBoss BPMS Project
Prepare a Git repository for the project configuration files. The repository is used to store the Maven repository and KIE container deployment files. The Git repository has the following file hierarchy:
- ../configuration/settings.xml for the Maven repository
- ../.s2i/environment for the KIE container deployment
Preparation of the BPMS project may require some prior knowledge with the Red Hat JBoss BPM Suite. Refer to the Red Hat JBoss BPM Suite User Guide for more information on any of these tasks.
- Log in to Red Hat JBoss BPM Suite: Business Central web console.
Clone the existing repository to ensure it is up-to-date.
Provide the Repository Name, Organizational Unit, and the Git URL and click the
Using Repository View, ensure the pom.xml is configured to use a remote repository by containing xml similar to the following:
... <distributionManagement> <repository> <id>deployment</id> <name>OpenShift Maven repo</name> <url>http://maven.example/content/repo/deployments/</url> </repository> <snapshotRepository> <id>deployment</id> <name>OpenShift Maven repo</name> <url>http://maven.example/content/repo/snapshots/</url> </snapshotRepository> </distributionManagement> ...
For more information, see the Red Hat JBoss BRMS Administration and Configuration Guide.
In the application repository, ensure the configuration/settings.xml and the .s2i/environment files define the Maven repository and the KIE container deployment respectively:
The Maven repository should be defined in the configuration/settings.xml so that OpenShift can download the application artifacts. It should contain xml similar to the following:
... <profiles> <profile> <id>openshift-mirror-repositories</id> <repositories> <repository> <id>openshift-mirror</id> <url>http://maven.example/content/group/public/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>openshift-mirror</id> <url>http://maven.example/content/group/public/</url> </pluginRepository> </pluginRepositories> </profile> </profiles> ...
For more information, see the Red Hat JBoss BRMS Installation Guide.
The .s2i/environment file must define the KIE container deployment, including which KIE jars to use and the location from which to retrieve them. The pod name is derived from the deployment alias, which is defined as ipsDemo in this example:
- Click Save if any changes have been made to the project.
- Click Open Project Editor → Build → Build and Deploy. This will push the project artifacts into the Maven repository so that it is ready to be deployed on OpenShift.
8.2. Preparing Intelligent Process Server Deployment
Create a new project:
$ oc new-project ips-app-demo
Create a service account to be used for the IPS deployment:
$ oc create serviceaccount ips-service-account
Add the view role to the service account. This enables the service account to view all the resources in the ips-app-demo namespace, which is necessary for managing the cluster.
$ oc policy add-role-to-user view system:serviceaccount:ips-app-demo:ips-service-account
The Intelligent Process Server template requires an SSL keystore and a JGroups keystore.
These keystores are expected even if the application will not use https.
This example uses ‘keytool’, a package included with the Java Development Kit, to generate self-signed certificates for these keystores. The following commands will prompt for passwords.
Generate a secure key for the SSL keystore:
$ keytool -genkeypair -alias https -storetype JKS -keystore keystore.jks
Generate a secure key for the JGroups keystore:
$ keytool -genseckey -alias jgroups -storetype JCEKS -keystore jgroups.jceks
Use the SSL and JGroup keystore files to create the secret for the project:
$ oc create secret generic ips-app-secret --from-file=jgroups.jceks --from-file=keystore.jks
Add the secret to the service account created earlier:
$ oc secret add sa/ips-service-account secret/ips-app-secret
- Log in to the OpenShift web console and select the ips-app-demo project space.
- Click Add to Project to list all of the default image streams and templates.
Use the Filter by keyword search bar to limit the list to those that match
processserver. You may need to click See all to show the desired application template.
Select and configure the desired template.
The SOURCE_REPOSITORY_URL must be set to the Git repository for the deployment, so that the application can pull the configuration/settings.xml and .s2i/environment files.
- Click Deploy.
During the build, the Maven repository is downloaded and build into the container so that no additional packages or dependencies are downloaded at runtime.
The application is available once the pod is running.