Hit follwing cmd on termial
ruby -v
ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-darwin14.0]
Install ruby gem upon confirmation
Create scaffolding for different stages
mkdir -p config/deploy
create config/deploy.rb
create config/deploy/staging.rb
create config/deploy/production.rb
mkdir -p lib/capistrano/tasks
Directory Tree
Root
├── Capfile
├── config
│ ├── deploy
│ │ ├── production.rb
│ │ └── staging.rb
│ └── deploy.rb
└── lib
└── capistrano
└── tasks
config/deploy.rb
config/deploy/production.rb config/deploy/staging.rb
- By now all setup is done
Confirm by hitting
cap staging deploy --dry-run
Syntax
cap environment deploy(module):task
cap production deploy
runs all task under deploy
cap production deploy:rollback
runs rollback to previous stage
cap production deploy:restart
runs restart task under deploy
cap production node:restart
runs restart task under node
cap production node:stop
runs stop task under node. ie kill node process
Capistranor implementation for S3 bucket