- Capistrano runs from the local/development machine.
- Capistrano checks out the code from source control to deploy to the target server.
- deploy.rb is the capistrano 'recipe' file that details deployment specifics.
cap -T => display tasks
cap -h => display help file
cap deploy => deploys project from svn and restarts the mongrel cluster
cap deploy:update => copy source code to server but does not restart app server(mongrel)
cap deploy:start => start the mongrel cluster
cap deploy:stop => stop the mongrel cluster
cap deploy:restart => restart the mongrel cluster
cap deploy:rollback => undo the last deployment
Using HOSTFILTER to limit deployment targets
cap HOSTFILTER=prod2.globalnetwatch.com deployIf HOSTFILTER is not used capistrano will execute instructions on every host defined in a role
Test environment - mail2
- Copy code
cap HOSTFILTER=mail2.globalnetwatch.com deploy:update
- Restart mongrel
cap HOSTFILTER=mail2.globalnetwatch.com deploy:test_restart