Cloud Tools is a set of tools for deploying, managing and testing Java EE applications on Amazon's Elastic Computing Cloud (EC2). There are three main parts to Cloud Tools
- Amazon Machine Images (AMIs) that are configured to run Tomcat and work with EC2Deploy. See list of installed software.
- EC2Deploy - the core framework. This framework manages EC2 instances, 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 to EC2
NEW: Cloud Tools now supports Elastic Block Store.
We are looking for beta testers for a new hosted version of Cloud Tools that provides automated application monitoring and management.
Please contact us if you are interested in trying out this new service.
Grails Plugin
The Grails plugin makes it easy to deploy a Grails application to Amazon EC2. 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 to EC2 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.
Contact me if you would like to know more about Cloud Tools or want to explore migrating your Java or Grails application to Amazon EC2.