Software Development Life Cycle (SDLC) and Methodologies

Chapter 10
DevOps, DevSecOps, and Cloud-Native Delivery

Diploma in Software Engineering
Software Development Life Cycle (SDLC) and Methodologies   •   Diploma

DevOps, DevSecOps, and Cloud-Native Delivery

Introduction and Context

Traditional software development often separated development, testing, operations, and security into specialised departments. Developers produced code, testers validated it later, operations teams deployed it, and security specialists reviewed it near the end. This arrangement created hand-offs, delays, limited feedback, and a tendency to treat deployment and security as someone else’s responsibility.

DevOps is a set of cultural practices, technical practices, and organisational principles that bring software development and IT operations closer together. Its purpose is not simply to deploy software faster. It is to create a reliable flow from idea to working service through collaboration, automation, measurement, and continuous learning.

DevSecOps extends this approach by integrating security into the entire software delivery lifecycle. Cloud-native delivery applies these principles to systems designed for elastic cloud infrastructure, automated provisioning, distributed execution, managed services, containers, and rapid change.

These approaches are especially important because modern applications are frequently updated, operate across multiple environments, depend on third-party services, and process sensitive data. A diploma-level software engineer should therefore understand both the technical mechanisms and the professional responsibilities involved in continuous delivery.

Learning Objectives

By the end of this chapter, a learner should be able to:

  • explain the purpose and principles of DevOps, DevSecOps, and cloud-native delivery;
  • distinguish continuous integration, continuous delivery, and continuous deployment;
  • describe an automated delivery pipeline and its quality controls;
  • explain infrastructure as code, containers, orchestration, and cloud service models;
  • select useful delivery, reliability, security, and observability metrics;
  • apply reliability practices such as service-level objectives, gradual release, and rollback;
  • identify security, governance, ethical, and operational risks; and
  • analyse a practical transition from manual delivery to a secure cloud-native process.

1. The DevOps Model

DevOps is best understood as a socio-technical system. Tools alone do not create DevOps. Effective practice requires:

  1. Shared responsibility: teams jointly own the software’s operation, security, and outcomes.
  2. Small, reversible changes: work is integrated frequently and released in manageable increments.
  3. Automation: repeatable activities such as testing, building, provisioning, and deployment are automated.
  4. Fast feedback: monitoring, tests, reviews, and user evidence inform the next change.
  5. Continuous improvement: teams examine failures and delivery performance without blaming individuals.

A useful model is the delivery value stream:

DevOps continuous delivery loop Plan and code Build and test Release Operate Feedback: users, telemetry, tests,security findings and incidents
DevOps continuous delivery loop
Figure: DevOps continuous delivery loop

Figure: DevOps treats delivery and operation as a continuous feedback loop rather than a one-time hand-off.

DevOps does not mean that every team must use the same tools or eliminate all specialist roles. It means that specialists collaborate through shared objectives, visible work, common evidence, and clear ownership.

2. Continuous Integration and Delivery

Continuous Integration

Continuous integration (CI) is the practice of integrating code changes into a shared repository frequently and validating each change through automated checks. A CI process commonly performs source retrieval, dependency installation, compilation or packaging, unit tests, static analysis, and artifact creation.

CI reduces integration risk. When changes are integrated daily or several times a day, a defect is associated with a small change set. Infrequent integration allows incompatible assumptions and defects to accumulate.

A good CI pipeline should be:

  • fast enough to provide useful feedback;
  • deterministic, producing the same result from the same inputs;
  • isolated from developer workstations;
  • reproducible through versioned configuration; and
  • strict about failing when essential quality checks fail.

Continuous Delivery and Deployment

Continuous delivery keeps the application in a releasable state. A production release may still require an explicit business or operational approval. Continuous deployment automatically releases every change that passes the required controls.

These terms are related but not identical:

PracticeMeaningHuman production approval
Continuous integrationFrequently integrate and validate codeNot applicable
Continuous deliveryAutomatically prepare a release-ready productMay be required
Continuous deploymentAutomatically release validated changesNormally absent

