Skip to content

Instantly share code, notes, and snippets.

@jraines
Created May 17, 2011 21:06
Show Gist options
  • Save jraines/977399 to your computer and use it in GitHub Desktop.
Save jraines/977399 to your computer and use it in GitHub Desktop.
21 Deployment Tips in 50 minutes

Vagrant

gem install vagrant

vagrant up

vagrant halt

  • Ruby DSL for provisioning VirtualBox VMs
  • creates a user named vagrant, with password 'vagrant'

Organizing cap files

  • break tasks into files in a subdir, like /deploy/recipes
  • if general, store them in a git-submodule
  • OR extract them into a gem

RVM

  • require 'rvm/capistrano'
  • set :ruby_string => 'ruby-1.9.2-p180'

Speed up Capistrano by combining symlink tasks

  • by default, each symlink task uses a separate ssh connection

Bundler & capistrano together

Use generic 'deploy' user for capistrano

define an on_rollback block for your task

  • what should happen if a task fails?

Capistrano notifcations

  • cap_gun gem

Coming soon pages

  • cap coming_soon:enable
  • cap coming_soon:disable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment