Cloud.com's EC2 local deployment Guide
8/30/2010
8/25/2011 (updated)
Table of Contents
1. Required 3rd Party Software
1) Following software has to be installed in order to deploy and run cloud-bridge tool:
apache-tomcat-6.0.32
axis2 1.5.1 (http://apache.imghat.com//ws/axis2/1_5/axis2-1.5-bin.zip)
ant
java
mysql
2) Set following environment variables:
ANT_HOME
CATALINA_HOME
export ANT_HOME
export JAVA_HOME
3) Go to CATALINA_HOME directory and excute “mkdir temp” (this directory is used for storing temporary axis files)
2. Clone repository
Clone cloud-bridge repository:
git clone git@github.com:alena11081/cloud-bridge.git
3. Build, deploy and run cloud-bridge with ant
Deployment procedure using ant (build.xml and build-cloud-bridge.xml are config files), execute from cloned cloud-bridge directory:.
* ant clean - removes dist directory
* ant clean-tomcat - cleans up $CATALINA_HOME/webapps/bridge directory
* ant build-cloud-bridge compiles and places the resulting jars into cloud-bridge/dist:
ls dist/
cloud-auth-ec2.mar cloud-auth-s3.mar cloud-bridge.jar cloud-ec2.aar cloud-s3.aar
* deploy-axis - copies and unwars cloud-bridge/lib/axis2-webapp-1.5.1.war to $CATALINA_HOME/webapps/bridge directory
ant deploy-cloud-bridge copies files to $CATALINA_HOME/webapps/bridge tomcat directory:
- copy cloud-bridge/dist/cloud-ec2.aar and cloud-s3.aar to $CATALINA_HOME/webapps/bridge/WEB-INF/services
- copy cloud-bridge/dist/cloud-auth-ec2.mar and cloud-auth-s3.mar to $CATALINA_HOME/webapps/bridge/WEB-INF/modules
- copy all .mar files from cloud-bridge/modules to $CATALINA_HOME/webapps/bridge/WEB-INF/modules
- copy cloud-bridge/dist/cloud-bridge.jar to $CATALINA_HOME/webapps/bridge/WEB-INF/lib
- copy all .jar files from cloud-bridge/lib directory to $CATALINA_HOME/webapps/bridge/WEB-INF/lib
- copy all .jar files from cloud-bridge/rampartlib directory to $CATALINA_HOME/webapps/bridge/WEB-INF/lib
- copy all files from cloud-bridge/conf directory to $CATALINA_HOME/webapps/bridge/WEB-INF/conf
- copy cloud-bridge/resource/Axis2/axis2.xml to $CATALINA_HOME/webapps/bridge/WEB-INF/conf
- copy cloud-bridge/web/web.xml to $CATALINA_HOME/webapps/bridge/WEB-INF
- copy cloud-bridge/resource/AmazonEC2/crypto.properties and xes.keystore to $CATALINA_HOME/webapps/bridge/WEB-INF/classes/
- remove $CATALINA_HOME/webapps/bridge/WEB-INF/lib/dom4j-1.6.1.jar
ant deploydb - execute cloud-bridge/db/mysql/deploy-db-bridge.sh (for Unix). If it's a windows deployment, execute db/mysql/init_db.bat script
5) Configure ec2-service.properties (see parameters descriptions in resource/AmazonEC2/docs/EC2-implementation-guide.html).
6) To run application execute "./catalina.sh run" from $CATALINA_HOME/bin directory.