Wednesday, March 29, 2017

BRMS 6.5.0 VFS Cluster and Maven Repository HA Architecture


Before we start our installation first we need to understand one thing, BRMS development environment Vs runtime environment. BRMS rules development environment needs git repository for asset storage & versioning, kie maven repo for kjar (binary form of rules project) artifact repository management, but rules execution (runtime) environment needs only runtime dependency jars and kjar not git repo, if you are using kie execution server, you just need the kjar only. Runtime cluster just based on your application server (EAP) clustering, not required for any additional settings. You may just deploy the Rules Execution Server on EAP container. EAP cluster will take care of the kie server clustering just like any other web application deployed on the EAP server.
But In development environment, you need to cluster the git repository, to do that BRMS using Apache ZooKeeper and Apache Helix.

Now let us get back to the installation.....
In this installation process, we are going to see step by step instruction for JBoss BRMS development clustering and Maven repository HA. This is highly available business process management system, developers and users can use the system 24/7 without any interruption or downtime delay. In a team environment, authorized developers can see or get the updated (edited by other team member) copy of the assets or file. Here in this example we used 5 VMs to demonstrate this HA architecture. The below diagram explains the high level architecture of the BRMS HA development environment.

BRMS VFS Cluster and Maven Repository HA Architecture Diagram

BRMS Git Repository Cluster Architecture

1. BRMS VFS Cluster and Maven Repository HA - Environment Overview

In this BRMS cluster demonstration we used 5 VMs,

VM1

Load Balance setup done in the VM1, client system access the BPM development service using this VM1.
  • BRMS Git Cluster Software
    • ZooKeeper
    • Helix ( Helix Admin )

VM2

VM3

VM4

VM5

2. Installation Steps

In this step we are installing and clustering EAP server in standalone mode and then installing BRMS 6.4.0 on EAP cluster and also installing mod-cluster for load balancing.

2.1 Install EAP 7 and BRMS 6.4.0

  • Install EAP 7 in standalone mode on VM2& VM3 and cluster those two EAP 7 servers.
  • Install BRMS 6.4.0 on EAP 7 server cluster (on both VMs, 2&3)
  • Install Apache Web Server
  • Install mod_cluster for load balancing
  • Start EAP 7 server (VM2&VM3) cluster in standalone HA mode.

2.2 BRMS 6.4.0 Clustering (Git Repository Clustering)

(In this step we are about to cluster the BRMS on top the EAP cluster environment)
BRMS installed on both EAP server having and managing its own VFS based assert repository backed with GIT. This asset repositories stores all the assets such as rules, decision table, data model etc..Since this VFS resides on each local server, then it must be kept in sync between all servers of a cluster, Apache Zookeeper and Apache Helix to accomplish this.
Zookeeper glues all the parts together, Helix is the cluster management component that registers all cluster details (nodes, resources and the cluster itself). Uberfire (on top of which Workbench is build) uses those 2 components to provide VFS clustering.

2.2.1 Download Zookeeper
Download the jboss-bpms-brms-VERSION-redhat-supplementary-tools.zip, which contains Apache Zookeeper, Apache Helix.

2.2.2 Setting up a ZooKeeper server in standalone mode
Setting up a ZooKeeper server in standalone mode is straightforward. The server is contained in a single JAR file, so installation consists of creating a configuration.
  • Once you've downloaded ZooKeeper, Unzip Zookeeper into a directory, (eg,$ZOOKEEPER_HOME ).
  • Navigate to zookeeper_home/conf and make a copy of zoo_sample.conf to zoo.conf
  • Edit zoo.conf and adjust settings (dataDir and clientPort) if needed, these two are important in most of the cases. Change the value of dataDir to specify an existing (empty to start with) directory.
              # the directory where the snapshot is stored.
                 dataDir=/tmp/zookeeper
              # the port at which the clients will connect
                 clientPort=2181
  • Navigate to zookeeper bin directory:
                $ cd $ZOOKEEPER_HOME/bin
  • Start the Zookeeper server:
                 bin/zkServer.sh start
  • If the server fails to start, verify that the dataDir (as specified in zoo.conf) is accessible.
  • ZooKeeper logs messages using log4j. You will see log messages coming to the console (default) and / or a log file depending on the log4j configuration.
