Publicité

Scaling to 150,000 Builds a Month... and Beyond

Software à Atlassian
3 Nov 2015
Publicité

Contenu connexe

Présentations pour vous(20)

En vedette(20)

Publicité

Similaire à Scaling to 150,000 Builds a Month... and Beyond(20)

Publicité

Scaling to 150,000 Builds a Month... and Beyond

  1. PETER LESCHEV • TEAM LEAD • ATLASSIAN • @PETERLESCHEV Build Engineering @ Atlassian: Scaling to 150k builds per month & beyond Summit 2015
  2. TEAM INTRODUCTION INFRASTRUCTURE BAMBOO SERVERS Introduction CONCLUSION
  3. Build platform & services used internally within Atlassian to build, test & deliver software
  4. Developers expect a reliable infrastructure & fast CI feedback
  5. • 12 Bamboo Servers • maven.atlassian.com / 9 Nexus instances / 9 TB • 7 Nexus proxies for internal traffic • Monitoring • opsview, graphite, statsd, newrelic, datadog Build Engineering today @ Atlassian • 1200 build agents on EC2 • include SCM clients, JDKs, JVM build tools, databases, headless browser testing, Python builds, NodeJS, installers & more • Maintain 20 AMIs of various build configurations
  6. 4 years ago: Builds per month 21k
  7. Last month: Builds per month 225k
  8. Build Engineering @ Atlassian
  9. JIRA alone has Automated tests 49k
  10. 3 stories of gaining maturity to handle Atlassian growth
  11. INTRODUCTION TEAM INFRASTRUCTURE BAMBOO SERVERS Team CONCLUSION
  12. History of team roles
  13. Individual Engineers Information Silos Fault investigation, requests for advice, unplanned work Little project work Very interrupt driven Duplication of effort Limited to customer driven changes
  14. Disturbed role Knowledge Transfer When switching between project / disturbed roles is difficult More project work Non-disturbed can focus on larger tasks Context switching Reduction in duplication of effort, promotes collaboration within the team 2 week rotation
  15. Team expands Infra Engineers Developers Build Engineers
  16. Disturbed for Dev & Infra Too interrupt driven To encourage knowledge transfer between infra & dev Staggered changeovers Minimising disruption due to context switching Disturbed pairing Couldn’t handle smaller customer raised requests & interrupt driven work
  17. Supporting Developers team channel
  18. Supporting Developers Questions for Confluence
  19. Supporting Developers Questions for Confluence
  20. 1. Measure the pain 2. Continuous Improvement
  21. Technical Debt
  22. Technical Debt
  23. Contact Rate + Confluence Questions + Hipchat queries Customer JIRA issues Number of Developers ( ) ÷ =
  24. Contact Rate
  25. The Shield http://www.clker.com/cliparts/e/d/c/4/11970889822084687040sinoptik_Medieval_shield.svg.hi.png
  26. Rebranding Maintenance Disturbed Removing the negative attitude towards the old role within the team
  27. Project work Maintenance The Shield
  28. How do we avoid this in the future? PETER LESCHEV “ ”
  29. Fix it now, fix it for the future
  30. Self service
  31. Chat bots Self Service
  32. Self Service Maven Self Help Tool
  33. INTRODUCTION INFRASTRUCTURE TEAM BAMBOO SERVERS Infrastructure CONCLUSION
  34. Infrastructure as Code = Puppet + SCM ?
  35. 4 years ago… Started using Puppet Manually maintained snow flakes
  36. Production rollout puppetmaster build agents
  37. Production rollout failure puppetmaster build agents
  38. Low confidence of change
  39. • Coding on Puppet Master • Culture of manually modifying production - Configuration Drift • Impact on Builds Using Staging for Development puppetmaster build agents staging puppet environment
  40. Vagrant www.vagrantup.com Mitchell Hashimoto @mitchellh Packer packer.io
  41. Rolling out to staging Rolling out to production Broken build agents Developing locally
  42. Behaviour Driven Development Cucumber https://github.com/cucumber/aruba
  43. But it works on my machine EVERY DEVELOPER “ ”
  44. Continuous Integration ‘From scratch’ provisioning Confidence that you can rebuild in disaster
  45. The Pets: you give nice names, you stroke them, and when they get ill, you nurse them back to health, taking a long time over it. “ ” The Cattle: you give them numbers. When they get ill, you shoot them TIM BELL, CERN
  46. Broken builds master
  47. Branch builds BUILDENG-5670 BUILDENG-5669 master
  48. Infrequent Releases
  49. Manual Puppet Rollouts git clone librarian-puppet install symlink update on puppet master
  50. Bamboo Deployments Available agents Available agents Destination server TASK 1 TASK 2 Task list 1.3 Build results (Artifacts) Release Environments Repository Build artifacts Release 1.3 Build results (Artifacts) Release 1.0 1.3 1.3 Build results (Artifacts) Release Environments Production Development 1.0 1.3 1.3 1.3 Build results (Artifacts) Release Environments Production Development 1.0 1.31.3 Production Development 1.31.3 Development Repository Build artifacts Release How artifacts work 1.3 1.0 1.31.3 Production Development 1.31.3 Development Release notes Repository Build artifacts Release staging production 1.3 Build results (Artifacts) Release Environments Repository Build artifacts Release 1.3 d results rtifacts) Release Environments sitory Build artifacts Release 1.3 Build results (Artifacts) Release Environments Repository Build artifacts Release build • git clone • librarian-puppet • to specific environments • scp to puppet master & symlink update test deploy • ‘delta’ & ‘from scratch’ vagrant provisions 1.3 Build artifacts Release build & test AMIs • Generated using Packer • AMIs on Bamboo Servers updated deploy AMIs
  51. Puppet Build, Test & Deploy Pipeline
  52. Puppet Build, Test & Deploy Pipeline
  53. ‘open prs’ Bot
  54. Less human effort through automation = Increased frequency & reliability of releases
  55. Snowflakes Pets Cattle Stateless Machines
  56. Infrastructure consistency is key
  57. INTRODUCTION BAMBOO SERVERS TEAM INFRASTRUCTURE Bamboo Servers CONCLUSION
  58. At scale is hard
  59. Bamboo Servers 12
  60. Build Plans 3500
  61. Plan Branches 14k
  62. Bamboo is great, but hard to manage at scale
  63. Build Configuration as code
  64. Plan Templates Bamboo Plugin:
  65. Plan Templates Checked into SCM Bamboo Plugin: Reusable snippets changes can be code reviewed Export plans for backup, or move to another Bamboo instance easily Bulk changes Export existing plans Update 100s of job requirements with a single commit
  66. Pushing Bamboo to its limits
  67. Agent Smith Wallboard Bamboo Plugin: Trend data sent to Graphite https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugin.agent-smith-wallboard
  68. Add metrics, then alert on them
  69. Bamboo Monitoring Plugin Metrics to graphite Bamboo Plugin: Bamboo Health ActiveMQ, Database connections, Tomcat, JVM Memory usage. Background thread workers. Number of plans / plan branches, plans / plan branches for deletion. https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugin.bamboo-monitoring-plugin
  70. When a Bamboo Server starts misbehaving…
  71. Infrastructure differences? Is it Bamboo Configuration? Is it a Bamboo Plugin? Is it Bamboo the product? How is it being used?
  72. Infrastructure consistency of Bamboo Servers is key
  73. Bamboo Puppet provider + REST API for Administration Bamboo Puppet Provider REST calls https://forge.puppetlabs.com/atlassian/bamboo_rest
  74. Bamboo Puppet provider https://forge.puppetlabs.com/atlassian/bamboo_rest Hipchat Notification Managed via Puppet
  75. Bamboo Plugins ‘Continuous Plugin Deployment’ Task This text box is not intended to contain a bunch of copy. 1-click upgrades of Available agents Available agents Destination server TASK 1 TASK 2 Task list Available agentsTask list Task list Production Available agents Destination server TASK 1 TASK 2 Task list How artifacts work 1.3 1.0 1.31.3 Produc Developm 1.31.3 Development Release notes Repository Build artifacts Release How artifacts work 1.3 Build results (Artifacts) Release Environments 1.0 1.31.3 Production Development 1.31.3 Development Release notes Repository Build artifacts Release How artifacts work 1.3 1.0 1.31.3 Production Development 1.31.3 Development Artifacts Ve Test & Build JIRA issue Commit TriggerCode Release notes Repository Build artifacts Release All Bamboo Servers How artifacts work 1.3 Build results (Artifacts) Release Environments 1.0 1.31.3 Production Development 1.31.3 Development Repository Build artifacts Release build Deploy How artifacts work 1.3 1.0 1.31.3 Production Developmen 1.31.3 Development Repository Build artifacts Release build & test AMIs Build https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugins.deploy.continuous-plugin-deployment
  76. Bamboo Servers 1-click upgrades of Using scp / ssh & puppet Available agents Available agents Destination server TASK 1 TASK 2 TASK 1 TASK 2 Task list Available agents TASK 1 TASK 2 Task list Task list Production Available agents Destination server TASK 1 TASK 2 Task list How artifacts work 1.3 Build results (Artifacts) Release Environments De 1.0 1.31.3 Production Development 1.31.3 Development Repository Build artifacts Release How artifacts work 1.3 1.3 1.3 Build results (Artifacts) Release Environments Development 1.0 1.31.3 Production Development 1.31.3 Development Release notes Repository Build artifacts Release How artifacts work 1.3 1.0 1.31.3 Production Development 1.31.3 Development Artifacts Versio Test &JIRA Release notes Repository Build artifacts Release How artifacts work 1 1.3 1.3 Build results (Artifacts) Release Environments Development 1.0 1.31.3 Production Development 1.31.3 Development Repository Build artifacts Release Upgrade Bamboo 1.3 1.0 1.31.3 Production Development 1.31.3 Development Repository Build artifacts Release Build Bamboo 1.3 Build results (Artifacts) Release Environm D Repository Build artifacts 1.0 1.3 1.3 1.3 Build results (Artifacts) Release Environments Production Development Repository Build artifacts Release jira-bamboo servicedesk-bamboo
  77. Infrastructure differences? Is it Bamboo Configuration? Is it a Bamboo Plugin? Is it Bamboo the product? How is it being used?
  78. TEAM INFRASTRUCTURE BAMBOO SERVERS Conclusion CONCLUSION INTRODUCTION
  79. Constant improvement
  80. We’ve matured to handle the growth of Atlassian
  81. Thank you! PETER LESCHEV • TEAM LEAD • ATLASSIAN • @PETERLESCHEV
Publicité