DevOps and Left Shift Principle, to reduce errors





Generally whenever we talk about Devops, we are mostly focussed on faster and continuous deployment, automation and monitoring the system for errors and failures.
At times, what we often tend to neglect is the “Testing” part of a Devops implementation.
So today I am going to discuss a bit about the “Left Shift” principle and how to do it in Devops way. I know that it is not a new concept but for those of you who do not know the “Left Shift” 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

So the “Left Shift” concept emphasis that the more effort that is shifted towards left or earlier in the lifecycle process, the less chances or errors or failures. In simple words, it talks about identifying the bugs and errors at an early stage (Left side) and prevent them rather than solving them later (Right side). As we know “Prevention is always better than Cure”
The goal is to have a better quality application code, shorter testing cycles, lesser deployment time and a error-free Production environment. Let us admit , no-one wants unwelcoming surprises during a deployment and a unstable production environment, worst nightmare for a Devops team.

Left Shift in a Devops Way
So when we talk about “Shift Left” in a Devpos context, we normally refer to these Devops processes:
  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 “Left Shift testing” as well. Using Devops automation tools a “Shift Left” approach can have 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 do a “Left Shift”
There are many ways on how to implement a “Left Shift” 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 right understanding before even starting to code.
  2. Do not make too many frequent changes in your architecture, 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 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 a 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 env, or if possible a replica of the same (if budget permits)
  8. The continuous deployment tools, should again have another set of test-suite to run, before the final deployment happens.
By following the above pointers, we should be able to have “Shift Left” based Devops implementation, which will ensure that we are able to identify and fix any potential bug or error before deployment itself , and hence 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.

Comments

Popular posts from this blog

Docker Command Cheatsheet