Capistrano
- Capistrano is an application deployment system.
- It is programmed by means of a Ruby-based DSL (ala rake).
- It runs "tasks" on role-based sets of remote servers:
- Servers must be accessible via SSH.
- Servers must support a Posix-compatible shell.
- Tasks can intercept and process the servers' output.
- It has many Rails-specific features,
but is not inherently Rails-specific.
- It has hooks for CVS, Git, and Subversion (so far :-).
Examples:
desc 'tail production log files'
task :tail_logs, :roles => :app do
cmd = "tail -f #{shared_path}/log/production.log"
run cmd do |channel, stream, data|
puts # force a line break between entries
puts "#{channel[:host]}: #{data}"
break if stream == :err
end
end
This script (adapted from http://errtheblog.com/post/21)
performs a "tail -f" of log files on multiple servers.
Links:
Sparks
|