wesabe / robot-army
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
Brian Donovan (author)
Wed Sep 23 13:28:03 -0700 2009
commit 0615c8d5b3845b789c60ebff3fe66de1bdb97071
tree 033f1fc99533b34cbfc8edfd34a42363123b74ec
parent 79c68ffb4579be972ab443f75049f993dbece63c
tree 033f1fc99533b34cbfc8edfd34a42363123b74ec
parent 79c68ffb4579be972ab443f75049f993dbece63c
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Mon Jun 23 18:39:40 -0700 2008 | |
| |
LICENSE | Wed May 14 09:40:55 -0700 2008 | |
| |
README.markdown | Thu Jun 19 16:17:33 -0700 2008 | |
| |
Rakefile | Wed May 14 09:47:46 -0700 2008 | |
| |
Thorfile | Wed Sep 23 13:28:03 -0700 2009 | |
| |
VERSION | Wed Sep 23 13:23:09 -0700 2009 | |
| |
examples/ | Thu Jul 23 07:55:12 -0700 2009 | |
| |
lib/ | Thu Jul 23 07:55:12 -0700 2009 | |
| |
robot-army.gemspec | Wed Sep 23 13:28:03 -0700 2009 | |
| |
spec/ | Wed Jul 22 12:25:20 -0700 2009 |
README.markdown
Robot Army
Robot Army is deploy scripting which offers remote execution of Ruby in addition to the usual shell scripting offered by other deploy packages.
If you want to test this, be sure that the robot-army gem is installed on both the client and server machines. You should get an error if you try to execute it against a server with it installed.
Example
class AppServer < RobotArmy::TaskMaster
host 'app1.prod.example.com'
desc "time", "Get the time on the server (delta will be slightly off depending on SSH delay)"
def time
rtime = remote{ Time.now }
ltime = Time.now
say "The time on #{host} is #{rtime}, " +
"#{(rtime-ltime).abs} seconds #{rtime < ltime ? 'behind' : 'ahead of'} localhost"
end
desc "deployed_revision", "Gets the deployed revision"
def deployed_revision
say "Checking deployed revision on #{host}"
say "Deployed revision: #{remote{ File.read("/opt/app/current/REVISION") }}"
end
end
Known Issues
- Code executed in
remotehas no access to instance variables or globals - Probably doesn't work with Windows
