DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Driving DevOps With Smart, Scalable Testing
  • Scaling DevOps With NGINX Caching: Reducing Latency and Backend Load
  • Internal Developer Portals: Modern DevOps's Missing Piece
  • The Role of AI in Enhancing DevOps Processes

Trending

  • A Deep Dive Into Firmware Over the Air for IoT Devices
  • Cosmos DB Disaster Recovery: Multi-Region Write Pitfalls and How to Evade Them
  • Dropwizard vs. Micronaut: Unpacking the Best Framework for Microservices
  • Docker Base Images Demystified: A Practical Guide
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. DevOps and CI/CD
  4. DevOps and The Shift-Left Principle

DevOps and The Shift-Left Principle

Catch bugs quicker and make more secure products with a shift-left security strategy.

By 
Saurabh Gupta user avatar
Saurabh Gupta
·
Updated Jun. 24, 19 · Analysis
Likes (4)
Comment
Save
Tweet
Share
14.2K Views

Join the DZone community and get the full member experience.

Join For Free

image title


generally, when we talk about devops, we are mostly focused on faster and continuous deployment, automation, and monitoring the system for errors and failures.

at times, what we often neglect is the testing part of a devops implementation.

today i am going to discuss the “ shift-left” principle and how to do it the devops way. i know that it is not a new concept, but for those of you who do not know the “shift-left” principle, let me try to elaborate.

what do we actually mean by “shifting left”?

consider a regular software lifecycle, which typically moves from left to right:

design >> develop >> test >> deployment >> production monitoring

the shift-left concept emphasis that the more effort that is shifted towards the left, or earlier, in the lifecycle process, the fewer the chances of errors or failures. in other words, it talks about identifying bugs and errors at an early stage and preventing them rather than solving them later. as we know, “ prevention is always better than the cure.”

the goal is to have better quality application code, shorter testing cycles and deployment time, and an error-free production environment. no one wants unwelcome surprises during deployment, and an unstable production environment is the worst nightmare for a devops team.

shift-left in a devops way

so when we talk about “shift left” in a devops context, we normally refer to these devops processes as:

  1. continuous testing
  2. continuous deployment
  3. continuous security (often a part of devsecops)

software testing itself is not a single process; there are several types of testing involved, and we do have the concept of shift-left testing as well. using devops automation tools, a shift-left approach can have the following benefits:

  • less code errors while deployment.
  • increased test coverage by able to run more tests at the same time.
  • short testing and deployment cycles and faster delivery.
  • a more stable production environment, as bugs are identified and fixed at earlier stages itself.


how to "shift-left"

there are many ways on how to implement a “shift-left” approach and vaies from organization to organization. in general, some of the ways to follow a “shift-left” principle in devops are:

  1. design, review, and freeze your architecture decisions early in the cycle, so that developers get the right understanding before even starting to code.
  2. do not make too many frequent changes in your architecture, as this confuses the development team.
  3. the development team should follow a tdd approach, to identify the potential bugs in initial stages itself.
  4. the development team should be in-sync with the ops team. as far as the dev environment setup is concerned, it should be as close to a real production environment as possible.
  5. the testing/qa teams should also work closely with the dev teams, so that they can understand the flow and write test cases wherever possible. this will also ensure high code coverage.
  6. the qa/testing team should try to automate all the test cases, using the devops automation tools. with all test suites automated, the chances of manual errors would be minimum.
  7. also, the testing/qa environment should be continuously in sync with the live production environment, or if possible a replica (if budget permits).
  8. the continuous deployment tools should have another set of test suites to run before the final deployment happens.

by following the above pointers, we should be able to have a “shift-left” based devops implementation, which will ensure that we are able to identify and fix any potential bugs or errors before deployment itself,  ensuring a more confident, bug-free deployment and stable production system.

remember the key idea is to, “identify and fix the errors, before they can reach a production environment.” the sooner the better.

DevOps

Opinions expressed by DZone contributors are their own.

Related

  • Driving DevOps With Smart, Scalable Testing
  • Scaling DevOps With NGINX Caching: Reducing Latency and Backend Load
  • Internal Developer Portals: Modern DevOps's Missing Piece
  • The Role of AI in Enhancing DevOps Processes

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: