http://www.flickr.com/photos/iboy_daniel/92896276/sizes/l/in/photostream/<br />Continuous Deployment ASP.net style<br />@B...
LondonCambridge (UK) based C# MVPLove Open Source Projects<br />Co-founder of Meerkatalyst<br />Co-Author of <br />Testing...
Agenda<br />Myths<br />Reality of life<br />Culture <br />Tooling<br />First steps<br />
Reducing risk and increasing opportunity by releasing changes as they happen<br />
http://www.flickr.com/photos/mayhem/292141287/sizes/o/in/photostream/<br />Let’s deploy 4 weeks worth of changes at once!<...
If it hurts, do it more often<br />
Continuous Deployment<br />Committed: 	40 lines added	80 lines deleted<br />Push changes to live<br />Automated monitoring...
Make releases a non-event<br />http://www.flickr.com/photos/violla/5110156999/sizes/l/in/photostream/<br />
Myths<br />
git push <PaaS> production<br />
Cowboy driven development<br />http://www.flickr.com/photos/esteemedhelga/3850944786/<br />
Pushing untested changes<br />
Throw it over the wall<br />http://www.flickr.com/photos/vizzzual-dot-com/2226095398/<br />
It wouldn’t work for us<br />
Reality<br />
How long would it take your organisation to deploy a change that involved just one single line of code?<br />Mary Poppendi...
“Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.”<br />Agile M...
“Continuous deployment doesn’t mean our product changes 30 times a day, it means we can be responsive”<br />Pascal-Louis P...
All the cool startups are doing it<br />
Asset Management by Mutual Funds in US. Highly regulated.<br />$2,000,000/day<br />No Ops, No QA<br />http://www.slideshar...
Waste<br />http://www.flickr.com/photos/hape_gera/5260530549/<br />
Feedback<br />
Reduce risk<br />http://www.flickr.com/photos/ianz/2594572474/<br />
Improve team morale<br />
Culture or Tooling?<br />
culture<br />
“High” Test Coverage<br />High != line coverage<br />High == confidence of changes<br />
No Blame<br />http://www.flickr.com/photos/cyberslayer/2535502341/<br />
Trust<br />http://www.flickr.com/photos/sephiroty/317320551/<br />
Desire to reduce risk<br />
Willingness to experiment<br />
Dark launches and gate keepers<br />http://www.flickr.com/photos/krymzon/102096279/sizes/z/in/photostream/<br />
Nasa style Go  No-Go<br />http://www.flickr.com/photos/28634332@N05/4053997535/<br />
Feature switches<br />http://www.flickr.com/photos/maxabxarata/535048895/<br />
Data Driven Companies<br />
CEOs, Managers and marketing LOVE data!<br />
Design for system failure<br />http://www.flickr.com/photos/thekrankis/3377123568/sizes/l/in/photostream/<br />
Five whys<br />
Everything needs to be automated<br />Fix it via a script<br />Write a script to detect and automate in the future<br />
tooling<br />Sounds great?! But how?<br />
Code focused tools<br />
Git<br />Why does git make CD easier? <br />
TeamCity<br />
Branch in code<br />
Feature switches<br />
If (cfg.enable_unicorn_polo) {<br />  // Do something new / cool<br />}<br />else {<br />  // Do something boring<br />}<b...
public override void OnActionExecuting(ActionExecutingContextfilterContext) {<br />boolfeaturedOn = FeatureSwitchService.G...
MSDeploy, Dolphin Deploy, AppHarbor<br />All you really need is Meerkatalyst<br />
Database Migrations<br />
Databases are always difficult<br />Stop the line for DB?<br />
Migrations in code?<br />Forward  Backwards compatible<br />
Infrastructure <br />
Chef / Knife<br />It works on Windows! <br />
Installing .Net via MSI<br />msiFile = “C:installersnet_framework.msi”<br />execute “Install .Net” do<br />	command “msiex...
Load Balancers<br />
Round robin deployments<br />Deploy to just one<br />
listen webfarm 0.0.0.0:80<br />  mode http<br />  stats enable<br />  server web001 192.168.0.102:80 check<br />  server w...
http://haproxy.1wt.eu/img/haproxy-stats.png<br />
10% deployment<br />Manage in code via feature switches<br />Facebook style deployments<br />
Design for failure<br />Identify single point of failure<br />
Load balancers  Data centres<br />“The Cloud”<br />
Front end  cache serversMessage QueuesDatabase Master  Slave<br />
Auto discovery<br />
monitoring<br />
Cloudkick<br />Monitor your servers<br />
Zabbix and windows perf counters<br />
Zabbix Example<br />
Ask the application<br />Health checks<br />
Image of a dashboard removed.<br />Sorry.<br />
Application level monitoring<br />
AB Testing<br />Website Optimizer<br />Performable<br />KissMetrics  MixPanel<br />
Data is king.  The winner is the one with most data.<br />
Dashboard – BIG DASHBOARDS<br />http://www.flickr.com/photos/mogwai_83/3022261893/<br />
kaChing dashboard<br />http://eng.wealthfront.com/2010/05/deployment-infrastructure-for.html<br />
Flickr dashboard<br />
Immune System<br />Without this, continuous deployment can be hard and dangerous.<br />
Meerkatalyst<br />
Images of application removed.<br />Sorry.<br />Sign up at http://www.meerkatalyst.com<br />
Do you need high test coverage?<br />
Lean, MVP, proving concept<br />
Tests around key areas. Monitoring to ensure nothing is missed.<br />
First steps to continuous deployment<br />summary<br />
1) Automate Deployment<br />Dolphin Deploy  WebDeploy  MSBuild<br />
2) Monitor System<br />User, Application, System<br />
3) Feature switches<br />Hide<br />
4) Do it<br />Start with staging...<br />
Thank you<br />
More information<br />http://about.digg.com/blog/continuous-deployment-code-review-and-pre-tested-commits-digg4<br />http:...
Upcoming SlideShare
Loading in...5
×