Running ZooKeeper in standalone mode is convenient for evaluation, some development, and testing. But in production, you should run ZooKeeper in replicated mode.

2.2.3 Configure the cluster in Helix

  • Unzip Helix into a directory, the extracted directory is your helix home ($HELIX_HOME).
  • Navigate to Helix bin directory
            $ cd $HELIX_HOME/bin
  • To create the cluster, please type the following command and enter,
             ./helix-admin.sh zkSvr XX.XX.XXX.XX:2181 addCluster repoCluster
Command format details:
($HELIX_HOME/bin/helixadmin.sh zkSvr ZOOKEEPER_HOST:ZOOKEEPER_PORT --addCluster CLUSTER_NAME)

2.2.4 Add nodes to the cluster

Usually the number of nodes in the cluster equal the number of application servers in the cluster.
The node names (node1, node2 ...) can be changed as needed.
Command format details:
( $HELIX_HOME/bin/helixadmin.sh zkSvr ZOOKEEPER_HOST:ZOOKEEPER_PORT addNode CLUSTER_NAME NODE_NAMEUNIQUE_ID)
  • Type the following script to add cluster node one
                ./helixadmin.sh zkSvr XX.XX.XXX.XX:2181 addNode repoCluster node1
  • Type the following script to add cluster node two
           ./helixadmin.sh zkSvr XX.XX.XXX.X:2181 addNode repoCluster node2

2.2.5 Add resources to the cluster

  • Type the following command and enter,
./helixadmin.sh zkSvr 10.11.164.80:2181 addResource repoCluster vfsrepo 1 LeaderStandby AUTO_REBALANCE
  • Rebalance the cluster.
          ./helixadmin.sh zkSvr 10.11.164.80:2181 rebalance repoCluster vfsrepo2
  • Start the Helix controller in BRMS Server 1
  • Log in to your server one machine and navigate to your Helix installation home folder.
           /opt/helixtools/helixcore0.6.2incubatingredhat1/bin
  • Navigate to helix bin directory and run the controller
./runhelixcontroller.sh zkSvr XX.XX.XXX.XX:2181 cluster repoCluster 2>&1 > /tmp/controller.log &
  • Start the Helix controller in BRMS Server 2
./runhelixcontroller.sh zkSvr XX.XX.XXX.XX:2181 cluster repoCluster 2>&1 > /tmp/controller.log &

2.2.6 Modify the standalone.xml file in the standalone EAP server ONE
  • Login to your standalone server one machine and navigate to your JBoss EAP server installation home folder
  • Navigate to server standalone/configuration folder folder
          /jbosseapserver1/standalone/configuration
  • Edit the standalone.xml
## your custom location of git repo and index directory, by default it created in the
server bin folder, if you want to change location you can use these property to change

<systemproperties>
<property name="kie.maven.settings.custom" value="/opt/apachemaven3.2.2/
conf/settings.xml"/>
<property name="org.kie.example" value="${org.kie.example:false}"/>
<property name="org.jbpm.designer.perspective"
value="${org.jbpm.designer.perspective:ruleflow}"/>
<property name="org.uberfire.nio.git.dir" value="/opt/bpmsgitDir/repo "/>##
<property name="org.uberfire.metadata.index.dir" value="/opt/bpmsgitDir/index" />##
<property name="jboss.node.name" value="node11"/>
<property name="org.uberfire.cluster.id" value="repoCluster" />
<property name="org.uberfire.cluster.zk" value="xx.xx.xxx.xx(host):2181" />**
<property name="org.uberfire.cluster.local.id" value="node1" />
<property name="org.uberfire.cluster.vfs.lock" value="vfsrepo"
/>
<property name="org.uberfire.nio.git.deamon.port" value="9418" />
<property name="org.uberfire.cluster.autostart" value="false" />
<property name="org.uberfire.nio.git.ssh.port" value="8003" />
<property name="org.uberfire.nio.git.daemon.host" value="provide your server 1 ip
address" />
<property name="org.uberfire.nio.git.ssh.host" value="provide your server 1 ip
address" />
</systemproperties>

