Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

Deliver

 Deliver

As a developer, your job does not stop with writing clean, well-documented and well-tested code. You get paid for working, in production code. So how do you consistently deliver your code into production? How you make it part of your CI process? Does devops do it for you via Chef or Puppet?

This talk is meant to explore the current deployment processes, present their strengths and weaknesses and provide a simple alternative. This alternative has no dependencies (no, not even Ruby) and can be applied in the same way to your trusted Rails, the hated PHP or your look-ma-no-tests node.js.

Video: http://www.youtube.com/watch?v=dzI8M-H3F08

Gerhard Lazu

March 11, 2013
Tweet

More Decks by Gerhard Lazu

Other Decks in Programming

Transcript

  1. BACK TO BASICS git ssh foreman bash WE ARE A

    UNIX SHOP, EVERYTHING ELSE IS JUST A DETAIL
  2. .deliver/config 1 #!/usr/bin/env bash 2 3 $APP="foo" 4 $HOSTS="foo.1 foo.2"

    5 $PORT="5000" 6 7 post_launch() { 8 notify_newrelic_of_deployment 9 clean_static_cache 10 }
  3. $ deliver check ORIGIN_DIR /Users/gerhard/code/foo STRATEGY ruby HOSTS foo.1 foo.2

    ----------------------------------------------------------- APP foo APP_USER foo DELIVER_TO ~foo/app REFSPEC master GIT_PUSH -f REVISION f80584aa195479eaa613aa2f5900009188 PORT 5000 SUPERVISOR upstart READY TO DELIVER!
  4. $ deliver DELIVERING FOO WITH RUBY STRATEGY -----> Authorizing hosts

    -----> Ensuring hosts are ready to accept git pushes -----> Pushing new commits with git to: [email protected] [email protected] -----> Resetting remote hosts to f80584aa195479eaa613aa2f590 -----> Updating git submodules -----> Installing gems with bundler -----> Exporting services to upstart -----> Launching app with upstart -----> Notifying New Relic of new deployment FOO DELIVERED!
  5. strategies/ruby 1 run() { 2 authorize_hosts 3 init_app_remotely 4 git_push

    5 git_reset_remote 6 authorize_remote_hosts 7 git_submodules 8 rvmrc_trust 9 bundle_install 10 foreman_export 11 launch 12 }
  6. .deliver/config 1 #!/usr/bin/env bash 2 3 $APP="foo" 4 $HOSTS="foo.1 foo.2"

    5 $PORT="5000" 6 7 post_launch() { 8 notify_newrelic_of_deployment 9 clean_static_cache 10 }
  7. bin/build 1 #!/usr/bin/env bash 2 3 # functions 4 5

    setup_dependencies 6 run_tests 7 tag_for_deploy 8 use_compiled_assets 9 _deliver