Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
part 2, rename switchtower -> capistrano
git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@3786 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
- Loading branch information
Showing
39 changed files
with
59 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,35 +1,35 @@ | |||
= SwitchTower | = Capistrano | ||
|
|
||
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. | Capistrano 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). | Capistrano 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 | == 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. | Capistrano 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. | ||
|
|
||
== Assumptions | == 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): | In keeping with Rails' "convention over configuration", Capistrano 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 writing web applications and want to use Capistrano to deploy them. | ||
* You are using Ruby on Rails (http://www.rubyonrails.com) to build your apps. | * 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 using Subversion (http://subversion.tigris.org/) to manage your source code. | ||
* You are running your apps using FastCGI, together with Rails' spinner/reaper utilities. | * 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. | As with the rest of Rails, if you can abide by these assumptions, you can use Capistrano "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 | == 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.org/read/book/17). | 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.org/read/book/17). | ||
|
|
||
In general, you'll use SwitchTower as follows: | In general, you'll use Capistrano 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. | * 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 +cap+ script to execute your recipe (see below). | ||
|
|
||
Use the +switchtower+ script as follows: | Use the +cap+ script as follows: | ||
|
|
||
switchtower -r deploy -a someaction -vvv | cap -vvv someaction | ||
|
|
||
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. | By default, the script will look for a file called one of <tt>config/deploy</tt>, <tt>config/deploy.rb</tt>, <tt>capistrano</tt>, or <tt>capistrano.rb</tt>. You can the <tt>-v</tt> switch multiple times (as shown) to increase the verbosity of the output. The +someaction+ text indicates which action to execute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,29 +1,29 @@ | |||
require './lib/switchtower/version' | require './lib/capistrano/version' | ||
|
|
||
Gem::Specification.new do |s| | Gem::Specification.new do |s| | ||
|
|
||
s.name = 'switchtower' | s.name = 'capistrano' | ||
s.version = PKG_VERSION | s.version = PKG_VERSION | ||
s.platform = Gem::Platform::RUBY | s.platform = Gem::Platform::RUBY | ||
s.summary = <<-DESC.strip.gsub(/\n/, " ") | s.summary = <<-DESC.strip.gsub(/\n/, " ") | ||
SwitchTower is a framework and utility for executing commands in parallel | Capistrano is a framework and utility for executing commands in parallel | ||
on multiple remote machines, via SSH. The primary goal is to simplify and | on multiple remote machines, via SSH. The primary goal is to simplify and | ||
automate the deployment of web applications. | automate the deployment of web applications. | ||
DESC | DESC | ||
|
|
||
s.files = Dir.glob("{bin,lib,examples,test}/**/*") | s.files = Dir.glob("{bin,lib,examples,test}/**/*") | ||
s.files.concat %w(README MIT-LICENSE ChangeLog) | s.files.concat %w(README MIT-LICENSE ChangeLog) | ||
s.require_path = 'lib' | s.require_path = 'lib' | ||
s.autorequire = 'switchtower' | s.autorequire = 'capistrano' | ||
|
|
||
s.bindir = "bin" | s.bindir = "bin" | ||
s.executables << "switchtower" | s.executables << "cap" | ||
|
|
||
s.add_dependency 'net-ssh', ">= #{SwitchTower::Version::SSH_REQUIRED.join(".")}" | s.add_dependency 'net-ssh', ">= #{Capistrano::Version::SSH_REQUIRED.join(".")}" | ||
s.add_dependency 'net-sftp', ">= #{SwitchTower::Version::SFTP_REQUIRED.join(".")}" | s.add_dependency 'net-sftp', ">= #{Capistrano::Version::SFTP_REQUIRED.join(".")}" | ||
|
|
||
s.author = "Jamis Buck" | s.author = "Jamis Buck" | ||
s.email = "jamis@37signals.com" | s.email = "jamis@37signals.com" | ||
s.homepage = "http://www.rubyonrails.com" | s.homepage = "http://www.rubyonrails.org" | ||
|
|
||
end | end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
require 'capistrano/configuration' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,3 +1,3 @@ | |||
SwitchTower.configuration(:must_exist).load do | Capistrano.configuration(:must_exist).load do | ||
set :gateway, "foo" | set :gateway, "foo" | ||
end | end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters