DevOps: What Is Continuous Integration, Continuous Deployment and Continuous Delivery

Saptadip Sarkar
Techno Tales
Published in
8 min readMay 25, 2018

If you are an IT professional then I believe there is no need to introduce you to the term “DevOps”, as you already know how it is changing the way the software companies had been working for so many years. To work in DevOps model, the very first thing is to clearly understand the concept and basic differences between “Continuous Integration”, “Continuous Deployment” and “Continuous Delivery”.

So first I will define each of these terms and then try to give some real life examples, so that it can be easy for the readers to co-relate them in practical life. Please remember that the real life examples I have used here is just to clarify the basic understanding of CI-CD concept in simple terms. In reality it has no relation with the actual CI-CD pipelines that are used by DevOps teams in a modern IT company.

Continuous Integration

Continuous Integration(CI) is a way to increase code quality without putting any extra burden on the developers by ensuring the testing of each code change is done to the codebase automatically and as early as possible. Continuous automated tests and checks of the code are handled on a (CI)server and the results are automatically reported back to developer. This gives confidence to the developer to experiment, implement new features, and ship updates “quickly”.

Continuous Deployment

Continuous Deployment(CD) is the process where every change that passes the automated tests is deployed to production “automatically”.

Continuous Delivery

Continuous Delivery(CD) is a series of practices designed to ensure that code can be rapidly and safely deployed to production by delivering every change to a production-like environment and ensuring business applications and services function as expected through rigorous automated testing. Since every change is delivered to a staging environment using complete automation, we can have confidence the application can be deployed to production with a push of a button when the business is ready.

So in simple words:

Continuous Delivery is an approach which incorporates the concepts of Continuous Integration, Automated Testing and Continuous Deployment.

The difference between Continuous Delivery and Deployment is that business teams may decide not to release software into production with continuous delivery due to various reasons.

While Continuous Deployment may not be right for every company, Continuous Delivery is an absolute requirement of DevOps practices. Only when we continuously deliver our code, we can have true confidence that our changes will be serving value to our customers within minutes of pushing the “go” button, and that we can actually push that button any time the business is ready for it.

Real Life Example

Let’s say you are a school going kid. Your class teacher gives you an assignment which consist of two parts: One Mathematical problem and one English essay.

For sake of simplicity, you can think:

Yourself as ‘Developer

Your teacher as ‘Client

The Assignment as ‘Code’ or ‘Software’ to deliver

So you first finish your math activity and ask your parents to verify it before you submit it to your teacher. After inspection, your parents found that your solution was incorrect, as you used a wrong formula to solve it.

After getting feedback from your parents, you rectify the mistake and solve the problem again. Then you ask your parents to check it again and this time they confirmed that it is all perfect.

So in the above example, your parents effectively played the role of a Continuous Integration(CI) server. The over all process can be visualized as below:

  1. Code Build: Defining and implementing steps to solve the problem.
  2. Generate Trigger: Asking parents to check the problem solution.
  3. Testing: Parents check the problem solution.
  4. Notification: Parents provide feedback.
  5. Decision: If parent’s feedback is positive, then the result is ready to be submitted to the teacher. If the feedback is negative, then repeat the steps starting from 1.

So following the above process helps you to avoid certain situations that could have arose in case you had submitted the ‘first’ solution to your teacher, before consulting your parents. For example, you avoid:

In the same way, implementing Continuous Integration in software delivery model helps developer to improve code quality and also ensures that any existing bug is reported at a very early stage of the development cycle so that it is easy and quick to fix. This also helps to improve credibility of the developer after the code or product is delivered to client.

Now let’s try to understand what is Continuous Deployment(CD).

After you finished solving the maths problem, you go to school and submit the results to your class teacher. Then you come back home and start working on second part of the assignment i.e. writing English essay. After finish writing, you again ask you parents to do the preliminary checks(CI) and when you are satisfied with their feedback, you go to school and submit the essay to your teacher.

