Thursday, June 5, 2014

Red Hat JBoss BPM Suite - installation configuration tricks with properties

In this article we wanted to share some handy configuration tricks that can provide surprising help when setting up your JBoss BPM Suite. As the JBoss BPM Suite is a super set, including full JBoss BRMS functionality, the rest of this article will refers to the JBoss BPM Suite but apply to both products.

There is a rather large listing currently of properties you can use when configuring a JBoss BPM Suite installation, often hidden from you should you choose to leverage the provided graphical installer. When installing with the deployable version of the product, you have more control and can setup your environment properties as desired.

This will be the case as we examine some of these properties as used in the current OpenShift bpmPaaS cartridge to see how they auto install an existing project on startup of the JBoss BPM Suite product.

We will also refer to an example demo based on a Generic Loan process to show how several of the properties are used to configure this installation for ease of use locally on a single machine.

Configuration properties

The best place to start is with where these properties can be found or applied. You will need to look into the standalone.xml file found in your JBoss EAP server, when using a single standalone server you will find it in standalone/configuration/standalone.xml.

Here are some of the more interesting properties which we will present here, but is not an all inclusive list, see product documentation for more:
  • org.uberfire.nio.git.dir
    • Location of the local git repository stored under .niogit/
    • Default: working directory (meaning it is stored where you start the server from)
  • org.uberfire.nio.git.daemon.enabled
    • Enables/disables git daemon
    • Default: true
    • If git daemon enabled, uses this property as local host identifier
    • Default: localhost
  • org.uberfire.nio.git.ssh.enabled
    • Enables/disables ssh daemon
    • Default: true
    • If ssh daemon enabled, uses this property as local host identifier
    • Default: localhost
  • org.uberfire.nio.git.ssh.port
    • If ssh daemon enabled, uses this property as port number
    • Default: 8001
  • org.uberfire.nio.git.ssh.cert.dir
    • Location of the directory .security where local certificates will be stored
    • Default: working directory (meaning it is stored where you start the server from)
  • org.uberfire.metadata.index.dir
    • Place where Lucene .index folder will be stored
    • Default: working directory (meaning it is stored where you start the server from)
  • org.guvnor.m2repo.dir
    • Place where Maven repository folder will be stored
    • Default: working-directory/repositories/kie (meaning it is stored where you start the server from)
  • org.kie.example.repositories
    • Folder from where repositories will be cloned.
    • Default: Not used.
The properties listed above that have been marked in bold will be examined in more detail below.

Example usage in local install

When initially setting up the product for use, one can adjust configuration with the help of certain system properties. These will provide an easy user experience that does not involve having to login, setup the organization structure, clone in the new project, and finally opening a process in the designer to start exploring the project.

Below we show how to (from top line working downwards) point to an expected location to ensure our git repository for our projects is always found in the JBoss EAP bin directory. We also include the same location for the Lucene index and the products maven repository that will be found under .../bin/repositories/kie/.
<!-- Configuration property found in standalone.xml -->
<property name="org.uberfire.nio.git.dir" value="${jboss.home.dir}/bin" />
<property name="org.uberfire.metadata.index.dir" value="${jboss.home.dir}/bin" />
<property name="org.guvnor.m2repo.dir" value="${jboss.home.dir}/bin" />

Example usage in bpmPaaS

Within the OpenShift bpmPaaS cartridge there is a need to provide a copy of the Mortgage demo project pre-installed. This is achieved using the following property, that is set to look into the provided directory for any projects and will clone them into the product by using the bare .git found inside a project.
<!-- Configuration property found in standalone.xml -->
<property name="org.kie.example.repositories" value="${jboss.server.config.dir}/initial" />

This property ensures you can create a directory in jboss-eap-version/standalone/configuration/initial/ and populate it with checked out projects you want to appear when you start the JBoss BPM Suite.

We hope these tips shed some light on how you can easily streamline your personal installations and demo setups with JBoss BPM Suite.

For more configuration tips...