Merlin: free software Ruby on Rails cloud controller

Merlin is a Ruby on Rails application for interacting with and controlling EC2 API compatible clouds, such as Amazon EC2 and Eucalyptus. It provides a web interface for the creation of instances, volumes, and snapshots, and enables fast provisioning of new instances by providing a custom userdata script which the machine prior to running a configuration management system (currently, only Puppet is supported).

What does Merlin do for me?

Primarily, Merlin is a web interface to Eucalyptus clouds, but it can also be used with AWS (in fact, I do today). Merlin is intended to build on top of a standard cloud interface, giving the user the ability to store and hold advanced metadata on cloud objects. Merlin will keep track of hostnames, instance descriptions, and what have you. Merlin also provides a dirt-simple API that userdata or CLI scripts can use to take certain actions, such as introducing an instance, registering it in DNS, etc.

How much of Merlin works today?

Currently, Merlin supports the following:

  • Connecting to AWS EC2 and Eucalyptus clouds
  • Enumerating existing resources within a cloud
  • Creating new instances with or without new volumes
  • Provides Rails objects for instances, volumes and more, which support things like attachment, detachment, reservation, etc
  • A particularly crude UI (This is a feature!)

Here be dragons

This is still a very immature project (as of March 2011). The UI is atrocious, the code reflects its origins as my first serious Ruby/Rails project, and there are no unit tests or model validations to speak of.

Merlin will not prevent you from shooting yourself in the foot, and if you give it admin access to your Eucalyptus cloud, it may, in fact, encourage such things.

That being said, Merlin is under rapid development, and should be expected to improve rapidly. Work is currently ongoing to make sure the following workflow is fully implemented, to start:

  • Create instance using Merlin with associated volume(s) — works today
  • Userdata script works for all cases (hello, attach_storage, completed, intervene) — 50% works
  • Registration in DNS (BIND/UltraDNS) — *BIND is nearly finished, UltraDNS needs to be refactored

Once this work is done, the first “real” version will be released, and then the project will start using actual migrations, as opposed to simply modifying the existing one over and over. Cough.

Where Merlin is currently going

Soon we’re going to have:

  • Model validators! Remove all the old cruft (there’s still a lot)
  • Refactor: api_request (remove xml stuff which is from pre-release cruft)
  • Refactor: Fix pluralization of models/etc where needed, make sure everything is Rails-like — completed, somewhat
  • DNS updates with BIND/etc should work correctly — nearly complete

Later we’ll add:

  • Stop using a13g/ActiveMQ and use Redis/Resque
  • Closer puppet integration (Facter/API stuff)
  • Unit tests!
  • Snapshot implementation

Get involved

Join the Merlin community, by joining our mailing list, checking out our code and filing merge requests and bugs.

Merlin is written by Justin Baugh, and is free software,
licensed under the GNU Affero General Public License, version 3 or later.

Follow us on identi.ca | Follow us on Twitter

The Merlin logo is Creative Commons Attribution-ShareAlike 3.0 licensed, by Matt Lee, with contributions from the public domain Open Clip Art library.