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

Release Faster

51567a4f786cd8a2c41c513b592de9f9?s=47 David Cramer
September 14, 2013

Release Faster

PyCon APAC 2013

51567a4f786cd8a2c41c513b592de9f9?s=128

David Cramer

September 14, 2013
Tweet

Transcript

  1. RELEASE FASTER David Cramer twitter.com/zeeg Sunday, September 15, 13

  2. Sunday, September 15, 13

  3. I work on "Developer Productivity" Sunday, September 15, 13

  4. (No one knows what that means) Sunday, September 15, 13

  5. I also build Sentry Sunday, September 15, 13

  6. "How do we release faster?" Sunday, September 15, 13

  7. Continuous Deployment (n) Shipping new code as soon as it's

    ready Sunday, September 15, 13
  8. # Update the site every 5 minutes */5 * *

    * * cd /www/example.com \ && git pull \ && service apache restart Sunday, September 15, 13
  9. Continuous Deployment (n) Shipping new code as soon as it's

    ready Sunday, September 15, 13
  10. Review Integration Deploy Failed Build Reporting Rollback Commit Sunday, September

    15, 13
  11. Better Testing Simplify Development Automate Releases Feature Gates Code Review

    Sunday, September 15, 13
  12. A Dropbox tale.. Sunday, September 15, 13

  13. "Go through these [extremely manual] instructions to setup a development

    VM" Sunday, September 15, 13
  14. Sunday, September 15, 13

  15. "Why don't we just use Vagrant?" Sunday, September 15, 13

  16. Optimize the Bootstrap Sunday, September 15, 13

  17. Bootstrap affects newly hired developers Sunday, September 15, 13

  18. Bootstrap affects rebuilding environments Sunday, September 15, 13

  19. Bootstrap affects time to run tests Sunday, September 15, 13

  20. Bootstrap affects our sanity Sunday, September 15, 13

  21. vagrant up ⇢ provision.sh Sunday, September 15, 13

  22. Remove Dependencies Sunday, September 15, 13

  23. You cannot reproduce your production environment Sunday, September 15, 13

  24. Stop Trying Sunday, September 15, 13

  25. Do you really need Apache? RTQDCDN[PQV Sunday, September 15, 13

  26. Do you really need HAProxy? UGTKQWUN[! Sunday, September 15, 13

  27. Do you really need RabbitMQ? JQYCDQWV4GFKU! Sunday, September 15, 13

  28. Do you really need Zookeeper? PQRG Sunday, September 15, 13

  29. Do you really need Hadoop? NQN Sunday, September 15, 13

  30. Do you really need Anything? Sunday, September 15, 13

  31. Utilize your build servers for complicated dependencies Sunday, September 15,

    13
  32. Find Your Bottlenecks [QWRTQDCDN[FQP VPGGFC8/KH[QWJCXGGPIKPGGTU Sunday, September 15, 13

  33. Better Testing Simplify Development Automate Releases Feature Gates Code Review

    Sunday, September 15, 13
  34. Culture vs Tooling Sunday, September 15, 13

  35. Make Testing Easier Ensure you want to write tests Sunday,

    September 15, 13
  36. "Oh look, a test I can copy/paste" Sunday, September 15,

    13
  37. Encourage building better testing tools and paradigms Sunday, September 15,

    13
  38. pip install pytest Sunday, September 15, 13

  39. pip install flake8 Sunday, September 15, 13

  40. pip install mock Sunday, September 15, 13

  41. Your goal is to make testing accessible Sunday, September 15,

    13
  42. Automatically test individual commits to ensure every change is stable

    Sunday, September 15, 13
  43. Sunday, September 15, 13

  44. Test Continuously Before code review (lint) Sunday, September 15, 13

  45. Test Continuously During code review Sunday, September 15, 13

  46. Test Continuously Post-code review (merge) Sunday, September 15, 13

  47. Optimize test execution time to deliver feedback ASAP Sunday, September

    15, 13
  48. Sunday, September 15, 13

  49. Keep a tight Feedback Loop PQQPGYCPVUVQHKPFQWVVJGPGZVFC[VJCVVJGKTEQFGYCUDTQMGP Sunday, September 15, 13

  50. Prevent mistakes by blocking commits which fail the build cycle

    Sunday, September 15, 13
  51. Failed builds won't deploy Sunday, September 15, 13

  52. Failed builds won't merge Sunday, September 15, 13

  53. Better Testing Simplify Development Automate Releases Feature Gates Code Review

    Sunday, September 15, 13
  54. Mandatory Code Review Sunday, September 15, 13

  55. Sunday, September 15, 13

  56. Use Code Review to sanity check code Sunday, September 15,

    13
  57. Use Code Review to influence testing culture Sunday, September 15,

    13
  58. Use Code Review to educate developers Sunday, September 15, 13

  59. Use Code Review to decrease cycle time Sunday, September 15,

    13
  60. "Does this change look sane?" Sunday, September 15, 13

  61. "No, this will break X, Y, and Z" FKF[QWGXGPMPQY:YCUCVJKPI! Sunday,

    September 15, 13
  62. Aim for Quality Patches Sunday, September 15, 13

  63. Changes happen outside of master causing master to be the

    new stable CMCVKRQTVTWPM Sunday, September 15, 13
  64. Better Testing Simplify Development Automate Releases Feature Gates Code Review

    Sunday, September 15, 13
  65. Choose your Audience Sunday, September 15, 13

  66. Releasing a feature internally can be as effective as externally

    Sunday, September 15, 13
  67. Use feature gates to limit the audience your change affects

    Sunday, September 15, 13
  68. Gargoyle at Disqus Sunday, September 15, 13

  69. from gargoyle import gargoyle def my_view(request): if gargoyle.is_active('awesome', request): return

    'my new awesome feature' else: return 'boring old version' Sunday, September 15, 13
  70. Better Testing Simplify Development Automate Releases Feature Gates Code Review

    Sunday, September 15, 13
  71. Look at Heroku Sunday, September 15, 13

  72. $ heroku create sushi Creating sushi... done http://sushi.herokuapp.com/ | git@heroku.com:sushi.git

    $ git push heroku master ----> Heroku receiving push ----> Rails app detected ----> Compiled slug size is 8.0MB http://sushi.herokuapp.com deployed to Heroku Sunday, September 15, 13
  73. Continuous deployment is not deploying every commit Sunday, September 15,

    13
  74. Focus on the ability to release every commit, not actually

    doing it Sunday, September 15, 13
  75. Review Integration Deploy Failed Build Reporting Rollback Commit Sunday, September

    15, 13
  76. Stage Release TGNGCUGECPOGCPYJCVGXGTKVPGGFUVQYKVJKP[QWTQTICPK\CVKQP Sunday, September 15, 13

  77. Closing Thoughts Sunday, September 15, 13

  78. Quality over Quantity PQUGTKQWUN[ Sunday, September 15, 13

  79. Scale culture through tooling Sunday, September 15, 13

  80. Your problems are not unique Sunday, September 15, 13

  81. Thank You! (p.s. Tokyo is amazing) twitter.com/zeeg Sunday, September 15,

    13