BT

Cloud Tools bring Java EE on Amazon EC2

| by Dio Synodinos Follow 4 Followers on May 30, 2008. Estimated reading time: 2 minutes |

Chris Richardson the author of "POJOs in Action", has released Cloud Tools, a set of tools for deploying and testing Java EE applications on Amazon's Elastic Computing Cloud (EC2), under Apache License 2.0.

There are three main parts to Cloud Tools

  • Amazon Machine Images (AMIs) that are configured to run Tomcat and work with EC2Deploy
  • EC2Deploy - the core framework.
  • A Maven plugin that uses EC2Deploy to deploy a web application to EC2

Chris Richardson blogs about why he has created Cloud Tools:

Computer hardware has traditionally been a scarce, expensive resource. In the early days of computing developers had to share a single machine. Today each developer usually has their own machine but it's rare for a developer to have more than one. This means that running performance tests often involves scavenging for machines.  Likewise, replicating even just part of a production environment is a major undertaking. With Amazon's Elastic Compute Cloud (EC2), however, things are very different. A set of Linux servers is now just a web service call away. Depending on the type of the servers you simply pay 10-80 cents per server per hour for up to 20 servers! No more upfront costs or waiting for machines to be purchased and configured.

To make it easier for enterprise Java developers to use EC2, I have created EC2Deploy.  It's a Groovy framework for deploying an enterprise Java application on a set of Amazon EC2 servers. EC2Deploy provides a simple, easy to use API for launching a set of EC2 instances; configuring MySQL, Apache and one or more Tomcat servers; and deploying one or more web applications. In addition, it can also run JMeter and collect performance metrics.

On the project's page there is a short discretion on how to use the Maven plugin to deploy applications to EC2:

The maven plugin is the easiest 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

After the addition of Persistent Storage, Amazon's EC2 seems to gathering momentum over the traditional paradigm for allocating and managing hardware resources and the creation of software like Cloud Tools may signify the beginning of the creation of a whole EC2 software ecology.

For more information on Cloud Computing, please visit: http://www.infoq.com/cloud-computing

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss
BT