このコンテンツは選択した言語では利用できません。
Chapter 4. Decision Server clusters in a runtime environment
The primary benefit of clustering a Decision 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 Decision Server clustered runtime environment, you download and extract Red Hat JBoss EAP 7.1 and Decision Server. Then, you configure Red Hat JBoss EAP 7.1 for a domain-mode cluster, start the cluster, and install Decision Server on each cluster node.
If desired, you can then cluster the headless Decision Manager controller.
4.1. Downloading and extracting Red Hat JBoss EAP 7.1 and Decision Server
Complete the steps in this section to download and install Red Hat JBoss EAP 7.1 and download and repackage Decision Server for installation in a clustered environment.
Procedure
Install Red Hat JBoss EAP 7.1 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.1
-
Click Download next to Red Hat JBoss Enterprise Application Platform 7.1.0. (
jboss-eap-7.1.0.zip
). -
Extract the
jboss-eap-7.1.0.zip
file. Thejboss-eap-7.1/jboss-eap-7.1
directory is referred to asEAP_HOME
.
Download and extract Decision 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.1
-
Download Red Hat Decision Manager 7.1.0 Decision Server for All Supported EE7 Containers (
rhdm-7.1.0-kie-server-ee7.zip
).
-
Extract the
rhdm-7.1.0-kie-server-ee7.zip
archive to a temporary directory. In the following examples this directory is calledTEMP_DIR
.
Repackage the
kie-server.war
directory:-
Navigate to the
TEMP_DIR/rhdm-7.1.0-kie-server-ee7/kie-server.war
directory. -
Select the contents of the
TEMP_DIR/rhdm-7.1.0-kie-server-ee7/kie-server.war
directory and create thekie-server.zip
file. -
Rename
kie-server.zip
tokie-server.war
. This is the file that you will use to deploy Decision Server on the cluster nodes. -
If desired, copy the new
kie-server.war
file to a location that is more convenient to deploy from.
-
Navigate to the
-
If you want to use a security manager with Decision Server, copy the contents of the
TEMP_DIR/rhdm-7.1.0-kie-server-ee7/SecurityPolicy
directory to theEAP_HOME/bin
directory on each node of the cluster.
4.2. Configuring a Red Hat JBoss EAP 7.1 domain-mode cluster for Decision Server
To centrally manage and publish configurations for the servers across a cluster, configure the Red Hat JBoss EAP cluster in domain mode for Decision Server. Domain mode provides a central location to store and publish configurations.
Procedure
-
On the the master node of the cluster (where you will run the domain controller), open the
EAP_HOME/domain/configuration/domain.xml
file in a text editor. Make the following changes for each server group in the
server-groups
element:-
Specify the
server-group name
andjvm
name. To enable high availability, change the
profile
tofull-ha
and thesocket-binding-group
tofull-ha-sockets
.<server-group name="some-server-group" profile="full-ha"> <jvm name="some-jvm"> <heap size="1000m" max-size="1000m"/> </jvm> <socket-binding-group ref="full-ha-sockets"/> </server-group>
<server-group name="some-server-group" profile="full-ha"> <jvm name="some-jvm"> <heap size="1000m" max-size="1000m"/> </jvm> <socket-binding-group ref="full-ha-sockets"/> </server-group>
Copy to Clipboard Copied!
-
Specify the
In the
<subsystem xmlns="urn:jboss:domain:messaging-activemq:2.0">
element, make the following changes:-
Replace
<cluster password="${jboss.messaging.cluster.password:CHANGE ME!!}"/>
with<cluster user="<CLUSTER_USER>" password="<CLUSTER_PWD>"/>
where<CLUSTER_USER>
is the user used by Red Hat JBoss EAP to form a messaging cluster and<CLUSTER_PWD>
is the password for that user. In the
security-setting
element add thekie-server
role:<subsystem xmlns="urn:jboss:domain:messaging-activemq:2.0"> <server name="default"> <security-setting name="#"> <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/> <role name="kie-server" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/> </security-setting>
<subsystem xmlns="urn:jboss:domain:messaging-activemq:2.0"> <server name="default"> <security-setting name="#"> <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/> <role name="kie-server" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/> </security-setting>
Copy to Clipboard Copied!
-
Replace
-
Save the
domain.xml
file.
4.3. Configuring Red Hat JBoss EAP 7.1 host files for a Decision Server clustered environment
After you have installed Red Hat JBoss EAP and configured the domain.xml
file for a Decision Server clustered environment, you must configure the host.xml
and host-slave.xml
files.
Prerequisite
Red Hat JBoss EAP 7.1 is installed on each node of the cluster.
Procedure
Complete the following steps on the master node of the cluster:
-
Open the
EAP_HOME/domain/configuration/host.xml
file in a text editor. -
In the
main-server-group
<servers>
element, add the servers that will be part of the cluster.
-
Open the
Complete the following steps in the
host.xml
file on the master node and in thehost-slave.xml
file on each slave node:-
Open the
EAP_HOME/domain/configuration/host-slave.xml
file in a text editor. -
In the
main-server-group
<servers>
element, add the servers that will be part of the cluster.
-
Open the
4.4. Starting the cluster and distributing Decision Server
After you have configured a Red Hat JBoss EAP cluster and repackaged Decision Server, you must start the cluster and distribute the repackaged kie-server.war
file.
Prerequisites
-
A Red Hat JBoss EAP 7.1 cluster is available and the
domain.xml
,host.xml
, andhost-slave.xml
files have been configured. -
The repackaged
kie-server.war
file is available.
Procedure
-
Add Red Hat JBoss EAP management users to the master node (where you configured the
domain.xml
file) as described in the Red Hat JBoss EAP 7.1 Configuration Guide. On each node of the cluster, add Decision Server users as described in Installing and configuring Red Hat Decision Manager on Red Hat JBoss EAP 7.1.
To start the master node, enter one of the following commands:
On Linux or UNIX-based systems, enter:
<EAP_HOME>/bin/domain.sh
<EAP_HOME>/bin/domain.sh
Copy to Clipboard Copied! On Windows, enter:
<EAP_HOME>/bin/domain.bat
<EAP_HOME>/bin/domain.bat
Copy to Clipboard Copied!
To start the slave nodes, on each of the slave nodes enter one of the following commands, where
<MASTER_NODE_IP>
is the IP address of the master node (where the domain controller is configured):On Linux or UNIX-based systems, enter:
<EAP_HOME>/bin/domain.sh --host-config=host-slave.xml -Djboss.domain.master.address=<MASTER_NODE_IP>
<EAP_HOME>/bin/domain.sh --host-config=host-slave.xml -Djboss.domain.master.address=<MASTER_NODE_IP>
Copy to Clipboard Copied! On Windows, enter:
<EAP_HOME>/bin/domain.bat --host-config=host-slave.xml -Djboss.domain.master.address=<MASTER_NODE_IP>
<EAP_HOME>/bin/domain.bat --host-config=host-slave.xml -Djboss.domain.master.address=<MASTER_NODE_IP>
Copy to Clipboard Copied! For more information, see the following sections of the Red Hat JBoss EAP 7.1 Configuration Guide:
- "Starting JBoss EAP"
- "Managed Domain Configuration Files".
-
On each node of the cluster, review the
EAP_HOME/domain/servers/SERVER_NAME/log/server.log
file to verify that the nodes are available. To deploy the
kie-server.war
file that you created previously into the server group, complete the following steps on the master node:-
Log in to the Red Hat JBoss EAP
Administration
console of your domain as amanagement
user. -
Click Deployments
Server Groups→ main-server-group and click Add. - In the dialog box, click Upload a new deployment and click Next.
-
In the Upload Deployments dialog box, click Browse, select the
kie-server.war
file, and click Next. Click Enable and click Next.
NoteMake sure to check deployment unit readiness with every cluster member.
When a deployment unit is created on a cluster node, it takes some time before it is distributed among all cluster members. You can check the deployment status using the server Administration console or REST API. However, if the query is sent to the node where the deployment was originally issued, the query will return a value of
deployed
. If the query is sent to a node where the deployment has not yet been distributed, the query returnsDeploymentNotFoundException
.
-
Log in to the Red Hat JBoss EAP
To verify that the Decision Server main endpoint is available and business process management (BPM) capabilities are enabled, enter the following command and replace
<node_IP>
and<node_port>
with the IP address and port number of the node you are verifying:curl -X GET "http://<node_IP>:<node_port>/kie-server/services/rest/server"
curl -X GET "http://<node_IP>:<node_port>/kie-server/services/rest/server"
Copy to Clipboard Copied! If the following line is present in the output, BPM capabilities are enabled:
<capabilities>BPM</capabilities>
<capabilities>BPM</capabilities>
Copy to Clipboard Copied!
For more information about installing Decision Central, see Installing and configuring Red Hat Decision Manager on Red Hat JBoss EAP 7.1.
4.5. Clustering with the headless Decision Manager controller
The Decision Manager controller is integrated with Decision Central. However, if you do not install Decision Central, you can install the headless Decision Manager controller and use the REST API or the Decision Server Java Client API to interact with it.
Prerequisites
-
A backed-up Red Hat JBoss EAP installation version 7.1 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 mounted partition is available.
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.1
-
Download Red Hat Decision Manager 7.1.0 Add Ons (the
rhdm-7.1.0-add-ons.zip
file). -
Unzip the
rhdm-7.1.0-add-ons.zip
file. Therhdm-7.1-controller-ee7.zip
file is in the unzipped directory. -
Extract the
rhdm-7.1-controller-ee7.zip
file to a temporary directory. In the following examples this directory is calledTEMP_DIR
. Repackage the
controller.war
directory:-
Navigate to the
TEMP_DIR/rhdm-7.1.0-add-ons/rhdm-7.1-controller-ee7/controller.war
directory. -
Select the contents of the
TEMP_DIR/rhdm-7.1.0-add-ons/rhdm-7.1-controller-ee7/controller.war
directory and create thecontroller.zip
file. -
Rename
controller.zip
tocontroller.war
. This is the file that you will use to deploy the headless Decision Manager controller on the cluster nodes. -
If desired, copy the new
controller.war
file to a location that is more convenient to deploy from.
-
Navigate to the
-
If you want to use a security manager with the headless Decision Manager controller, copy the contents of the
TEMP_DIR/rhdm-7.1.0-add-ons/rhdm-7.1-controller-ee7/SecurityPolicy
directory to theEAP_HOME/bin
directory on each node of the cluster. -
Add Red Hat JBoss EAP management users to the master node (where you configured the
domain.xml
file) as described in the Red Hat JBoss EAP 7.1 Configuration Guide. - On each node of the cluster, add users for the headless Decision Manager controller as described in the "Installing the headless Decision Manager controller" section of Installing and configuring Red Hat Decision Manager on Red Hat JBoss EAP 7.1.
Complete the following steps in the
host.xml
file on the master node and in thehost-slave.xml
file on each slave node:-
Open the
EAP_HOME/domain/configuration/host.xml
orEAP_HOME/domain/configuration/host-slave.xml
file in a text editor. -
In the
main-server-group
<servers>
element, add the servers that will be part of the cluster. 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>
<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>
Copy to Clipboard Copied! If the value of the
org.kie.server.controller.templatefile.watcher.enabled
property is set totrue
, 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 tofalse
, changes to the template file are detected only when the server restarts.
-
Open the
To deploy the
controller.war
file that you created previously into the server group, complete the following steps on the master node:-
Log in to the Red Hat JBoss EAP
Administration
console of your domain as amanagement
user. -
Click Deployments
Server Groups→ main-server-group and click Add. - In the dialog box, click Upload a new deployment and click Next.
-
In the Upload Deployments dialog box, click Browse, select the
controller.war
file, and click Next. Click Enable and click Next.
NoteMake sure to check deployment unit readiness with every cluster member.
When a deployment unit is created on a cluster node, it takes some time before it is distributed among all cluster members. You can check the deployment status using the server Administration console or REST API. However, if the query is sent to the node where the deployment was originally issued, the query will return a value of
deployed
. If the query is sent to a node where the deployment has not yet been distributed, the query returnsDeploymentNotFoundException
.
-
Log in to the Red Hat JBoss EAP
For more information about installing Decision Central, see Installing and configuring Red Hat Decision Manager on Red Hat JBoss EAP 7.1.