Concepts & practices
Beyond the tools, DevOps rests on a few ideas: treat infrastructure like code, design systems that can change safely, and always know what your system is doing in production.
Infrastructure as Code
IaC means describing servers, networks and databases in files instead of clicking through a cloud console. The files live in Git, so infrastructure changes get reviewed, versioned and can be rebuilt identically in a new region or after a disaster. No more "nobody knows how that server was set up".
# main.tf (Terraform)
resource "aws_instance" "web" {
ami = "ami-0abcdef1234567890"
instance_type = "t3.micro"
tags = { Name = "web-01" }
}
$ terraform init # download the provider plugins
$ terraform plan # preview: what would change?
$ terraform apply # make it so
$ terraform destroy # remove everything it created
Terraform is declarative: you describe the end result, not the steps, and it works out what to create, change or delete. It records what it built in a state file, which teams keep in shared remote storage. AWS's own equivalent is CloudFormation. Ansible complements it by configuring the servers once they exist; it connects over SSH and needs no agent installed on them.
Monoliths and microservices
A monolith is one application deployed as a single unit: simple to build, test and deploy at first, but every change redeploys everything and one part can't scale without the rest. Microservices split the system into small services that each own one job and their own data, talk over APIs or events, and deploy independently. That brings flexibility and independent scaling, but much more to operate: networking, monitoring, and failures between services. Containers and Kubernetes are what made microservices practical.
Observability: knowing what's happening
You can't fix what you can't see. Observability rests on three kinds of data:
- Metrics: numbers over time (CPU, request rate, error rate, response time). Collected by Prometheus or CloudWatch, graphed in Grafana.
- Logs: timestamped records of events, collected centrally (ELK stack, Loki, CloudWatch Logs) so you can search across all servers at once.
- Traces: the path of a single request across several services, showing where time was spent.
Alerts turn metrics into action: page someone when the error rate goes above 5% for five minutes, not every time CPU briefly spikes.
SRE and reliability targets
Site Reliability Engineering (from Google) applies software engineering to operations. Its vocabulary: an SLI is something measured (the percentage of requests that succeed), an SLO is the internal target for it (99.9% over 30 days), and an SLA is the promise to customers, with penalties if missed. The gap between 100% and the SLO is the error budget: while there's budget left, ship features; when it's used up, focus on stability.
GitOps and DevSecOps
GitOps takes IaC one step further: the Git repository describes exactly what should run in production, and a tool like Argo CD continuously syncs the cluster to match it. Deploying means merging a pull request, and rolling back means reverting one. DevSecOps builds security into every step instead of checking it at the end: scanning code and dependencies in CI, scanning images, keeping secrets out of Git, and least-privilege permissions everywhere.