News

Cloud Tools

Tools for deploying Java Spring and Grails applications in the Cloud

Cloud Tools is a set of tools for deploying, managing and testing Java EE applications on Amazon's Elastic Computing Cloud (EC2) and VMware environments. There are three main parts to Cloud Tools:

  • EC2Deploy - the core framework. This framework manages virtual instances (e.g. EC2), configures MySQL, Tomcat, Terracotta and Apache and deploys the application. See this blog entry for an overview.
  • Maven and Grails plugins that use EC2Deploy to deploy an application
  • Amazon Machine Images (AMIs) that are configured to run Tomcat and work with EC2Deploy. See list of installed software.
NEW: Cloud Tools now has adaptors for vSphere and vCloud (Terremark vCloudExpress platform), see the blog entry.


Grails Plugin

The Grails plugin makes it easy to deploy a Grails application to the cloud. It takes care of configuring MySQL, Tomcat and Apache and deploys the application. The plugin provides many scripts including:

  • cloud-tools-deploy - deploy the web application
  • cloud-tools-describe - display information about the running EC2 instances
  • cloud-tools-redeploy - redeploys the application
  • cloud-tools-stop - terminates the instances
You can download the plugin from here. See GettingStartedWithTheCloudToolsGrailsPlugin for information about configuring the plugin.

Maven Plugin

The Maven plugin is an easy way to use Cloud Tools. Once you have configured the plugin in the pom.xml you can deploy your web application with "mvn cloudtools:deploy". This goal will:

  • Launch the specified number of Amazon EC2 instances
  • Configure a MySQL master database: create the schema, and run your database initialization scripts
  • Configure zero or more MySQL slaves (optionally in a different availability zone)
  • Upload your web application to EC2
  • Configure one or more Tomcat servers and deploy your web application
  • Configure an Apache instance to load balance across the Tomcat servers
The Cloud Tools maven plugin also supports the following other goals:
  • cloudtools:jmeter - runs a load test
  • cloudtools:redeploy - redeploys the web application
  • cloudtools:dbsave - save a database snapshot in S3
  • cloudtools:dbrestore - restore the database from S3
  • cloudtools:clone - creates a copy of the cluster
  • cloudtools:describe - describes the cluster
  • cloudtools:list - lists the available clusters
  • cloudtools:stop - shutdown the cluster
See these instructions on using the Maven plugin.