Versions Compared

Key

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

...

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

...

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

In the file server, install the NFS server

 

Code Block
sudo apt-get install portmap nfs-kernel-server

Create shared directory and set permission

 

Code Block
sudo mkdir -p /export/wflow

...


sudo chown nobody:nogroup /export/wflow

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

 

Code Block
sudo vim /etc/exports 


The /etc/exports should contain the following:

Code Block
/export/wflow 192.168.1.0/255.255.255.0(rw,no_subtree_check,async)

Export the shares and restart NFS service

 

Code Block
sudo exportfs -ra

...


sudo service nfs-kernel-server restart 

...



 

...

Mount the Shared Directory in the Application Servers

 

 

In the application servers, install the NFS client

 

Code Block
apt-get install nfs-common

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

 

Code Block
sudo mkdir -p /opt/joget/shared/wflow

...


sudo chmod 777 /opt/joget/shared/wflow

Mount the shared directory.

 

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

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

anchor _3whwml4

Code Block

...

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

...

...

Create a Shared Database

...

Install MySQL (

...

https://help.ubuntu.com/14.04/serverguide/mysql.html

...

)


 

Code Block
sudo apt-get install mysql-server

Create a database called jwedb accessible to the application servers.

 

Code Block
mysql -u root 

Run the following MySQL commands to create a blank database

Code Block
create database jwedb;

...


quit

Populate the newly created database with the Joget database schema

 

Code Block
mysql -uroot jwedb < /path/to/jwdb-mysql.sql

 

Anchor_qsh70q_qsh70q Anchor_qsh70q_qsh70qConfigure database permissions

 

Code Block
mysql -u root 

Run the following MySQL commands to grant permissions to user joget and password joget

Code Block
grant all privileges on jwedb.* to 'joget'@'%' identified by 'joget';

...


flush privileges;

...


quit

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

 

Code Block
sudo vim /etc/mysql/my.cnf 


Comment away the bind-address directive by adding a # in front of the line

Code Block
#bind-address = 127.0.0.1 


Restart MySQL

Code Block
sudo service mysql restart

Test remote connections


In the application server, test a remote connection to the database server database_host

Code Block
mysql -h database_host -u joget -p

...



...

Deploy Application Servers

 

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

 

Code Block
sudo mkdir -p /opt/joget/

...


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

Start each application server

 

Code Block
sudo cd /opt/joget/apache-tomcat-8.0.20

...


sudo ./bin/catalina.sh start

Open a web browser and access each server to confirm that

...

http://server:8080/jw

...

Anchor_1pxezwc_1pxezwc Anchor_1pxezwc_1pxezwc

...



 

...

Configure Application Server Session Replication

 

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.

 

Code Block
<Engine name="Catalina" defaultHost="localhost" jvmRoute="node01">

...


<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

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:

 

Code Block
192.168.1.10 server1

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.

 

Restart the Tomcat servers.

 

Code Block
sudo cd /opt/joget/apache-tomcat-8.0.20

...


sudo ./bin/catalina.sh stop

...


sudo ./bin/catalina.sh start

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:

 

Code Block
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+_

 

...

...

Configure Load Balancer

In the load balancer server, install Apache HTTP Server


 

Code Block
sudo apt-get install apache2

Install proxy and balancer modules


 

Code Block
sudo a2enmod headers proxy proxy_balancer proxy_http

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

 

Code Block
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>

Enable the new site and restart Apache

 

Code Block
sudo a2ensite jwsite

...


sudo service apache2 reload

...

...



...

Deploy and Configure Joget Workflow LEE

...

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