A pipeline commonly contains the following stages:

  1. Commit: a developer submits a change through version control and peer review.
  2. Build: source code is compiled or packaged, and dependencies are resolved.
  3. Test: unit, integration, API, acceptance, and regression tests are run as appropriate.
  4. Inspect: code quality, dependency risk, secrets, licences, and security weaknesses are assessed.
  5. Package: an immutable artifact, such as a container image, is created and recorded.
  6. Deploy: the artifact is promoted through development, test, staging, and production environments.
  7. Verify: health checks, smoke tests, telemetry, and business checks confirm correct operation.
  8. Release or rollback: the change is exposed gradually or returned to a known-good version.

The pipeline should promote the same tested artifact rather than rebuilding different artifacts for each environment. Environment-specific values should be supplied through controlled configuration, not by changing application code.

3. DevSecOps: Security as a Delivery Property

DevSecOps embeds security controls throughout the lifecycle. Security is not a final gate that attempts to discover every weakness after implementation. Instead, risks are identified early, automated where possible, and reviewed by people where judgement is required.

Typical controls include:

  • secure coding standards and peer review;
  • secret detection in source repositories and build logs;
  • software composition analysis for open-source dependencies;
  • static application security testing (SAST), which examines source or compiled code;
  • dynamic application security testing (DAST), which tests a running application;
  • infrastructure and configuration scanning;
  • container image scanning;
  • dependency pinning and provenance records;
  • least-privilege access controls;
  • encryption in transit and at rest;
  • vulnerability prioritisation based on exploitability and business impact; and
  • incident response and security monitoring.

Automation does not remove security responsibility. A scanner can produce false positives, miss business-logic flaws, or identify a vulnerability that is not practically exploitable in a particular architecture. Teams must define thresholds, triage findings, document exceptions, and establish remediation deadlines.

Secrets such as passwords, private keys, and tokens must not be stored in source code or ordinary pipeline variables visible to unauthorised users. A secrets manager, short-lived credentials, rotation, access logging, and least privilege are safer practices. Security logs should be protected from unauthorised alteration because they may be needed for investigation and legal compliance.

4. Infrastructure as Code and Configuration Management

Infrastructure as code (IaC) represents infrastructure in machine-readable, version-controlled definitions. Servers, networks, databases, permissions, policies, and monitoring resources can be created from these definitions rather than manually configured.

IaC provides:

  • repeatability across environments;
  • reviewable infrastructure changes;
  • recoverability after failure;
  • an auditable history; and
  • reduced configuration drift.

Two important concepts are declarative and imperative provisioning. A declarative specification states the desired end state, while an imperative script states the sequence of commands to execute. Declarative systems can compare actual and desired states and determine required changes, although destructive changes still require careful review.

IaC should be modular, parameterised, tested, and subject to access control. State files may contain sensitive information and must be encrypted and stored with controlled access. A plan or preview should be reviewed before applying changes. Manual production changes should be exceptional, documented, and reconciled with the source definition.

Configuration management also separates application code from environment-specific settings. Configuration should be validated, versioned where appropriate, and supplied through secure mechanisms. Poor configuration management can cause outages even when application code is correct.

5. Containers and Cloud-Native Architecture

A container packages an application and its user-space dependencies while sharing the host operating system kernel. Containers are usually lighter and faster to start than full virtual machines, but they are not automatically secure isolation boundaries. The host kernel, runtime, image contents, permissions, and network exposure remain important security concerns.

A reliable container image should:

  • use a trusted and minimal base image;
  • pin or verify dependency versions;
  • run as a non-root user where possible;
  • exclude source secrets and unnecessary tools;
  • receive regular vulnerability updates;
  • be scanned and signed; and
  • be stored in a controlled registry.

Containers are often managed by an orchestrator, which schedules workloads, replaces failed instances, provides service discovery, manages configuration, and supports scaling. Orchestration introduces complexity involving networking, identity, storage, scheduling, upgrades, and observability. It should be used because its operational benefits justify that complexity, not merely because it is fashionable.

Cloud-native systems are designed to exploit cloud capabilities such as on-demand resources, managed databases, object storage, queues, serverless execution, automated networking, and elastic scaling. Common characteristics include stateless application instances, externalised state, automated deployment, resilience to instance failure, and API-based infrastructure.

Cloud service models are commonly described as:

ModelProvider commonly managesCustomer commonly manages
Infrastructure as a servicePhysical facilities and core hardwareOperating systems, applications, data, configuration
Platform as a serviceInfrastructure, operating system, runtimeApplication code, data, application configuration
Software as a serviceMost technology stackUsers, data governance, access configuration

