Docsity

Chapter_14_DevOps_and_CICD_Pipelines, Lecture notes of Computer Fundamentals

Toggle sidebar
bg1
CH APTE R 14
DevOps & CI/CD Pipelines
Applied Computing Study Notes • Automation, Infrastructure as Code & Observability
1. DevOps Culture & Core Goals
DevOps unifies software development (Dev) and IT operations (Ops) through shared ownership, blameless post-mortems, and heavy
automation. Instead of infrequent, risky mega-releases, teams ship small incremental changes rapidly and safely.
2. Continuous Integration & Continuous Delivery (CI/CD)
Continuous Integration (CI): Developers merge code into the main repository multiple times a day. Every commit automatically
triggers a build, static code linter, and automated unit/integration test suite.
Continuous Delivery vs. Deployment (CD): Continuous Delivery keeps tested artifacts ready for one-click human approval to
production; Continuous Deployment automatically releases every commit that passes all automated quality gates.
Figure 14.1: Automated CI/CD Release Pipeline Stages
3. Infrastructure as Code & Zero-Downtime Releases
Infrastructure as Code (IaC) (using tools like Terraform or Ansible) defines servers, networks, and permissions in version-controlled
declarative files. This prevents manual configuration drift and enables identical staging and production environments.
Release Strategy Mechanism Key Advantage
Blue-Green
Deployment
Runs two identical environments; switches router traffic from
Blue (old) to Green (new).
Instant zero-downtime rollback simply by
switching traffic back.
Canary Release Routes a small percentage (e.g., 5%) of live users to the new
version before full rollout.
Limits blast radius if a subtle production bug
surfaces under real traffic.
Rolling Update Replaces server instances sequentially in small batches. Requires minimal extra hardware capacity during
upgrades.
Three Pillars of Production Observability
Once code is live, teams monitor system health using: (1) Metrics (numeric time-series like CPU load and error rates), (2) Logs
(timestamped discrete event records), and (3) Distributed Traces (tracking a single user request across multiple microservices).
•
•
1. Commit
2. Build
3. Auto Test
4. Stage & Deploy

Partial preview of the text

Download Chapter_14_DevOps_and_CICD_Pipelines and more Lecture notes Computer Fundamentals in PDF only on Docsity!

CHAPTER 14

DevOps & CI/CD Pipelines

Applied Computing Study Notes • Automation, Infrastructure as Code & Observability

1. DevOps Culture & Core Goals

DevOps unifies software development (Dev) and IT operations (Ops) through shared ownership, blameless post-mortems, and heavy automation. Instead of infrequent, risky mega-releases, teams ship small incremental changes rapidly and safely.

2. Continuous Integration & Continuous Delivery (CI/CD)

Continuous Integration (CI): Developers merge code into the main repository multiple times a day. Every commit automatically triggers a build, static code linter, and automated unit/integration test suite. Continuous Delivery vs. Deployment (CD): Continuous Delivery keeps tested artifacts ready for one-click human approval to production; Continuous Deployment automatically releases every commit that passes all automated quality gates.

Figure 14.1: Automated CI/CD Release Pipeline Stages

3. Infrastructure as Code & Zero-Downtime Releases

Infrastructure as Code (IaC) (using tools like Terraform or Ansible) defines servers, networks, and permissions in version-controlled declarative files. This prevents manual configuration drift and enables identical staging and production environments.

Release Strategy Mechanism Key Advantage Blue-Green Deployment

Runs two identical environments; switches router traffic from Blue (old) to Green (new).

Instant zero-downtime rollback simply by switching traffic back. Canary Release Routes a small percentage (e.g., 5%) of live users to the new version before full rollout.

Limits blast radius if a subtle production bug surfaces under real traffic. Rolling Update Replaces server instances sequentially in small batches. Requires minimal extra hardware capacity during upgrades.

Three Pillars of Production Observability Once code is live, teams monitor system health using: (1) Metrics (numeric time-series like CPU load and error rates), (2) Logs (timestamped discrete event records), and (3) Distributed Traces (tracking a single user request across multiple microservices).

1. Commit 2. Build 3. Auto Test 4. Stage & Deploy