Tuesday, June 30, 2009

Deploy Intalio Tempo in Apache Tomcat 5

Now you can try WSO2 BPS 2.0.0 which offers you to deploy human tasks written in WS-HumaTasks standard as well as Business  Processes written in WS-BPEL standard. You can also integrate human tasks within the business  processes according to WS-BPEL4People standard. You can start the server as a stand-alone server, so that no need to go through hard configuration stuff. WSO2 BPS 2.0.0 is open source product. Check release note

Recently, I tried to deploy Intalio Tempo in standalone Apache Tomcat 5.5.xx. Tempo provides a ruby build script (tempo_builder.rb) to provide a Tempo integrated in to a Apache Tomcat server. But, what I required was different scenario. I needed to deploy Tempo in my own Tomcat server.
It took few days for me to deploy Tempo in a standalone Tomcat server. Therefore, I thought of sharing the experience I gained, in-order to minimise the pain of people who are in need of deploying Tempo in Tomcat.
Please note well, this document may not be the best way to deploy Tempo in Tomcat. Therefore, please let me know, if you got to know a better way.

First of all, make sure that all the required software are properly installed. Refer INSTALL.txt to find the required software. If you intend to build Apache ODE, then you have to aware about the Buildr and the Java version. In case if you need help on this, refer this post. Make sure that you install the Buildr version 1.3.3 instead of 1.3.2 to support both ODE and Tempo.

checkout the source of Tempo
git clone git://github.com/intalio/tempo.git

Build the Tempo (according to the building instructions of Tempo )
buildr package

In case, if you have installed Buildr in both Ruby and jRuby, make sure to prefix jruby -S or ruby -S to select between the installed Buildrs.

Build the Tempo (to build the dependency jars, BPEL processes and axis2 services)
run the script TEMPO_CHECKOUT/rsc/scripts/tempo_builder.rb
refer INSTALL.txt for further details

From this onwards:
TEMPO_TOMCAT refers to the Tomcat directory created by the tempo_builder.rb script.
TOMCAT_HOME refers to the standalone Tomcat server in which Tempo should be deployed.

Copy the following
TEMPO_TOMCAT/bin/setenv.sh to TOMCAT_HOME/bin
TEMPO_TOMCAT/var to TOMCAT_HOME/

Edit TOMCAT_HOME/conf/context.xml and add the following in to the <context> element
<resourcelink global="jdbc/BPMSDB" name="jdbc/BPMSDB" type="javax.sql.DataSource"/>
<resourcelink global="DeployRegistry" name="registry/DeployRegistry" type="org.intalio.deploy.registry.Registry"/>
<transaction factory="">TomcatGeronimoTxFactory" />

Edit TOMCAT_HOME/conf/server.xml and add the following to the <globalnamingresources> element
<resource name="jdbc/BPMSDB" auth="Container" type="javax.sql.DataSource" maxactive="100" maxidle="30" maxwait="10000" username="root" password="password" driverclassname="jdbc.Driver" url="jdbc:mysql://localhost:3306/bpms?relaxAutoCommit=true"/>
<resource name="registry/DeployRegistry" auth="Container" type="registry.Registry" factory="org.intalio.deploy.registry.RegistryObjectFactory" />

Edit TOMCAT_HOME/conf/web.xml and add the following to the element <web-app>
<resource-ref>
<res-ref-name>jdbc/BPMSDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

Install MySQL Server and create the database "bpms" and create the schema as in TEMPO_TOMCAT/bpms.sql
create database bpms;
use bpms;
source TEMPO_HOME/bpms.sql;


Copy the MySQL connector jar to TOMCAT_HOME/common/lib

Copy the additional jars in the TEMPO_TOMCAT/common/lib to the TOMCAT_HOME/common/lib
deploy-registry-1.0.3.jar
slf4j-api-1.4.3.jar
slf4j-log4j12-1.4.3.jar
log4j-1.2.15.jar

Deploy Axis2 (1.4.1) and ODE (1.3.2) in your standalone Tomcat Server

Deploy the following web services which are in the TEMPO_CHECKOUT's respective target directories, in Axis2.
tempo-tas-service-5.x.x.x.aar
tempo-tms-service-5.x.x.x.aar

Also deploy the following web services which can be found in TEMPO_TOMCAT/webapps/axis2/WEB-INF/
servicesdeploy-ws-service-1.0.3.aar
security-ws-service-1.0.1.aar

Copy the following jars in TEMPO_TOMCAT/webapps/ode/WEB-INF/lib to the TOMCAT_HOME/webapps/ode/WEB-INF/lib
deploy-api-1.0.3.jar
ode-ext-deploy-1.0.0.jar
tempo-processes-xpath-extensions-6.0.6.jar

Then deploy the following .war files that can be found in respective target directories of TEMPO_CHECKOUT directory.
fds.war
ui-fw.war
wds.war

Then Deploy the xFormsManager.war. It is possible to build it from the source (git clone git://http://github.com/intalio/xforms-manager.git) or download the war file

Now you are ready to use Tempo in your Tomcat server. Please feel free to point out the mistakes in this post as well as your problems regarding deployment.

References:
Tempo-div thread - Is it possible to deploy tempo on tomcat 5.5 and use its runtime
Tempo Installation Guide - INSTALL.txt
Tempo Building Guide - Building
Install Buildr - Buildr for ODE and Tempo
Tempo-div thread which I used to get help - Problem on deploying fds & ui-fw

No comments:

Post a Comment