Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Image Removed
Joget Workflow v5 Large Enterprise Edition
Clustering Guide
2016
Table of Contents  


Introduction

...

 

...

Overview

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.
Anchor_1fob9te_1fob9te Anchor_1fob9te_1fob9te

...

Requirements

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:
Anchor_3znysh7_3znysh7 Anchor_3znysh7_3znysh7

  • Load Balancers
  • Application Servers
  • Shared File Directory
  • Shared Database

anchor 

_2et92p0 _2et92p0 Anchor_2et92p0_2et92p0

...

Architecture

 

...

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:

Anchor_tyjcwt_tyjcwt Anchor_tyjcwt_tyjcwt

...




 

...

Deployment and Configuration Guide

 

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.

Warning
IMPORTANT: Please note that there is minimal configuration required in Joget Workflow LEE itself, and almost all the work is done on the separate layers so it is vital to ensure that you have sufficient expertise in your chosen products.

...

...


...

Pre-Deployment Requirements

Anchor_1t3h5sf_1t3h5sfBefore the clustering installation can be done, the following prerequisites are needed:

...

 

...

Shared file directory

 

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.

...

  • _2s8eyo1Verify that the shared directory is mounted on the application servers and that files can be accessed with read and write permissions. Anchor_pfvj3etwle46_pfvj3etwle46

 

Shared database

 

Common database to be accessed by the application servers with permission to select, update, delete, create and alter tables.

...

  • Verify that the application servers can connect and query the shared database. Anchor_7t7p06sekojd_7t7p06sekojd

 

Application servers

 

Java web application server to be installed and running on each server in the cluster.

...

  • _3rdcrjnVerify that each application server has been installed correctly and can be accessed with a web browser. Anchor_6gc88j6v21fr_6gc88j6v21fr

 

Session replication

 

Session replication to be configured on the application servers and network.

...

  • Verify that session replication has been configured for each application server and the network. Anchor_ijqvn19vagp2_ijqvn19vagp2

 

Load balancer

 

Load balancer (hardware or software) to be installed and configured to direct traffic for requests beginning with /jw to the application servers.

...

  • Verify that the load balancer has been installed and configured correctly so that web traffic is directed to the individual application servers. Anchor_3kynp5h9e3tw_3kynp5h9e3tw

 


Joget Workflow Clustering Configuration

Anchor_35nkun2_35nkun2 


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

  1. Copy the files app_datasource.properties and app_datasource-default.properties from the wflow directory of a standard Joget installation into the shared file directory.
  2. Edit app_datasource-default.properties and set the database connection settings for the shared database, e.g. for MySQL, change the bold values below:

Code Block
workflowDriver=com.mysql.jdbc.DriverworkflowUrl=jdbc\:mysql\://host\:port/database_name?characterEncoding\=UTF-8

...


workflowUser=username

...


profileName=

...


workflowPassword=password

...

 

 

...

Application Deployment and Configuration

 

Deploy Joget WAR files to the application servers and configure the startup properties to point to the shared directory.

  1. Deploy the WAR files jw.war and jwdesigner.war from the LEE bundle to each of the application servers e.g. for Apache Tomcat, copy the files into the tomcat webapps directory
  2. Add a Java -wflow.home=shared_directory_path option in the application server startup e.g. for Apache Tomcat, modify the JAVA_OPTS line

Code Block
export JAVA_OPTS="-XX:MaxPermSize=128m -Xmx1024M -Dwflow.home=/shared_directory_path"

...

 

License Activation

Activate license for each server. Each server has a unique system key and requires a separate license activation.

  1. For each of the application servers, use the browser to directly access the Joget web console bypassing the load balancer e.g. {+}http://server1:8080/jw/web/console/home+
  2. Request for license and activate it using the link in the web console footer.

...

 

 

...

Post-Deployment Testing

 

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. Anchor_z337ya_z337ya Anchor_z337ya_z337ya

...

 

 

...

Sample Installation and Configuration

Anchor_3j2qqm3_3j2qqm3 Anchor_3j2qqm3_3j2qqm3 


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

...

Warning
IMPORTANT: Please note that this is not a comprehensive guide and does not cover production-level requirements e.g. user permissions, network and database security, etc. Please ensure that these are covered by your system, network and database administrators.

...

 

...

Create a Shared File Directory

...

_2xcytpi_2xcytpiShare 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

  1. In the file server, install the NFS server


sudo apt-get install portmap nfs-kernel-server

  1. Create shared directory and set permission


sudo mkdir -p /export/wflow
sudo chown nobody:nogroup /export/wflow

  1. Configure NFS to export the shared directory, edit /etc/exports to export the directory to the local 192.168.1.0 subnetwork with your favourite editor


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)

  1. Export the shares and restart NFS service

...

    1. Anchor
      _tuhqe186nkq3
      _tuhqe186nkq3
      Mount the Shared Directory in the Application Servers

 

  1. In the application servers, install the NFS client


apt-get install nfs-common

  1. Create new directory /opt/joget/shared/wflow to mount the shared directory and set the directory permissions


sudo mkdir -p /opt/joget/shared/wflow
sudo chmod 777 /opt/joget/shared/wflow

  1. Mount the shared directory.


sudo mount -t nfs wflow:/export/wflow /opt/joget/shared/wflow

  1. Test read-write permissions to confirm that the directory sharing works.


Anchor
_3whwml4
_3whwml4
echo test123 > /opt/joget/shared/wflow/test.txt

    1. Anchor
      _2bn6wsx
      _2bn6wsx
      Create a Shared Database

 

  1. Install MySQL ({+}https://help.ubuntu.com/14.04/serverguide/mysql.html+)


sudo apt-get install mysql-server

  1. Create a database called jwedb accessible to the application servers.


mysql -u root
Run the following MySQL commands to create a blank database
create database jwedb;
quit

  1. Populate the newly created database with the Joget database schema

...


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

  1. Configure MySQL to listen to database connections from remote hosts. Edit the my.cnf file with your favourite editor


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

  1. Test remote connections


In the application server, test a remote connection to the database server database_host
mysql -h database_host -u joget -p

Anchor
_3as4poj
_3as4poj
Anchor
_3as4poj
_3as4poj

    1. Anchor
      _qlhqdvlylzzw
      _qlhqdvlylzzw
      Deploy Application Servers

 

  1. Install Apache Tomcat on each of the application servers. In each application server, run the following to extract tomcat into /opt/joget:


sudo mkdir -p /opt/joget/
sudo tar xvfz apache-tomcat-8.0.20.tar.gz /opt/joget/

  1. Start each application server


sudo cd /opt/joget/apache-tomcat-8.0.20
sudo ./bin/catalina.sh start

  1. Open a web browser and access each server to confirm that *http://server:8080/jw*

...

    1. Anchor
      _d6ogmi9qegsu
      _d6ogmi9qegsu
      Configure Application Server Session Replication

 

  1. Configure Tomcat for clustering by editing apache-tomcat-8.0.20/conf/server.xml. Add jvmRoute="node01" to the Engine tag and uncomment the Cluster tag.


<Engine name="Catalina" defaultHost="localhost" jvmRoute="node01">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

  1. Configure local domain IP. Verify that the local server name resolves to the IP and not 127.0.1.1. Assuming the server name is server1 and the IP is 192.168.1.10, edit /etc/hosts and set:


192.168.1.10 server1

  1. Verify multicast is enabled between the application servers by running ifconfig and look for MULTICAST. Try {+}http://blogs.agilefaqs.com/2009/11/08/enabling-multicast-on-your-macos-unix/+ if there are issues.

 

  1. Restart the Tomcat servers.


sudo cd /opt/joget/apache-tomcat-8.0.20
sudo ./bin/catalina.sh stop
sudo ./bin/catalina.sh start

  1. Verify session replication working between the application servers. The catalina.out log file in apache-tomcat-8.0.20/logs should show something similar to:


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.

  1. More information on Tomcat clustering is at {_}{+}http://tomcat.apache.org/tomcat-8.0-doc/cluster-howto.html+_

 

    1. Anchor
      _rarh14a3opnv
      _rarh14a3opnv
      Configure Load Balancer
  1. In the load balancer server, install Apache HTTP Server


sudo apt-get install apache2

  1. Install proxy and balancer modules


sudo a2enmod headers proxy proxy_balancer proxy_http

  1. Configure a new site with the proxy and balancer modules. Create a new file in /etc/apache2/sites-available, named jwsite


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>

  1. Enable the new site and restart Apache

...

    1. Anchor
      _qpc488wc2rdo
      _qpc488wc2rdo
      Deploy and Configure Joget Workflow LEE

 

  1. Deploy and configure Joget Workflow LEE as described earlier in 2.2 Joget Clustering Configuration