• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Continuous Deployment - Lean LA

on

  • 18,126 views

A case-study on how I transitioned to Continuous Deployment.

A case-study on how I transitioned to Continuous Deployment.
- Benefits
- How to get started
- When to get started

Statistics

Views

Total Views
18,126
Views on SlideShare
6,134
Embed Views
11,992

Actions

Likes
16
Downloads
179
Comments
0

13 Embeds 11,992

http://seleniumhq.wordpress.com 11637
http://feeds.feedburner.com 310
http://www.newsblur.com 22
http://translate.googleusercontent.com 7
http://us-w1.rockmelt.com 5
https://twitter.com 2
http://newsblur.com 2
http://xianguo.com 2
http://rssminer.net 1
http://webcache.googleusercontent.com 1
http://www.twylah.com 1
http://ams.activemailservice.com 1
http://docs.seleniumhq.wordpress.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Hi - I am Ash with WiredReach and I&apos;m going to be presenting a case-study on how I transitioned from a traditional development process to continuous deployment. <br /> <br /> Just to get a sense of who is in the room, <br /> How many people here know what Continuous Deployment is? <br /> And how many people practice Continuous Deployment today? <br />
  • If I were to ask you &#x201C;How do you maximize progress in a lean startup?&#x201D;, <br /> most of you would probably say: <br /> <br />
  • If I were to ask you &#x201C;How do you maximize progress in a lean startup?&#x201D;, <br /> most of you would probably say: <br /> <br />
  • The &#x201C;lean&#x201D; in lean startup is not about being cheap but about speed. <br /> It&#x2019;s about having a strong initial vision and then systematically testing it through tightly defined experiments. <br />
  • When you first hear: &#x201C;get out of the building and talk to customers&#x201D;, it&#x2019;s easy to think that all you have to do is run a bunch of surveys or focus groups to gather feature requests from customers. <br /> It&#x2019;s NOT. <br /> <br /> A Lean Startup is NOT about asking customers what they want, but measuring what they do. <br />
  • But most important of all, a Lean startup is about focus. Startups are inherently chaotic but at any given point in time, there are only a few actions that truly matter. <br /> <br /> A Lean Startup focuses on those and ignores the rest. <br />
  • If I were to ask you &#x201C;How do you maximize progress in a lean startup?&#x201D;, <br /> most of you would probably say: <br /> <br />
  • So lets take a look at where in the development process we learn about customers. <br /> Some of this learning happens during the requirements stage in the form of customer discovery when we&#x2019;re out talking to customers and figuring and out what to build. <br /> But most of this learning happens only after we get the product into customers&#x2019; hands in the form of customer validation. <br /> There is very little learning during development and QA. <br /> Sure we learn about other things, just not about customers. <br /> <br /> <br />
  • So lets take a look at where in the development process we learn about customers. <br /> Some of this learning happens during the requirements stage in the form of customer discovery when we&#x2019;re out talking to customers and figuring and out what to build. <br /> But most of this learning happens only after we get the product into customers&#x2019; hands in the form of customer validation. <br /> There is very little learning during development and QA. <br /> Sure we learn about other things, just not about customers. <br /> <br /> <br />
  • So lets take a look at where in the development process we learn about customers. <br /> Some of this learning happens during the requirements stage in the form of customer discovery when we&#x2019;re out talking to customers and figuring and out what to build. <br /> But most of this learning happens only after we get the product into customers&#x2019; hands in the form of customer validation. <br /> There is very little learning during development and QA. <br /> Sure we learn about other things, just not about customers. <br /> <br /> <br />
  • Even though building a product is the purpose of a startup, you could say that <br /> Product Development actually gets in the way of learning about customers. <br />
  • While we obviously can&#x2019;t eliminate development and QA, we can shorten the cycle time from requirements to release so we can get to the learning parts faster. <br /> <br /> That is exactly what Continuous Deployment does. <br /> Continuous Deployment shortens the cycle time it takes to build, test, and deploy features. <br /> <br /> Shorter cycle times mean we get feedback faster and learn faster. <br />
  • While we obviously can&#x2019;t eliminate development and QA, we can shorten the cycle time from requirements to release so we can get to the learning parts faster. <br /> <br /> That is exactly what Continuous Deployment does. <br /> Continuous Deployment shortens the cycle time it takes to build, test, and deploy features. <br /> <br /> Shorter cycle times mean we get feedback faster and learn faster. <br />
  • While we obviously can&#x2019;t eliminate development and QA, we can shorten the cycle time from requirements to release so we can get to the learning parts faster. <br /> <br /> That is exactly what Continuous Deployment does. <br /> Continuous Deployment shortens the cycle time it takes to build, test, and deploy features. <br /> <br /> Shorter cycle times mean we get feedback faster and learn faster. <br />
  • While we obviously can&#x2019;t eliminate development and QA, we can shorten the cycle time from requirements to release so we can get to the learning parts faster. <br /> <br /> That is exactly what Continuous Deployment does. <br /> Continuous Deployment shortens the cycle time it takes to build, test, and deploy features. <br /> <br /> Shorter cycle times mean we get feedback faster and learn faster. <br />
  • While we obviously can&#x2019;t eliminate development and QA, Lean Startups shorten the cycle time from requirements to release by continuously deploying features and involving customers throughout the development process. <br /> <br /> These shorter cycle times translate to faster feedback and faster learning for the startup. <br />
  • Here&#x2019;s an overview of what I&#x2019;ll be talking about today. <br /> <br /> I&#x2019;ll describe what my development process looked like before and after continuous deployment. <br /> I&#x2019;ll talk about how I got started and how I build features now. <br />
  • So, before Continuous Deployment, we used to release on a 2 week cycle which is fairly fast by most standards. <br /> We used to spend about a week in development and then QA tested for another 2-3 days before we deployed to customers. <br /> <br /> Now we release multiple times a day. <br />
  • Before Continuous Deployment, we had a common staging area that mirrored production. This is what we used for development and QA. It worked fine in the early days but as we grew, coordinating around a single staging area became a problem. <br /> <br /> Now we build complete standalone sandboxes for development and QA. Each developer has the complete system on their workstation which gives them a lot more freedom to experiment. Each QA machine also runs on a standalone sandbox which makes it easier for us to do isolated testing as well as scale the testing infrastructure horizontally. <br />
  • Before Continuous Deployment, releases were all day events. We would do a code freeze typically on a Thursday and spend most of Friday building, testing and packaging a release. <br /> <br /> Now a release is triggered automatically every time we commit code. The system is run against a battery of tests and only deployed into production if it passes all the tests. We constantly monitor the production environment and can tell good changes from bad changes quickly and revert a release if we need to. <br /> <br /> Our release process currently takes about 20 minutes. <br />
  • Before Continuous Deployment, the average size of a release was measured in hundreds of lines of code. <br /> <br /> Now a typical release is under 25 lines of code. <br />
  • When you are committing 25 lines of code versus hundreds per release, the impact on the system is much more localized. This has led to fewer production emergencies and less firefighting for us. <br />
  • But most important of all, if you are a technical founder like me, you constantly have to trade-off outside the building activities like customer development against inside the building activities like product development. <br /> <br /> Before Continuous Deployment, I had to schedule my week for coding days and customer days. Now I can do both in the same day. I schedule my coding in 2 hour blocks usually early in the day. That leaves the rest of the day open for everything else. <br />
  • So, Continuous Deployment sounds great in theory. <br />
  • But taking the plunge was still scary. <br /> <br /> The biggest reason for us was having the feeling of there being no safety net. With a traditional development process, there is a QA cycle before deployment which provides a safety net of time and there is some comfort in sharing testing responsibility with someone else. <br />
  • But taking more time in QA was not always optimal for us: <br /> - despite our best testing efforts, bugs still crept into production <br /> - bugs got more expensive and harder to fix the longer we waited <br /> - but most important of all, we felt we weren&#x2019;t learning anything about customers during that time <br /> <br /> The answer isn&#x2019;t taking more time in QA but less through test automation and getting better at detecting and fixing issues in production. <br />
  • But taking more time in QA was not always optimal for us: <br /> - despite our best testing efforts, bugs still crept into production <br /> - bugs got more expensive and harder to fix the longer we waited <br /> - but most important of all, we felt we weren&#x2019;t learning anything about customers during that time <br /> <br /> The answer isn&#x2019;t taking more time in QA but less through test automation and getting better at detecting and fixing issues in production. <br />
  • But taking more time in QA was not always optimal for us: <br /> - despite our best testing efforts, bugs still crept into production <br /> - bugs got more expensive and harder to fix the longer we waited <br /> - but most important of all, we felt we weren&#x2019;t learning anything about customers during that time <br /> <br /> The answer isn&#x2019;t taking more time in QA but less through test automation and getting better at detecting and fixing issues in production. <br />
  • But taking more time in QA was not always optimal for us: <br /> - despite our best testing efforts, bugs still crept into production <br /> - bugs got more expensive and harder to fix the longer we waited <br /> - but most important of all, we felt we weren&#x2019;t learning anything about customers during that time <br /> <br /> The answer isn&#x2019;t taking more time in QA but less through test automation and getting better at detecting and fixing issues in production. <br />
  • But taking more time in QA was not always optimal for us: <br /> - despite our best testing efforts, bugs still crept into production <br /> - bugs got more expensive and harder to fix the longer we waited <br /> - but most important of all, we felt we weren&#x2019;t learning anything about customers during that time <br /> <br /> The answer isn&#x2019;t taking more time in QA but less through test automation and getting better at detecting and fixing issues in production. <br />
  • So lets take a look at how we got started. <br />
  • Here&#x2019;s some background on WiredReach and the type of products we build. We&#x2019;ve been in business for 7 years and have launched 2 products - BoxCloud and CloudFire. <br /> <br /> The first product BoxCloud was built using a release early, release often methodology while CloudFire was built using Lean Startup techniques. <br /> <br /> Both products are hybrid web/desktop applications. What I mean by that is they have both a web component and a downloaded client component which runs on mac and windows. <br />
  • Here&#x2019;s some background on WiredReach and the type of products we build. We&#x2019;ve been in business for 7 years and have launched 2 products - BoxCloud and CloudFire. <br /> <br /> The first product BoxCloud was built using a release early, release often methodology while CloudFire was built using Lean Startup techniques. <br /> <br /> Both products are hybrid web/desktop applications. What I mean by that is they have both a web component and a downloaded client component which runs on mac and windows. <br />
  • <br />
  • <br />
  • Another problem with tests is that over time, they get out of date and start failing. I&#x2019;ve worked in places where developers start ignoring these which is a slippery slope as the problem only keeps getting worse. <br /> <br /> In Continuous Deployment, these tests are your only line of defense before deploying code, so you have to take failing tests very seriously. We only deploy a release if it passes all the tests. Otherwise, we stop and fix the tests first. <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • The first and most important practice we adopted was fitting releases into small batch sizes. Coding in small batches is the key concept in continuous deployment and can directly be attributed back to shorter cycle times, faster feedback, and a better work flow. <br /> <br /> For me, a small batch is the output of a 2 hour work block. We can not always build a full feature in 2 hours but we have gotten good at deploying features incrementally. We start with non-user facing changes first, like api updates and database changes, before building user-facing changes. Even deploying these changes early greatly help to lower the integration risk of a feature. <br /> <br />
  • Before Continuous Deployment, the average size of a release was measured in hundreds of lines of code. <br /> <br /> Now a typical release is under 25 lines of code. <br />
  • When you are committing 25 lines of code versus hundreds per release, the impact on the system is much more localized. This has led to fewer production emergencies and less firefighting for us. <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • We now have a practice of writing a new functional test with every user facing change, but we didn&#x2019;t start that way. We got started by writing a single test for the user activation flow first. This is the path users take when they first signup, download and interact with our product. <br /> <br /> If something goes wrong here, nothing else matters after that. <br />
  • <br />
  • The next thing we did was not try to achieve 100% automation from the start. We kept deploying these small batch releases manually for a while and audited everything we did. This helped us build confidence in the process and overcome some of the initial fear of loosing control. <br /> <br /> We already had a continuous integration server that ran a large collection of unit tests but once we took out the formal QA step, we found ourselves preferring functional tests over unit tests since they were much better at reflecting what users actually did with the system. <br />
  • <br />
  • <br />
  • You&#x2019;ll eventually want to build one of these cluster immune systems (just hopefully not that one) that can automatically tell good changes from bad ones and do something about it. But here too, it&#x2019;s important to build it out incrementally. <br /> <br /> We got started simply monitoring the health of production servers using off-the-shelf tools like ganglia and nagios. Over time we built other application and business level monitoring into it. <br /> <br /> We did this mostly reactively to production issues. 5Whys. <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • Lastly, I want to spend some time talking about how I build features. <br /> <br /> Continuous Deployment shortens the cycle time it takes to deploy features but how do you make sure you&#x2019;re actually building what customers want and not simply cranking out new features faster. <br /> <br /> Here are some rules we follow. <br />
  • Features must be pulled not pushed. <br /> <br /> If you&#x2019;ve followed a customer discovery process, identified your top 3 problems, and defined a mvp, you do not need to push more features until you have validated your mvp. <br /> <br /> This doesn&#x2019;t mean you stop development, but most of your time should be spent measuring and improving existing features versus chasing after new problems to solve. <br /> <br /> From experience, I know this can be a hard rule to enforce and the next rule helps with that. <br />
  • A good practice for ensuring the 80/20 rule is constraining the features pipeline. This is a common practice from Agile and Kanban, but with the addition of a validated learning state. <br /> <br /> Here&#x2019;s how it works: Ideally, a new feature must be pulled or tested with more than one customer for it to show up in the backlog. The number of features in-progress is constrained by the number of developers and so is the number of features waiting for validation. This ensures that you cannot deploy a new feature until a previously deployed feature has been validated. <br />
  • So how do you validate a feature? Unless you have a lot of traffic, quantitative metrics can take some time to collect. For this reason, I prefer to validate a feature qualitatively first. Once a feature goes live, I directly contact customers that expressed interest in that feature and ask them for feedback. It&#x2019;s important not just to test the coolness factor of a feature but that it actually solves a customer problem and more importantly makes or keeps the sale. If I don&#x2019;t get a strong initial signal, I try and figure out why and either improve or kill the feature. <br /> <br /> We use google website optimizer, KISSmetrics, Mixpanel, and homegrown scripts to collect quantitative data. It&#x2019;s important here too, to focus on the macro and track key metrics over time, like revenue and retention, versus just clicks. <br />
  • So when is the best time to adopt Continuous Deployment? <br /> I believe the ideal time is as early in the product development cycle as possible - when you are small and have a few or even no customers. <br /> <br /> Continuous Deployment is an incremental process that you have to practice to get really good at. But even adopting simple practices like &#x201C;coding in small batch sizes&#x201D; paid off for us very quickly. The biggest benefit we have derived from Continuous Deployment is the ability to integrate Customer Development with Product Development. <br /> <br /> The fundamental call to action from Continuous Deployment is to &#x201C;Ship More Frequently&#x201D;. Once you take that first step, what you need to do next becomes clearer. <br /> <br /> Thank you. <br />
  • <br />
  • <br />
  • <br />

Continuous Deployment - Lean LA Continuous Deployment - Lean LA Presentation Transcript