public
Description: A capistrano/rails plugin that makes it easy to deploy/manage/scale to EC2
Home | Edit | New

Extending

It should be safe to edit the generated files because the rails generate script will warn of conflicts on subsequent runs, and allow you to perform a diff for resolving the conflict. However, for deployment scripts, there is a lot you can do by tying into the existing process flow by using the capistrano before/after mechanism. For example,

after "rubber:install_packages", "custom_install"
before "rubber:install_packages", "custom_install_web"

# run for all roles
task :custom_install do
  sudo_script <<-SCRIPT
    run_cmd
    other_cmd
    ! cmd_that_can_have_non-zero_exit
  SCRIPT
end

# only run for web roles
task :custom_install_web, :roles => :web do
  put(File.read("local/file"), "/some/file")
end

If anyone has any configuration templates similar to what is provided in generators/vulcanize/templates, please contribute them to the project, e.g. a module for using postgres instead of mysql, etc.

Last edited by wr0ngway, Wed Sep 16 14:44:24 -0700 2009
Home | Edit | New
Versions: