Upgrade to Pro — share decks privately, control downloads, hide ads and more …

USING CAPISTRANO FOR DEPLOYING EVERYTHING - Codemash 2013

Rob
January 10, 2013

USING CAPISTRANO FOR DEPLOYING EVERYTHING - Codemash 2013

Rob

January 10, 2013
Tweet

More Decks by Rob

Other Decks in Programming

Transcript

  1. Capistrano is a remote server automation tool which works wonderfully

    for automating deployments and other server tasks. Monday, April 29, 13
  2. 2 Core Assumptions ‣ You are using SSH to access

    the remote servers. ‣ You either have the same password to all target machines, or you have public keys in place to allow passwordless access to them. Monday, April 29, 13
  3. Capistrano was originally created to work with rails (it is

    written in Ruby). Monday, April 29, 13
  4. set :deploy_to, "/var/www" set :repository, "[email protected]:sparkbox/ sparkbox-web.git" set :scm, :git

    role :app, "www.test.com" Installing Capistrano Monday, April 29, 13
  5. Simple task for compiling sass on a PHP Project desc

    "Compile sass to css" task :compile_sass, :roles => :app do run "cd #{release_path}; sass --update sass:css --style compressed" end Capistrano Tasks Monday, April 29, 13
  6. Simple task for creating a symlink for managed content task

    :create_symlinks, :roles => :app do run "ln -s #{deploy_to}/#{shared_dir}/ uploads #{current_release}/uploads" end Capistrano Tasks Monday, April 29, 13
  7. “Are you not entertained? Are you not entertained? Is this

    not why you are here?” Monday, April 29, 13