The shared-responsibility model means that using a cloud provider does not transfer all security and compliance obligations. The provider may secure the underlying service, while the customer remains responsible for identity, data, configuration, application security, and lawful use.

6. Observability and Reliability Engineering

Monitoring reports known measurements, such as CPU utilisation or request count. Observability is the broader ability to infer the internal state of a system from its outputs. Its principal signals are:

  • metrics: numerical measurements over time;
  • logs: timestamped records of events; and
  • traces: paths of a request across distributed components.

Useful telemetry requires consistent timestamps, correlation or trace identifiers, meaningful event fields, controlled retention, and protection of personal or confidential data. Excessive logging can increase cost and expose sensitive information; insufficient logging makes diagnosis difficult.

Reliability should be expressed in user-relevant terms. A service-level indicator (SLI) is a measurement, such as the proportion of successful requests. A service-level objective (SLO) is the target for that indicator, such as 99.9% successful requests over a defined period. A service-level agreement (SLA) is a formal commitment, often including consequences if the commitment is missed.

For an availability SLI, one possible definition is:

Availability = (Successful eligible requests ÷ Total eligible requests) × 100%

This formula assumes that requests are clearly classified, the observation period is defined, and “successful” is specified—for example, an HTTP response below a selected error threshold. It should not be confused with simple server uptime when users may still experience failed requests.

The error budget is the amount of unreliability permitted by an SLO. If the target availability is 99.9% during a 30-day month, the permitted unavailability is approximately:

Error budget = (1 − 0.999) × 30 × 24 × 60 = 43.2 minutes

This calculation assumes a 30-day month and continuous measurement. Teams can use the budget to balance feature delivery and reliability work. If rapid releases consume the budget through incidents, release activity may be slowed while reliability improvements are made.

Important reliability practices include health checks, timeouts, retries with limits and back-off, circuit breakers, redundancy, graceful degradation, backups, disaster recovery testing, capacity planning, and blameless post-incident reviews. Retries must be designed carefully: uncontrolled retries can amplify load during an outage.

Four widely used delivery and operational indicators are deployment frequency, lead time for changes, change failure rate, and time to restore service. These indicators should be interpreted together. Increasing deployment frequency while increasing failed changes may indicate harmful optimisation.

7. Release Strategies and Pipeline Governance

A rolling deployment replaces instances gradually. It reduces the number of simultaneously changed instances but requires compatibility between old and new versions. A blue-green deployment maintains two environments and switches traffic between them, enabling rapid reversal at the cost of operating duplicate capacity. A canary release exposes a new version to a small proportion of users or traffic and expands exposure after evidence supports it. Feature flags separate deployment from user-visible activation, but stale flags create complexity and must be managed.

A mature pipeline includes controls such as branch protection, peer review, signed commits or artifacts where appropriate, separation of duties for high-risk changes, approval records, traceability from requirement to release, and an auditable deployment identity. Governance should be proportionate: excessive approvals can encourage workarounds, while inadequate control can create unacceptable operational or regulatory risk.

8. Illustrative Case: A Secure Cloud-Native Student Portal

Background

A fictional college operates a student portal containing schedules, assessment results, and fee information. The application runs on manually configured virtual machines. Releases occur every six weeks, and production defects are common because testing is performed late.

Problem

The college wants faster delivery but must protect personal data. The existing process has no reliable rollback, credentials are shared by administrators, infrastructure differs between test and production, and logs are insufficient for diagnosing failures.

Analysis

The primary problems are not only technical. Teams have separate objectives, deployments are large and risky, security review occurs after implementation, and there is no agreed definition of acceptable reliability. Manual configuration creates drift, while shared credentials weaken accountability.

Approach and Solution

The college first places application and infrastructure definitions in version control. Developers submit small changes through peer review. A CI pipeline runs unit tests, integration tests, dependency checks, secret scanning, and static analysis. It then builds one versioned container image and records its digest.

IaC creates separate but structurally consistent environments. A managed database is used for persistent data, while application instances remain stateless. Secrets are stored in a managed secrets service, and each pipeline stage receives only the permissions it needs.

A staging deployment runs database migration checks, smoke tests, and dynamic security tests. Production uses a canary strategy. Metrics include successful request rate, latency, authentication failures, and database health; logs contain correlation identifiers but exclude payment details and unnecessary personal information. A defined SLO establishes an error budget. A tested rollback procedure returns traffic to the previous image if the canary produces unacceptable results.

