Chapter 6. Clustering
- GIT repository: virtual-file-system (VFS) repository that holds the business assets so that all cluster nodes use the same repository
- Execution Server and Web applications: the runtime server that resides in the container (such as, Red Hat JBoss EAP) along with BRMS and BPM Suite web applications so that nodes share the same runtime data.For instructions on clustering the application, refer to the container clustering documentation.
- Back-end database: database with the state data, such as, process instances, KIE sessions, history log, etc., for fail-over purposes

Figure 6.1. Schema of BPMS system with individual system components
GIT repository clustering mechanism
- Apache Zookeeper brings all parts together.
- Apache Helix is the cluster management component that registers all cluster details (the cluster itself, nodes, resources).
- kie-commons provides VFS implementation and clustering
- uber fire framework provides backbone of the web applications

Figure 6.2. Clustering schema with Helix and Zookeeper
- Setting up the cluster itself using Zookeeper and Helix
- Setting up the back-end database with Quartz tables and configuration
- Configuring clustering on your container (this documentation provides only clustering instructions for Red Hat JBoss EAP 6)
Clustering Maven Repositories
rsync.
6.1. Setting up a cluster
- Download the
jboss-bpms-brms-VERSION-redhat-supplementary-tools.zip, which contains Apache Zookeeper, Apache Helix, and quartz DDL scripts. After downloading, unzip the archive: theZookeeperdirectory ($ZOOKEEPER_HOME) and theHelixdirectory ($HELIX_HOME) are created. - Now Configure Zookeeper:
- In the Zookeeper directory, go to
confdirectory and do the following:cp zoo_sample.cfg zoo.cfg
- Open
zoo.cfgfor editing and adjust the settings including the following:# the directory where the snapshot is stored. dataDir=$ZOOKEEPER_HOME/tmp/ # the port at which the clients connects clientPort=2181
Make sure the dataDir location exists and is accessible.
- Set up Zookeeper, so you can use it when creating the cluster with Helix:
- Go to the
$ZOOKEEPER_HOME/bin/directory and start Zookeeper:./zkServer.sh start
You can check the Zookeeper log in the$ZOOKEEPER_HOME/bin/zookeeper.outfile.
- Set up the cluster with the Zookeeper server as the master of the configuration:
- Create the cluster:
$HELIX_HOME/bin/helix-admin.sh --zkSvr ZOOKEEPER_HOST:ZOOKEEPER_PORT --addCluster CLUSTER_NAME
- Add your nodes to the cluster:
$HELIX_HOME/bin/helix-admin.sh --zkSvr ZOOKEEPER_HOST:ZOOKEEPER_PORT --addNode CLUSTER_NAME NODE_NAMEUNIQUE_ID
Example 6.1. Adding two cluster nodes
./helix-admin.sh --zkSvr localhost:2181 --addNode bpms-cluster nodeOne:12345 ./helix-admin.sh --zkSvr localhost:2181 --addNode bpms-cluster nodeTwo:12346
- Add resources to the cluster.
Example 6.2. Adding vfs-repo as resource
./helix-admin.sh --zkSvr localhost:2181 --addResource bpms-cluster vfs-repo 1 LeaderStandby AUTO_REBALANCE
- Rebalance the cluster.
Example 6.3. Rebalancing the bpms-cluster
./helix-admin.sh --zkSvr localhost:2181 --rebalance bpms-cluster vfs-repo 2
- Start the Helix controller.
Example 6.4. Starting the Helix controller
./run-helix-controller.sh --zkSvr localhost:2181 --cluster bpms-cluster 2>&1 > /tmp/controller.log &

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.