Capistrano with pairing stations

My last few projects have all been developed on mac minis. We have them set up as pairing stations, with two people to a machine. Every machine was cloned from the original (or an image), so each station is just like every other.

Over time, machines need maintenance. For example, one pair realizes that we need to upgrade a gem. In order to keep the machines in sync, that pair would either ssh to every pairing station and perform the upgrade, or else ask each pair to do it themselves.

Instead of this manual process, we came up with a capistrano task to launch a shell on every machine. Now, we can run commands on every pairing station at the same time.

task :pairing_stations do
  ENV["HOSTS"] = "10.1.0.12, 10.1.0.13"
  shell
end

For example, we can check which version of rake is installed on our pairing stations and make sure that they are all up to date:

% cap pairing_stations
  * executing `pairing_stations'
  * executing `shell'
====================================================================
Welcome to the interactive Capistrano shell! This is an experimental
feature, and is liable to change in future releases. Type 'help' for
a summary of how to use the shell.
--------------------------------------------------------------------
cap> gem list | grep rake
[establishing connection(s) to 10.1.0.12, 10.1.0.13]
 ** [out :: 10.1.0.12] rake (0.7.3)
 ** [out :: 10.1.0.13] rake (0.8.1)
cap> gem update rake