Archive for the ‘Capistrano’ Category

Installing Rails, Mongrel on Slicehost with Ubuntu “Gutsy Gibbon”

Monday, February 4th, 2008

Links for future reference on Installing Rails, Mongrel on Slicehost with Ubuntu “Gutsy Gibbon”

Slicehost Configuration Guide:

Help Wanted: Advanced Slicehost with Capistrano

Monday, December 3rd, 2007

I’m looking for someone to help me with some advanced server setup adminstration.

I have configured a Slicehost VPS to deploy my applications, but I need to get MySQL Replication working, along with some Capistrano/Deprec Recipes to automate deployment and configuration.

If anyone is interested in some paid work, drop me a line:

Performance testing Mongrel and Rails with httperf and autobench

Saturday, December 1st, 2007

I posted recently about my experiences with Slicehost, Capistrano and Deprec.

As part of my approach for migrating the Top Secret Project to Slicehost, I’ve been testing my new VPS using httperf and autobench.

Maybe it’s just me, but performance testing and statistics is a whole lot of fun.

My 256 Slice running Apache proxied to two Mongrel instances peaks at about 41.6 requests/second, but can handle about 40 req/sec as consistent average. The single instance averages about 15 req/sec but can burst up to 30.

I think 40 requests/second is more than enough for my needs at the moment … it provides a pretty good peak capacity, and with Slicehost you can always get more resources when you need them - running extra Mongrels is wonderfully straight forward, but can also create slice to act as a dedicated database host. The options are endless.

One useful lesson: your client connection makes a BIG difference to these tests.

On my laptop running a wireless ADSL connection, the results were all over the place. Running the tests from one of my servers with a much fatter pipe, gave consistent test results.
For more information on using httperf and autobench, this is your best friend: HTTP performance testing with httperf, autobench and openload

Capistrano, Deprec: Best Things Ever

Saturday, December 1st, 2007

I signed up for a slice on Slicehost a little while ago (there’s quite a waiting list, which is a good sign).

I’m planning on moving some stuff from a local provider to Slicehost, but wanted to experiment first.My current host is a CPanel VPS and it’s proved a little challenging to get that configured for Rails - CPanel doesn’t provide great support out-of-the-box, so it’s all manual, but with the added complexity fo having to work with CPanel’s configuration. I’ve only been able to get a single Mongrel instance running, because CPanel doesn’t support Apache 2.2.x.

System Administration is definitely the weakest part of my skill set - I have always been focussed on the code, and have had the advantage of working with dedicated sys admins - so configuring a VPS from scrach is a little daunting.

Enter Capistrano and Deprec to the rescue.

These tools automate the installation of your Rails stack and deployment of your applciation from Subversion (or GIT, or whatever is hot this week).

The basic steps:

cap setup_admin_account_as_root
cap setup_ssh_keys
cap install_rails_stack
cap deprec_setup
cap deploy_with_migrations
cap restart_apache

And that’s it, you’re done …

You bneed to create a deploy.rb file with your Apache and Mongrel configuration details and Cap will work the rest out.

It’s pretty incredible.

Slicehost has some detailed instructions for configuring Configuring Rails on Ubuntu using Capistrano and Deprec. The instructions pretty much worked out of the box for me.