Apr 13

If you have the budget, choose Amazon EC2. And until Amazon EC2 provides a good web interface to manage the server instances (I heard they have a web interface now, but not sure if it’s good), Rightscale might be a good choice. Rightscale has lots of documentation on setting up server instances for RoR, but I am quite sure this post will still help cut the time needed to finally launch your Rails app on Amazon EC2!

First of all, follow the Rightscale instructions here for preliminary set up.

Now, create the master & slave MySQL server instances. Follow the instructions here. One thing it seems to miss is the instruction to input DB_BINLOG_PREFIX with something like ‘/mnt/mysql-binlogs/mysql-bin’. Otherwise, the MySQL Master instance is in ’stranded’ state as expected, only with a different reason. Click on Audit Entries on the instance, and it has to be stranded during ‘DB Master Restore’

Now to set up the Rails instances with load balancing, follow the instructions here. I like using Passenger, and it’s a pity they dont have the template for that yet. But mongrel cluster will do just fine. Anyway, that instruction is not enough curiously. After tailing the mongrel error log, and googling, we found that we need to do something else for the HAProxy.

Also if you need ImageMagick / rmagick / any other gems, you need to create a custom boot script, customize the Rails Frontend template and add the bootscript there.

Another interesting thing is there is operational Rightscript that does db:migrate :) So we gotta create a custom Rightscript for that as well.

Hope this helps!

One Response to “Rightscale & Ruby on Rails setup guide for dummies”

  1. Thank you for providing nice information on Ruby on Rails setup guide it’s work for me.

Leave a Reply

Security Code: