{"id":603,"date":"2011-02-13T20:48:26","date_gmt":"2011-02-13T20:48:26","guid":{"rendered":"http:\/\/fragile.org.uk\/?p=603"},"modified":"2011-02-13T20:48:26","modified_gmt":"2011-02-13T20:48:26","slug":"in-praise-of-continuous-deployment","status":"publish","type":"post","link":"https:\/\/fragile.org.uk\/index.php\/2011\/02\/13\/in-praise-of-continuous-deployment\/","title":{"rendered":"In Praise of Continuous Deployment"},"content":{"rendered":"<blockquote>\n<div>It doesn&#8217;t matter if you get there, every step along the way is an improvement.<\/div>\n<\/blockquote>\n<div style=\"text-align:right;\">Me, praising Continuous Deployment<\/div>\n<p>\nEver since coming across the idea on <a title=\"Start up lessons learned\" href=\"http:\/\/www.startuplessonslearned.com\/\">Eric Ries\u2019s blog<\/a> I\u2019ve always been a big fan of <a title=\"Startup lessons learned | Continuous Deployment\" href=\"http:\/\/www.startuplessonslearned.com\/2009\/02\/continuous-deployment-and-continuous.html\">Continuous Deployment<\/a>. For those unfamiliar with the term, it means writing your code, testing frameworks and monitoring systems in such a way that it is possible to completely automate the process of going from source control commit to deployment to a live system without posing a quality melt down. This means teams can find themselves deploying 50 times a day as a matter of course.<\/p>\n<p><a title=\"Pwwwblog | Braveheart\" href=\"http:\/\/pwwwblog.ibeatyou.com\/blog\/wp-content\/uploads\/2009\/11\/mel-gibson-braveheart-photograph-c101019223.jpg\">Yeah<\/a><\/p>\n<p>It\u2019s not without it\u2019s <a title=\"Last i first out | Continuous deployment\" href=\"http:\/\/blog.lastinfirstout.net\/2009\/03\/continuous-deployment-debate.html\">critics<\/a>, and a lot of people see this as one way ticket to putting out poorly tested buggy code. I think that those folk completely miss the point and that in many scenarios in fact the opposite is true. The thing I really like though, is that, whether or you ever get to the point of automatically deploying every commit to live, every step that you might take to get there is hugely positive.<\/p>\n<p>So, really, what would have to happen in order to employ a Continuous Deployment regime?<\/p>\n<p>18 months ago my then team started to take this idea more seriously, I thought it would be interesting to give an overview of the steps taken towards Continuous Deployment, and since we&#8217;re certainly not there yet, what we plan to do in the future.<\/p>\n<p>We started from a point where we would release to live environment every few weeks. Deployments, including pre and post deploy testing could take two people half a day sometimes more.\u00a0I should also say that we are dealing with machine to machine SaaS systems where the expectation is that the service is <em>always<\/em> available.<\/p>\n<h2>Reduce manual deployment load<\/h2>\n<p>Our first efforts aimed to reduce the human load on deployment through automation. <a title=\"Startup lessons learned | Fear is a mind killer\" href=\"http:\/\/www.startuplessonslearned.com\/2009\/05\/fear-is-mind-killer.html\">Fear<\/a> meant that we still needed to ssh into every node to restart but every other step was taken care of. This meant that it eventually became common place to deploy multiple times a week across multiple platforms.<\/p>\n<h2>Improve system test coverage<\/h2>\n<p>Once a deploy was live we were still spending considerable time on behaviour verification. To address this we worked to improve our system and load testing capability.\u00a0Doing so meant that we had more time to manually verify deploy specific behaviour, safe in the knowledge that the general behaviour was covered by the tester.<\/p>\n<h2>Improve system monitoring<\/h2>\n<p>This approach also requires a high level of trust in system monitoring. We have our own in house monitoring system whose capabilities we expanded during this period. In particular, we improved our expression language to better state what constituted erroneous behaviour and we also worked on\u00a0better long term trend analysis, taking inspiration from this <a title=\"Evan Miller | Poisson trend analysis\" href=\"http:\/\/www.evanmiller.org\/poisson.pdf\">paper <\/a>. It\u2019s no surprise to me that it came out of <a title=\"Timothy Fitz | Doing the impossible 50 times a day\" href=\"http:\/\/timothyfitz.wordpress.com\/2009\/02\/10\/continuous-deployment-at-imvu-doing-the-impossible-fifty-times-a-day\/\">IMVU<\/a> who have been practicing Continuous Deployment for a long time.<\/p>\n<h2>Reduce deploy size<\/h2>\n<p>Since the act of deployment was now much less expensive we looked to reduce the number of changes that went out in each deploy. At first this felt false, after all if the user can&#8217;t use the feature in it&#8217;s entirety, what&#8217;s the point? We soon realised that smaller chunks were easier to verify and sped us up over time. We took an approach that I&#8217;ve since heard referred to as \u2018experiments\u2019 so that new functionality could be deployed live but was hidden from regular users. It meant that we could demo new functionality in production, without disrupting the business as usual service.<\/p>\n<h2>Embrace lean inspired methodology<\/h2>\n<p>Breaking down deploys into a few day\u2019s worth of work also improved our lead time meaning that we could more responsive in the event of a change of plan. It was during this period that we switched from <a title=\"Fragile | Switch from Scrum to Kanban\" href=\"http:\/\/fragile.org.uk\/2010\/01\/the-switch-to-kanban\/\">time boxing to Kanban<\/a>. This is interesting since Continuous Deployment is often championed by the <a title=\"Start up lessons learned | the lean start up\" href=\"http:\/\/www.startuplessonslearned.com\/2008\/09\/lean-startup.html\">lean startup movement<\/a>.<\/p>\n<h2>The future<\/h2>\n<p>More recently, actively pursuing Continuous Deployment has taken a back seat, but the next logical steps could be to further flesh out the system test coverage and then look to completely automate deployment to the staging environment (modulo database changes).<\/p>\n<p>However, it doesn\u2019t really matter what we do next, if it takes us a step closer to theoretically being able to deploy continuously it will undoubtedly improve our existing lead time and responsiveness.<\/p>\n<p>This post contains a number of Continuous Deployment resources, but a few further articles I found to be interesting follow include:-<\/p>\n<ul>\n<li><a href=\"http:\/\/radar.oreilly.com\/2009\/03\/continuous-deployment-5-eas.html\">http:\/\/radar.oreilly.com\/2009\/03\/continuous-deployment-5-eas.html<\/a><\/li>\n<li><a href=\"http:\/\/timothyfitz.wordpress.com\/2009\/02\/10\/continuous-deployment-at-imvu-doing-the-impossible-fifty-times-a-day\/\">http:\/\/timothyfitz.wordpress.com\/2009\/02\/10\/continuous-deployment-at-imvu-doing-the-impossible-fifty-times-a-day\/<\/a><\/li>\n<li><a href=\"http:\/\/toni.org\/2010\/05\/19\/in-praise-of-continuous-deployment-the-wordpress-com-story\/\">http:\/\/toni.org\/2010\/05\/19\/in-praise-of-continuous-deployment-the-wordpress-com-story\/<\/a><\/li>\n<li><a href=\"http:\/\/theagileexecutive.com\/2010\/07\/01\/technical-debt-meets-continuous-deployment\/\">http:\/\/theagileexecutive.com\/2010\/07\/01\/technical-debt-meets-continuous-deployment\/<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<a href=\"https:\/\/fragile.org.uk\/index.php\/2011\/02\/13\/in-praise-of-continuous-deployment\/\" rel=\"bookmark\" title=\"Permalink to In Praise of Continuous Deployment\"><p>It doesn&#8217;t matter if you get there, every step along the way is an improvement. Me, praising Continuous Deployment Ever since coming across the idea on Eric Ries\u2019s blog I\u2019ve always been a big fan of Continuous Deployment. For those unfamiliar with the term, it means writing your code, testing frameworks and monitoring systems in [&hellip;]<\/p>\n<\/a>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[16,22,23],"class_list":{"0":"post-603","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-development","7":"tag-continuous-deployment","8":"tag-kanban","9":"tag-lean","10":"h-entry","11":"hentry"},"_links":{"self":[{"href":"https:\/\/fragile.org.uk\/index.php\/wp-json\/wp\/v2\/posts\/603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fragile.org.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fragile.org.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fragile.org.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fragile.org.uk\/index.php\/wp-json\/wp\/v2\/comments?post=603"}],"version-history":[{"count":0,"href":"https:\/\/fragile.org.uk\/index.php\/wp-json\/wp\/v2\/posts\/603\/revisions"}],"wp:attachment":[{"href":"https:\/\/fragile.org.uk\/index.php\/wp-json\/wp\/v2\/media?parent=603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fragile.org.uk\/index.php\/wp-json\/wp\/v2\/categories?post=603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fragile.org.uk\/index.php\/wp-json\/wp\/v2\/tags?post=603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}