1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00
Remote multi-server automation tool
Find a file
2006-01-05 14:51:16 +00:00
bin Attempt to require rubygems when executing the switchtower utility (fixes #2134) 2005-09-11 19:40:43 +00:00
examples Initial commit of the new switchtower utility 2005-08-03 12:59:03 +00:00
lib Set :actor key on SSH channel instances. Add Actor.default_io_proc 2006-01-05 14:51:16 +00:00
test Handle ssh password prompts like "someone's password:" (closes #3290) 2006-01-02 16:48:37 +00:00
CHANGELOG Set :actor key on SSH channel instances. Add Actor.default_io_proc 2006-01-05 14:51:16 +00:00
MIT-LICENSE Initial commit of the new switchtower utility 2005-08-03 12:59:03 +00:00
Rakefile switchtower: include rake package tasks in rakefile 2005-10-19 00:52:09 +00:00
README switchtower: depend on Net::SSH 1.0.3 (to resolve windows/pageant issues) 2005-11-09 14:53:36 +00:00
setup.rb Have setup.rb create a switchtower.cmd file on Win32 platforms 2005-10-11 01:43:28 +00:00
switchtower.gemspec Add a sanity check to make sure the correct versions of Net::SSH and Net::SFTP are installed 2006-01-02 05:01:58 +00:00

= SwitchTower

SwitchTower is a utility and framework for executing commands in parallel on multiple remote machines, via SSH. It uses a simple DSL (borrowed in part from Rake, http://rake.rubyforge.org/) that allows you to define _tasks_, which may be applied to machines in certain roles. It also supports tunneling connections via some gateway machine to allow operations to be performed behind VPN's and firewalls.

SwitchTower was originally designed to simplify and automate deployment of web applications to distributed environments, and so it comes with many tasks predefined for that ("update_code" and "deploy", for instance).

== Dependencies

SwitchTower depends upon the Net::SSH library by Jamis Buck (http://net-ssh.rubyforge.org). Net::SSH itself depends on the Needle library (http://needle.rubyforge.org), also by Jamis Buck. If you are on Windows, you must have at least Net::SSH 1.0.3 installed.

== Assumptions

In keeping with Rails' "convention over configuration", SwitchTower makes several assumptions about how you will use it (most, if not all, of which may be explicitly overridden):

* You are writing web applications and want to use SwitchTower to deploy them.
* You are using Ruby on Rails (http://www.rubyonrails.com) to build your apps.
* You are using Subversion (http://subversion.tigris.org/) to manage your source code.
* You are running your apps using FastCGI, together with Rails' spinner/reaper utilities.

As with the rest of Rails, if you can abide by these assumptions, you can use SwitchTower "out of the box". If any of these assumptions do not hold, you'll need to make some adjustments to your deployment recipe files.

== Usage

More documentation is always pending, but you'll want to see the user manual for detailed usage instructions. (The manual is online at http://manuals.rubyonrails.com/read/book/17).

In general, you'll use SwitchTower as follows:

* Create a deployment recipe ("deploy.rb") for your application. You can use the sample recipe in examples/sample.rb as a starting point.
* Use the +switchtower+ script to execute your recipe (see below).

Use the +switchtower+ script as follows:

    switchtower -r deploy -a someaction -vvvv

The <tt>-r</tt> switch specifies the recipe to use, and the <tt>-a</tt> switch specifies which action you want to execute. You can the <tt>-v</tt> switch multiple times (as shown) to increase the verbosity of the output.