SwitchTower is a utility that can execute commands in parallel on
multiple servers. It allows you to define tasks, which can include
commands that are executed on the servers. You can also define roles
for your servers, and then specify that certain tasks apply only to
Manual: http://manuals.rubyonrails.org/read/book/17 Project: http://rubyforge.org/projects/switchtower Install: gem install switchtower
SwitchTower 1.0.1, coming hard on the heels of 1.0.0, fixes the
broken rakefile that was generated for rails applications. Nothing
else was changed.
In addition to SwitchTower 1.0.1, I’d also like to announce
SwitchTower Extensions 1.0.0, a collection of SwitchTower tasks and
methods for use in your own SwitchTower recipes. There are two tasks
provided by this library:
watch_load. Just run “switchtower -r config/deploy -a watch_load”
and you’ll see a display of the current load (1/5/15) for each of
your servers. The display updates every 30 seconds.
watch_requests. Run “switchtower -r config/deploy -a
watch_requests” and you’ll see a display of the current requests/
second of each of your application servers, as harvested from your
application log, in real-time.
Mostly, this library is provided as an example of how to write
SwitchTower extensions, though some may find the tasks themselves
useful. You can install SwitchTower extensions either by downloading
from http://rubyforge.org/projects/switchtower, or by rubygems (gem
install switchtower-ext). Once installed, you simply need to put
“require ‘switchtower/ext/monitor’” in your deploy.rb and the tasks
will be available to you.