Getting Into the Zero Downtime Deployment World

Getting Into the Zero Downtime Deployment World

Dev Day 2016 (Krakow, Poland)

3a53a5136f530c121a196914aecf3936?s=128

Tugberk Ugurlu

September 16, 2016
Tweet

Transcript

  1. Getting Into the Zero Downtime Deployment World Tugberk Ugurlu Redgate

    Software @tourismgeek tugberkugurlu.com #ABBDevDay https://flic.kr/p/fNTDM1
  2. #ABBDevDay https://flic.kr/p/HLRTPW Software Dev @ Redgate Human in Cambridge, UK

    MVP @ Microsoft
  3. @tourismgeek tugberkugurlu.com github.com/tugberkugurlu stackoverflow.com/users/463785/tugberk

  4. What is This? #ABBDevDay https://flic.kr/p/cdvAaj

  5. #ABBDevDay Example HTTP APIs v1 Example Android iPhone Example Android

    Client Example Web Client Example HTTP APIs v1.1
  6. Should I Care? #ABBDevDay https://flic.kr/p/e7oMGm

  7. #ABBDevDay https://flic.kr/p/49FHd3

  8. #ABBDevDay https://flic.kr/p/CTxCx

  9. https://twitter.com/tourismgeek/status/580270772402393088 #ABBDevDay

  10. Continuous Delivery #ABBDevDay https://flic.kr/p/bzG7ds

  11. #ABBDevDay http://bit.ly/2cstlDK

  12. #ABBDevDay http://zleek.com

  13. LB zleek-0 zleek-1 zleek-n mongodb neo4j elasticsearch rabbitmq recipe-generation-worker-0 recipe-sync-worker-0

    food-sync-worker-0 store-sync-worker-0 recipe-generation-worker-1 recipe-generation-worker-n recipe-sync-worker-n recipe-sync-worker-0 #ABBDevDay
  14. #ABBDevDay https://gist.github.com/revett/99d8a5143c0bfeddfc92 Our Target

  15. Our Scope #ABBDevDay

  16. Scope of the Talk #ABBDevDay HTTP Services Web Sites

  17. #ABBDevDay https://flic.kr/p/mRRFdH The Path and Guidance

  18. Write Down the Deployment Strategy #ABBDevDay https://flic.kr/p/pd4X4A

  19. #ABBDevDay

  20. Script out the Deployment Strategy https://flic.kr/p/79EVn6

  21. #ABBDevDay

  22. Release Management #ABBDevDay https://flic.kr/p/fCbQWb

  23. #ABBDevDay Octopus Deploy http://bit.ly/2d2ivzU

  24. #ABBDevDay Docker Cloud http://bit.ly/2d2ivzU #ABBDevDay

  25. True Staging Environment #ABBDevDay

  26. example-api-v0-6786234 example-api- process example-api-v0-6327638 example-api- process Router v0.example.com

  27. Blue-green Deployment http://martinfowler.com/bliki/BlueGreenDeployment.html #ABBDevDay

  28. Router v0.example.com #ABBDevDay example-api-v0-6327638 example-api- process example-api-v0-6786234 example-api- process

  29. Drain Requests #ABBDevDay https://flic.kr/p/79A7Db

  30. Router v0.example.com #ABBDevDay example-api-v0-6327638 example-api- process example-api-v0-6786234 example-api- process

  31. Router v0.example.com #ABBDevDay example-api-v0-6327638 example-api- process example-api-v0-6786234 example-api- process

  32. SemVer Your Software http://www.tugberkugurlu.com/archive/versioning-software-builds-based-on-git-tags-and-semantic-versioning-semver #ABBDevDay

  33. SemVer (semver.org) #ABBDevDay Patch No user facing changes Major Introducing

    incompatible changes Minor Add functionality in a backwards- compatible manner 2.4.6
  34. SemVer as Way of Application Versioning • Support 2 Major

    versions of the HTTP Service, not 1, not 3. • Define a support policy for support lifetime for versions #ABBDevDay
  35. Minor-Patch Releases • No breaking changes #ABBDevDay

  36. example-api-v0-6327638 example-api-v0-7814219 example-api-v0-9528392 LB v0.example.com example-api- process example-api- process example-api-

    process example-api-v0-6786234 example-api-v0-3266280 example-api-v0-8429842 example-api- process example-api- process example-api- process
  37. DEMO https://github.com/tugberkugurlu/AspNetCoreSamples/tree/abbdevday2016/haproxy-zero-downtime-sample #ABBDevDay

  38. HAProxy Config Reload http://engineeringblog.yelp.com/2015/04/true-zero-downtime-haproxy-reloads.html #ABBDevDay

  39. Internal LB-1 LB-1 Internal LB-2 server1 server2 server3 server4 server5

    server6 server7 server8 server9 server10 client client client client client client #ABBDevDay
  40. Multiple Load Balancer Nodes http://robert.penz.name/386/howto-setup-a-haproxy-as-fault-tolerant-high-available-load-balancer-for-multiple-caching-web-proxies-on-rhelcentossl/ #ABBDevDay

  41. #ABBDevDay http://robert.penz.name/386/howto-setup-a-haproxy-as-fault-tolerant-high-available-load-balancer-for-multiple-caching-web-proxies-on-rhelcentossl/

  42. Major Releases • Breaking Changes • First Major Release •

    Non-first Major Releases #ABBDevDay
  43. example-api-v0-6327638 example-api-v0-7814219 example-api-v0-9528392 LB v0.example.com example Products example Products example

    Products example-api-v1-2276168 example-api-v1-5677802 example Products example Products LB v1.example.com example-api-v1-7182721 example Products
  44. Prefer Fast-forward Database Changes #ABBDevDay https://flic.kr/p/54a6xY

  45. #ABBDevDay v1 v2 Id Make Model Colour 1 Renault Clio

    Red 2 Mercedes GLA Black 3 Volkswagen Polo White 4 Toyota Yaris Yellow Id Make Model Colour 1 Renault Clio Red 2 Mercedes GLA Black 3 Volkswagen Polo White 4 Toyota Yaris Yellow
  46. Do Not Override Client Side Assets #ABBDevDay

  47. #ABBDevDay v1 v1.1

  48. #ABBDevDay v1 v1.1

  49. Be Aware of the Context #ABBDevDay

  50. Be Aware of the Context • Cookies • Sessions •

    Authentication Tokens #ABBDevDay
  51. Sticky Sessions http://blog.haproxy.com/2012/03/29/load-balancing-affinity-persistence-sticky-sessions-what-you-need-to-know/ #ABBDevDay

  52. Helpful Tools • Git (https://git-scm.com) • Travis CI (https://travis-ci.org) •

    Octopus Deploy (https://octopus.com) • HAProxy (http://haproxy.org) • node-semver CLI (http://bit.ly/1PO6hvR) • Docker (https://docker.com) • Docker Cloud (a.k.a. Tutum, http://bit.ly/1RYYtl2) • SQL Server Data Tools (SSDT, http://bit.ly/1P7qETh) • DLM Automation Tools from Redgate (http://bit.ly/1VQ2rDm) #ABBDevDay
  53. @tourismgeek github.com/tugberkugurlu linkedin.com/in/tugberk https://flic.kr/p/edfM1R