Rapid real-world testing using git-deploy

Ævar Arnfjörð Bjarmason <avarab@gmail.com>
FOSDEM – February 5, 2012

What is git-deploy?

It's a tool to make deployments really easy

We've gone from deployments being a hard manual process, to doing dozens of them a day.

deploys per month at Booking.com

It's highly configurable and pluggable

this image is of no significance except to fill up space

What's the core concept behind it?


So how does it actually work

Step 1: start

Step 1: start - example of someone already deploying

I'm sorry Dave, I'm afraid I can't do that

Step 1: start - example of a successful start

Step 2: sync

Step 3: finish

Step 4: panic

OMGWTFBBQ we're spewing errors

git-deploy revert -- re-sync out a previous version

$ git-deploy revert
# INFO : Starting step 'revert' at 2012-02-03 12-09-50
# INFO : Working directory was checked out to tag 'frob-20120203-111220', will restore this tag on abort
# INFO : 
The following commits are available to revert the site to:
# INFO : Filtering list by m/^frob/ (use `git-deploytool show .` to see all).
# INFO : SHA1........  tag: PREFIX-YYYYMMDD-HHMM == Original rollout of same sha1
# INFO : Tags against active commit are marked with a '*' and are highlighted differently
   1.   ac6152d369 *tag: frob-20120203-111220       ==     office-20120203-110941
   2.   639022c78d  tag: frob-20120202-160118      
   3.   fc29e97c43  tag: frob-20120202-132719      
   4.   77b932ea11  tag: frob-20120201-164625      
   5.   f2ffb24388  tag: frob-20120201-163350       ==     book-20120201-162541
   6.   a7bf6eb7c8  tag: frob-20120201-140814      
   7.   ee728fa093  tag: frob-20120201-110816       ==     frob-20120131-145422     frob-20120131-121103     frob-20120130-171544     frob-20120130-121126
   8.   cb3189bf21  tag: frob-20120201-105349       ==     admin-20120201-103938
   9.   ee728fa093  tag: frob-20120131-145422       ==     frob-20120131-121103     frob-20120130-171544     frob-20120130-121126
  10.   e987ca15e1  tag: frob-20120131-143318      
# INFO : Showing first 10, *bignum* of *bignum* not shown (111 filtered). Use --count=N or different filter to show more (N=0 shows all)
Please select a commit from 1-10 to revert to, or 'quit' to not do anything: quit

Why use it?

What doesn't it do?

Why does it work for us / Why do we need it?

Thank you!, questions?