Infrastructure as Code

Infrastructure as Code, 2nd Edition by Kief Morris, ISBN: 9781098114671

Get Started. It's Free
or sign up with your email address
Infrastructure as Code by Mind Map: Infrastructure as Code

1. I. Foundations

1.1. 1. What Is Infrastructure as Code?

1.1.1. Objections We don’t make changes often enough to justify automating them We should build first and automate later We must choose between speed and quality

1.1.2. The Four Key Metrics Delivery lead time Deployment frequency Change fail percentage Mean Time to Restore (MTTR)

1.1.3. Core Practices Define Everything as Code Reusability Consistency Transparency Continuously Test and Deliver All Work in Progress Core Practice: Build Small, Simple Pieces That You Can Change Independently

1.1.4. Conclusion

1.2. 2. Principles of Cloud Age Infrastructure

1.2.1. Principles Assume Systems Are Unreliable Make Everything Reproducible Create Disposable Things Minimize Variation Ensure That You Can Repeat Any Process

1.2.2. Snowflake Systems

1.2.3. Configuration Drift

1.2.4. The Automation Fear Spiral

1.2.5. Conclusion

1.3. 3. Infrastructure Platforms

1.3.1. The Parts of an Infrastructure System Applications Application runtimes Infrastructure platform

1.3.2. Infrastructure Platforms Public IaaS cloud services Private IaaS cloud products Bare-metal cloud tools

1.3.3. Multicoud Hybrid cloud Cloud agnostic Polycloud

1.3.4. Infrastructure Resources Compute Resources Virtual machines (VMs) Physical servers Server clusters Containers Application hosting clusters FaaS serverless code runtimes Storage Resources Block storage (virtual disk volumes) Object storage Networked filesystems (shared network volumes) Structured data storage Secrets management Network Resources Network address blocks Names, such as DNS entries Routes Gateways Load balancing rules Proxies API gateways VPNs (virtual private networks) Direct connection Network access rules (firewall rules) Asynchronous messaging Cache Service mesh

1.3.5. Conclusion

1.4. 4. Core Practice: Define Everything as Code

1.4.1. What You Can Define as Code Choose Tools with Externalized Configuration Manage Your Code in a Version Control System Traceability Rollback Correlation Visibility Actionability

1.4.2. Infrastructure Coding Languages Infrastructure Scripting Declarative Infrastructure Languages Programmable, Imperative Infrastructure Languages Domain-Specific Infrastructure Languages Idempotency

1.4.3. Implementation Principles for Defining Infrastructure as Code Separate Declarative and Imperative Code Treat Infrastructure Code Like Real Code Code as Documentation

1.4.4. Conclusion

2. II. Working with Infrastructure Stacks

2.1. 5. Building Infrastructure Stacks as Code

2.1.1. What Is an Infrastructure Stack? “Stack” As a Term Stack Code Stack Instance Configuring Servers in a Stack Low-Level Infrastructure Languages High-Level Infrastructure Languages

2.1.2. Patterns and Antipatterns for Structuring Stacks Antipatterns: Monolithic Stack Patterns: Application Group Stack Patterns: Service Stack Patterns: Micro Stack Blast Radius

2.1.3. Conclusion

2.2. 6. Building Environments with Stacks

2.2.1. What Environments Are All About Delivery Environments Multiple Production Environments Fault tolerance Scalability Segregation

2.2.2. Patterns for Building Environments Antipattern: Multiple-Environment Stack Antipattern: Copy-Paste Environments Pattern: Reusable Stack

2.2.3. Building Environments with Multiple Stacks

2.2.4. Conclusion

2.3. 7. Configuring Stack Instances

2.3.1. Using Stack Parameters to Create Unique Identifiers Design Principle: Keep Parameters simple

2.3.2. Patterns for Configuring Stacks Antipattern: Manual Stack Parameters Pattern: Stack Environment Variables Pattern: Scripted Parameters Pattern: Stack Configuration Files Pattern: Wrapper Stack Pattern: Pipeline Stack Parameters CI Servers, Pipelines, and Secrets Pattern: Stack Parameter Registry

2.3.3. Configuration Registry Implementing a Configuration Registry Infrastructure Automation Tool Registries General-Purpose Configuration Registry Products Platform Registry Services DIY ConfigurationRegistries Single or Multiple Configuration Registries

2.3.4. Handling Secrets as Parameters Encrypting Secrets Secretless Authorization Injecting Secrets at Runtime Disposable Secrets

2.3.5. Conclusion

2.4. 8. Core Practice: Continuously Test and Deliver

2.5. 9. Testing Infrastructure Stacks

3. III. Working with Servers and Other Application Runtime Platforms

3.1. 10. Application Runtimes

3.2. 11. Building Servers as Code

3.3. 12. Managing Changes to Servers

3.4. 13. Server Images as Code

3.5. 14. Building Clusters as Code

4. IV. Designing Infrastructure

4.1. 15. Core Practice: Small, Simple Pieces

4.2. 16. Building Stacks from Components

4.3. 17. Using Stacks as Components

5. V. Delivering Infrastructure

5.1. 18. Organizing Infrastructure Code

5.2. 19. Delivering Infrastructure Code

5.3. 20. Team Workflows

5.4. 21. Safely Changing Infrastructure