Archive for the ‘EC2 on Rails’ Category.

Movin’ on… (status of EC2 on Rails)

I began a fun project a couple of years ago: EC2 on Rails. It became quite widely used, people contributed some great code, and a small community developed.

I had a great vision for what it should become. But since I was very busy with a start-up (which we successfully sold last August), I struggled to find the time to work on it. I did a lot of work that I never ended up releasing because I couldn’t find the time for testing and fixing the last few small bugs (though it has been in use in production with great success).

The hardest thing to find time for was always documentation and communication of the status, so today I’m taking the time to clarify since I get asked a lot:

I won’t be working on it any more.

But open source is a wonderful thing and anyone who wants to keep using it can fork it and do so.

Thanks to everyone who contributed features and fixes.

I apologize for letting it languish for so long, I had the best intentions to find some more time but now that I have a four-week old baby I know that it’s impossible.

A great success in it’s day

It felt great to be sitting in a session at RailsConf 2008 and hear the presenter recommend EC2 on Rails.

When I first created EC2 on Rails it was the first and only Rails AMI, and in fact it was the first public Ubuntu AMI that I know of (though Eric Hammond went on to create what later became the definitive Ubuntu public AMI and Canonical eventually produced official Ubuntu images).

In spite of the sparse documentation it was simple enough that many people used it either as-is or as a starting point for their own custom setup.

I think there’s still a great need for a simple open-source Rails server image, but now there are at least a couple of options, and the choices for all components of the Rails production stack have improved hugely.

Some of the custom functionality is now available via other projects like Marc-AndrĂ© Cournoyer’s mysql_s3_backup.

I’d do a few things differently

If I had the time to continue working on it I’d make some major changes in the architecture:

  • I’d use Chef to configure the image instead of a build script. This would allow running instances to be upgraded more easily, allow greater customization by the user, and allow the sharing of common customizations.
  • I’d stop using Capistrano for deployment, or at least move all the code that’s inside Capistrano recipes into scripts that exist on the server. (Chef-deploy looks promising but I haven’t had a chance to play with it yet).
  • I would provide better support for elastic clusters (i.e. adding and removing instances from the cluster).

I have a lot of thoughts on how those things would be achieved, feel free to get in touch with me if you are building something similar and want to chat about it.

The new and improved but unreleased version

The unreleased version (available on GitHub) has been substantially rewritten. It is now based on Nginx, and Phusion Passenger, and uses the awesome Varnish proxy for balancing across multiple instances (optionally with HTTP caching). As I mentioned it’s being used in production with great success, but there are still a few minor known issues and probably some untested areas.

Please feel free to fork it and give it new life.

EC2 on Rails version 0.9.9.1 released

I finally found the time to release a new version of EC2 on Rails. It fixes some bugs, updates some software (Rails 2.2, Rubygems 1.3.1, Ubuntu 8.04.2 LTS), and includes public images for the European EC2 region.

For a full list of changes see the change log.

My next priorities are:

  1. Integrating other people’s changes, especially Adam Greene’s huge changes (support for EBS and much more).
  2. Improving (or you could say fixing!) multi-instance support. It should be as easy to manage your app running on an EC2 cluster as it is on a single instance. I’m now using this myself so I finally have the motivation! :-)
  3. General robustness improvements.
  4. Documentation.

Please report any bugs using the RubyForge bug tracker or by email.

Got Git

I’ve moved EC2 on Rails from Subversion to Git. It’s hosted on Github at pauldowman/ec2onrails.

Most Ruby developers are familiar with Git by now. (If you’re not: it’s a distributed version control system that was created in 2005 by Linus Torvalds for Linux kernel development). Within the last year almost every Ruby-based open-source project has switched to Git (including Rails itself). And in fact they’re almost all hosted on Github!

At first I found it funny that even though they were moving to a distributed version control system, everyone decided to keep their repositories in the exact same place. Being distributed, a Git repository doesn’t need to be hosted unless you’re sharing it. You can publish it easily on any web server, and RubyForge (which has always been the most popular place to host Ruby projects) supports git.

But after playing with it a bit I can see why everyone is choosing Github. For one thing they got the project hosting part right, with a simple clean UI and cool features like an API and hooks for all kinds of services.

But the really cool thing about Github is that it provides a social environment. You can watch projects as you’d expect, but you can also follow people, send them messages, and easily send them pull requests (to integrate changes you’ve made). It’s great for discovering interesting and new projects: just follow friends and people whose work you like to see what they’re watching, creating and forking.

Now that EC2 on Rails is on Github it’s more likely that other people will want to build it themselves so I’ll try to make that easier with a one-step script at the root of the project. Feel free to fork it, implement changes and send me patches or pull requests.

And find me on Github!

EC2 on Rails version 0.9.9 released

I released version 0.9.9 of EC2 on Rails a few weeks ago and announced it on the mailing list but forgot to mention it here. The main change was switching to version 8.04 (”Hardy”) of Ubuntu. See the change log for full details.

EC2 on Rails version 0.9.8 available

UPDATE: it’s 0.9.8.1 now, there was a small update to the RubyGem. The new gem uses the same AMI’s.

EC2 on Rails version 0.9.8 is now available (or will be in a few hours when the RubyForge servers are synced). This is a recommended update for everyone.

It includes some major new features:

  • monit monitoring daemon: monitors mysqld, apache, memcached, mongrels, system load and free drive space
  • incremental MySQL backup (important for large databases)
  • Apache SSL support
  • a local Postfix SMTP server enabled by default

And most importantly this fixes the problem with broken Ubuntu package updates which was caused by a missing repository in the list of repositories.

As I mentioned yesterday, the base image is now built using Eric Hammond’s EC2 Ubuntu script.

Also, there are major new features such as incremental MySQL backup (important for large databases), Apache SSL support, and a local Postfix SMTP server enabled by default.

My priorities now are:

  1. Release an update based on Ubuntu 8.04 Hardy (this version is still using Ubuntu 7.10 Gutsy because I wanted to provide a reliable update as quickly as possible due to bug #20040. But now that the base image is built with Eric Hammond’s script it should be easy to update to Hardy.)
  2. Create complete documentation.
  3. Release a 100% bug-free version 1.0 with the current feature-set. Please help by reporting any bugs you find, either using the RubyForge bug tracker or by email.