What Is the Shift-Left Approach in DevOps?
Written by Austin Dease   
Friday, 03 June 2022

The short answer is that it is a methodology that brings software testing into earlier stages of the software development lifecycle. We look at the importance of this new approach and how to implement it.

DevOps brings development and operations together, leading to faster, more flexible software delivery pipelines while increasing collaboration between teams. Users can further improve their software delivery even when implementing and utilizing DevOps practices. It can be done by implementing other techniques or methodologies on top of DevOps. In this article, we will look at one such methodology known as the shift-left approach and how it benefits DevOps.

What is Shift-Left?

In a more traditional sense, the Shift-Left approach was introduced to bring software testing into earlier stages of the software development lifecycle. This approach aims to reduce errors later on in the pipelines by moving testing into the early stages of development and creating a faster development process.Shirt-Left

The Shift-Left approach has become invaluable in modern software development, as it helps integrate software and security testing into earlier stages of continuous delivery pipelines. Furthermore, it allows you to detect any errors or security vulnerabilities in the software quickly. You can also apply this approach to other areas, such as infrastructure provisioning and configuration. For instance, it can be used when configuring a Kubernetes cluster, where operational and architectural considerations and configurations are mapped out in the early stages of the design process. It will avoid issues at the later stages of the cluster provisioning process. 

To summarize, shift-left essentially moves tasks that are traditionally done in the later stages of a development process into earlier stages. It, in turn, reduces unforeseen complications that can occur later on in a software delivery pipeline.

Importance of the Shift-Left Approach

The shift-left approach enables users to integrate software quality assurance and security at the earliest possible stages of the development process. Implementing this approach allows individual team members to focus on quality and security from the start, reducing build failures, unexpected bugs, resource wastage, and time to market.

Think of a more traditional development pipeline where security testing is done at a later stage after multiple individual changes have been merged to a repository. In that case, troubleshooting for a detected security issue involves going through all the changes made to the code base and identifying the root of the issue. Then, you have to fix the issue, merge the code again, and run the security testing. Depending on the issue and the scope of changes, it can be a time-consuming and resource-intensive task. Users can minimize such incidents by using the shift-left approach, since it prioritizes security testing at the developer level before pushing the code into the repository. This way, you can fix any detected issues before they are merged into central repositories.

Shift-Left in DevOps

In a DevOps environment, the shift-left approach applies to both continuous integration and continuous delivery, focusing on the following areas.

  • Continuous Testing - Implement automated testing at the earliest possible stage of the CI pipeline. Allow developers to trigger tests against their branches with each change and quickly provide feedback on failures.

  • Continuous Security - It spans both the CI/CD processes. Integrate security testing as an essential part of the CI pipeline. As with software testing, provide automated security tests that run at the earliest possible stage and get triggered at the developer level. It not only alerts developers about potential security issues, but also helps them develop with a more security-focused mindset. Ensure that any infrastructure changes will not compromise security at an infrastructure level, and plan for these changes at the earliest possible stage in the delivery process.

  • Continuous Deployment - Create automated builds and deploy them in a test environment, facilitating further testing before production deployments. It will enable capturing bugs or vulnerabilities that were not detected during initial tests. Additionally, it will provide an identical environment to production, allowing users to check any infrastructure changes before applying them to production.

 

How to Implement the Shift-Left Approach in a DevOps Environment

The best approach to follow when implementing the shift-left approach is to establish a standardized development and testing process. The Ops team can work with developers to create this process that is tailored to their specific requirements. It covers developmental testing, allowing individual developers or teams to integrate tests directly into their development process.

For operational testing, users should replicate the production environment configurations in the staging environment to eliminate failures due to configuration issues. Any required infrastructure changes can be captured during the development process, and the Ops team can test and validate them before hitting production. As DevOps organically increases collaboration between Ops and Dev teams, aligning them all towards a shift-left approach is much simpler in a DevOps environment.

Conclusion

The shift-left approach allows users to identify issues and inconsistencies at the early stages of the development process. This approach can be implemented with DevOps practices without significant complications. It can be as simple as shifting some workloads to earlier stages of the delivery pipelines. Moreover, it allows users to take advantage of all the benefits of the shift-left approach while fully embracing DevOps practices. 

 

Related Articles

Insights Into Successful Software Delivery

New DevOps Credentials From IBM On Coursera

The DevOps Master Class - Go Behind The Concept

Happy Developers Think More About Security

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

 

Banner


Extend NGINX With The New JavaScript Module
28/10/2024

Inject middleware functionality into NGINX with the expressive power of Javascript. NGINX JavaScript or NJS for short is a dynamic module under which you can use scripting for hooking into the NGINX e [ ... ]



OpenAI Library For .NET Exits Beta
19/11/2024

A few months ago the OpenAI .NET library was released as a beta. It has now reached version 2.0.0 and the time has come to leave beta and, with a few amendments enter production readiness.


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

 

Last Updated ( Monday, 06 June 2022 )