1. Create an account with OpenShift.
2. Add application in free tier.
3. Within that application you are free to create Tomcat 7 , Web Load Balancer and MySQL instance.
4. Create the war file.
5. Copy the war file to a location where you have the permission
eg . scp -i your_certificate war_file.war user_xxxx@yyyyy-zzzzzz.rhcloud.com:/var/lib/openshift/user_xxxx/app-root/data
6. ssh -i your_certificate user_xxxx@yyyy-zzzzzz.rhcloud.com
7. cp war file to /var/lib/openshift/user_xxxx/app-root/dependencies/jbossews/webapps
8. Now restart all service using ctl_all restart in command line . ( or use the web front end )
9. Make sure all DB access variables are taken from the env variables
eg. String dbHost = System.getenv(“OPENSHIFT_MYSQL_DB_HOST”);
String dbPort = System.getenv(“OPENSHIFT_MYSQL_DB_PORT”);
String appName = System.getenv(“OPENSHIFT_APP_NAME”);
10. Create the db first or configure hibernate config file to auto create the DB.
11. Its done and check the url ( will take some time )