Tech Blogging‎ > ‎

Deploying Bonita an Open Source BPM on Tomcat a Step by Step Guide

posted Jan 9, 2012, 2:59 AM by Haris Hashim   [ updated Jan 9, 2012, 4:31 AM ]
Disclaimer: This writeup is just for reference and not in anyway suitable for production or any other purposes.

1. We are going to use Tomcat 6, Download the binary, extract it and relocate to a suitable path. Download url bellow is just for reference and it is a good idea to verify binary authenticity. Which is not done here.
 
wget  http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.24/bin/apache-tomcat-6.0.24.tar.gz
tar -zxvf apache-tomcat-6.0.24.tar.gz
mv apache-tomcat-6.0.24 /opt/tomcat6

2. Download BOS-5.6.1-deploy.zip from BonitaSoft website (sign-up might be required). Pay attention to the word 'deploy' in the file name. My download location is /tmb/bonita. Sounds like a good idea at that time :D. After download is finished, extract using unzip

cd /tmp/bonita
unzip BOS-5.6.1-deploy.zip -d BOS-5.6.1-deploy

3. Create folder to store  libraries needed by Bonita as well as register this it in catalina.properties file.

mkdir /opt/tomcat6/lib/bonita
 vi /opt/tomcat6/conf/catalina.properties    


Look for common.loader. Hint: to use vi search function pressed the / key and type search phrase. Append our new library location at the end of line. The result should be as follows. Appended text is in bold.

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib
,${catalina.home}/lib/*.jar,${catalina.home}/lib/bonita/*.jar

Exit and save the file.

4. Copy the libraries for the Execution Engine and User Experience module into folder created in previous step.

cd /tmp/bonita/BOS-5.6.1-deploy/bonita_execution_engine/
cp engine/libs/* /opt/tomcat6/lib/bonita/
cp bonita_client/libs/* /opt/tomcat6/lib/bonita/

5. Deploy user experience and xcmis war files. Nothing fancy, just copy them into Tomcat webapp folder and when tomcat is started it will expand the war files.

cd /tmp/bonita/BOS-5.6.1-deploy/bonita_user_experience/
cp without_execution_engine_with_client/bonita.war /opt/tomcat6/webapps/

cd /tmp/bonita/BOS-5.6.1-deploy/xcmis/
cp xcmis.war /opt/tomcat6/webapps

6. Copy config files to tomcat home folder. Bellow command should copy two folders named bonita and external.

 cp -R /tmp/bonita/BOS-5.6.1-deploy/conf/* /opt/tomcat6/

7. Next step is to specify environment variable that is used when tomcat is started. Tomcat 6 come without this setenv.sh file. So we are going to create and dump some text into it.

cd /opt/tomcat6/bin/
vi setenv.sh

Enter insert mode (press i) and paste the following text.

#!/bin/sh

# Sets some variables
BONITA_HOME="-DBONITA_HOME=$CATALINA_HOME/bonita"
LOG_OPTS="-Djava.util.logging.config.file=$CATALINA_HOME/external/logging/logging.properties"
SECURITY_OPTS="-Djava.security.auth.login.config=$CATALINA_HOME/external/security/jaas-standard.cfg"
CATALINA_OPTS="$CATALINA_OPTS $BONITA_HOME $LOG_OPTS $SECURITY_OPTS $CMIS_CONFIG -Dfile.encoding=UTF-8
-Xshare:auto -Xms512m -Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError"
export CATALINA_OPTS

Exit and save. Set the file as executable using bellow command.

chmod u+x setenv.sh

8.

Comments