Continuous deployment

2,481

Published on

Slides from my NDC2011 session on Continuous Deployment.

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,481
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
27
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide
  • Quickly find ways to solve the parts which hurt, this will improve the entire process and make everything more effective. If you keep doing it in the painful way once a month, then it will stay painful. Move to once an hour, and everything will change.
  • Just because you can easily push, doesn’t mean that you should do it continuously. Lots more to think about and consider. Just pushing code randomly is dangerous and cowboy like
  • People say that about XP. People said that about automated builds, testing etc etc
  • Facebook – 15mins across all servers
  • Not to say you should just follow, consider it more of a trend. Startups promote a lot of good practices, they have super-smart people, they push boundaries which in the end will filter down to more mainstream companies. It’s important to identify how you can learn from them.
  • New ideasA\\B Testing
  • Refer back to Scot Gu and the keynote.
  • Refer back to Scot Gu and the keynote.
  • More control over when you push changesEasier to branchMindset of making small changes
  • In theory you shouldn’t be making massive changes to the DB, it’s OK to stop the line and perform a deployment if no other way. Need to plan\\adapt and work the way you want to work. However, your introducing blocker – this will come back to bite you.
  • Facebook’s approach to migrations. You never know what version will be running.
  • ZooKeeper – automation, shouldn’t have to reconfigure anything which new systems come\\go
  • Transcript of "Continuous deployment"

    1. 1. http://www.flickr.com/photos/iboy_daniel/92896276/sizes/l/in/photostream/<br />Continuous Deployment ASP.net style<br />@Ben_Hall<br />Ben@BenHall.me.uk<br />
    2. 2. LondonCambridge (UK) based C# MVPLove Open Source Projects<br />Co-founder of Meerkatalyst<br />Co-Author of <br />Testing ASP.net<br />Web Applications<br />http://www.testingaspnet.com<br />
    3. 3. Agenda<br />Myths<br />Reality of life<br />Culture <br />Tooling<br />First steps<br />
    4. 4. Reducing risk and increasing opportunity by releasing changes as they happen<br />
    5. 5. http://www.flickr.com/photos/mayhem/292141287/sizes/o/in/photostream/<br />Let’s deploy 4 weeks worth of changes at once!<br />Opps… I wonder what went wrong<br />
    6. 6. If it hurts, do it more often<br />
    7. 7. Continuous Deployment<br />Committed: 40 lines added 80 lines deleted<br />Push changes to live<br />Automated monitoring systems<br />Users start to see benefits<br />
    8. 8. Make releases a non-event<br />http://www.flickr.com/photos/violla/5110156999/sizes/l/in/photostream/<br />
    9. 9. Myths<br />
    10. 10. git push <PaaS> production<br />
    11. 11. Cowboy driven development<br />http://www.flickr.com/photos/esteemedhelga/3850944786/<br />
    12. 12. Pushing untested changes<br />
    13. 13. Throw it over the wall<br />http://www.flickr.com/photos/vizzzual-dot-com/2226095398/<br />
    14. 14. It wouldn’t work for us<br />
    15. 15. Reality<br />
    16. 16. How long would it take your organisation to deploy a change that involved just one single line of code?<br />Mary Poppendieck<br />Lean Software Development<br />http://www.agilejourneyman.com/2011/01/continoues-delivery.html<br />
    17. 17. “Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.”<br />Agile Manifesto<br />http://agilemanifesto.org/principles.html<br />
    18. 18. “Continuous deployment doesn’t mean our product changes 30 times a day, it means we can be responsive”<br />Pascal-Louis Perez<br />WealthfrontkaChing<br />http://www.manualdastartup.com.br/blog/quotes-da-sllconf-2011/<br />
    19. 19. All the cool startups are doing it<br />
    20. 20. Asset Management by Mutual Funds in US. Highly regulated.<br />$2,000,000/day<br />No Ops, No QA<br />http://www.slideshare.net/pascallouis/sll-conf-continuous-deployment<br />
    21. 21. Waste<br />http://www.flickr.com/photos/hape_gera/5260530549/<br />
    22. 22. Feedback<br />
    23. 23. Reduce risk<br />http://www.flickr.com/photos/ianz/2594572474/<br />
    24. 24. Improve team morale<br />
    25. 25. Culture or Tooling?<br />
    26. 26. culture<br />
    27. 27. “High” Test Coverage<br />High != line coverage<br />High == confidence of changes<br />
    28. 28. No Blame<br />http://www.flickr.com/photos/cyberslayer/2535502341/<br />
    29. 29. Trust<br />http://www.flickr.com/photos/sephiroty/317320551/<br />
    30. 30. Desire to reduce risk<br />
    31. 31. Willingness to experiment<br />
    32. 32. Dark launches and gate keepers<br />http://www.flickr.com/photos/krymzon/102096279/sizes/z/in/photostream/<br />
    33. 33. Nasa style Go No-Go<br />http://www.flickr.com/photos/28634332@N05/4053997535/<br />
    34. 34. Feature switches<br />http://www.flickr.com/photos/maxabxarata/535048895/<br />
    35. 35. Data Driven Companies<br />
    36. 36. CEOs, Managers and marketing LOVE data!<br />
    37. 37. Design for system failure<br />http://www.flickr.com/photos/thekrankis/3377123568/sizes/l/in/photostream/<br />
    38. 38. Five whys<br />
    39. 39. Everything needs to be automated<br />Fix it via a script<br />Write a script to detect and automate in the future<br />
    40. 40. tooling<br />Sounds great?! But how?<br />
    41. 41. Code focused tools<br />
    42. 42. Git<br />Why does git make CD easier? <br />
    43. 43. TeamCity<br />
    44. 44. Branch in code<br />
    45. 45. Feature switches<br />
    46. 46. If (cfg.enable_unicorn_polo) {<br /> // Do something new / cool<br />}<br />else {<br /> // Do something boring<br />}<br />
    47. 47.
    48. 48. public override void OnActionExecuting(ActionExecutingContextfilterContext) {<br />boolfeaturedOn = FeatureSwitchService.GetStatus(_featureName);<br /> if(!featureOn)<br />filterContext.Result = new ContentResult { Content = null };<br />}<br />
    49. 49. MSDeploy, Dolphin Deploy, AppHarbor<br />All you really need is Meerkatalyst<br />
    50. 50.
    51. 51. Database Migrations<br />
    52. 52. Databases are always difficult<br />Stop the line for DB?<br />
    53. 53. Migrations in code?<br />Forward Backwards compatible<br />
    54. 54.
    55. 55. Infrastructure <br />
    56. 56. Chef / Knife<br />It works on Windows! <br />
    57. 57. Installing .Net via MSI<br />msiFile = “C:installersnet_framework.msi”<br />execute “Install .Net” do<br /> command “msiexec /qn /i #{msiFile}”<br />end<br />
    58. 58. Load Balancers<br />
    59. 59. Round robin deployments<br />Deploy to just one<br />
    60. 60. listen webfarm 0.0.0.0:80<br /> mode http<br /> stats enable<br /> server web001 192.168.0.102:80 check<br /> server web002 192.168.0.103:80 check<br />https://gist.github.com/354469<br />
    61. 61. http://haproxy.1wt.eu/img/haproxy-stats.png<br />
    62. 62. 10% deployment<br />Manage in code via feature switches<br />Facebook style deployments<br />
    63. 63. Design for failure<br />Identify single point of failure<br />
    64. 64. Load balancers Data centres<br />“The Cloud”<br />
    65. 65. Front end cache serversMessage QueuesDatabase Master Slave<br />
    66. 66. Auto discovery<br />
    67. 67. monitoring<br />
    68. 68. Cloudkick<br />Monitor your servers<br />
    69. 69. Zabbix and windows perf counters<br />
    70. 70. Zabbix Example<br />
    71. 71. Ask the application<br />Health checks<br />
    72. 72. Image of a dashboard removed.<br />Sorry.<br />
    73. 73. Application level monitoring<br />
    74. 74. AB Testing<br />Website Optimizer<br />Performable<br />KissMetrics MixPanel<br />
    75. 75. Data is king. The winner is the one with most data.<br />
    76. 76. Dashboard – BIG DASHBOARDS<br />http://www.flickr.com/photos/mogwai_83/3022261893/<br />
    77. 77. kaChing dashboard<br />http://eng.wealthfront.com/2010/05/deployment-infrastructure-for.html<br />
    78. 78.
    79. 79.
    80. 80. Flickr dashboard<br />
    81. 81. Immune System<br />Without this, continuous deployment can be hard and dangerous.<br />
    82. 82. Meerkatalyst<br />
    83. 83. Images of application removed.<br />Sorry.<br />Sign up at http://www.meerkatalyst.com<br />
    84. 84. Do you need high test coverage?<br />
    85. 85. Lean, MVP, proving concept<br />
    86. 86. Tests around key areas. Monitoring to ensure nothing is missed.<br />
    87. 87. First steps to continuous deployment<br />summary<br />
    88. 88. 1) Automate Deployment<br />Dolphin Deploy WebDeploy MSBuild<br />
    89. 89. 2) Monitor System<br />User, Application, System<br />
    90. 90. 3) Feature switches<br />Hide<br />
    91. 91. 4) Do it<br />Start with staging...<br />
    92. 92. Thank you<br />
    93. 93. More information<br />http://about.digg.com/blog/continuous-deployment-code-review-and-pre-tested-commits-digg4<br />http://radar.oreilly.com/2009/03/continuous-deployment-5-eas.html<br />http://www.startuplessonslearned.com/2009/06/why-continuous-deployment.html<br />http://blog.stelligent.com/integrate-button/2011/03/list-of-software-tools-for-continuous-delivery-in-the-cloud.html<br />http://eng.wealthfront.com/2011/02/continuous-deployment-for-data-not-just.html<br />http://techcrunch.com/2011/05/30/facebook-source-code/<br />http://www.justin.tv/startuplessonslearned/b/286511488<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×