Outcome

The college can release smaller changes more frequently, identify defects earlier, and investigate incidents more effectively. Security checks are performed before release rather than postponed. The approach does not eliminate risk: dependencies still require maintenance, cloud costs must be monitored, and business owners must continue reviewing privacy and retention requirements.

Learning Points

The case demonstrates that DevOps is a coordinated operating model. Automation is valuable because it makes a good process repeatable; it cannot compensate for unclear ownership or unsafe design. Cloud-native services can simplify operations, but they introduce dependency, cost, portability, and governance decisions.

9. Challenges, Ethics, and Contemporary Developments

DevOps transformation can fail when organisations purchase tools without changing incentives, measure activity rather than outcomes, or expect teams to remain permanently available. Automation may also reproduce insecure assumptions at scale. Teams should protect developers from unreasonable on-call demands, provide training, and use incident reviews for learning rather than punishment.

Privacy must be considered in telemetry, testing, and cloud storage. Production data should not be copied into development environments without lawful justification, minimisation, masking, and access control. Accessibility, data residency, retention, and regulatory requirements may affect architecture and provider choice.

Software supply-chain risks have increased as applications depend on open-source packages, registries, build services, and third-party APIs. Useful responses include dependency inventories, provenance, signed artifacts, reproducible or controlled builds, vulnerability response procedures, and supplier assessment.

Artificial intelligence is increasingly used for code completion, test generation, anomaly detection, and incident assistance. It can improve productivity, but generated code may contain vulnerabilities, licensing concerns, fabricated explanations, or insecure dependencies. AI-generated changes require the same review, testing, security analysis, privacy protection, and accountability as human-generated changes.

Contemporary cloud-native practice also includes policy as code, platform engineering, software supply-chain attestations, serverless systems, event-driven architectures, and progressive delivery. These are techniques rather than universal solutions. Selection should be based on system constraints, organisational capability, cost, risk, and user needs.

Best-Practice Checklist

  • Keep changes small, reviewed, and traceable.
  • Build and test automatically on every relevant change.
  • Promote the same immutable artifact through environments.
  • Treat infrastructure and policy as version-controlled code.
  • Store secrets in a dedicated, audited secrets system.
  • Apply least privilege to users, services, and pipelines.
  • Scan code, dependencies, images, infrastructure, and running services.
  • Define SLIs and SLOs before selecting reliability targets.
  • Use telemetry that is useful, affordable, privacy-preserving, and protected.
  • Test rollback, backup restoration, and disaster recovery.
  • Measure outcomes rather than tool adoption.
  • Review cloud costs, provider dependencies, accessibility, and compliance.
  • Learn from incidents without suppressing evidence or blaming individuals.

Chapter Summary

DevOps integrates development and operations through shared responsibility, automation, frequent integration, rapid feedback, and continuous improvement. Continuous integration validates changes early; continuous delivery keeps software releasable; continuous deployment releases validated changes automatically. A delivery pipeline can build, test, inspect, package, deploy, verify, and roll back software.

DevSecOps embeds security controls throughout the pipeline and requires secure design, secrets management, dependency governance, least privilege, vulnerability handling, and human judgement. Infrastructure as code makes environments repeatable and auditable. Containers package applications consistently, while orchestration and cloud services support scalable, automated operation but introduce additional security and governance responsibilities.

Observability combines metrics, logs, and traces to support diagnosis. SLOs and error budgets connect reliability to delivery decisions. Canary, blue-green, rolling, and feature-flag strategies reduce release risk when appropriately designed. Successful cloud-native delivery depends not only on technology but also on culture, governance, privacy, resilience, cost management, and continuous learning.

Key Terms

DevOps: A socio-technical approach integrating development and operations through collaboration, automation, and feedback.

DevSecOps: DevOps practice that incorporates security throughout the software lifecycle.

Continuous integration: Frequent integration of code changes with automated validation.

Continuous delivery: Maintaining software in a releasable state through automated processes.

Continuous deployment: Automatically releasing validated changes to production.

Pipeline: An automated sequence of activities that moves a change toward release.

Infrastructure as code: Defining and managing infrastructure using version-controlled machine-readable specifications.

Container: A packaged application process and its dependencies sharing the host kernel.

Orchestration: Automated scheduling, networking, scaling, and management of workloads.

