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

Capistrano: A three act play in multistage depl...

Tyler Bird
October 23, 2012

Capistrano: A three act play in multistage deployment strategies.

Taking you through a basic deploy to one stage, then to the standard dual stage (staging and production) we learn a best practice way to use Capistrano to deploy to multiple stages.

Tyler Bird

October 23, 2012
Tweet

More Decks by Tyler Bird

Other Decks in Programming

Transcript

  1. who I am I’m Tyler Bird aka @7hunderbird Work for

    Engine Yard Sunday, October 28, 12
  2. who I am I’m Tyler Bird aka @7hunderbird Work for

    Engine Yard Married with Child Sunday, October 28, 12
  3. what I’m going to say Setup from scratch Expand into

    multistage Sunday, October 28, 12
  4. what I’m going to say Setup from scratch Expand into

    multistage Refactor multistage for fun (and profit?) Sunday, October 28, 12
  5. act 1 Create an awesome app Do a default deploy

    to one stage Sunday, October 28, 12
  6. act 1 Create an awesome app Do a default deploy

    to one stage Let’s get started Sunday, October 28, 12
  7. what do we need? rails new awesome --skip bundler create

    app repository Sunday, October 28, 12
  8. what do we need? rails new awesome --skip bundler create

    app repository push the app Sunday, October 28, 12
  9. what else do we need? a place to deploy to

    how about a vagrant box? Sunday, October 28, 12
  10. setup the vagrant vagrant add box <name> <url> vagrant init

    Modify the Vagrantfile Sunday, October 28, 12
  11. act 2 how can we duplicate this for production? but

    keep ourselves DRY Sunday, October 28, 12
  12. use a task as a stage the simplest way to

    do multistage deploy in single file Sunday, October 28, 12
  13. use a task as a stage the simplest way to

    do multistage deploy in single file define each stage in a task Sunday, October 28, 12
  14. use a task as a stage the simplest way to

    do multistage deploy in single file define each stage in a task cap <stage> deploy, cap <stage> <cap_task> Sunday, October 28, 12
  15. conclusion sensible default multi-stage deploy DRY system to expand into

    moar stages (CI, testing) Sunday, October 28, 12
  16. what I said Setup from scratch Expanded into multistage Refactored

    multistage for fun (and profit) Sunday, October 28, 12