37signals moved TaDaList to run on pretty much the same things I’m using: EC2, EBS, Elastic IPs, Apache, Passenger. They also started from the same Ubuntu Intrepid images. 🙂
Joshua posted more info on their setup in the comments section of the blog post:
Joshua Sierles 28 Nov 08
Our custom image is based on the Ubuntu Intrepid images from Alestic. We install useful EC2 gems and base packages, bundle, then provision each instance by role. Working with EC2 is so easy, we don?t see much value in using a third-party provider for our scale.
EBS and Elastic IPs were the primary motivation for moving to EC2 . We use EBS extensively: for MySQL data, logs and local repository mirrors. Performance so far is excellent. Snapshotting volumes is a breeze and makes setting up MySQL slaves and staging environments really easy.
[From Ta-da List on Rails 2.2, Passenger And EC2 – (37signals)]
Ray pointed me to a RailsCast on how to use Passenger for local development, it literally took me 2 minutes to setup. If you work on multiple Ruby on Rails applications, you should definitely do it.
There is however one problem on this approach, since the default passenger.pref config relies on virtual host, you can’t really setup SSH port forward to forward something to one of the virtual hosts, and this is important as this is how most of us develop Facebook applications locally. To get Passenger and Rails Facebook apps to work, you have to:
- open up httpd.conf ask Apache to listen to another port:
- add another named virtual host, here I’m adding port *.81:
- In the configuration for that Facebook app, change it to respond to all traffic on the new port (81 in this case):
Allow from all
Now you can setup your tunnel to forward to localhost (or 127.0.0.1 if you use SSHKeychain) port 81 and it should work. Add more ports if you work on multiple Facebook apps at the same time.
Ray just typed up an howto on deploying rails with Passenger, good stuff, we’re using this for our new project which should be launching soon.
[From Deploying your Rails applications with Phusion Passenger : Raymond Law]