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.

All Your Stuff is Gonna Change: Build Evolvable Cloud Infrastructure and Avoid Tears

66 views

Published on

Principal Cloud Technologist, Kief Morris explores ways to implement cloud-based systems using automation tools like Terraform, CloudFormation, Ansible, Chef, Puppet, Docker, Kubernetes (anything, really) with change as a first-class concern. Apply agile engineering practices like Test Driven Development, Continuous Integration, and Continuous Delivery to your infrastructure. Adopt design patterns to make your infrastructure architecture loosely coupled and resilient. The concepts discussed here are relevant whatever your tools of choice, and should be of interest to any technical practitioner, architect, or decision maker involved in designing and implementing cloud-style infrastructure.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

All Your Stuff is Gonna Change: Build Evolvable Cloud Infrastructure and Avoid Tears

  1. 1. Kief Morris Head of Cloud Engineering Practices
  2. 2. EVOLVE! Your Infrastructure Kief Morris
  3. 3. kief@thoughtworks.com Head of Cloud Engineering Practices Twitter: @kief Book: http://oreil.ly/1JKIBVe Site: http://infrastructure-as-code.com
  4. 4. CLOUD
  5. 5. RISK
  6. 6. Throughput Poor Throughput Instability Stability
  7. 7. State of the DevOps Report
 https://devops-research.com/
 
 
 
 Accelerate,
 Nicole Forsgren, PhD,
 Jez Humble,
 Gene Kim
  8. 8. THROUGHPUT STABILITY The Four Metrics DEPLOYMENT FREQUENCY LEAD TIME FOR CHANGES CHANGE FAIL RATE TIME TO RESTORE SERVICE
  9. 9. "The highest performers excel at throughput and stability" State of the DevOps Report 2018 Nicole Forsgren, PhD, Jez Humble, Gene Kim https://devops-research.com/
  10. 10. ThroughputStability
  11. 11. FastSlow Stable Unstable
  12. 12. Prioritize throughput over stability FRAGILE MESS FastSlow Unstable
  13. 13. Prioritize correctness over speed of change Stable Slow Unstable FRAGILE MESS
  14. 14. Agile, Lean, DevOps FastSlow Stable Unstable
  15. 15. "Since we can't avoid change, we need to exploit it" Building Evolutionary Architectures Neal Ford, Rebecca Parsons, Pat Kua
  16. 16. OPTIMIZE FOR CHANGE AS CODE CONTINUOUS VALIDATION SMALL PIECES
  17. 17. Define all your stuff AS CODE
  18. 18. Define infrastructure as code Infrastructure configuration is: • Visible • Reusable • Consistent • Testable
  19. 19. Infrastructure PLATFORM Compute Storage Networking Amazon AWS Microsoft Azure Google Cloud Platform Digital Ocean OpenStack VMWare
  20. 20. Infrastructure STACK A collection of infrastructure resources defined and managed as a unit Terraform AWS CloudFormation Azure Resource Manager Google Cloud Deployment Ansible Cloud Modules OpenStack Heat Chef Provisioning Puppet Provisioning Salt Cloud
  21. 21. Application Runtime Platforms APP Serverless Runtimes APP APP Virtual Machines APP APP APP Container ClustersPhysical Hardware APP APP
  22. 22. MANAGING MULTIPLE ENVIRONMENTS
  23. 23. Many-headed stack antipattern Test Staging Production our_env/ !"" test.tf !"" staging.tf !"" production.tf
  24. 24. Changes have a wide blast radius Test Staging Production our_env/ !"" test.tf !"" staging.tf !"" production.tf 😢
  25. 25. Singleton stack antipattern our_env/ !"" test/ !"" servers.tf our_env/ !"" staging/ !"" servers.tf our_env/ !"" production/ !"" servers.tf Test Staging Production
  26. 26. Code changes by copy/paste our_env/ !"" test/ !"" servers.tf our_env/ !"" staging/ !"" servers.tf our_env/ !"" production/ !"" servers.tf Test Staging Production
  27. 27. Template stack pattern test instance stack source code Staging Production
  28. 28. CONTINUOUSLY VALIDATE all work in progress as you go
  29. 29. Automatically test every change before applying it
  30. 30. Promote changes to environments using a pipeline BUILDLOCAL APPLY TO QA APPLY TO PROD Sandbox QA Production APPLY TO TEST Test
  31. 31. Processes and controls are enforced by code Every change is logged and traceable, from commit to production Enable governance with pipelines Environment Definitions Test Code Compliance Specifications Pipeline Definitions
  32. 32. Challenge: Feedback cycles This stuff is slow. Very. Very. Slow.
  33. 33. BUILD SMALL, independently releasable components
  34. 34. Break out server roles Stack Java Cookbook Tomcat Cookbook Appserver Role Monitoring Agent Cookbook
  35. 35. Test server configurations Test configuration elements separately Provision and test using virtual machines or containers Test locally or on build agents
  36. 36. Extract separate pipeline stages for server configuration Test stack definition Test server configuration Test integrated system
  37. 37. Monolithic stack Wide blast radius, high coordination overhead 😢
  38. 38. Divide infrastructure into multiple, independently changeable stacks
  39. 39. Each stack has its own pipeline to deliver changes
  40. 40. Draw boundaries to optimize for change
  41. 41. How to start? Build first? Or automate first?
  42. 42. Automation makes delivery faster and more reliable Adding automation afterwards probably means rebuilding
  43. 43. Build incrementally Automate as you go
  44. 44. kief@thoughtworks.com Head of Cloud Engineering Practices Twitter: @kief Book: http://oreil.ly/1JKIBVe Site: http://infrastructure-as-code.com

×