Chapter 2. Installation
2.1. Installation Options
Red Hat JBoss BRMS comes in two versions:
- Executable JAR installer for installation on Red Hat JBoss Enterprise Application Platform (EAP) 6.4.
ZIP file install which itself comes in two versions:
-
jboss-brms-6.4-deployable-eap6.x.zip
: version adapted for deployment on Red Hat JBoss Enterprise Application Platform (EAP 6). -
jboss-brms-6.4-deployable-generic.zip
: the deployable version with additional libraries adapted for deployment on Red Hat JBoss Web Server (EWS) and other supported containers.
-
Depending on your environment, you may choose the installation option best suited for your project needs.
Red Hat JBoss BRMS is designed to work with UTF-8 encoding. If a different encoding system is used by the underlying JVM, unexpected errors might occur. To ensure UTF-8 is used by the JVM, use the following system property: "-Dfile.encoding=UTF-8"
.
From Red Hat JBoss BRMS 6.1 onwards, you must have JBoss EAP 6.4 or better already installed before attempting to install Red Hat JBoss BRMS.
2.2. Downloading Red Hat JBoss BRMS for Red Hat JBoss EAP
- Go to the Red Hat Customer Portal and log in.
- Click DOWNLOADS at the top of the page.
- In the Product Downloads page that opens, click Red Hat JBoss BRMS.
- From the Version drop-down menu, select version 6.4.
- Select Red Hat JBoss BRMS 6.4.0 Deployable for EAP 6 and then click Download.
2.3. Installing Red Hat JBoss BRMS Using Installer
The installer for Red Hat JBoss BRMS is an executable Java JAR file. You can use it to install Red Hat JBoss BRMS on an existing Red Hat JBoss EAP 6.4 installation.
Note that the provided Red Hat JBoss BRMS JAR file installer does not support the Red Hat JBoss EAP distribution installed by yum or RPM Package Manager. In this case, download the Red Hat JBoss BRMS 6.4.0 Deployable for EAP 6 file and follow the steps described in Section 2.6, “Installing Red Hat JBoss BRMS on Red Hat JBoss Enterprise Application Platform”.
For security reasons, you should run the installer as a non-root user.
Prerequisite
Before attempting to install Red Hat JBoss BRMS, ensure you have already installed Red Hat JBoss EAP 6, version 6.4.7 or higher, and create a back up. Ensure that your user has sufficient rights to complete the installation.
Set up location and users.
Navigate to the folder where you downloaded the installer file in a command prompt and execute the following command:
java -jar jboss-brms-VERSION-installer.jar
NoteWhen running the installer on Windows, you may be prompted to provide administrator credentials during the installation. To prevent this, add the
izpack.mode=privileged
option to the installation command:java -Dizpack.mode=privileged -jar jboss-brms-VERSION-installer.jar
Furthermore, when running the installer with a 32-bit Java Virtual Machine, you can encounter memory limitations. To solve the issue, run
java -XX:MaxHeapSize=4g -jar jboss-brms-VERSION-installer.jar
- The graphical installer will execute and display a splash screen and a license agreement page. Read and accept the license to proceed.
- In the next screen, provide the parent location of an existing Red Hat JBoss EAP where you want to install Red Hat JBoss BRMS.
In the next two screens, create two users: the first one for the management console of the Red Hat JBoss EAP (ManagementRealm) and the second one for managing Red Hat JBoss BRMS itself (ApplicationRealm).
Creation of the first user for the management console of Red Hat JBoss EAP is optional and you may skip it if it is not required.
Make a note of these user names and passwords as you will need them to access the Red Hat JBoss EAP server (if you do decide to create it) and the Red Hat JBoss BRMS application respectively.
ImportantMake sure that the selected user name does not conflict with any known title of a role or a group.
For example, if there is a role called
admin
, you should not create a user with the user nameadmin
.NoteThe passwords that you create must have at least 8 characters and must contain at least one number and one non-alphanumeric character (not including the character &).
NoteThe application role assigned to the second user that you create is the
admin
role. This is the only role that can be assigned to this newly created user. You can create more users with narrow roles afterwards by using the command line.Set up security environment.
Next, you will set up the security environment of your new Red Hat JBoss BRMS install. Decide to enable or disable the Java Security Manager in this step by clicking the check box. The Java Security Manager makes your system more secure but may downgrade performance. You need to make a decision based on your environment.
- Choose whether you want to set up pure IPv6 configuration on the server that the installation is taking place. This will enable you to set up runtime IPv6 specific configurations later.
Configure runtime environment.
This step provides the option of using a default configuration or specifying an advanced configuration.
Default Configuration
Choose Perform default configuration for the runtime environment in the next step and click Next to review the installation details. If you are happy with the details, click Next to start the actual installation or click Previous to go back and make changes.
Advanced Configuration
Choose to enable advanced configuration options. Select Perform advanced configuration and choose the advanced configuration options you want to enable for your environment using the check boxes.
Configure Password Vault
Vault passwords are used to obfuscate passwords in the various server descriptors using a Java secret key generated during the installation process, or manually using the keytool. This prevents passwords from being stored as plain text in the descriptors. The Iteration count and Salt are both parameters to the encryption process.
For more information about vault passwords, see the Red Hat JBoss EAP Security Guide.
SSL Security
The SSL Security screen enables you to add the
<ssl>
and<truststore>
elements to the ManagementRealm security realm using the provided keystore.-
The
<ssl>
element causes the server to present the certificate within the keystore as its identity, which enables the user to apply their official certificate. -
The
<truststore>
element enables Client-Cert authentication. This means that, if a remote client attempts to connect to any resource managed by the ManagementRealm, the client can present a certificate, and if an entry in the truststore matches, will be authenticated without needing to provide a user name/password.
The end result is an encrypted connection that is secure between the client and the server for the ManagementRealm.
-
The
LDAP Connection
This step in the installer enables the user to define an LDAP server, which in turn defines users which should be allowed to authenticate with the ManagementRealm. This replaces the default configuration.
The LDAP Connection screen enables users to define how to connect to the LDAP server.
- Distinguished Name (DN): the user that can connect to the LDAP server. Typically the DN will uniquely define a special user for this purpose.
LDAP Security (Management Console)
The Management Console LDAP Configuration screen enables you to set up a security realm. This defines the
<security-realm>
element to be added to the descriptors, and utilizes the connection defined previously.- Base DN: Will typically define a 'base search' or 'root context' to begin searching for users.
- Filter Type: Tells Red Hat JBoss EAP how to find the LDAP attribute that defines a user; it is can be a simple attribute, but can also be a complex LDAP filter.
-
Username filter: The LDAP attribute which holds the user name values. A user name entered in this field is used for search queries as a value of the
uid
attribute. If a user chooses LDAP Syntax Query as a filter type, this query must be specified in this field. - Recursive directory search: If enabled, Red Hat JBoss EAP will traverse the LDAP tree recursively, starting at Base DN. Otherwise, the search will be limited to Base DN.
LDAP Security (Business Central)
Most of the values on the Business Central LDAP Configuration screen are similar to the Base DN values. Contexts are used to search for roles, which enables it to perform authorization in addition to authentication. Otherwise, the context fields are analogous to the Base DN from the previous, and attribute fields are analogous to user name attribute. The filters enable fine grained control over which values of the given attribute will be accepted.
Input values from the Business Central LDAP Configuration page are used to configure a new security domain, which make use of the
LdapExtended
login module. This security domain is set as default for Business Central web application. For more information about security domains and login modules, see the Red Hat JBoss EAP Security Guide.Security Domain and JSSE Configuration
The Security Domain screen enables you to configure all of the elements of the
<security-domain>
security subsystem for managing security information, including JSSE configuration. For more detailed information about configuring security domains, see the Red Hat JBoss EAP Security Guide.Configure Clustering
Selecting this option installs Red Hat JBoss BRMS ready for clustered operation. For more information, see Section 6.5, “Clustering on Red Hat JBoss EAP”.
Business Central Datasource Setup
After cluster configuration, the next screen enables you to configure the Business Central data source.
Configure Business Resource Planner
The Configure Business Resource Planner screen enables you to configure Business Resource Planner.
Configure Optaplanner Execution Server
Optaplanner is enabled by default. To disable Optaplanner, select Configure Optaplanner Execution Server then select Disable Optaplanner Execution Server on the Configure Optaplanner screen.
Configure KIE Server Management
Select Enable KIE server management if you want Business Central to manage the Realtime Decision Server.
Managing the Realtime Decision Server using the Business Central requires a password vault to be configured. If you did not configure one, a vault with default values is created See Configuring Password Vault for further information. The password to the keystore is the same as for the user
brmsAdmin
.
- The installer will go through the steps to install Red Hat JBoss BRMS and will perform post installation configuration steps when you click Next. The installer will also start the Red Hat JBoss BRMS server and connect to it to validate the installation. Click Next to get to the last screen where you can generate the installation script and properties file. Click Done to quit the installer.
You have successfully installed Red Hat JBoss BRMS using the installer.
2.4. Installing Red Hat JBoss BRMS Using the Installer in CLI Mode
The installer for Red Hat JBoss BRMS can also be executed through the command-line interface (CLI). The procedure below demonstrates the steps that you are likely to encounter using this option to install Red Hat JBoss BRMS.
Prerequisite
Before attempting to install Red Hat JBoss BRMS, ensure you have already installed Red Hat JBoss EAP 6, version 6.4.7 or higher, and create a back up. Ensure that your user has sufficient rights to complete the installation.
Navigate to the folder where you downloaded the installer file in a command prompt and execute the following command.
java -jar jboss-brms-VERSION-installer.jar -console
The command-line interactive process will start and display the End-User license agreement. You will be prompted to select an option at the end of this license:
press 1 to continue, 2 to quit, 3 to redisplay.
Enter
1
to begin the installation and type in the parent directory of an existing Red Hat JBoss EAP installation.The location below must specify the JBOSS_HOME of an existing EAP installation. [/home/user/BRMS-VERSION/jboss-eap-6.4]
The installer will verify the location of the Red Hat JBoss EAP installation at the provided location.
press 1 to continue, 2 to quit, 3 to redisplay.
Enter
1
to confirm and continue.Create an administrative user.
Create an administrative user This user will be added to the host container's management realm for administrative purposes. It can be used to access the management console, the management CLI or other applications secured in this realm. The password must be at least eight characters long, with one alphabetic character, one digit, and one non-alphanumeric character not including &. Create an administrative user. 0 [x] Skip new administrative user creation. 1 [ ] Create a new administrative user.
Create and confirm a password for the user of the EAP management console:
Admin password: [] ********** Confirm admin password: [**********] **********
After the passwords have been entered, choose an option from the prompt below:
press 1 to continue, 2 to quit, 3 to redisplay.
Enter
1
and create a Red Hat JBoss BRMS user:Create a Business Rules Management System Admin User Create a BRMS admin user. The user will be added to the ApplicationRealm, and can be used to access the Business Central Console. The User will be assigned the 'admin' application role. The BRMS username cannot be any of the following: 'admin', 'analyst', 'user', 'manager' or 'developer'. The password must be at least eight characters long, with one alphabetic character, one digit, and one non-alphanumeric character not including &. BRMS username: [brmsAdmin]
ImportantMake sure that the selected user name does not conflict with any known title of a role or a group.
For example, if there is a role called
admin
, you should not create a user with the user nameadmin
.Create and confirm a password for the Red Hat JBoss BRMS user:
BRMS password: [] ********** Confirm BRMS password: [**********] **********
After the passwords have been entered, choose an option from the prompt below:
press 1 to continue, 2 to quit, 3 to redisplay.
Configure the Java Security Manager.
A Java security manager offers JVM level security beyond what is provided by the application container. It enforces access rules at the JVM runtime based on one or more security policies. This installer will place two security policies in the installation directory with the filenames 'security.policy' and 'kie.policy' regardless of choice. Those policies will be enabled at runtime if the option below is selected. Please note that a security manager imposes a significant performance overhead when enabled. It is suggested the included policies be applied in production if user requirements call for a stronger measure than what is already provided by the application container's authentication and authorization mechanism. Please see the JBoss Business Rules Management System administrative documentation for further details and consideration. [ ] Enable the Java security manager Input 1 to select, 0 to deselect:
After the Java Security Manager choice, choose an option from the prompt below:
press 1 to continue, 2 to quit, 3 to redisplay.
Next, select whether to enable the IPv6 configuration.
IPv6 configuration If this computer is using a pure IPv6 configuration, please check the box below. A pure IPv6 setup requires additional configuration at runtime to ensure the proper bindings of the management and http interfaces. [ ] Enable pure IPv6 configuration Input 1 to select, 0 to deselect:
After the IPv6 configuration choice, choose an option from the prompt below:
press 1 to continue, 2 to quit, 3 to redisplay.
Configure the runtime environment by either choosing the default configuration or inputting advanced options.
Configure runtime environment Red Hat JBoss Business Rules Management System can be further customized at this time. 0 [x] Perform default configuration 1 [ ] Perform advanced configuration Input Selection:
If you select
1
, Perform advanced configuration, complete the following configurations:[ ] Install password vault Input 1 to select, 0 to deselect:
[ ] Enable SSL security Input 1 to select, 0 to deselect:
[ ] Secure EAP Management Console with LDAP Input 1 to select, 0 to deselect:
[ ] Secure Business Central and Dashbuilder with LDAP Input 1 to select, 0 to deselect:
[ ] Add a security-domain Input 1 to select, 0 to deselect:
[ ] Install Business-Central Datasource Input 1 to select, 0 to deselect:
[ ] Configure Optaplanner Execution Server Input 1 to select, 0 to deselect:
[ ] Configure KIE Server management Input 1 to select, 0 to deselect:
Next, choose an option from the prompt below:
press 1 to continue, 2 to quit, 3 to redisplay.
-
The
.jar
file begins the unpacking and configuration. After a successful installation, the command line will ask you if you would like to generate an automatic installation script and properties file.
Installation has completed successfully. Application installed on /home/user/BRMS-VERSION/jboss-eap-6.4 Would you like to generate an automatic installation script and properties file? (y/n) [n]:
If you select
y
, provide a path for the automatic installation script:Select path for the automatic installation script: [/home/user/BRMS-VERSION/jboss-eap-6.4/AUTO_SCRIPT_FILENAME]
This generated script will enable the user to run the installer in the following way for future installations:
java -jar jboss-brms-VERSION-installer.jar AUTO_SCRIPT_FILENAME
NoteRunning the installer in this way will result in an installation identical to the installation from which the auto script was generated. Note that sensitive values, such as passwords, will need to be provided from an external file or provided at auto installation time. The optional argument below enables the user to provide these values automatically:
-variablefile VARIABLE_FILENAME
Sensitive values can also be provided using the following argument:
-variables key1=value1,key2=value2
The command-line will provide the following message upon a successful auto script creation and/or console installation:
XML written successfully. [ Console installation done ] [BRMS_Installer]$
Start Red Hat JBoss EAP by running
standalone.sh
in thejboss-eap-6.4/bin
directory../standalone.sh
-
Navigate to
http://localhost:8080/business-central
in a web browser. - Log in with the correct user name/password as given to the Red Hat JBoss BRMS user in the Create and confirm a password for the Red Hat JBoss BRMS user step.
2.5. Troubleshooting Red Hat JBoss BRMS Installer
- The Red Hat JBoss BRMS installation failed. How do I reinstall Red Hat JBoss BRMS?
If the installer detects Red Hat JBoss BRMS applications, the installation will not continue. In case of a failed installation:
-
Change into
EAP_HOME/standalone/deployments
. Delete all Red Hat JBoss BRMS deployments, that is:
-
business-central.war
-
dashbuilder.war
-
kie-server.war
-
- Start the installer again.
-
Change into
2.6. Installing Red Hat JBoss BRMS on Red Hat JBoss Enterprise Application Platform
To install Red Hat JBoss BRMS 6.4 deployable on Red Hat JBoss EAP 6.4 or later, perform the following tasks:
-
Download the
Red Hat JBoss Enterprise Application Platform 6.4.0
orRed Hat JBoss Enterprise Application Platform 7.0
ZIP file from the Customer Portal. -
Extract the ZIP file. This location is your
EAP_HOME
. Patch the Red Hat JBoss EAP to the supported version for your Red Hat JBoss BRMS version.
- See Red Hat JBoss BPM Suite 6 Supported Configurations to verify which patch is applicable for your Red Hat JBoss BRMS version.
- See Patching a Zip/Installer Installation from the Red Hat JBoss EAP Installation Guide for further information about applying patches.
-
Download the
Red Hat JBoss BRMS 6.4.0 Deployable for EAP 6
ZIP file. Extract the file and copy
jboss-eap-6.4/bin/*
intoEAP_HOME/bin/*
. When asked, merge the directories.If you want to run Red Hat JBoss BRMS in the standalone mode:
-
Copy
jboss-eap-6.4/standalone/configuration/*
intoEAP_HOME/standalone/configuration/
. Copy
jboss-eap-6.4/standalone/deployments/*
intoEAP_HOME/standalone/deployments/
.NoteIf you already have deployments on your Red Hat JBoss EAP, ensure that your current deployments do not have colliding names with Red Hat JBoss BRMS deployments.
-
Copy
If you want to run Red Hat JBoss BRMS in the domain mode:
Copy
jboss-eap-6.4/domain/configuration/*
intoEAP_HOME/domain/configuration/
.WarningMake sure this step is performed by the same user account that was used to install Red Hat JBoss EAP. This account must not be a superuser account.
Add an application user:
./EAP_HOME/bin/add-user.sh -a --user bpmsAdmin --password password@1 --role kie-server,admin,rest-all,analyst
Starting Red Hat JBoss BRMS in Standalone Mode
-
Change into
EAP_HOME/bin
. Execute:
In a Unix environment:
./standalone.sh
In a Windows environment:
standalone.bat
You can now log into Business Central in your web browser: localhost:8080/business-central
.
Configuring Domain Mode
If you installed Red Hat JBoss BRMS as described in Section 2.2, “Downloading Red Hat JBoss BRMS for Red Hat JBoss EAP”, deploy Red Hat JBoss BRMS web applications manually.
The business-central.war
, dashbuilder.war
, and kie-server.war
applications are supplied in the Red Hat JBoss BRMS 6.4.0 Deployable for EAP 6
ZIP file as directories. To deploy the applications into domain mode:
Package the application directories into archives:
Extract the following files from the
Red Hat JBoss BRMS 6.4.0 Deployable for EAP 6
ZIP file:-
jboss-eap-6.4/standalone/deployments/business-central.war
-
jboss-eap-6.4/standalone/deployments/kie-server.war
-
jboss-eap-6.4/standalone/deployments/dashbuilder.war
-
Create a ZIP file with the content of the
business-central.war
,kie-server.war
, andkie-server.war
directories, for example:Change into the directory:
cd business-central.war
-
Execute
zip -r business-central.war .
to create a ZIP file of the content of thebusiness-central.war
directory. Repeat this procedure for all the web applications you want to deploy.
This ensures that
business-central.war
,kie-server.war
, anddashbuilder.war
are archives, not directories.
Deploy the archives:
Add a management user:
./EAP_HOME/bin/add-user.sh -b --user mgmtAdmin --password password@1 --role admin
-
Execute
./EAP_HOME/bin/domain.sh
. -
Log into
http://localhost:9990/
using your management user. -
Click Deployments
Content Repository Add. - Select and upload the web archive from the file system.
Select the deployment and click Assign.
NoteIf you want to deploy multiple Red Hat JBoss BRMS nodes on a single machine, set ports and other properties before assigning the deployment to a server. See the section called “Red Hat JBoss BRMS Settings for Red Hat JBoss EAP” for more information.
- Select the server group.
You can now log into Business Central at localhost:8080/business-central
.
To log into Business Central deployed on Host Controller (HC) machines, the user created on the Domain Controller machine has to be created on the Host Controller machines as well, by following the steps in Section 2.9, “Creating Users”.
Red Hat JBoss BRMS Settings for Red Hat JBoss EAP
If you want to run multiple instances of Red Hat JBoss EAP with Red Hat JBoss BRMS, the best practice is to meaningfully set the following properties:
-
org.uberfire.nio.git.dir
-
org.uberfire.metadata.index.dir
-
org.uberfire.nio.git.ssh.cert.dir
When multiple Red Hat JBoss BRMS nodes are used on a single machine, the below properties need to be specified:
-
org.uberfire.nio.git.daemon.host
: can belocalhost
. -
org.uberfire.nio.git.daemon.port
-
org.uberfire.nio.git.ssh.host
: can belocalhost
. -
org.uberfire.nio.git.ssh.port
Both the org.uberfire.nio.git.daemon.port
and the org.uberfire.nio.git.ssh.port
require different port values in order to avoid port conflicts.
Set the properties in the EAP_HOME/domain/configuration/host.xml
file:
Node A:
<system-properties> <property name="org.uberfire.nio.git.dir" value="/valid/path/.." boot-time="false"/> <property name="org.uberfire.metadata.index.dir" value="/valid/path/.." boot-time="false"/> <property name="org.uberfire.nio.git.ssh.cert.dir" value="/valid/path/.." boot-time="false"/> <property name="org.uberfire.nio.git.daemon.host" value="10.10.10.10" boot-time="false"/> <property name="org.uberfire.nio.git.daemon.port" value="9417" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.host" value="10.10.10.10" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.port" value="8002" boot-time="false"/> </system-properties>
Node B:
<system-properties> <property name="org.uberfire.nio.git.dir" value="/valid/path/.." boot-time="false"/> <property name="org.uberfire.metadata.index.dir" value="/valid/path/.." boot-time="false"/> <property name="org.uberfire.nio.git.ssh.cert.dir" value="/valid/path/.." boot-time="false"/> <property name="org.uberfire.nio.git.daemon.host" value="10.10.10.10" boot-time="false"/> <property name="org.uberfire.nio.git.daemon.port" value="9418" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.host" value="10.10.10.10" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.port" value="8003" boot-time="false"/> </system-properties>
The system properties depicted above should indicate the host, port, or location of the .index
or .niogit
files. These files, which should be used by a respective node, would then be grouped in a particular domain.
2.7. Installing Red Hat JBoss BRMS on Red Hat JBoss Web Server
The generic deployable package is provided for customers to install Red Hat JBoss BRMS 6.4 to an existing application server. The following procedure provides instructions for installation on an existing Red Hat JBoss Web Server 2.1.0 instance.
In a fresh Red Hat JBoss BRMS installation, you can encounter exceptions in the log similar to the following:
WARNING: Unable to instantiate EJB Asynchronous Bean. Falling back to Executors' CachedThreadPool.
The exceptions are caused by the code that failed to look up an Enterprise Java Beans object registered under a JNDI name that does not exist in Apache Tomcat. Therefore, a default implementation is used instead.
These messages are only warnings and do not have any impact on the overall functionality of the system.
Procedure: Installing Generic Deployable Package
- Go to the Red Hat Customer Portal and log in.
- Click DOWNLOADS at the top of the page.
- In the Product Downloads page that opens, choose Red Hat JBoss BRMS.
- From the Version drop-down menu, select version 6.4.
Select Red Hat JBoss BRMS 6.4 Deployable for All Supported Containers package and click Download.
Also select and download the Red Hat JBoss BRMS Core Engine files (
jboss-brms-VERSION-engine.zip
).-
Extract
business-central.war
andkie-server.war
from the generic deployable archive and copy totomcat7/webapps/
folder. -
Remove the
.war
extensions from thebusiness-central.war
andkie-server.war
folders. -
Move the
kie-tomcat-integration-VERSION.jar
file from the Red Hat JBoss BRMS Core Engine distribution totomcat7/lib
. Define users and roles in
tomcat7/conf/tomcat-users.xml
as shown below.ImportantMake sure that the selected user name does not conflict with any known title of a role or a group. See Section 2.8, “Defining Roles” for a list of defined roles.
For example, if there is a role called
admin
, you should not create a user with the user nameadmin
.<role rolename="admin"/> <role rolename="analyst"/> <user username="user" password="password" roles="admin,analyst"/>
Install the transaction manager.
WarningPlease note that the following section describes the setup of a transaction manager, Bitronix, that is not officially supported by Red Hat.
Copy the following transaction manager JAR libraries from the
lib
folder to$TOMCAT_DIR/lib/
directory. These JARs are available injboss-brms-VERSION-deployable-generic.zip
andjboss-brms-VERSION-engine.zip
.-
btm-VERSION.jar
-
btm-tomcat55-lifecycle-VERSION.jar
-
h2-VERSION.jar
-
jta-VERSION.jar
-
slf4j-api-VERSION.jar
-
slf4j-jdk14-VERSION.jar
Additionally, download the following library and copy it into the
$TOMCAT_DIR/lib/
folder: javax.security.jacc-api.jar.Add
Valve
configuration intoTOMCAT_HOME/conf/server.xml
inside the<host>
element as lastValve
definition:<Valve className="org.kie.integration.tomcat.JACCValve" />
-
Create the transaction manager configuration files in
$TOMCAT_DIR/conf/
:btm-config.properties
bitronix.tm.serverId=tomcat-btm-node0 bitronix.tm.journal.disk.logPart1Filename=${btm.root}/work/btm1.tlog bitronix.tm.journal.disk.logPart2Filename=${btm.root}/work/btm2.tlog bitronix.tm.resource.configuration=${btm.root}/conf/resources.properties
resources.properties
(theresource.ds1.uniqueName
defines the data source name used in Tomcat resource definition later — make a note of this value).Example 2.1. H2 Data Source Definition
resource.ds1.className=bitronix.tm.resource.jdbc.lrc.LrcXADataSource resource.ds1.uniqueName=jdbc/jbpm resource.ds1.minPoolSize=10 resource.ds1.maxPoolSize=20 resource.ds1.driverProperties.driverClassName=org.h2.Driver resource.ds1.driverProperties.url=jdbc:h2:file:~/jbpm resource.ds1.driverProperties.user=sa resource.ds1.driverProperties.password= resource.ds1.allowLocalTransactions=true
Example 2.2. MySQL 5.5 Data Source Definition
resource.ds1.className=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource resource.ds1.uniqueName=jdbc/jbpm resource.ds1.minPoolSize=0 resource.ds1.maxPoolSize=10 resource.ds1.driverProperties.URL=jdbc:mysql://localhost:3306/sampledb resource.ds1.driverProperties.user=dbuser resource.ds1.driverProperties.password=dbpassword resource.ds1.allowLocalTransactions=true
Example 2.3. DB2 Type 4 Data Source Definition
resource.ds1.className=com.ibm.db2.jcc.DB2Driver resource.ds1.uniqueName=jdbc/jbpm resource.ds1.minPoolSize=0 resource.ds1.maxPoolSize=10 resource.ds1.driverProperties.URL=jdbc:db2://localhost:50000/sampledb resource.ds1.driverProperties.user=dbuser resource.ds1.driverProperties.password=dbpassword resource.ds1.allowLocalTransactions=true
Example 2.4. Oracle Data Source Definition
resource.ds1.className=oracle.jdbc.xa.client.OracleXADataSource resource.ds1.uniqueName=jdbc/jbpm resource.ds1.minPoolSize=0 resource.ds1.maxPoolSize=10 resource.ds1.driverProperties.URL=jdbc:oracle:thin:@//localhost:1521/bpms resource.ds1.driverProperties.user=dbuser resource.ds1.driverProperties.password=dbpassword resource.ds1.allowLocalTransactions=true
Example 2.5. Microsoft SQL Server Data Source Definition
resource.ds1.className=com.microsoft.sqlserver.jdbc.SQLServerDriver resource.ds1.uniqueName=jdbc/jbpm resource.ds1.minPoolSize=0 resource.ds1.maxPoolSize=10 resource.ds1.driverProperties.URL=jdbc:sqlserver://localhost:1433;databaseName=bpms; resource.ds1.driverProperties.user=dbuser resource.ds1.driverProperties.password=dbpassword resource.ds1.allowLocalTransactions=true
If you are using a data source other than the default provided by the underlying H2 database, you will need to set up persistence. If you are using the default H2 database, then you can ignore the rest of the steps in this procedure.
In this procedure, you configure a data source with the JNDI name
jdbc/myDatasource
as defined inuniqueName=jdbc/jbpm
in the Bitronixresources.properties
file earlier (for the MySQL option).In
business-central/META-INF/context.xml
, replace the data source JNDI name in the<Resource>
element. TheuniqueName
attribute refers to theresource.ds1.uniqueName
property set inresources.properties
:<Resource name="jdbc/myDatasource" uniqueName="jdbc/jbpm" auth="Container" removeAbandoned="true" factory="bitronix.tm.resource.ResourceObjectFactory" type="javax.sql.DataSource"/>
In
business-central/WEB-INF/web.xml
, replace the data source JNDI name in the<res-ref-name>
element with your data source name:<resource-ref> <description>Console DS</description> <res-ref-name>jdbc/myDatasource</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref>
Change
business-central/WEB-INF/classes/META-INF/persistence.xml
.In this file, change the name of the Hibernate dialect used for your database, if using a different database other than H2. The code below demonstrates the original database information for
persistence.xml
:<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
This information can be updated in the following manner (as demonstrated with MySQL database below):
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
NoteThe dialect for DB2 is
org.hibernate.dialect.DB2Dialect
, for DB2 on AS/400 isorg.hibernate.dialect.DB2400Dialect
, for Oracle isorg.hibernate.dialect.Oracle10gDialect
, and for Microsoft SQL Server isorg.hibernate.dialect.SQLServerDialect
.Change
business-central/WEB-INF/classes/META-INF/persistence.xml
file so that Red Hat JBoss BPM Suite process engine can use the new database.The code below demonstrates the original data source information for
persistence.xml
:<jta-data-source>java:comp/env/jdbc/jbpm</jta-data-source>
Change this value to the data source defined earlier:
<jta-data-source>java:comp/env/jdbc/myDatasource</jta-data-source>
Set up the transaction manager listener in
$TOMCAT_DIR/conf/server.xml
to start and stop Bitronix on container startup and shutdown.Add the following element as the last
<Listener>
element into the<Server>
element:<Listener className="bitronix.tm.integration.tomcat55.BTMLifecycleListener" />
Define the
btm.root
system property and location where Bitronix configuration file is placed in:In the
$TOMCAT_DIR/bin/
, create a readablesetenv.sh
file with the following content:CATALINA_OPTS="-Xmx512M -XX:MaxPermSize=512m -Djava.security.auth.login.config=$CATALINA_HOME/webapps/business-central/WEB-INF/classes/login.config -Dbtm.root=$CATALINA_HOME -Dbitronix.tm.configuration=$CATALINA_HOME/conf/btm-config.properties -Dorg.jbpm.designer.perspective=RuleFlow -Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry -Dorg.jboss.logging.provider=jdk -Dorg.jbpm.server.ext.disabled=true -Dorg.jbpm.ui.server.ext.disabled=true"
The property
org.jbpm.designer.perspective
is set toRuleFlow
to allow the default perspective for the designer to beRuleFlow
rather thanFull
. Grant the file execute permissions if applicable.NoteThe
-XX:MaxPermSize=512m
JVM property is valid only for JDK 6 and 7. It is not valid for JDK 8+.ImportantOn Microsoft Windows systems, replace the
$CATALINA_HOME
value in the content of the file with the equivalent environment variable name, or use the absolute path and add the values insetenv.bat
file as shown here in the following example:set "CATALINA_OPTS=-Xmx512m -XX:MaxPermSize=512m -Djava.security.auth.login.config=C:\apache-tomcat\webapps\business-central\WEB-INF\classes\login.config -Dbtm.root=C:\apache-tomcat -Dbitronix.tm.configuration=C:\apache-tomcat\conf\btm-config.properties -Dorg.jbpm.designer.perspective=RuleFlow -Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry -Dorg.jbpm.server.ext.disabled=true -Dorg.jbpm.ui.server.ext.disabled=true"
Install the driver to your database — copy the JAR file with the relevant database driver to
$TOMCAT_DIR/lib/
.Driver to Embedded H2 DatabaseIf using the embedded H2 database, the driver is available in
business-central/WEB-INF/lib/
.Start JBoss Web Server by running
startup.sh
in thetomcat7/bin
directory../startup.sh
Wait a few minutes and check the server log (
$TOMCAT_DIR/tomcat7/logs
) for any errors. If there are no errors, proceed to the next step.-
Navigate to
http://localhost:8080/business-central
in a web browser. -
Login with the user name/password defined in the
tomcat-users.xml
file.
After setting up Business Central, it is necessary to configure data sources for the Realtime Decision Server (kie-server
) as well. Otherwise, Realtime Decision Server tries to find a data source under the JNDI jboss/datasources/ExampleDS
, which is by default registered only in Red Hat JBoss EAP and not in Apache Tomcat.
Realtime Decision Server requires a data source only if the jBPM extension is enabled. This extension is enabled by default.
Realtime Decision Server needs a dedicated database, which is why it is not possible to reuse the data source registered for Business Central. To add a dedicated data source for kie-server
, do the following:
-
Copy the JAR file with the relevant database driver to
$TOMCAT_DIR/lib/
. If you are using an H2 database, this step has already been done during the Business Central installation. Add the data source into the
resources.properties
file. Note that the actual values may differ, based on the underlying database.resource.ds2.className=bitronix.tm.resource.jdbc.lrc.LrcXADataSource resource.ds2.uniqueName=jdbc/kieserver resource.ds2.minPoolSize=10 resource.ds2.maxPoolSize=20 resource.ds2.driverProperties.driverClassName=org.h2.Driver resource.ds2.driverProperties.url=jdbc:h2:file:~/bpm630tomcat7kieserver resource.ds2.driverProperties.user=sa resource.ds2.driverProperties.password= resource.ds2.allowLocalTransactions=true
Register a new resource in the
kie-server/META-INF/context.xml
:<Resource name="jdbc/kieserver" uniqueName="jdbc/kieserver" auth="Container" removeAbandoned="true" factory="bitronix.tm.resource.ResourceObjectFactory" type="javax.sql.DataSource" />
Update the
$TOMCAT_DIR/bin/setenv.sh
file. Add the following data source-related properties forkie-server
:-Dorg.kie.server.persistence.ds=java:comp/env/jdbc/kieserver -Dorg.kie.server.persistence.tm=org.hibernate.service.jta.platform.internal.BitronixJtaPlatform
2.8. Defining Roles
Before starting the server and logging in to Business Central, you will need to create some user accounts. This section describes the different user roles that are used in Red Hat JBoss BRMS:
-
admin
: The users withadmin
role are the administrators of the application. Administrators can manage users, manage the repositories (create and clone), and have full access to make the required changes in the application. Administrators have access to all areas within the system. -
analyst
: Ananalyst
role has access to all high-level features to model projects. However, AuthoringAdministration access is unavailable to users with the analyst
role. Certain lower-level features targeted towards developers, like the DeploymentArtifact Repository view are not accessible for this role. However, the Build & Deploy button is available for the analyst
role while using the Project Editor.
Enter the above mentioned roles during the user creation process.
2.9. Creating Users
To start adding new users, you will need to run the add-user.sh
script on a Unix system or the add-user.bat
file on a Windows system from the Red Hat JBoss EAP bin
directory.
Procedure: Creating New Users
-
Go to the Red Hat JBoss EAP
bin
directory. On a Unix system, run the following command:
./add-user.sh
On a Windows system, run:
./add-user.bat
-
Enter
b
to select the application user and press Enter. - Accept the default realm (ApplicationRealm) by pressing Enter.
At the user name prompt, enter the user name and confirm. For example
helloworlduser
.ImportantMake sure that the selected user name does not conflict with any known title of a role or a group.
For example, if there is a role called
admin
, you should not create a user with the user nameadmin
.Create the user password at the password prompt and reenter the password. For example
Helloworld@123
.NoteThe password should be at least 8 characters in length and should contain upper and lower case alphabetic characters (A-Z, a-z), at least one numerical character (0-9) and at least one special character (for example ~ ! @ # $ % ^ * ( ) - _ + =).
Enter a comma-separated list of roles the user will need at the roles prompt (see Section 2.8, “Defining Roles”).
Note that Business Central users need to have the
analyst
or theadmin
role assigned.- Confirm that you want to add the user.
-
Enter
yes
at the next prompt to enable clustering in the future.