The DevOps lifecycle is not so linear as it seems

14 Jan 2025

DevOps lifecycle shows how activities flow between the developers and the operations teams in software development.

The twisted closed loop representation of the DevOps lifecycle helps us comprehend how the DevOps practices create harmony among the Dev and Ops teams.

But this representation also creates an incorrect notion that activities flow linearly in software development which is not the case in real life.

Let's first go through the phases in the DevOps lifecycle and then see how things work in real life.

Phases of the DevOps lifecycle

DevOps lifecycle

Plan

In the planning phase, you consider requirements of all stakeholders and prioritize what needs to be done.

Users or the customers are the key stakeholders in a software project but product managers, QA engineers, operations teams, etc., are all important stakeholders and must be involved in planning.

Planning is a continuous activity in software development. You must continuously analyze the requirements of stakeholders and improve the software to meet the expectations.

Code

In the coding phase the developers write code to implement the requirements identified in the planning phase.

Multiple developers work independently on different parts of the software and commit their code to a central repository. This central repository merges the changes from different developers and notify the developers if there are conflicting changes.

Build

In the build phase, you take code from the central repository and build artifacts to be deployed on your target platform.

Kubernetes and Docker Engine are the most popular target platforms for running software at scale.
Both of these platforms need Docker images as the build artifacts.

So, in the build phase you build Docker images from the code in the central repository. This step is often automated with build tools.

Test

Before deploying software to production, QA engineers in the software teams test the software in a test environment which is a scaled-down version of the production environment.

QA engineers do many types of testing like smoke testing. regression testing, stress testing, integration testing, etc., in the test environment to verify the functionality of the software.

Software testing is mostly automated, but certain types of manual testing is also required for complete assurance.

Once the testing is successful software is ready for deployment in production.

Deploy

In the deploy phase, youe deploy the new software to production.

If your target platform is Kubernetes, you can use one of the many continuous deployment tools like ArgoCD, Tekton, Harness, etc., to deploy your software. These tools use advanced deployment strategies like blue-green deployment and canary deployment to deploy and migrate services to the new software with minimal interruption to the users.

Operate

In the operating phase, the Ops team monitors the metrics of running software to identify service degradation or anomalies. Logs and traces support further troubleshooting to pinpoint issues.

Other operational activities include cloud service provisioning, database backups, performance optimization, data archiving, etc.

Feedback

Feedback represents the collaboration of the Dev and Ops teams to keep the DevOps cycle running smooth.

How does DevOps lifecycle works in real life

The representation of the DevOps lifecycle may make you think that the activities linearly flow from one phase to the next. But in all practical situations, that's not the case.

How build, test, and deploy work in the DevOps lifecycle

Testing occurs in multiple places in the DevOps lifecycle. In the coding phase, the developers use unit tests to test the code they write individually.

After writing code they commit the code to the central repository. This commit action triggers the build process. The build tools run all unit tests again and notify the developers if any test fails.

Then the developers must again update and commit the code to the central repository which triggers the build cycle again. If build succeeds the deployment tools deploy the new software on the test environment for testing.

Test environment is a scaled-down version of the production environment. We use the same deployment tools to deploy code to production and test environment.

In the test environment QA engineers do many types of testing like smoke testing, sanity testing, regression testing, stress testing, integration testing, etc.

If any of these tests fail, QA engineers notify the developers. After the developers correct the problem and commit the code the build and test cycle runs again.

If all tests are passed you can start deploying code in production. Using the same deployment tools that we used to deploy code to the test environment, we now deploy the software to the production environment.

In the production environment also you need to run certain types of testing like smoke testing and sanity testing. Also, the operations teams monitor the performance of the new software via metrics and logs, and notify the developers about any problems.

How feedback works in the DevOps lifecycle

The feedback in the DevOps lifecycle is represented as flowing from the operation phase to planning.

But feedback must not be so limiting.

Anything that requires collaborative work like improving test coverage, eliminating deficiencies in the build process, reducing user impact at deployment, etc., must be considered for the feedback phase.

Parallelism in the DevOps lifecycle

DevOps lifecycle is not one huge loop that's operating in sequence.

At anytime multiple activities continue in parallel. So while one part of the software is being deployed in production, testing of a new feature may be continuing in the test environment and a new build for a bug fix may be ongoing.

So the DevOps lifecycle is a continuous flow of activities happening in parallel.

Alright, now we understand how the DevOps lifecycle works in real life
In the next letter we'll explore about another aspect of DevOps.

Thanks for reading
-Indika

Read Cloud Letters in your Inbox