Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Enabling Microservices @Orbitz - DevOpsDays Chicago 2015

906 views

Published on

In this talk we discuss how we enabled decomposition of one of our 500+ system components into a continuously deployed microservice cluster using automated pipelines in jenkins with docker, mesos, & marathon

Published in: Technology
  • Be the first to comment

Enabling Microservices @Orbitz - DevOpsDays Chicago 2015

  1. 1. #devopsdays Chicago 2015 Enabling Microservices @Orbitz Steve Hoffman Senior Principal Engineer @bacoboy
  2. 2. #devopsdays Chicago 2015
  3. 3. #devopsdays Chicago 2015 Outline • Brief Architecture Overview/History • From Monolithic to Services to Microservices/Docker • Automated Pipelines • Questions
  4. 4. #devopsdays Chicago 2015
  5. 5. #devopsdays Chicago 2015 2000
  6. 6. #devopsdays Chicago 2015 2000 Yes, we are STILL hiring!
  7. 7. #devopsdays Chicago 2015 2000 Yes, we are STILL hiring! @OrbitzTalent
  8. 8. #devopsdays Chicago 2015 2000 Web Layer Business Layer
  9. 9. #devopsdays Chicago 2015 2000
  10. 10. #devopsdays Chicago 2015 2000
  11. 11. #devopsdays Chicago 2015 2000 Business Layer
  12. 12. #devopsdays Chicago 2015 2000 Business Layer
  13. 13. #devopsdays Chicago 2015 Business Layer 2000
  14. 14. #devopsdays Chicago 2015 Business Layer 2003
  15. 15. #devopsdays Chicago 2015 Business Layer 2003
  16. 16. #devopsdays Chicago 2015 Business Layer 2003
  17. 17. #devopsdays Chicago 2015 2003
  18. 18. #devopsdays Chicago 2015 2004
  19. 19. #devopsdays Chicago 2015 2004
  20. 20. #devopsdays Chicago 2015 2004
  21. 21. #devopsdays Chicago 2015 2012
  22. 22. #devopsdays Chicago 2015 2012
  23. 23. #devopsdays Chicago 2015 2012 • Multiple Brands • Websites • Webservices • Multiple Backends • 500+ apps / thousands of instances • Deployments Daily (sometimes more)
  24. 24. #devopsdays Chicago 2015 2015 • Multiple Brands • Websites • Webservices • Multiple Backends • 500+ apps / thousands of instances • Deployments Daily (sometimes more)
  25. 25. #devopsdays Chicago 2015 Process Overkill
  26. 26. #devopsdays Chicago 2015 Different Provisioning Tools DEV OPS
  27. 27. #devopsdays Chicago 2015 Different Provisioning Tools DEV OPS Application Platform!=
  28. 28. #devopsdays Chicago 2015 A New Experiment • Microservices? • Decompose single “service” into the actual 40+ sub-services • Any change to sub-service was a deployment of many • Could it be a simple Spring Boot App in Docker (12 factor?) • Backward compatible with existing service infrastructure. • Code to Production w/o help from other Humans - Minutes not Days
  29. 29. #devopsdays Chicago 2015
  30. 30. #devopsdays Chicago 2015 Module Module Module Module
  31. 31. #devopsdays Chicago 2015 Orbitz Content Orchestration Service Content (Solr) Editorial Module Search Module Hotel Module
  32. 32. #devopsdays Chicago 2015 Orbitz Content Orchestration Service Content (Solr) Editorial Module Search Module Hotel Module Hotel Team Search Team Content Team
  33. 33. #devopsdays Chicago 2015 Orbitz Content Orchestration Service Content (Solr) Editorial Module Search Module Hotel Module
  34. 34. #devopsdays Chicago 2015 Orbitz Content Orchestration Service Content (Solr) Editorial Module Search Module Hotel Module Hotel Team Search Team Content Team
  35. 35. #devopsdays Chicago 2015 Pre-Continuous Delivery 1.2-­‐BETA-­‐20150401-­‐113002 Test Discard Test Discard 1.2-­‐BETA-­‐20150402-­‐093002 Build Build And so on…
  36. 36. #devopsdays Chicago 2015 Pre-Continuous Delivery 1.2-­‐BETA-­‐20150401-­‐113002 Test Discard Test Discard 1.2-­‐BETA-­‐20150402-­‐093002 Build Build Test Deploy 1.2 Build
  37. 37. #devopsdays Chicago 2015 App App App
  38. 38. #devopsdays Chicago 2015 App App App
  39. 39. #devopsdays Chicago 2015 App App App xN
  40. 40. #devopsdays Chicago 2015 App App App xN
  41. 41. #devopsdays Chicago 2015 Continuous Delivery with Jenkins, Docker, Ansible and Marathon
  42. 42. #devopsdays Chicago 2015 Committer Pull Request
  43. 43. #devopsdays Chicago 2015 Committer Reviewer Pull Request
  44. 44. #devopsdays Chicago 2015 Committer Reviewer Pull Request
  45. 45. #devopsdays Chicago 2015 Committer Reviewer Pull Request
  46. 46. #devopsdays Chicago 2015 Jenkins Pipeline
  47. 47. #devopsdays Chicago 2015 if(…) { x ++; } Merge
  48. 48. #devopsdays Chicago 2015 build unit test publish deploy dev acceptance tests deploy qa deploy staging open RFC deploy prod close RFC Pipeline (Simplified)
  49. 49. #devopsdays Chicago 2015 if(…) { x ++; } 1.2 Merge Build
  50. 50. #devopsdays Chicago 2015 if(…) { x ++; } 1.2 Merge 1.2. editorial-module.jar ./gradlew build {BUILD_NUMBER} Build
  51. 51. #devopsdays Chicago 2015 1.2 Merge editorial-module.jar if(…) { x ++; } 171.2. Build
  52. 52. #devopsdays Chicago 2015 1.2 Merge editorial-module.jar FROM orbitz/java-8 ADD build/editorial-module.jar /opt/orbitz CWD /opt/orbitz CMD java -jar editorial-module.jar if(…) { x ++; } 171.2. Build
  53. 53. #devopsdays Chicago 2015 1.2 Merge editorial-module.jar orbitz/editorial-module:1.2.17 if(…) { x ++; } 171.2. Build
  54. 54. #devopsdays Chicago 2015 orbitz/editorial-module:1.2.17 Build
  55. 55. #devopsdays Chicago 2015 Master Master Slave Commit/Push or Pull Request/Merge
  56. 56. #devopsdays Chicago 2015 Master Master Slave Poll or Push Trigger Commit/Push or Pull Request/Merge
  57. 57. #devopsdays Chicago 2015 Master Master Slave Slave Poll or Push Trigger Commit/Push or Pull Request/Merge
  58. 58. #devopsdays Chicago 2015 Master Master Slave Slave Poll or Push Trigger Commit/Push or Pull Request/Merge
  59. 59. #devopsdays Chicago 2015 Master Master Slave Slave Poll or Push Trigger Commit/Push or Pull Request/Merge Clone & Build Push Artifacts
  60. 60. #devopsdays Chicago 2015 Master Master Slave
  61. 61. #devopsdays Chicago 2015 Jenkins on Docker on Mesos Slides: http://bit.ly/oww-mesoscon2015-slides Video: Coming to YouTube
  62. 62. #devopsdays Chicago 2015 git pull playbook.yml (abridged) - hosts: localhost - tasks: - name: marathon deploy marathon: image=orbitz/{{application}}:{{version}} instances=3 Deploy
  63. 63. #devopsdays Chicago 2015 - tasks: marathon: … playbook.yml 1.2.16 1.2.16 1.2.16 Deploy
  64. 64. #devopsdays Chicago 2015 - tasks: marathon: … 1.2.16 1.2.16 1.2.16 Deploy
  65. 65. #devopsdays Chicago 2015 - tasks: marathon: … 1.2.16 1.2.16 1.2.16 Deploy
  66. 66. #devopsdays Chicago 2015 - tasks: marathon: … PUT /apps/editorial-module { “image”: “orbitz/editorial-module:1.2.17” … } 1.2.16 1.2.16 1.2.16 Deploy
  67. 67. #devopsdays Chicago 2015 Deploy PUT /apps/editorial-module { “image”: “orbitz/editorial-module:1.2.17” … } - tasks: marathon: … 1.2.16 1.2.16 1.2.16 app = GET /v2/apps/editorial-module if not app then deploy_id = POST /v2/apps { “image”: “orbitz/editorial-module:1.2.17”, “id”: “editorial-module” } else deploy_id = PUT /v2/apps/editorial-module { “image”: “orbitz/editorial-module:1.2.17” } end if while GET /v2/deployments contains deploy_id // still deploying end // deploy complete
  68. 68. #devopsdays Chicago 2015 - tasks: marathon: … PUT /apps/editorial-module { “image”: “orbitz/editorial-module:1.2.17” … } 1.2.16 1.2.16 1.2.16 Deploy
  69. 69. #devopsdays Chicago 2015 - tasks: marathon: … 1.2.16 1.2.16 1.2.16 Deploy
  70. 70. #devopsdays Chicago 2015 - tasks: marathon: … 1.2.16 1.2.16 1.2.16 1.2.17 1.2.17 1.2.17 Deploy
  71. 71. #devopsdays Chicago 2015 - tasks: marathon: … /health 1.2.16 1.2.16 1.2.16 1.2.17 1.2.17 1.2.17 Deploy
  72. 72. #devopsdays Chicago 2015 - tasks: marathon: … /health 200 OK 200 OK 200 OK 1.2.16 1.2.16 1.2.16 1.2.17 1.2.17 1.2.17 Deploy
  73. 73. #devopsdays Chicago 2015 - tasks: marathon: … 1.2.17 1.2.17 1.2.17 Deploy
  74. 74. #devopsdays Chicago 2015 And off to the next environment… 1.2.17 1.2.17 1.2.17 Deploy
  75. 75. #devopsdays Chicago 2015 1.2.17 1.2.17 1.2.17 What if?
  76. 76. #devopsdays Chicago 2015 1.2.17 1.2.17
  77. 77. #devopsdays Chicago 2015 1.2.17 1.2.17
  78. 78. #devopsdays Chicago 2015 1.2.17 1.2.17 1.2.17
  79. 79. #devopsdays Chicago 2015 /health 200 OK 1.2.17 1.2.17 1.2.17
  80. 80. #devopsdays Chicago 2015 1.2.17 1.2.17 1.2.17
  81. 81. #devopsdays Chicago 2015 Smoke/Acceptance Testing 1.2.17 1.2.17 1.2.17
  82. 82. #devopsdays Chicago 2015 Paper Trail create tickets commit(s)
  83. 83. #devopsdays Chicago 2015 Paper Trail fail! close/fail
  84. 84. #devopsdays Chicago 2015 Paper Trail ok close
  85. 85. #devopsdays Chicago 2015 Build Unit Test Deploy Dev Deploy Prod Deploy Staging Acceptance Test Code Review & Push Production Pre-Production Open RFC Close RFC
  86. 86. #devopsdays Chicago 2015 “Why didn’t you use {{.x}} ?”
  87. 87. #devopsdays Chicago 2015 Keeping an eye on… Hashicorp Vault Rancher Convoy Kubernetes Amazon Elastic Container Service Docker Swarm + Machine
  88. 88. #devopsdays Chicago 2015 Summary • Create a platform for docker deployments using shared and app-specific “localhost” helpers — this was ours, yours SHOULD look different — adapt to change, don’t fight it. • People don’t scale, use automation • Docker - repeatable applications (environment portable apps) • Chef - repeatable infrastructure (environment aware services) • Jenkins - repeatable releases (pipelines) • Delineate configuration concerns: • Known at Compile time — Bake into Docker image • Known at Boot time — Bake into Playbook/Launcher - parameter to Docker run • Changes Anytime — Externalize (consul K/V, etcd, zookeeper)
  89. 89. #devopsdays Chicago 2015 Questions? @bacoboy

×