Chapter 29. KIE Server clusters in a runtime environment
The primary benefit of clustering a KIE Server runtime environment is load balancing. If activity on one node of the cluster increases, that activity can be shared among the other nodes of the cluster to improve performance.
To create a KIE Server clustered runtime environment, you download and extract Red Hat JBoss EAP 7.3 and KIE Server. Then, you configure Red Hat JBoss EAP 7.3 for a cluster, start the cluster, and install KIE Server on each cluster node.
Optionally, you can then cluster the headless Decision Manager controller.
Do not connect KIE Server to Business Central in high availability (HA) on premise environments.
Business Central instances are not able to keep in sync with the status of each KIE Server. For example, if a KIE Server is up but not in sync, Business Central will not be able to deploy through that instance.
29.1. Downloading and extracting Red Hat JBoss EAP 7.3 and KIE Server
Complete the steps in this section to download and install Red Hat JBoss EAP 7.3 and KIE Server for installation in a clustered environment.
Procedure
Download Red Hat JBoss EAP 7.3 on each node of the cluster:
Navigate to the Software Downloads page in the Red Hat Customer Portal (login required) and select the product and version from the drop-down options:
- Product: Enterprise Application Platform
- Version: 7.3
-
Click Download next to Red Hat JBoss Enterprise Application Platform 7.3.0. (
jboss-eap-7.3.0.zip
).
-
Extract the
jboss-eap-7.3.0.zip
file. Thejboss-eap-7.3/jboss-eap-7.3
directory is referred to asEAP_HOME
. - Download and apply the latest Red Hat JBoss EAP patch, if available.
Download KIE Server:
Navigate to the Software Downloads page in the Red Hat Customer Portal and select the product and version from the drop-down options:
- Product: Decision Manager
- Version: 7.11
-
Download Red Hat Decision Manager 7.11.0 KIE Server for All Supported EE8 Containers (
rhdm-7.11.0-kie-server-ee8.zip
).
-
Extract the
rhdm-7.11.0-kie-server-ee8.zip
archive to a temporary directory. In the following examples this directory is calledTEMP_DIR
. Copy the
TEMP_DIR/rhdm-7.11.0-kie-server-ee8/rhdm-7.11.0-kie-server-ee8/kie-server.war
directory toEAP_HOME/standalone/deployments/
.WarningEnsure the names of the Red Hat Decision Manager deployments you copy do not conflict with your existing deployments in the Red Hat JBoss EAP instance.
-
Copy the contents of the
TEMP_DIR/rhdm-7.11.0-kie-server-ee8/rhdm-7.11.0-kie-server-ee8/SecurityPolicy/
toEAP_HOME/bin
. - When prompted to overwrite files, click Replace.
-
In the
EAP_HOME/standalone/deployments/
directory, create an empty file namedkie-server.war.dodeploy
. This file ensures that KIE Server is automatically deployed when the server starts. - Download and apply the latest Red Hat Decision Manager patch, if available.
-
Navigate to the
EAP_HOME/bin
directory. Create a user with the
kie-server
role that you will use to log in to KIE Server.$ ./add-user.sh -a --user <USERNAME> --password <PASSWORD> --role kie-server
- Make a note of your user names and passwords.
To start the cluster, navigate to
EAP_HOME/bin
and enter one of the following commands:On Linux or UNIX-based systems:
$ ./standalone.sh -c standalone-full.xml
On Windows:
standalone.bat -c standalone-full.xml
29.2. Clustering KIE Servers with the headless Decision Manager controller
The Decision Manager controller is integrated with Business Central. However, if you do not install Business Central, you can install the headless Decision Manager controller and use the REST API or the KIE Server Java Client API to interact with it.
Prerequisites
-
A backed-up Red Hat JBoss EAP installation version 7.3 or later is available. The base directory of the Red Hat JBoss EAP installation is referred to as
EAP_HOME
. - Sufficient user permissions to complete the installation are granted.
- An NFS server with a shared folder is available as described in Section 28.3, “Configuring an NFS version 4 server”.
Procedure
Navigate to the Software Downloads page in the Red Hat Customer Portal (login required), and select the product and version from the drop-down options:
- Product: Decision Manager
- Version: 7.11
-
Download Red Hat Decision Manager 7.11.0 Add Ons (the
rhdm-7.11.0-add-ons.zip
file). -
Extract the
rhdm-7.11.0-add-ons.zip
file. Therhdm-7.11.0-controller-ee7.zip
file is in the extracted directory. -
Extract the
rhdm-7.11.0-controller-ee7
archive to a temporary directory. In the following examples this directory is calledTEMP_DIR
. Copy the
TEMP_DIR/rhdm-7.11.0-controller-ee7/controller.war
directory toEAP_HOME/standalone/deployments/
.WarningEnsure that the names of the headless Decision Manager controller deployments you copy do not conflict with your existing deployments in the Red Hat JBoss EAP instance.
-
Copy the contents of the
TEMP_DIR/rhdm-7.11.0-controller-ee7/SecurityPolicy/
directory toEAP_HOME/bin
. - When prompted to overwrite files, click Yes.
-
In the
EAP_HOME/standalone/deployments/
directory, create an empty file namedcontroller.war.dodeploy
. This file ensures that the headless Decision Manager controller is automatically deployed when the server starts. -
Open the
EAP_HOME/standalone/configuration/standalone.xml
file in a text editor. Add the following properties to the
<system-properties>
element and replace<NFS_STORAGE>
with the absolute path to the NFS storage where the template configuration is stored:<system-properties> <property name="org.kie.server.controller.templatefile.watcher.enabled" value="true"/> <property name="org.kie.server.controller.templatefile" value="<NFS_STORAGE>"/> </system-properties>
Template files contain default configurations for specific deployment scenarios.
If the value of the
org.kie.server.controller.templatefile.watcher.enabled
property is set to true, a separate thread is started to watch for modifications of the template file. The default interval for these checks is 30000 milliseconds and can be further controlled by theorg.kie.server.controller.templatefile.watcher.interval
system property. If the value of this property is set to false, changes to the template file are detected only when the server restarts.To start the headless Decision Manager controller, navigate to
EAP_HOME/bin
and enter the following command:On Linux or UNIX-based systems:
$ ./standalone.sh
On Windows:
standalone.bat