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.

Infrastructure as Microservices - OReillySACon London 2016

1,418 views

Published on

Many teams adopting Infrastructure as Code end up with monolithic infrastructure. But many of the principles for microservices software architecture apply just as well to infrastructure: small, focused capabilities that can be delivered independently. This talk explores how team structures and microservices principles apply to infrastructure, and describes some patterns and anti-patterns. These are applicable whatever tools are used, whether it's Terraform, CloudFormation, Puppet, Chef, Ansible, or others. It also applies to all infrastructure platforms, whether it's an IaaS cloud like AWS or OpenStack, a virtualized platform, or even physical hardware.

Published in: Technology

Infrastructure as Microservices - OReillySACon London 2016

  1. 1. @kief Infrastructure as MICROSERVICES #OReillySACon
  2. 2. kief@thoughtworks.com Cloud Practice Lead (UK) DevOps, Continuous Delivery, Agile Ops Twitter: @kief Book: http://oreil.ly/1JKIBVe Site: http://infrastructure-as-code.com October 2016
  3. 3. The MONOLITHIC infrastructure
  4. 4. THE INFRASTRUCTURE Microservices Infrastructure
  5. 5. Fragile: Easy to break something Effort: Changes require too much time and effort Snowflakes: Can’t reliably rebuild it Testing: Difficult to write automated tests PROBLEMS
  6. 6. MICROSERVICES! Ease of Change Resilience Replaceability Scaling Composability
  7. 7. THINGS TO THINK ABOUT ■ Teams ■ Capabilities ■ Design
  8. 8. TEAMS
  9. 9. HOW ARE YOUR DEV & OPS TEAMS ORGANIZED?
  10. 10. SEPARATE DEV & OPS GROUPS?
  11. 11. FULLY CROSS-FUNCTIONAL TEAMS?
  12. 12. DEV, OPS, AND DEVOPS?
  13. 13. Challenges with Cross-Functional Teams
  14. 14. DISPERSAL OF DEEP EXPERTISE
  15. 15. DUPLICATED EFFORT
  16. 16. LACK OF OWNERSHIP
  17. 17. CONFLICTING PRIORITIES
  18. 18. MONOLITHIC INFRASTRUCTURE TEAM ... Multiple Microservice Teams Single [Infrastructure] Team
  19. 19. “Organizations which design systems are constrained to produce designs which are copies of the communication structures of these organizations.” CONWAY’S LAW
  20. 20. Design your team structures and technical architectures together INVERSE CONWAY MANEUVER ThoughtWorks Radar: http://thght.works/2dpXEJv
  21. 21. OPS SERVICE TEAMS Organized around capabilities Enable other teams “You build it, you run it”
  22. 22. CAPABILITIES
  23. 23. What services does your infrastructure need to provide? ● Servers ● Networking ● Storage ● Monitoring ● Deployment ● Security ● Databases
  24. 24. CHARACTERISTIC OF MICROSERVICE DESIGN Independently deployable elements Organized around business capabilities Delivered as products not projects With decentralized governance Designed for failure With an evolving design http://martinfowler.com/articles/microservices.html
  25. 25. PROVIDING CAPABILITIES Guidance Examples Tools Services
  26. 26. Define and manage your platform by: ● Identifying your users ● Identifying their goals ● Defining tasks ● Organizing tasks to achieve outcomes http://jpattonassociates.com/user-story-mapping/ STORY MAPPING / CAPABILITY MAPPING
  27. 27. DESIGN
  28. 28. How are your infrastructure files currently organized? ● One big file? ● Modules? ● Other?
  29. 29. DESIGN CHALLENGE How can we design loosely coupled infrastructure so that we can make changes routinely, easily, and safely?
  30. 30. EXAMPLE INFRASTRUCTURE Catalog DB User DB Viewer Service Editor Service Catalog Service User ServiceVendor Service ELB Monitoring Service ELB Security Group
  31. 31. Catalog DB User DB Viewer Service Editor Service Catalog Service User ServiceVendor Service ELB Monitoring Service MONOLITHIC STACK ELB Security Group
  32. 32. MODULAR INFRASTRUCTURE ELB Definition Module Modularity is helpful for sharing and reusing code
  33. 33. MODULAR INFRASTRUCTURE Shared ELB Definition Module Modularity can actually make change more risky Multiple stacks import the module
  34. 34. HORIZONTAL STACKS
  35. 35. MICRO-SERVICE STACKS Infrastructure Stack for the Viewer Service ● Load Balancer VIP ● Firewall Rule ● Web Server Vhost ● App Server Cluster Infrastructure Stack for the User Service ● Load Balancer VIP ● Firewall Rules ● App Server Cluster ● Database Instance
  36. 36. SHARED STACKS Shared Networking Infrastructure Stack ● Subnets ● Firewall Rules User Service Infrastructure Stack ● Load Balancer VIP ● App Server Cluster ● Database Instance
  37. 37. SHARED STACKS Configuration Registry app_server_subnet_id=sn-1234abcd https_port_allow_rule=sg-dcba4321 Shared Networking User Service
  38. 38. A FEW THOUGHTS Align infrastructure stacks according to the scope of change Use delivery pipelines to test changes to infrastructure elements
  39. 39. Book: http://oreil.ly/1JKIBVe Site: http://infrastructure-as-code.com Twitter: @kief kief@thoughtworks.com Cloud Practice Lead (UK) DevOps, Continuous Delivery, Agile Ops

×