Infrastructure as Code
-
Manual deployment
-
Snowflake servers
- Deployment steps vary by environment
- More verification steps
-
Slower release cadence to minimize pain and long weekends
-
Infrastructure as code
-
Consistent servers between environment
- Fully automate creation and updates of environments
- Use blue/green deployments
-
Treat servers as cattle, not pets
-
Azure Resource Manager (
ARM
) is a form of IaC
Modularization
- Divide automation assets into logical parts
Imperative vs. Declarative
-
Declarative
-
Functional
-
Defines what the final state should be
-
Imperative
- Procedural
- Defines the "how" for what the final state should be
Idempotence
Idempotence
: Ability to apply one or more operations against a resource, resulting in the same outcome!- E.g., if a pod already exists, it will not be reapplied on kubectl apply with the same yaml
Chef
Chef
is an infrastructure automation tool that is used to manager apps and infra- Components
- Chef Server
- Chef Client (node)
- Chef Workstation: Developer machine
- Cookbooks: File with all the tasks (recipes)
- Recipes: Tasks
Chefknife
: command to run the configs
Puppet
- Deployment and configuratio management toolset
- Client server model
-
Components
-
Pippet Master
- Puppet Agent: Machines managed bby the server
- Console Services: Web interface
-
Facts: Metadata related to state
-
Manifest files
: extensive .pp
Ansible
- Open-source platform that automates cloud provisioning configuration management
- It's agentless, no software needs to be configured in the machines
- Ansible uses the own resources of the server (E.g., ssh, win)
- Ansible is based on python and it's easy to earn! Uses YAML
- Ansible uses
playbooks
which contain the list of instructions
Terraform
- Allows you to provision, manage and version
cloud infrastructure
- Terraform`s CLI provides simple mechanism to deploy to Azure, AWS, Google, etc
Componentes
- Configuration files
.tf
- Terraform CLI
- Modules