How to deploy WSO2 BPS on Apache Tomcat
WSO2 Business Process Server (BPS) -1.0 is the latest member of WSO2 SOA platform. I have demonstrated a basic scenario using WSO2 BPS standalone distribution in a previous blog post. WSO2 BPS (and all other carbon based products) can be deployed in most of the servlet containers with a few configuration steps. Lets deploy WSO2 BPS on Apache tomcat 6.*.
Download WSO2 BPS-1.0 from here. Extract the downloaded zip into a directory. Copy conf, database, repository and resources directories in to a new folder. Say it is carbon-repo (i.e:- C:\bps\carbon-repo)
Also, create a new directory, lib\extensions under carbon-home.
Lets refer to your tomcat installation directory, CATALINA_HOME. Go to CATALINA_HOME\webapps directory and create a new folder, bps.
Now, copy wso2bps-1.0\webapps\ROOT\WEB-INF to CATALINA_HOME\webapps\bps
We need to enable https in tomcat. Therefore, edit CATALINA_HOME\conf\server.xml by adding the following entry.
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
acceptCount="100" scheme="https" secure="true" SSLEnabled="true"
keystoreFile = "C:\bps\carbon-repo\resources\security\wso2carbon.jks"
Make sure to give the exact location of wso2carbon.jks as highlighted above.
We have done the configurations required in tomcat. Now, we must do the necessary configurations in a set of config files shipped with WSO2 BPS. We will update carbon.xml, axis2.xml, registry.xml and user-mgt.xml which can be found at carbon-repo\conf directory.
First, open carbon.xml and update the ServerURL element as follows.
Note that we have configured tomcat to run on 8443 port.
Save and close carbon.xml.
Open registry.xml and update DB URL as follows.
Now, open user-mgt.xml and update database URL as follows.
Make sure to specify the absolute path of the WSO2CARBON_DB in both of the above elements.
It is required to change the contextRoot in the service path of axis2.xml. Change it to match with the web application directory name we have given in step2. In our case, it is bps.
We must change the http and https ports in In Transports section of axis2.xml as follows.
We have almost completed the required configurations. Before starting tomcat with those changes, we need to do one more change. Due to a bug in BPS-1.0, we must copy org.wso2.carbon.geronimo.jta.1.1.spec-1.1.jar (which is available at the lib\extensions directory of the WSO2 BPS binary distribution) to carbon-repo\lib\extensions and CATALINA_HOME\webapps\bps\WEB-INF\lib directories.
Now, open a new command window and change the directory to CATALINA_HOME/bin.
Define an environment variable called CARBON_HOME and set the path to your carbon-repo directory.
In windows; set CARBON_HOME=C:\bps\carbon-repo
In linux; export CARBON_HOME=\home\user\bps\carbon-repo
Start tomcat from the same command window/shell.
WSO2 BPS will be started successfully. You can access the management console using https:\\localhost:8443\bps\carbon