2.2.7 Modify the standalone.xml file in the standalone EAP server TWO
  • Login to your standalone server two machine and navigate to your JBoss EAP server installation home folder
  • Navigate to server standalone/configuration folder folder
        /jbosseapserver2/standalone/configuration
  • Edit the standalone.xml
## your custom location of git repo and index directory, by default it created in the
server bin folder, if you want to change location you can use these property to change

<systemproperties>
<property name="kie.maven.settings.custom" value="/opt/apachemaven3.2.2/
conf/settings.xml"/>
<property name="org.kie.example" value="${org.kie.example:false}"/>
<property name="org.jbpm.designer.perspective"
value="${org.jbpm.designer.perspective:ruleflow}"/>
<property name="org.uberfire.nio.git.dir" value="/opt/bpmsgitDir/repo"/>##
<property name="org.uberfire.metadata.index.dir" value="/opt/bpmsgitDir/index"/>##
<property name="jboss.node.name" value="node22"/>
<property name="org.uberfire.cluster.id" value="repoCluster"/>
<property name="org.uberfire.cluster.zk" value="HOST_ID:2181"/>**
<property name="org.uberfire.cluster.local.id" value="node2"/>
<property name="org.uberfire.cluster.vfs.lock" value="vfsrepo"/>
<property name="org.uberfire.nio.git.deamon.port" value="9418" />
<property name="org.uberfire.cluster.autostart" value="false"/>
<property name="org.uberfire.nio.git.ssh.port" value="8003"/>
<property name="org.uberfire.nio.git.daemon.host" value="provide your server 2 ip
address" />
<property name="org.uberfire.nio.git.ssh.host" value="provide your server 2 ip
address" />
</systemproperties>
  • Start the Cluster Servers in in HA mode and Test the Installation
  • Start the Standalone EAP Server One in HA mode
          Djboss.node.name=node1 must match the standalone.xml file org.uberfire.cluster.local.id property value
./standalone.sh c standaloneha.xml b XX.XX.XXX.XX u 230.0.0.4 Djboss.node.name=node1
  • Start the Standalone EAP Server Two in HA mode
Djboss.node.name=node2 must match the standalone.xml file org.uberfire.cluster.local.id property value
./standalone.sh c standaloneha.xml b XX.XX.XXX.XX u 230.0.0.4 Djboss.node.name=node2
  • Check the mod_cluster console for server status, it should list all the running instances in the cluster
               http://HOST_NAME:6666/mod_cluster_manager
  • Open a new browser window, and enter BRMS business central url for server one
                 http://HOST_NAME_1:8080/businesscentral/
  • Log in to business central, and create a rule project in server one and save it
  • Open a new browser window, and enter BRMS business central url for server Two
              http://HOST_NAME_2:8080/businesscentral/
  • Log in to business central and you can able to see the rule project created in server one. Do some some changes in that project and save it.
  • Now log in back to server one business central and you can see the updated rules in the server one.

3. Maven Nexus Repository Manager HA Setting

3.1 Cluster Information

Red Hat Enterprise Linux HighAvailability clustering was configured on both nodes with communication via unicast in a cluster called "MavenHA". The cluster is comprised of 2 nodes maven{1,2}, a gfs2 volume (/repository), a floating ip (corresponding to the fqdn maven.rdu.salab.redhat.com), and a "Script" resource that will utilize the nexus provided init script to start and stop the service. The service is configured to prefer node 2 and only operate in an Active/Passive role as the Nexus software uses a lock file to restrict operation against a given repository to a single host.

Note:
In Red Hat Enterprise Linux 6, luci controlled both Red Hat Enterprise Linux 5 and Red Hat Enterprise Linux 6 high availability clusters.

Red Hat Enterprise Linux 7 removes luci and replaces it with pcspcs can control only Red Hat Enterprise Linux 7 pacemaker-based clusters. It cannot control Red Hat Enterprise Linux 6 rgmanager-based high availability clusters. If you want to use RHEL7 instead of RHEL6.5 for maven cluster, please use RED HAT document for pcs cluster information.

Thank You



Friday, March 24, 2017

KIE Execution Server Implementation and jBPM Process Engine System Architecture


This blog explains the simple architecture of standalone kie execution server installation, you can have your kie execution server installed locally or remotely or in the cloud. This is just a high level architecture of the installation, if you want to know more details about the execution server please refer the below link jBPM community document.

