InfoQ

News

Cloud Tools bring Java EE on Amazon EC2

Posted by Dionysios G. Synodinos on May 30, 2008 07:53 AM

Community
Architecture,
Java
Topics
Virtualization,
Data Access,
Cloud Computing
Tags
Amazon,
EC2

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

No comments

Reply

Exclusive Content

Typemock: Past, Present and Future

Eli Lopian of Typemock answers a few questions on Typemock origins and where Typemock is headed.

Agile in Practice: What Is Actually Going On Out There?

Scott Ambler talks about actual data resulting from surveys made during 2006-2008, showing how Agile is perceived and implemented within organizations.

Building Smart Windows Applications

From QCon 2008, Daniel Moth presents on using Visual Studio 2008 and .NET 3.5 to create compelling rich Windows applications.

Joshua Kerievsky about Industrial XP

Joshua Kerievsky, founder of Industrial Logic, talks about Industrial Extreme Programming which extends XP by including practices dealing with management, customers and developers.

Jeff Barr Discusses Amazon Web Services

Amazon Web Services (AWS) Evangelist Jeff Barr discusses SimpleDB, S3, EC2, SQS, cloud computing, how different Amazon services interact, origins of AWS, AWS globalization and the March AWS outage.

More Than Just Spin (Up) : Virtualization for the Enterprise and SaaS

Cloud services have helped bring virtualization to the forefront. Its full power however, also includes other benefits such as high availability, disaster recovery, and rapid provisioning.

Ruby Beyond Rails

John Lam talks about his path to dynamic languages, some of the problems of making IronRuby run fast, and how the DLR helps with implementing languages.

VMware Infrastructure 3 Book Excerpt and Author Interview

VMware Infrastructure 3: Advanced Technical Design Guide and Advanced Operations Guide provides a wealth of practical insights into setting up virtualization in todays corporate environments.