Cloud-native: Designed to exploit elastic cloud infrastructure, managed services, and automation.

Observability: The ability to infer system state from outputs such as metrics, logs, and traces.

Service-level indicator: A measurement of a service characteristic.

Service-level objective: A target value for a service-level indicator.

Service-level agreement: A formal service commitment, often with consequences.

Error budget: The permitted unreliability implied by an SLO.

Canary release: Gradual exposure of a new version to a limited audience or traffic share.

Infrastructure drift: Unintended difference between declared and actual infrastructure configuration.

Software supply chain: The code, dependencies, tools, services, and processes used to produce software.

Feature flag: A control that separates deployment of code from activation of functionality.

Review Questions

Short Answer Questions

  1. What is the main purpose of continuous integration?
  2. Distinguish continuous delivery from continuous deployment.
  3. State two advantages of infrastructure as code.
  4. What are the three principal observability signals?
  5. Why should secrets not be stored in source code?

Long Answer Questions

  1. Explain how a delivery pipeline can reduce software release risk.
  2. Compare containers with virtual machines and discuss security implications.
  3. Explain how DevSecOps changes the timing and responsibility of security activities.
  4. Describe how SLOs and error budgets can influence release decisions.
  5. Discuss the shared-responsibility model in cloud computing.

Analytical / Application Questions

  1. A team deploys frequently, but its change failure rate is increasing. Analyse possible causes and recommend technical and organisational responses.
  2. Design a secure pipeline for a web application that handles personal data. Identify tests, approvals, secrets controls, deployment strategy, and observability requirements.
  3. An organisation wants to move a manually configured application to containers and managed cloud services. Evaluate the likely benefits, risks, costs, and migration sequence.

Multiple Choice Questions with Answers

Question 1

Which practice requires code changes to be integrated frequently and automatically validated?

A. Continuous integration

B. Blue-green deployment

C. Infrastructure drift

D. Service-level agreement

Correct Answer: A. Continuous integration

Question 2

What is the defining characteristic of continuous deployment?

A. All testing is performed manually

B. Every approved change is automatically released after passing controls

C. Infrastructure is configured only once

D. Security testing occurs only after production release

Correct Answer: B. Every approved change is automatically released after passing controls

Question 3

Which control is most appropriate for storing application passwords used by a pipeline?

A. A public source repository

B. A comment in the deployment script

C. A dedicated secrets manager

D. An unencrypted text file on a developer laptop

Correct Answer: C. A dedicated secrets manager

Question 4

What does infrastructure as code primarily provide?

A. Manual configuration without records

B. Repeatable and reviewable infrastructure provisioning

C. A replacement for application testing

D. Guaranteed elimination of cloud costs

Correct Answer: B. Repeatable and reviewable infrastructure provisioning

Question 5

Which observability signal records the path of a request across distributed services?

A. Trace

B. Static analysis report

C. Container image

D. Feature flag

Correct Answer: A. Trace

Question 6

A service has a 99.9% availability target. Approximately how much unavailability is allowed in a 30-day month?

A. 4.32 minutes

B. 43.2 minutes

C. 432 minutes

D. 720 minutes

Correct Answer: B. 43.2 minutes

Question 7

Which release strategy exposes a new version to a small proportion of users before wider rollout?

A. Canary release

B. Full rebuild

C. Big-bang release

D. Dependency pinning

Correct Answer: A. Canary release

Question 8

Which statement about cloud security is correct?

A. The provider always assumes all customer security responsibilities

B. Customers remain responsible for areas such as identity, data, and configuration

C. Cloud services do not require access control

D. Using containers removes the need for vulnerability management

Correct Answer: B. Customers remain responsible for areas such as identity, data, and configuration

Question 9

Why is promoting the same immutable artifact through environments beneficial?

A. It ensures each environment receives a separately modified build

B. It reduces differences between the tested and released software

C. It prevents all runtime failures

D. It eliminates the need for configuration management

Correct Answer: B. It reduces differences between the tested and released software

Question 10

What is the purpose of an error budget?

A. To calculate developer salaries

B. To define permitted unreliability implied by an SLO

C. To measure the number of source files

D. To replace incident response procedures

Correct Answer: B. To define permitted unreliability implied by an SLO

Software Development Life Cycle (SDLC) and Methodologies
Chapter 10 of 15