Software used in this installation Architecture...

WildFly-10.1.0.Final,  JDK 8, MySQL Community Server 5.6, jBPM 6.5.0.Final 


Standalone jBPM KIE Execution Server


The above diagram shows the standalone kie server installation Architecture


Managed jBPM KIE Execution Server

In managed kie execution server installation you can have your controller and execution server installed in your local network or remotely. Remote installation can be interacted by REST API over HTTP protocol.
The above diagram shows the managed kie server installation Architecture




jBPM 6.5.0.Final -  Development and Execution Environment Architecture


The above diagram explains the complete installation architecture of jBPM 6.4.0.Final kie work bench (develop, deploy, test and execution environment ), kie execution server, repository management, asset management, version control, user communication (interaction) and user authorization&authentication. In this architecture, since this the managed kie execution server architecture, you may use the default H2 database for kie-workbench and your option of RDBMS for kie execution server. The color difference shows the local and remote network.

jBPM Process Engine - High Level System Architecture


Wednesday, March 22, 2017

How to install Red Hat JBoss BPM Suite 6.4.0 on Red Hat JBoss EAP 7



1. Download and install EAP 7
https://singaramprabakar.blogspot.com/2017/03/how-to-install-red-hat-jboss-eap-7-on.html

2. Download Red Hat BPM Suite 6.4.0 from the following url, since EAP 7 not support BPM Suite jar installer, so please download the Deployable for EAP zip bundle into your local temp folder.
https://developers.redhat.com/products/bpmsuite/download/


3. Navigate to the downloaded location, and unzip it,


4. Copy the unzipped files into already installed EAP 7 server home...In our case EAP server installed in the following location

/Users/prabakarsingaram/EAP
BPM Suite 6.4.0 deployable for EAP7 zip bundle downloaded and unzipped into the following location..
/Users/prabakarsingaram/jboss/jboss-eap-7.0
If you navigate to the unzipped BPM zip folder, you can find the all needed BPM Suite files ....

