Created
January 15, 2013 15:42
-
-
Save aquaranto/4539551 to your computer and use it in GitHub Desktop.
Using_Capistrano
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Teams are afraid of deploying code | |
You provide value | |
Shipping code needs to be easy and enjoyable | |
Capistrano- runs over ssh to automate deployment and other server tasks | |
2 assumptions | |
*ssh access to remote servers | |
*all target machines either need to have the same password or have keys set up | |
Source control! | |
github helps deploying with capistrano documentation | |
created to work with rails (it's written in ruby) | |
custom tasks can be written to work with anything | |
How it works: | |
* Clone from GHub | |
* Push changes to GHub | |
* (Continuous Integration: Travis, simaphoreapp.com?, etc) | |
* cap deploy | |
* pulls from GHub | |
Cap works if you have multiple servers | |
gem install capistrano | |
capify . - for brand new projects - creates deployment.rb file | |
set :deploy_to insert_dir | |
set :repository insert_repo_info | |
role :app | |
Capistrano Tasks | |
group :task_name | |
cap deploy:check - checks for dependencies - where the problems are before you even try anything | |
cap deploy:setup - sets up the deployment - shared dir(things you want to persist: log files, user content) and releases dir() | |
cap deploy - puts a new release in the releases dir and makes current dir (make sure you point to current dir) | |
cap depoly:rollback - old release is saved on the servers, rollback reverts to the last release (it will rollback migrations for rails) | |
Rails Deployment Tasks | |
New tasks are simple to add with a bit of rubies | |
Deploying Rails PragProg Book |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment