Skip to content

Deploy and manage nodejs based project using capistrano over AWS EC2

Notifications You must be signed in to change notification settings

pramendra/capistrano-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Capistrano Setup

  1. Confirm if Ruby is installed.

Hit follwing cmd on termial

ruby -v

ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-darwin14.0]

  1. gem install capistrano

Install ruby gem upon confirmation

  1. cap install STAGES=staging,production

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
  1. Configure different deploys in

config/deploy.rb

  1. Define server(s) per role in stages

config/deploy/production.rb config/deploy/staging.rb

  1. By now all setup is done

Confirm by hitting

cap staging deploy --dry-run

Upon confirmation following commands is avaliable

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

What is capistrano and how it works

http://www.slideshare.net/neoramax/capistrano-34278510

Capistranor implementation for S3 bucket

https://github.com/hooktstudios/capistrano-s3

About

Deploy and manage nodejs based project using capistrano over AWS EC2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages