BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Configured Rails software stacks become available

Configured Rails software stacks become available

Rails creator David Heinemeier Hansson kicked off the discussion after RailsConf07 on the new discussion group "Ruby on Rails: Stacks":
So Xen, EC2, Vmware, and other technologies are uprooting traditional thoughts on system management. At RailsConf we had presentations by Rails Machine, Engine Yard, and Amazon Web Services on the subject. There's little doubt that this is the future.

Thus, I think it's time to start a conversation about how we help further this move by putting together a handful of official Rails stacks. I'm envisioning something like a set of complete images for web, app, and db servers respectively. Running perhaps nginx, mongrel,and mysql for starters.
The idea is to use Virtualization tools, such as Xen or VMWare, to gather all necessary software to run Rails and install and configure it. The resulting disk contents can then be stored as a disk image, an ordinary file. A developer writing Rails code, can simply download such an image file, point the Virtualization software at it and boot it. This relieves the developer from installing and configuring an Operating System and all necessary libraries.

 It also makes it easy to deploy a particular system configuration, since it only involves copying the image file. Hosting services such as Amazon EC2 already use this method. Instead of assigning a particular server to a customer, the customer uploads an image file and tells Amazon EC2 to boot it. Amazon EC2 uses Xen as Virtualization software.

Configured Rails images have now started to appear. Paul Downman provides an image using Ubuntu as Operating System and various useful tools installed and configured. A sample of the feature list:
  • Automatic backup of MySQL database to S3 every 10 minutes.
  • Mongrel_cluster behind Apache 2.2, configured according to Coda Hale’s excellent guide, with /etc/init.d startup script
  • Ruby on Rails 1.2.3
  • Ruby 1.8.5
  • MySQL 5
  • Ubuntu 7.04 Feisty with Xen versions of standard libs (libc6-xen package).
  • All EC2 command-line tools installed
  • MySQL and Apache configured to write logs to /mnt/log so you don’t fill up EC2’s small root filesystem
  • Hostname set correctly to public hostname
  • NTP
  • A script to re-bundle, save and register your own copy of this image in one step (if you want to).
  • What makes this very useful is the attention to detail, such as the automatic MySQL backup to S3, Amazon's storage solution or the setup of the logging system.

     Another approach for providing the necessary software comes in the form of RubyWorks, which provides a full software stack and tools for Rails development. ThoughtWorks will start providing 24x7 support for this in July.

    How do you handle your Rails installations and deployment? Have you made use of Amazon EC2 or RubyWorks?

    Rate this Article

    Adoption
    Style

    BT