Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
This document is intended to describe the steps required to deploy Joget Workflow v5 Large Enterprise Edition (LEE) in a clustered environment for scalability and redundancy.
In order for clustering to work, the Large Enterprise Edition is required. The standard Enterprise Edition will not work due to licensing restrictions. Clustering requires several layers to be prepared and configured:
There are many ways to design the clustering architecture, but the core concepts will be similar. In this document, the architecture used is as follows:
This guide describes the steps required to setup Joget Workflow LEE clustering. The exact steps will depend on the actual products used in each layer.
Pre-Deployment Requirements
Before the clustering installation can be done, the following prerequisites are needed:
Common directory to be accessed by the application servers with read/write permissions. This directory is used to store shared configuration files, system generated files, and uploaded files.
Common database to be accessed by the application servers with permission to select, update, delete, create and alter tables.
Java web application server to be installed and running on each server in the cluster.
Session replication to be configured on the application servers and network.
Load balancer (hardware or software) to be installed and configured to direct traffic for requests beginning with /jw to the application servers.
It is important to ensure that the pre-deployment requirements have been verified. Once verified, the Joget Workflow specific steps are as follows:
Datasource Configuration
Configure the datasource properties files in the shared directory
workflowDriver=com.mysql.jdbc.DriverworkflowUrl=jdbc\:mysql\://host\:port/database_name?characterEncoding\=UTF-8 workflowUser=username profileName= workflowPassword=password
Deploy Joget WAR files to the application servers and configure the startup properties to point to the shared directory.
export JAVA_OPTS="-XX:MaxPermSize=128m -Xmx1024M -Dwflow.home=/shared_directory_path"
Activate license for each server. Each server has a unique system key and requires a separate license activation.
Once the pre-deployment and clustering configuration has been done, the testing is a matter of using a web browser to access the load balancer.
This sample describes an installation using the following products:
Joget Workflow | Joget Workflow v5 LEE |
Load Balancer | Apache HTTP Web Server 2.4 with mod_proxy and mod_balancer (proxy and load balancing modules) running on Ubuntu 14.04 |
Application Servers | Apache Tomcat 8.0 running on Ubuntu 14.04 |
Shared File Directory | NFS on Ubuntu 14.04 |
Shared Database | MySQL 5.5 on Ubuntu 14.04 |
Share a file directory to be accessed by the application servers. This directory is used to store configuration files, system generated files, and uploaded files.
In this sample, the shared file directory will be a directory /export/wflow in the file server
sudo apt-get install portmap nfs-kernel-server
sudo mkdir -p /export/wflow
sudo chown nobody:nogroup /export/wflow
sudo vim /etc/exports
The /etc/exports should contain the following:
/export/wflow 192.168.1.0/255.255.255.0(rw,no_subtree_check,async)
sudo exportfs -ra
sudo service nfs-kernel-server restart
apt-get install nfs-common
sudo mkdir -p /opt/joget/shared/wflow
sudo chmod 777 /opt/joget/shared/wflow
sudo mount -t nfs wflow:/export/wflow /opt/joget/shared/wflow
echo test123 > /opt/joget/shared/wflow/test.txt
sudo apt-get install mysql-server
mysql -u root
Run the following MySQL commands to create a blank database
create database jwedb;
quit
mysql -uroot jwedb < /path/to/jwdb-mysql.sql
mysql -u root
Run the following MySQL commands to grant permissions to user joget and password joget
grant all privileges on jwedb.* to 'joget'@'%' identified by 'joget';
flush privileges;
quit
sudo vim /etc/mysql/my.cnf
Comment away the bind-address directive by adding a # in front of the line
#bind-address = 127.0.0.1
Restart MySQL
sudo service mysql restart
In the application server, test a remote connection to the database server database_host
mysql -h database_host -u joget -p
sudo mkdir -p /opt/joget/
sudo tar xvfz apache-tomcat-8.0.20.tar.gz /opt/joget/
sudo cd /opt/joget/apache-tomcat-8.0.20
sudo ./bin/catalina.sh start
<Engine name="Catalina" defaultHost="localhost" jvmRoute="node01">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
192.168.1.10 server1
sudo cd /opt/joget/apache-tomcat-8.0.20
sudo ./bin/catalina.sh stop
sudo ./bin/catalina.sh start
INFO: Starting clustering manager at localhost#/jw
Jan 17, 2016 11:21:32 AM org.apache.catalina.ha.session.DeltaManager getAllClusterSessions
INFO: Manager [localhost#/jw], requesting session state from org.apache.catalina.tribes.membership.MemberImpl[tcp://{127, 0, 0, 1}:4001,{127, 0, 0, 1},4001, alive=55733886, securePort=-1, UDP Port=-1, id={-57 118 -98 -98 110 -38 64 -68 -74 -25 -29 101 46 103 5 -48 }, payload={}, command={}, domain={}, ]. This operation will timeout if no session state has been received within 60 seconds.
Jan 17, 2016 11:21:32 AM org.apache.catalina.ha.session.DeltaManager waitForSendAllSessions
INFO: Manager [localhost#/jw]; session state send at 1/17/16 11:21 AM received in 104 ms.
sudo apt-get install apache2
sudo a2enmod headers proxy proxy_balancer proxy_http
sudo vim /etc/apache2/sites-available/jwsite.conf
Add the contents
NameVirtualHost *
<VirtualHost *>
DocumentRoot "/var/www/jwsite"
ServerName localhost
ServerAdmin support@mycompany.com
DirectoryIndex index.html index.htm
<Proxy balancer://cluster>
BalancerMember http://server1:8080 route=node01
BalancerMember http://server2:8080 route=node02
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass /jw balancer://cluster/jw stickysession=JSESSIONID
ProxyPassReverse /jw balancer://cluster/jw
</VirtualHost>
sudo a2ensite jwsite
sudo service apache2 reload