I’ll set up your Ruby on Rails server for you. For free.

Need to set up a Ruby on Rails server? So do I, and chances are you need almost the same configuration as me. As of this writing 1845 people have bookmarked Coda Hale’s excellent guide to setting up Mongrel + Apache on del.icio.us. The article has 187 comments. Why should so many people each have to do the same thing?

The answer is a Rails server virtual appliance, and I’ve made one for Amazon’s EC2 hosting service.

A server is no longer a physical thing, and EC2 takes it one step further: they completely separate the concept of server images and instances. An image is like a snapshot of a server hard drive, stored in an unchangeable state in their S3 data storage service. An instance is a running server that was booted from a copy of this image. But the instance is transient; changes to it’s own working copy of the image don’t affect the original image that it was booted from, and because of this multiple server instances can be started from the same image. (Hence the “elastic” property, new instances can be created on demand, your server pool can grow and shrink dynamically.)

Now even the OS can be configured and tested once, and then simply deployed as part of the application. So how is that different from any of the third-party libraries and frameworks that we use as part of our applications? I assemble applications out of many pieces of third-party software. All of it is continually improved by other people, none of it requires painstaking building or configuration, and the OS can be used the same way.

So I’m going to continue working on my Ruby on Rails EC2 server image with the goal that you will be able to simply deploy your Rails app directly to it with Capistrano with little or no configuration.

Try it out, and tell me what you think!

3 Comments

  1. Jake Cahoon:

    I’m anxious to see what kind of performance you get with swiftiply and nginx. Ezra Zygmuntowicz’s presentation at RailsConf this year pimped both pieces of software. I’ve been anxious to try them but haven’t had the time.

  2. Dave B:

    I haven’t thought about this for more than the five minutes it took me to read the article, but at face value this is a brilliant idea. Good work!

  3. Jason Belec:

    Thank you, was just thinking about doing something similar.

    I will experiment with your wonderful idea and provide feedback or enhancements if I can come up with any.

Leave a comment