What is Continuous Deployment in DevOps?
Our previous tutorial in this series explained the meaning of Continuous Delivery.
Continuous delivery is an automated deployment pipeline with automated and manual gates in between whereas Continuous Deployment is the continuous delivery pipeline with no manual gates in between.
Recommended Reading => DevOps Training with Text and Video Tutorials
So, Continuous Deployment need not be a ‘Release to Production’. But the code is deployed to the production and kept under mute using ‘Feature Toggles’ and when it is ready, the Feature toggle will be turned on.
These feature toggles avoid any risk of failure of the feature functionality in the production by switching OFF the deployed feature in the production.
This option also allows turning on the feature to a certain set of users or certain geography or a certain customer site or even for internal employees for initial evaluation and feedback.
VIDEO Part 3 Block 3: Continuous Deployment – 6 minutes 28 seconds
Video Transcript:
Just before the previous video, we learned about the continuous delivery approach and its benefits.
In this block let us learn about continuous deployment and how is it different from continuous delivery. And we will also understand the meaning of continuous testing and the continuous testing pipeline in DevOps.
Here, I wish to introduce another term of DevOps, that is, continuous Deployment, which should not be confused with continuous delivery because the short form of both is CD.
As we already know, Continuous delivery or CD is the Process of delivering the software or software Updates to the production in smaller increments, ensuring that the software can be released any time to the production.
It is an automated deployment pipeline with both automated and manual gates in between.
Now, let us come to Continuous Deployment.
Continuous deployment is also a continuous delivery pipeline but without any manual gates in between. I mean, no manual gates or no manual intervention, from the initial code commit till the code is into the production.
This picture will explain you the continuous deployment pipeline.
As you see in this diagram, it is same as a continuous delivery pipeline, there will be a build trigger followed by a code check-in, automated compilation, build, unit tests, deployment and other automates tests till the ‘deployment to the production’.
Here I won’t call this as ‘Release to production’ but deployment to production, which I’ll explain in a little while.
So, there are no manual testing phases or manual approval gates or in other words no manual intervention at all.
This happens mainly in a matured organization and in case of delivery or updates of matured products, where DevOps practices are established very well and hence just automated delivery pipeline is sufficient enough to take care of quality and no manual testing and quality gates are required.
However Feature toggles are necessary for Continuous deployment though present in both the methods, i.,e continuous delivery and continuous deployment, and they are must for Continuous deployment pipeline.
The feature toggles avoid any risk of failure of the feature functionality in the production by switching OFF the deployed feature in the production. So, this feature flag ensures that all the features that are deployed on to the production can be turned ON or OFF based on the requirement and hence need not be immediately released to the end users.
As quoted earlier, continuous deployment need not be necessarily a release to customers but a ‘deployment to production’. This option of continuous deployment is used in deploying certain time-bound features.
To give an Example, a value-added service offer of a mobile operator to the customers, during Christmas, can be deployed via continuous deployment method to production any time, so that the feature or value-added service package is kept ready on the live and opened up during Christmas or at midnight of the new year etc., through a feature toggle.
And this feature can be opened up in production during wee hours or sleeping hours and safely be turned on to the end users later during the day, after ensuring that it is working fine.
Basically, it’s like deploying the code/feature to the production, but not running the code until it is the right time or the team makes a decision to release the code or feature.
This option also allows turning on the feature to a certain set of users or certain geography or certain customer site or even for internal employees for initial evaluation and feedback.
People also refer to the DevOps practice as CI-CD model, where CD refers to continuous delivery, continuous deployment. And this is all about continuous deployment.
Suggested reading =>> Continuous Deployment With Pact CLI
In the upcoming video tutorial, we will learn about ‘continuous testing’ and continuous testing pipeline.