The open-source Cloud Tools project, hosted on Google Code, is a prime example of the emerging trend of open-source developers targeting the cloud and looking at services such as Amazon Web Services and Google App Engine to host their applications.
An Evans Data survey recently emphasized this trend, showing that 40 percent of surveyed developers working on open-source projects plan to deliver their applications as Web services offerings using cloud providers. The majority of respondents, at 28 percent, said they plan to use Google App Engine to develop cloud applications, while 15 percent plan to use Amazon.com’s Amazon Web Services.
Chris Richardson, founder of the Cloud Tools project, is one such developer. Richardson started the Cloud Tools effort more than a year ago and it has taken off, so much so that Richardson has launched a commercial service based on Cloud Tools called Cloud Foundry.
Cloud Tools is a set of tools for deploying, managing and testing Java EE (Java Platform, Enterprise Edition) applications on the Amazon EC2 (Elastic Computing Cloud). There are three main parts to Cloud Tools: AMIs (Amazon Machine Images) that are configured to run Tomcat and work with EC2Deploy; EC2Deploy, the core framework that manages EC2 instances, configures MySQL, Tomcat, Terracotta and Apache, and deploys the application; and Maven and Grails plug-ins that use EC2Deploy to deploy an application to EC2.
The Cloud Tools Grails plug-in 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 project’s Maven plug-in is an easy way to use Cloud Tools, Richardson said.
“One of the great things about compute clouds such as Amazon EC2 is their elasticity-you can quickly and easily launch as many servers as you need,” Richardson said in a blog post. “And, with Cloud Tools, you can easily deploy and manage your Java/Grails applications on Amazon EC2.”
In a recent blog post, Java developer Dustin Whitney discussed the benefits of using Amazon EC2 and Cloud Tools. Richardson described Whitney’s use of Cloud Tools to help with a problem Whitney ran into. “His Grails application, which was running on [a] single instance, was overloaded by a sudden increase in traffic. Fortunately, he was able to use Cloud Tools to quickly redeploy his application on multiple instances that could handle the load.”
“The solution was as simple as opening my app, changing the config to run with four app servers, and running ‘grails cloud-tools-deploy.’ Once deployed, I switched the Elastic IP address of the old deployment to the load balancing server of my new deployment and voila! My site was hauling ass again.Had we been using the traditional managed hosting services that we typically use, like those offered by Rackspace, we’d have been totally screwed. It would have taken them at least a week to get another server up and running, which would have been way too long. Using EC2 and Cloud Tools, I simply started servers as I needed them, and I’ll shut them down tomorrow when the traffic dies down. It will probably only cost our client about $20 at the most, and think of the time and money that would have been lost if the server configuration had not been able to handle the load being thrown at it.“
Speaking generally about Cloud Tools, Whitney said: “You can launch your Grails application onto a server by simply typing: ‘grails cloud-tools-deploy.’ It supports all sorts of clustering and master/slave arrangements with DBs and so forth … totally rad.”
Moreover, Whitney said, “I can’t tell you how much time it saves to be able to bootstrap a server from the command line with a simple ‘grails cloud-tools-deploy.’ If you’ve built any Web sites then you know what a pain in the ass deployment is, and you know what a pain in the ass server configuration is. Cloud Tools and EC2 eliminate the need for both and allows you to focus on what you’re good at: writing code.”
What Cloud Foundry Will Do
Richardson said he founded Cloud Tools in the summer of 2007.
“I initially wrote Cloud Tools to enable me to quickly and easily deploy a Java application on EC2,” he said. “The ability to launch and manage servers through Web services APIs seemed very cool. And it solved a very practical problem: For my clients, I often need to set up clusters and run performance tests, etc. My clients often don’t have the necessary hardware in-house to do that. Since Amazon EC2 can run standard software stacks, it’s a great place to do that kind of testing and setup.”
After the Cloud Tools project began to take off, Richardson thought to build a commercial offering based on it. Enter Cloud Foundry. Cloud Foundry is now being beta tested and will be a service provided by Chris Richardson Consulting.
Cloud Foundry provides automated, outsourced data center management for Java and Grails applications, Richardson said. It eliminates the expense and distraction of developers building and operating their own data centers for their production applications and QA environments, he said, and, with no long-term contracts, developers simply use Cloud Foundry for as long as they need.
Moreover, with just a few clicks of the mouse, developers can deploy their application to a load-balanced cluster running on Amazon EC2 instances, Richardson said. Cloud Foundry also monitors and manages applications and automatically handles autoscaling and failover, he said.
“With Cloud Foundry, cloud computing is as easy as dropping your application’s .war files and database files into a Cloud Foundry-managed container running on Amazon EC2,” Richardson said.
Until commercial release, use of Cloud Foundry is free, but Amazon Web Services charges will still apply. To join the Cloud Foundry beta visit http://www.cloudfoundry.com/.
Richardson is the author of “POJOs in Action,” which describes how to build enterprise Java applications with POJOs (also known as Plain Old Java Objects) and lightweight frameworks such as Spring and Hibernate.