このコンテンツは選択した言語では利用できません。
Chapter 3. Red Hat Process Automation Manager clusters in a development (authoring) environment
Developers use Red Hat Process Automation Manager to author rules and processes that assist users with decision making. The primary benefit of clustering Red Hat Process Automation Manager development environments is high availability. If clustering is configured and Developer X is working on Node1 and that node fails, Developer X’s work is preserved and visible on any other node of the cluster.
Most development environments consist of Business Central for creating rules and processes and at least one Process Server to test those rules and processes .
You can also use this configuration for runtime environments if you want to use Business Central to manage the Process Servers in the cluster.
To create a Red Hat Process Automation Manager clustered development environment, you download and extract Red Hat JBoss EAP 7.1 and Red Hat Process Automation Manager 7.1. Then, you configure Red Hat JBoss EAP 7.1 for a domain-mode cluster, including Elasticsearch and the Java messaging server (JMS) broker resource adapter integrated with Red Hat JBoss EAP. Finally, you start the cluster and install Business Central on each cluster node.
Elasticsearch is a highly scalable open source full-text search and analytics engine. It enables you to store, search, and analyze high volumes of data quickly and in near-real time. In a Red Hat Process Automation Manager clustered environment, it enables you to perform complex and efficient searches across cluster nodes.
The JMS broker resource adapter enables your applications to communicate with any messaging provider. It specifies how components such as message-driven beans, Enterprise JavaBeans, and servlets can send or receive messages.
3.1. Installing and configuring Elasticsearch
To use Elasticsearch for more efficient searching across cluster nodes, you must install and configure Elasticsearch for the Red Hat Process Automation Manager clustered environment. Use the following instructions to configure a simplified, non-high availability environment.
To configure Elasticsearch for a high availability Red Hat Process Automation Manager clustered environment, see the Elasticsearch documentation.
Procedure
- Download and unzip the Elasticsearch installation file.
Replace the contents of the
elasticsearch/config/elasticsearch.yml
file with the following content, where<ELASTICSEARCH_NODE_IP>
is the IP address of the system where you unzipped the Elasticsearch file:cluster.name: kie-cluster transport.host: <ELASTICSEARCH_NODE_IP> http.host: <ELASTICSEARCH_NODE_IP> transport.tcp.port: 9300 discovery.zen.minimum_master_nodes: 1
Run Elasticsearch:
On Linux or UNIX-based systems, enter:
ELASTICSEARCH_HOME_/bin/elasticsearch
On Windows, enter:
ELASTICSEARCH_HOME\bin\elasticsearch.bat
3.2. Downloading and extracting Red Hat JBoss EAP 7.1 and Red Hat Process Automation Manager
Complete the steps in this section to download and install Red Hat JBoss EAP 7.1 and download and repackage Red Hat Process Automation Manager 7.1 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. (
JBEAP-7.1.0/jboss-eap-7.1.0.zip
). -
Extract the
jboss-eap-7.1.0.zip
file. In the following steps,EAP_HOME
is thejboss-eap-7.1/jboss-eap-7.1
directory.
On the cluster node where the Red Hat JBoss EAP domain controller will be started (the master node), navigate to the Software Downloads page in the Red Hat Customer Portal, and select the product and version from the drop-down options:
- Product: Process Automation Manager
- Version: 7.1
-
Download Red Hat Process Automation Manager 7.1.0 Business Central Deployable for Red Hat JBoss EAP 7 (
rhpam-7.1.0-business-central-eap7-deployable.zip
). -
Extract the
rhpam-7.1.0-business-central-eap7-deployable.zip
file to a temporary directory. In the following commands this directory is calledTEMP_DIR
. -
Open the
TEMP_DIR/rhpam-7.1.0-business-central-eap7-deployable/jboss-eap-7.1/standalone/deployments/business-central.war/WEB-INF/web.xml/
file, uncomment the<distributable/>
tag, and save theweb.xml
file. -
Copy the contents of
TEMP_DIR/rhpam-7.1.0-business-central-eap7-deployable/jboss-eap-7.1
toEAP_HOME
. Repackage the
business-central.war
file:-
Navigate to the
TEMP_DIR/rhpam-7.1.0-business-central-eap7-deployable/jboss-eap-7.1/standalone/deployments/business-central.war
directory. -
Select the contents of the
TEMP_DIR/rhpam-7.1.0-business-central-eap7-deployable/jboss-eap-7.1/standalone/deployments/business-central.war
directory and create thebusiness-central.zip
file. -
Rename
business-central.zip
tobusiness-central.war
. This is the file that you will use to deploy Business Central on the cluster nodes. -
If desired, copy the new
business-central.war
file to a location that is more convenient to deploy from.
-
Navigate to the
3.3. Configuring a Red Hat JBoss EAP 7.1 domain-mode cluster for Business Central
Configure the Business Central cluster in domain mode with Elasticsearch and the JMS broker resource adapter integrated with Red Hat JBoss EAP. By using domain mode with a cluster, you can centrally manage and publish configurations for your servers.
These steps describe a basic cluster configuration. For more complex configurations, see the Red Hat JBoss EAP 7.1 Configuration Guide.
Prerequisites
- Elasticsearch is installed as described in Section 3.1, “Installing and configuring Elasticsearch”.
- Red Hat JBoss EAP is installed on each node of the cluster as described in Section 3.2, “Downloading and extracting Red Hat JBoss EAP 7.1 and Red Hat Process Automation Manager”.
- An NFS server with a mounted partition is available.
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
to"full-ha"
and thesocket-binding-group
to"full-ha-sockets"
. To prevent Business Central from running out of memory, increase the JVM maximum heap size to
1500m
.<server-group name="some-server-group" profile="full-ha"> <jvm name="some-jvm"> <heap size="1000m" max-size="1500m"/> </jvm> <socket-binding-group ref="full-ha-sockets"/> </server-group>
-
Specify the
Edit or add the following properties to the
<system-properties>
element and replace the following placeholders:-
<ELASTICSEARCH_NODE_IP>
is the IP addresses where Elasticseach is installed. -
<JMS_USER>
is a Red Hat JBoss EAP application user. It is the user that Business Central uses to connect to the embedded JMS broker. <JMS_USER_PASSWORD>
is the password for<JMS_USER>
.<system-properties> <property name="appformer-jms-connection-mode" value="JNDI"/> <property name="appformer-jms-username" value="<JMS_USER> "/> <property name="appformer-jms-password" value="<JMS_USER_PASSWORD>"/> <property name="org.appformer.ext.metadata.elastic.port" value="9300"/> <property name="org.appformer.ext.metadata.elastic.host" value="<ELASTICSEARCH_NODE_IP>"/> <property name="org.appformer.ext.metadata.elastic.cluster" value="kie-cluster"/> <property name="org.appformer.ext.metadata.index" value="elastic"/> <property name="org.appformer.ext.metadata.elastic.retries" value="10"/> <property name="appformer-jms-connection-factory" value="java:/ConnectionFactory"/> </system-properties>
-
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 the role of the<JMS_USER>
to a newrole-name
element, for example:<security-setting name="#"> <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/> <role name="admin" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/> </security-setting>
-
Replace
-
Save the
domain.xml
file.
3.4. Configuring Red Hat JBoss EAP 7.1 host files for a Business Central clustered environment
After you have installed Red Hat JBoss EAP and configured the domain.xml
file for a Business Central clustered environment, complete these steps in the host.xml
file on the master node and in the host-slave.xml
file on each slave node.
Prerequisite
Red Hat JBoss EAP 7.1 is installed on each node of the cluster.
Procedure
-
Open the
EAP_HOME/domain/configuration/host.xml
file or theEAP_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 the system properties listed in Table 3.1, “Cluster node properties”
-
Save the
host.xml
orhost-slave.xml
file.
Property name | Value | Description |
---|---|---|
| node name | A node name unique within the cluster (optional). |
| node name | The name of the daemon host machine in a physical cluster. |
| port number | The port used by the VFS repo to accept client connections. The port must be unique for each cluster member. |
| SSH host node name | The name of the SSH host machine in a physical cluster. |
| port number | The unique port number for ssh access to the GIT repo for a cluster running on physical machines. |
| .niogit directory |
The location of Git repositories stored under |
| SSH host port | In a virtualized environment, the outside port to be used. |
| .security directory |
The location of the |
The following examples demonstrate how to configure a three node cluster in the host.xml
and host-slave.xml
files:
Example 3.1. Cluster nodeOne Configuration
<system-properties> <property name="jboss.node.name" value="nodeOne"/> <property name="org.uberfire.nio.git.daemon.host" value="nodeOne"/> <property name="org.uberfire.nio.git.daemon.port" value="9418" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.host" value="nodeOne"/> <property name="org.uberfire.nio.git.ssh.port" value="8003" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.hostport" value="8003" boot-time="false"/> <property name="org.uberfire.nio.git.dir" value="/mnt/jbpm/niogit" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.cert.dir" value="/tmp/jbpm/nodeone" boot-time="false"/> </system-properties>
Example 3.2. Cluster nodeTwo Configuration
<system-properties> <property name="jboss.node.name" value="nodeTwo"/> <property name="org.uberfire.nio.git.daemon.host" value="nodeTwo" /> <property name="org.uberfire.nio.git.daemon.port" value="9419" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.host" value="nodeTwo" /> <property name="org.uberfire.nio.git.ssh.port" value="8004" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.hostport" value="8004" boot-time="false"/> <property name="org.uberfire.nio.git.dir" value="/mnt/jbpm/niogit" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.cert.dir" value="/tmp/jbpm/nodetwo" boot-time="false"/> </system-properties>
Example 3.3. Cluster nodeThree Configuration
<system-properties> <property name="jboss.node.name" value="nodeThree"/> <property name="org.uberfire.nio.git.daemon.host" value="nodeThree" /> <property name="org.uberfire.nio.git.daemon.port" value="9420" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.host" value="nodeThree" /> <property name="org.uberfire.nio.git.ssh.port" value="8005" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.hostport" value="8005" boot-time="false"/> <property name="org.uberfire.nio.git.dir" value="/mnt/jbpm/niogit" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.cert.dir" value="/tmp/jbpm/nodethree" boot-time="false"/> </system-properties>
3.5. Starting the cluster and distributing Business Central
After you have configured a Red Hat JBoss EAP cluster and repackaged Business Central, you must start the cluster and distribute the repackaged business-central.war
file.
Prerequisites
- Elasticsearch is installed and running on one node of the cluster.
-
A Red Hat JBoss EAP 7.1 cluster is available and the
domain.xml
,host.xml
, andhost-slave.xml
files are configured. -
The repackaged
business-central.war
file is available.
Procedure
-
Add Red Hat JBoss EAP management users to the master node of the cluster (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 the following users:
- Add Business Central administration users as described in Installing and configuring Red Hat Process Automation Manager on Red Hat JBoss EAP 7.1.
Add the JMS user, where
<JMS_USER>
and<JMS_PWD>
is the JMS user and password combination that you added to thedomain.xml
file:$ ./add-user.sh -a --user <JMS_USER> --password <JMS_PWD> --role admin
Start the cluster by starting the the master node first, then start each of the slave nodes.
To start the master node, enter one of the following commands:
On Linux or UNIX-based systems, enter:
<EAP_HOME>/bin/domain.sh
On Windows, enter:
<EAP_HOME>/bin/domain.bat
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>
On Windows, enter:
<EAP_HOME>/bin/domain.bat --host-config=host-slave.xml -Djboss.domain.master.address=<MASTER_NODE_IP>
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
business-central.war
file into the server group, complete the following steps:-
On the master node, log in to the Red Hat JBoss EAP
Administration
console 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
business-central.war
file, and click Next. Click Enable and click Next. When the deployment is complete, Business Central starts automatically on each node.
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
.
-
On the master node, log in to the Red Hat JBoss EAP
For more information about installing Business Central, see Installing and configuring Red Hat Process Automation Manager on Red Hat JBoss EAP 7.1.
3.6. Verifying the Red Hat Process Automation Manager cluster
After configuring the cluster for Red Hat Process Automation Manager, create an asset to verify that the installation is working.
Procedure
-
In a web browser, enter
<node-IP-address>:8080/business-central
. Replace<node-IP-address>
with the IP address of a particular node. -
Enter the
admin
user credentials that you created during installation. The Business Central home page appears. -
Select Menu
Design Projects. -
Click Try Samples
Mortgages OK. The Assets window appears. -
Click Add Asset
Data Object. -
Enter
MyDataObject
in the Data Object field and click OK. -
Click Spaces
MySpace Mortgages and confirm that MyDataObject
is in the list of assets. Enter the following URL in a web browser, where
<node_IP_address>
is the address of a different node of the cluster:http://<node_IP_address>:8080/business-central
-
Enter the same credentials that you used to log in to Business Central on the first node, where you created the
MyDataObject
asset. -
Select Menu→ Design
Projects. - Select the Mortgages project.
-
Verify that
MyDataObject
is in the asset list. - Delete the Mortgages project.