For sake of understanding you can think of the above process as an example of “Continuous Deployment”. Point to note here is that “Continuous Deployment” cannot be achieved without implementing “Continuous Integration”. So the overall process flow can be visualized as below:

  1. Code Build: Defining and implementing steps to solve the problem.
  2. Generate Trigger: Asking parents to check the problem solution.
  3. Testing: Parents check the problem solution.
  4. Notification: Parents provide feedback.
  5. Decision: If the feedback is negative, then repeat the steps starting from 1. If parent’s feedback is positive, then follow the below steps.
  6. Deployment Preparation: Check if your name and roll number is properly written on the assignment copy, check if you have written a proper preface relevant to the assignment activity etc.
  7. Deployment: Go to school, submit the assignment and return home.
  8. Repeat: Repeat all the steps above for the second assignment activity i.e writing English essay.

Apart from the benefits of “Continuous Integration” described earlier, implementing “Continuous Deployment” has many additional benefits like:

Similarly, in Continuous Deployment you release small amounts of code at a time. So it’s easier to discover any problems and fix them quickly. It also enable us to have far less work-in-process items since now we would thin-slice some work and deploy it. You can also add valuable improvements and fixes to your code very quickly based on the client feedback as the scope of each deployment is limited.

Lastly, let us see how Continuous Delivery(CD) works and how it is different from Continuous Deployment.

Suppose you have finished working on the first part of your assignment, which is solving the mathematical problem. The solution is tested and verified by your parents and is ready to be submitted to your teacher. But you come to know that your teacher is busy this week in making the arrangements for the school annual function which is scheduled to be organized over the weekend. And adding to that you also come to know that your teacher will go on a planned vacation leave next week. So only option you have now is to wait for two weeks and then submit the first part of your assignment. But to effectively utilize these two weeks, you start working on the second part of the assignment i.e. writing the English essay. So by middle of next week, you complete the essay and get it thoroughly checked by your parents. Now when you finished both the activity of your assignment, you wait for your teacher to return from vacation. So after she join the school, you submit your complete assignment containing both mathematical problem solution and the English essay.

So you can consider this as a typical example of “Continuous Delivery” where you keep working on developing a product on an incremental basis by following the guidelines of Agile software development. But the final release to the production is done when the client or business is ready for it. In a nutshell, the overall process can described as below:

  1. Code Build: Defining and implementing steps to solve the problem.
  2. Generate Trigger: Asking parents to check the problem solution.
  3. Testing: Parents check the problem solution.
  4. Notification: Parents provide feedback.
  5. Decision: If the feedback is negative, then repeat the steps starting from 1. If parent’s feedback is positive, then follow the below steps.
  6. Deployment Preparation: Check if your name and roll number is properly written on the assignment copy, check if you have written a proper preface relevant to the assignment activity etc.
  7. Decide When To Deploy: Check if your class teacher is available. If yes, then submit the assignment activity. If no, then directly go to step 8.
  8. Repeat: Repeat all the steps above for the second assignment activity i.e writing English essay.

In addition to the benefits of “Continuous Integration” and “Continuous Delivery” as described earlier, one of the main reason why “Continuous Delivery” is beneficial in the above case is:

So we can say that Continuous Delivery decreases the time required for bringing changes into production. This generates a substantial benefit on the business end as it becomes much easier to react to changes of the market.

So I hope after reading this article now you have the basic understanding of Continuous Integration, Continuous Deployment and Continuous Delivery. In this article, I tried to describe only a few benefits of using CI-CD pipelines so that the topics are easy to grasp for the beginners. But there are many more advantages of using CI-CD pipelines in an organizations which works in DevOps model that I will explain in some of my future articles.

In case you like this article, please don’t forget to click the “ Clap” button. Also feel free to provide your feedback in the comment section below. You can also follow my publication Techno Tales to read more interesting technology related articles in future.

--

--

Saptadip Sarkar
Techno Tales

Technology enthusiast. Always learning how to make new things with the latest tech.