Now we need to copy those above listed three folders into the EAP installed location...to do that, type the following command and enter...
 prabakarsingaram$ sudo cp -r jboss-eap-7.0/* /Users/prabakarsingaram/EAP/*


now all the three folders copied into the EAP server home, please navigate to the EAP home verify those files to confirm

5. In a new terminal window, navigate to the EAP home bin folder and type the following command to create the bpm user accounts,

prabakarsingaram$ sudo ./add-user.sh

6. Type b and enter to create application user
7. Type your user name, password and enter as prompted, 
(to know more about the add-user utility, please use the this link https://access.redhat.com/documentation/en-us/red_hat_jboss_bpm_suite/6.4/html/installation_guide/chap_roles_and_users#creating_the_users)

8. Answer to the What groups do you want this user to belong to? please Type admin,developer,manager,analyst,user and enter as follows....


9. Type 'yes' and enter

10. Type 'no' and enter


11. At this point, you have done installing EAP, you have done installing BPM Suite on EAP and you have done creating BPM Suite application user, now this is the time to start the EAP server and explore the Business Central workbench...to do that continue with the following steps....

12. Open a new terminal window and navigate to the EAP home bin folder..
/Users/prabakarsingaram/EAP/bin

13. In the EAP Server bin folder type the following command and enter...
/Users/prabakarsingaram/EAP/bin/ sudo ./standalone.sh -c standalone-full.xml

Now you can see a clean no error server start up logs in the terminal...also you can see and the components got initialized and installed and deployed....end of the server start up you can able to see the Server started message as follows....

14. Open a new browser window and type the following url in the address bar (make sure you are using port 8080) and enter...
now you can able to see the Business Central log in page....

15. Please enter your BPM user name and password (created at the above step 7)..and click the Sign In Button...this will display the Red Hat BPM Suite Business Central Home page.


Congratulations, You have successfully installed Red Hat BPM Suite 6.4.0 on EAP 7

------

Tuesday, March 21, 2017

BPM Suite 6.4.0 - KIE Execution Server Installation and HA Configuration



In this blog I am going to share my experience with installing and configuring Red Hat BPM Suite 6.4.0, managed kie execution server aka intelligent process execution server cluster.

Installation Environment:

Software:

OS : RHEL 7
Java : JDK 1.8
RDBMS : Oracle 11g
BPM Suite : Red Hat JBoss BPM Suite 6.4.0
Application Server : EAP 7

Hardware

Local VMs 3
BPM Suite 6.4.0 Business Central installed on VM1
KIE Execution Server 1 installed on VM2
KIE Execution Server 2 installed on VM3

Remote VMs 2
Artifactory Repository Manager installed on remote VM5
Oracle 11g installed on remote VM4


The above architecture diagram explains the components installation, grey color area represents the local network and light yellow color area represents the remote installation.

Installation Instructions

The very first things is make sure you got the installation rights on those machines . I assume all the newly created VMS are installed and configured the following software ....

All VMS
  • RHEL 7
  • JDK8 
VM4
  • Oracle 11g
 VM5
  • Artifactory or Nexus repository Manager 

High level steps (detailed steps work in progress)

1. Download EAP 7 installer and BPM Suite 6.4.0 deployable for EAP 7 zip bundle from Red Hat portal.
2. Install EAP 7 on VM1, VM2 and VM3, please use the installer version of the download, this is lot    more easier for beginners.

3. Create and configure data source for remote Oracle11g RDBMS connection on VM2&3, EAP      Server installation
4. Create BPM Suite 6.4.0 database schema on remote (VM4) Oracle11g RDBMS
5. Install BPM Suite 6.4.0 (business central and dashbuilder) on VM1
    with reference to the Red Hat BPM Suite 6.4.0 installation guide documentation, EAP 7 not support BPM Suite 6.4.0 jar installer. So please use deployable  for EAP 7 zip bundle.
"However, the JAR installer does not support Red Hat JBoss EAP 7.0. For Red Hat JBoss EAP 7.0, only Deployable Zip installation option is supported."

6. Install KIE Execution Server on VM2 and VM3
7. Cluster the VM2 & VM3 EAP Servers and install httpd mod-cluster for load balance
8. Register KIE Server into Business Central
9. Connect Business Central to remote Artifactory repo.

How to install Red Hat JBoss EAP 7 on Mac OS X


In this blog I am going to guide you how to install Red Hat JBoss Enterprise Application Platform (EAP) on OS X,  If you want to know more about Red Hat JBoss EAP, please refer the following url...This is beginner level tutorial.
    https://developers.redhat.com/products/eap/overview/

1. First download EAP 7 from the following url into your local machine temporary location...
               https://developers.redhat.com/downloads/


 2. Open a terminal window, and navigate to your installed location and type the following command to run the downloaded executable jar file ...
      sudo java -jar jboss-eap-7.0.0-installer.jar


3. It will start the installation dialog box as shown in the below diagram..select your language and click OK

4. Accept the Licensing Agreement by selecting the I accept radio button, this enable the Next button, click on the Next button...



5. Select the installation location in your local file system and click OK,


6. Click Next


7. In the next window, enter your admin user name and password (remember the user name and password or make note of it for future use) and click Next



8. Click Next..


9. Click Next




10. We have two option here, one default configuration and another option is custom advanced configuration. Since this is newbie tutorial, we are good with the default configuration...click Next


11. Now you can see a install success message window...click Done...




12. At this point we are successfully installed the EAP 7 on the local Machine.

13. Now we need to start the EAP server, Open your terminal window and navigate to the EAP installed location, and navigate to the server bin folder. 

14. In the server bin folder location you can find all the server start up scripts...to start the server please type the following command...
                                          sudo ./standalone.sh

15. In the terminal, you can see the server starting logs...make sure you have a clean error free logs...



16. Now, your server is up and running, now open a new browser window, and type the following url,
                         http://localhost:8080/ and enter now, Red Hat JBoss EAP 7 home page will be open.

(make sure your port number, default port is 8080, if any of the service already using this port, you may need to change the port number in the server config file)


17. Click on the Administration Console, it will pop up the admin log in page, please enter the user name and password (use the name and password you created in the above step 7), click Log In button


18. Now you can see the EAP server admin page.




19. Just click on the each link and learn those futures, further reading please refer the below link...


Congratulations, you have successfully installed EAP 7
--------