DEV Community

Winnie Fred
Winnie Fred

Posted on

Configuration Managament & IaC

Configuration Management

Configuration management is commonly referred to as IT Automation or Server Orchestration.

  • CM ensures application implementation, function and performance.
  • CM is key to DevOps because it can be automated with code to accomplish common tasks instead of relying on manual intervention.
  • CM uses Ansible to integrate with OCI DevOps service.

cm

Infrastructure as Code (IaC)

  • IaC defines, configures and provisions infrastructure using readable code, eliminating the need for manual system setup.
  • IaC is a key DevOps practice that allows for infrastructure automation, which works together with the continuous delivery model.
  • IaC uses Terraform to integrate OCI DevOps service

There are 3 main task categories:
1: Infrastructure provisioning
- Spinning up new servers
- Network configuration
- Creating load balancers
- Configuration on infrastructure level

2: Configuration of provisioned infrastructure
- Installing applications on servers
- Managing the apps
- Prepare the infrastructure/servers to deploy the app

3: Deployment of application

Distinction of phases

Initial setup phase Maintaining phase
Provision infrastructure Adjustment to infrastructure
Configure infrastructure Add and remove servers
Initial installation of software Update software
Initial configuration of software Re-configuration of software

Difference of IaC tools
1: Automate tasks in different categories for different phases
2: Combination of 2 or more IaC tools. Example terraform does the initial infrastructure setup and manage infrastructure but also it can also do initial application setup.However Ansible can configure and management applications but also can configure already managed infrastructure

Note: Infrastructure as code asks, what resources are there? And configuration management asks, how are they configured?

Hence its recommended to use Terraform for provisioning and de-provisioning and Ansible for configuration, patching, deployment, and maintenance.

Ansible Terraform
Is a Configuration Management tool Is a Infrastructure as Code tool
Support mutable infrastructure Support immutable infrastructure
Works via SSH Works via API calls
Follows procedural language Follows declarative language

Benefits of configuration management for servers comes from defining infrastructure as code. This enables you to:

1: Use a version control system to keep track of any changes in your infrastructure.
2: Reuse provisioning scripts for multiple server environments such as development, testing and production.
3: Share provisioning scripts between coworkers to facilitate collaboration in a standardized development environment.
4: Streamline the process of replicating servers which facilitates recovery from critical errors.

Top comments (0)