Ruby Deployer

A simple tool with a simple name that helps put deployments into the hands of developers instead of manual deployment tinkers.

Philosophy

This tool has a philosophy that drives its developement.

  • Deploy artifacts, not source revisions.
  • Automate creation, provisioning and decommissioning of machines on top of a virtualized machine.
  • Simple, understandable DSL that is similar in style and function to rake.
  • Servers that contain only runtime environments.
  • Reproducable production environments on a local machine.

Sample Code

Deployfile

artifact :webapp do
  before do
    sh 'bundle install --deployment'
    rake 'assets:precompile'
  end
  exclude ['db']
end

artifact :db do
  before do
    sh 'bundle install --deployment'
  end
  include ['db', 'vendor'] # We need vendor for the vendered gems
end

provision do
  # By default, cookbooks are discovered in ./cookbooks
  # cookbooks ['cookbooks']
  instance 'haproxy'
  instance 'application_master'
  instance 'application', count: 4
  instance 'database_master'
  instance 'database'
  instance 'resque', count: 2
end

deploy do
  push :webapp => ['application_master', 'application', 'resque']
  push :db => ['database_master', 'database']
end

verify do
  rake "deploy:verify[#{environment}]"
end

Minimal Deployfile

artifact :webapp

provision do
  instance 'application_master'
end

deploy :webapp => ['application_master']