Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Download and run rails application for managing an EC2 cluster
JavaScript Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app changed action links to buttons
config pushed forward deletion of oldest snapshot, before and after snapshot…
doc first commit
log first commit


This is a ready-to-run rudimentary Amazon Web Services (AWS) EC2 management dashboard. It is very much a work in progress and significantly alpha - at the moment, it provides only functions I need, and is sufficiently tested that it works for me. (Automated tests would be really nice - I'm open to suggestions for how to do that without setting up a test aws account that can be clobbered. Stubs would probably help, but I didn't want to wait until figuring that out to share the code.)

Some notes:

1) The instances page provides an overview of all of your aws instances, optional labels, all of the ebs volumes attached to them (with devices), and the snapshots that each one has. There are also methods provided to generate a graph of your instances with attached ebs volumes and snapshots, and generate an external hosts file if you want one. Links are provided from the main instances page.

2) As a convenience, I've included active-scaffolding for editing "labels". Labels are used to generate the hosts file, and used to determine if an instance has an available ami to perform cloning with the rake clone_instance task. For regular labels, ignore the aws_source_id. For ami labels, use the ami id as the aws_id and use the instance_id of the machine it was created from as the aws_source_id. The clone_instance task will snapshot all of the disks attached to the source, and create a new instance based on the ami, and then attach the cloned volumes to the new instance using the correct devices. You're responsible for making sure they get mounted in the new instance.

3) To autosnap an instance, set autosnap in its label to true. Then, when you run rake instance:autosnap, it will take snapshots of every disk attached to every instance marked autosnap, and prune them to only keep the most recent 2 snapshots.

4) Look at the instance.rake file for other useful stuff.

5) USE AT YOUR OWN RISK. I think most of it works.

How to run:

1) Install the appoxy-aws, fastercsv, and ruby-graphviz gems (and graphviz). 
2) Enter your access ID and secret key into config/initializers/aws.rb. (Note: it appears that the appoxy-aws gem has been shifting things around. I'll try to get the version stabilized next week. You might need to change Aws:: to RightAws:: in initializers/aws.rb depending on what version of the gem you have.)
3) rake db:migrate. We're using sqlite by default, for convenience.
4) Fire up the server. "script/server -p 8081 -d" will do it. At the moment, this is only meant to run locally and has no authentication.
5) Hit localhost:8081/instances in a browser.

Some todos on my list:

1) Finish the dynamic resizing of EBS volumes.
3) Nicer graphs.
2) Hooks for before/after commands for snapshots. (Specifically for
fsync lock support for cloning mongodb instances.) - done, but not
extensively tested.
4) Support for EBS root instance cloning in addition to ami/instance store instance cloning.

I welcome comments, and I hope this is useful for you.

This code is released under the MIT license.
Rails and active-scaffold are included in this source package, also covered by the MIT license.
Something went wrong with that request. Please try again.