March 16, 2010

Running Multi-Mechanize on RackSpace Cloud Servers with Ubuntu

This post is about Multi-Mechanize, the web performance and load testing framework.
visit the project website: multimechanize.com

Here are some instructions for getting started on rackspace cloud. These are also general instructions for anyone using a debian/ubuntu system.

There are _lots_ of options for running multi-mechanize in the cloud. You have choices between several cloud vendors and hosting/vps providers. Then you have a choice of operating system to deploy onto. I've found the combination of rackpsace cloud servers and ubuntu to be a really good choice. I see it as a great platform to run cloud-based load tests from (though hopefully they will offer other geographic regions at some point). It has been a breeze to work with multi-mechanize on this infrastructure.

So far i've been very impressed with rackspace. It lacks some of the functionality and management feature that EC2 gives you, but it is much easier to use. you pay by the hour + bandwidth used (starting at 1.5cents/hour). It's dead simple to deploy servers, and they have lots of linux operating systems to choose from. You can login to your account and provision the latest Ubuntu Server (9.10) in literally seconds. Need multiple servers? no prob. need _lots_ of servers? no prob, use the API's they provide. very slick stuff.

So... to get multi-mechanize working on rackspace's service...

create a rackspace account:
http://www.rackspacecloud.com/cloud_hosting_products/servers

login to your account:
https://manage.rackspacecloud.com

Deploy a new server from your account (choose the latest Ubuntu image). You can start with the minimum RAM allocation, and later resize your server to run large tests. Once you create your server, Rackspace will email you the server's ip address and root password.

Open a terminal window and ssh into your server using the info they supplied:

>ssh <ip address> -l root 

(enter password when prompted)

First, setup the dependencies for multi-mechanize.
run the following commands:

>apt-get install -y python-mechanize 
>apt-get install -y python-matplotlib 
>apt-get install -y subversion 

Now you can grab the latest multi-mechanize trunk from subversion:

>cd /opt 
>svn checkout http://multi-mechanize.googlecode.com/svn/trunk/ multi-mechanize 

Now go to your multi-mechanize directory and run a test:

>cd /opt/multi-mechanize 
>python multi-mechanize.py default_project 

thats it...