Continuous Integration
A developer makes code changes to a Python API in a GitHub repo. This triggers a Jenkins job which clones the repo, installs dependencies, runs linting, unit tests and packaging. If all passes, the changes are merged to main branch. Failing builds send alerts in Slack.
Infrastructure as Code
A Terraform file defines the architecture of a 3-tier web application on AWS – a load balancer, web servers and database servers along with networking. Changes are reviewed and tested by deploying to a staging environment. Once validated, the production environment is updated by running a single ‘terraform apply’ command.
Configuration Management
Ansible scripts are used to automatically provision and configure a 100 node Kubernetes cluster across different regions. Playbooks install Docker, kubeadm, kubectl, configure iptables, deploy Kubernetes control plane and join worker nodes to the cluster with their pod network configuration handled automatically.
Monitoring
Prometheus scrapes metrics from services every 30 seconds which are stored in InfluxDB. Graphite graphs show the trends in database query latency across the web clusters over the past month. High values trigger alert in OpsGenie which pages the on-call engineer for further investigation.
Containerization
A monolithic Django app is broken into frontend, API and database microservices packaged as Docker images. These along with configuration files are stored in a Gitlab private registry. On code changes, a CI pipeline builds and tests and pushes updated images to production Kubernetes cluster across 3 availability zones.
Logging
Log entries from containers are forwarded to Splunk via Fluentd where they are indexed, searched and alerted on. This helps identify errors during UI testing and track a request across tiers for troubleshooting legacy code paths.