4. Pet vs Cattle
Pet Model
• You care so much about
your infrastructure that you
give it lovely names
• Earth, Jupiter, Mars …
• Goals: each server part of
your infrastructure should
be up 24/7
Cattle Model
• You stop naming your
servers and consider it as
“disposable” infrastructure
• front-01, front-02, front-
03…
• Goals: n servers are part of
the infrastructure 24/7
5. Cloud platforms make it possible
All is about automation
Imperative (Bash/PS scripts)
Declarative (ARM, Terraform…)
Idempotency
6. Infrastructure = code
• Stored in the source code repository
(GitHub, Azure Repos…), it’s just text!
• Same lifecycle
• You update the code, you update the
infrastructure
• Continuous Integration / Continuous
Deployment
• Versioning
• Labels / Rollbacks
• Also valid for configuration (configuration as
code)
8. What is Terraform?
• An open source tool/language (HCL) developed by HashiCorp
• Allows to write, plan and create infrastructure as code
• Common language for different providers
• Azure
• AWS
• Google
• Kubernetes
• …
• Same workflow / pipeline
• But different resources!
12. Advanced Workloads
• Remote State Storage
• Use Azure Storage or Terraform Cloud as backend
• Share states between teams and CI/CD runs
• Terraform Modules
• Module = container for multiple resources that are used together
• Automated testing
• How do I continuously integrate Terraform Infrastructure as Code ?