terraform earth
play

Terraform Earth Secure Infrastructure for Developers Chase Evans - PowerPoint PPT Presentation

Terraform Earth Secure Infrastructure for Developers Chase Evans Timeline 1. Where we were before May 2. Where we are today 3. Where we are going Timeline 1. Where we were before May GeoEngineer Builds Terraform state files by


  1. Terraform Earth Secure Infrastructure for Developers Chase Evans

  2. Timeline 1. Where we were before May 2. Where we are today 3. Where we are going

  3. Timeline 1. Where we were before May

  4. GeoEngineer ● Builds Terraform state files by fetching remote resources, think `$ terraform refresh` Manual and distributed changes easily reconciled ● when AWS is the source of truth Looks like HCL ● ● github.com/coinbase/geoengineer

  5. Applying Resources

  6. Terraform Mars

  7. The Problem

  8. The Problem (Bottlenecking)

  9. The Problem (Bottlenecking)

  10. The Problem (Bottlenecking)

  11. The Problem (Business units)

  12. The Problem (Platform vs Operations)

  13. The Problem (Did you remember to pull?)

  14. The Problem (Credential proliferation)

  15. The Problem (VPC proliferation)

  16. Timeline 1. Where we were before May 2. Where we are today

  17. Introducing Terraform Earth

  18. Heimdall ● Records PR approvals with MFA ● Provides a clean API ● Not vulnerable to administrative Github tampering

  19. Terraform Earth

  20. Single Production Deployment ● One deployment makes updates easier ● New VPCs work without deployment

  21. Flow Diagram

  22. Flow Diagram

  23. Why bother locking? ● Concurrent changes are usually safe ● Sometimes multiple PRs pile up and need to modify a resource in order

  24. Flow Diagram

  25. Why SHAs and not ‘master’? ● Master is just a label and moves frequently ● Code has quorum, not labels ● Something could be merged to the repo between quorum check and clone

  26. Flow Diagram

  27. Handling Failure ● Retry the GeoEngineer apply with backoff AWS rate limits heavily AWS has failures ● Queue and retry ● Replay the webhook using Github administration ● Add an endpoint to manually intervene

  28. Handling Failure Not great solutions, if you have ideas, let me know

  29. Staging Deploys ● Setup a bot with limited privileges You can test the flow, without breaking everything We have a separate repository that defines 1 S3 bucket ● Make a periodic cleaner that cleans up test resources We use lambdas to do this

  30. Timeline 1. Where we were before May 2. Where we are today 3. Where we are going

  31. Team Scaling

  32. Team Scaling

  33. Team Scaling

  34. Resource Configuration Today

  35. Ownership

  36. Ownership

  37. Resource Configuration Today ● project = Project.new(‘infra/heimdall’, aws_accounts) ● project.service_with_elb(‘api’, configuration) ● project.rds_instance(‘db’, configuration)

  38. What’s Wrong? ● Uses language the Infrastructure team knows ● Developer’s mental model of deploys is not represented ● Too many options, very little opinion ● Code is too flexible

  39. Resource Configuration Tomorrow name: ‘developers/my-service’ services: - api: load_balanced: true accessible_by: [‘developers/my-other-service’] databases: - postgres: size: medium

  40. Ownership

  41. Ownership

  42. The Future

  43. Design Considerations ● Mono-repo or multi-repo ● Automated workflows (PR bots) ● Exposing the information to outside services

  44. The Other Half ● Provisioning and management is now easy ● Operation is not

  45. Account Stewardship Today

  46. Account Stewardship Today

  47. Account Stewardship Tomorrow

  48. Complications ● Managing connectivity between many VPCs is hard ● Like microservices, finding the right domain is difficult ● How much access is enough access?

  49. Team Scaling

  50. Team Scaling

  51. The Future

  52. The Future

  53. The Future

  54. The Future

  55. Secure Infrastructure for Developers Or: Infrastructure with Vacation

  56. We’re Hiring! careers.coinbase.com

  57. Questions? chase.evans@coinbase.com

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend