# \[ANN\] SwitchTower 0.10.0

**URL:** <https://www.ruby-forum.com/t/ann-switchtower-0-10-0/87408>\
**Category:** Ruby\
**Created:** [January 2, 2006, 7:24pm UTC](https://www.ruby-forum.com/t/ann-switchtower-0-10-0/87408 "2006-01-02T19:24:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f17d59/32.png) [@jamis](https://www.ruby-forum.com/u/jamis)\
**Post date:** [January 2, 2006, 7:24pm UTC](https://www.ruby-forum.com/t/ann-switchtower-0-10-0/87408/1 "2006-01-02T19:24:52Z")

</div>

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  
certain roles. It was developed primarily to ease the pain of  
deploying Rails applications to multiple machines, but can be used  
for a great deal more than that.

SwitchTower 0.10.0 fixes several longstanding issues and adds some  
nice new functionality. I anticipate one (or at most two) more  
releases before 1.0.

Project: [http://rubyforge.org/projects/switchtower](http://rubyforge.org/projects/switchtower)  
Manual: [Peak Obsession](http://manuals.rubyonrails.com/read/book/17)

Installation is simple:

gem install --include-dependencies switchtower

You can get the whole scoop on what’s new in the change log (http://  
[rubyforge.org/frs/shownotes.php?release\_id=3930](http://rubyforge.org/frs/shownotes.php?release_id=3930)) or in the  
announcement at either [Peak Obsession](http://weblog.rubyonrails.com/articles/)  
2006/01/02/switchtower-0-10-0 or [http://jamis.jamisbuck.org/articles/](http://jamis.jamisbuck.org/articles/)  
2006/01/02/switchtower-0-10-0.

- Jamis

---

<div class="post-metadata">

**Author:** ![jamis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f17d59/32.png) [@jamis](https://www.ruby-forum.com/u/jamis)\
**Post date:** [January 3, 2006, 9:34pm UTC](https://www.ruby-forum.com/t/ann-switchtower-0-10-0/87408/2 "2006-01-03T21:34:17Z")

</div>

I have a question that may seem dumb, but I can’t seem to answer it. I  
understand that the situation I describe is only the “default” setup,  
and that Switchtower is exceedingly customizable. My question asks “why  
is this the default?”

Situation:

Assume I have a version controlled app that I am deploying with  
Switchtower.

Every time I deploy, Switchtower creates a new directory (named based on  
the date/time of deployment, and redirects the symlink to point to the  
newest folder.

Question:

Why does ST create a new folder, instead of simply storing the files in  
one place and overwriting them each time?

In the absence on version control, the ST model makes perfect sense.  
However, it seems to be that version control makes this model  
unnecessary. By simply logging each deployment, the advantages of this  
model (such as diff\_since\_last\_deploy) are easily obtainable through  
version control.

I am certainly open to the idea that I am missing something vital. I’m  
not saying that the ST model is wrong, I’m saying I don’t understand  
it. I very much hope to be enlightened.

Thank you everyone, I look forward to … some enlightenment.

Mike

---

<div class="post-metadata">

**Author:** ![jamis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f17d59/32.png) [@jamis](https://www.ruby-forum.com/u/jamis)\
**Post date:** [January 3, 2006, 9:56pm UTC](https://www.ruby-forum.com/t/ann-switchtower-0-10-0/87408/3 "2006-01-03T21:56:52Z")

</div>

Hello Mike,

2006/1/3, Mike H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Thank you everyone, I look forward to … some enlightenment.

I am by no means an expert on SwitchTower (haven’t even deployed  
once), but I know why it’s doing it this way.

If you update the directory from which the application is currently  
being served, clients (browsers) might get an inconsistent view of the  
system. Views are live - even in production mode. Since ST creates a  
new folder everytime, and updates a symlink as the last step of making  
the current application live, then the change happens atomically.

Hope that helps !

---

<div class="post-metadata">

**Author:** ![jamis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f17d59/32.png) [@jamis](https://www.ruby-forum.com/u/jamis)\
**Post date:** [January 3, 2006, 10:09pm UTC](https://www.ruby-forum.com/t/ann-switchtower-0-10-0/87408/4 "2006-01-03T22:09:10Z")

</div>

In addition to providing a consistent view to the users during an  
update, it  
also allows for rollback of that update if something goes wrong before  
the  
site is switched over to the new code.

And it does this across however many production machines you may have.
