The Apache Whirr project (http://whirr.apache.org) provides a Java API and set of shell scripts for installing and running various services on cloud providers such as Amazon EC2 and Rackspace. Whirr allows you to define the layout of a cluster in terms of the number of nodes as well as control which services run on each node. Whirr also comes with a set of scripts for performing management operations such as launching new clusters, starting and stopping clusters, and terminating clusters.
Whirr began as a set of shell scripts for running Hadoop on Amazon EC2, and later matured to include a Java API based on the Apache jclouds (http://jclouds.apache.org) project, which allowed it to support multiple cloud providers. Whirr has also expanded beyond Hadoop to support many additional distributed computing services such as Cassandra, Elastic Search, HBase, Pig, and others.