In this article – “What is Continuous Delivery – Big Picture”, I will walk you through the second phase of CI & CD culture i.e., what is continuous delivery, its principles, and the benefits.
This article is in continuation of the previous article – What is Continuous Integration, where we discussed continuous integration culture, its principles, and benefits.
I would suggest you go through the continuous integration article before moving ahead. You can easily understand continuous delivery, only when you know what continuous integration is.
This way of working with Continuous Integration and Continuous Delivery is commonly known as DevOps. These concepts are the basis of DevOps culture.
Here, in Continuous Delivery, I will proceed with the discussion on below topics
- Understanding the Typical Process Again
- Identify the Improvement Area
- What is Continuous Delivery
- Release Pipeline
- Infrastructure as a Code (IAC)
- CI & CD Culture Together
- Continuous Delivery (CD) vs Continuous Deployment (CD)
- Continuous Delivery Principles
- Benefits of Continuous Delivery
You know the traditional process for developing and integrating the code to the central repository. You also know how continuous integration concept helps you to improve the process.
Now, we need to explore what happens after the code is integrated and built. This is the time when the operation team comes into the picture.
Understanding the Typical Process Again
Let’s understand the traditional operation and delivery process, to identify the need for continuous delivery.
Software development teams create software for particular software modules. They run & validate their piece of code into feature branches in source control.
The integration team or build engineer merge these branches for the different modules into the master branch in version control.
This integration happens once in every iteration let’s say of a couple of weeks or months.
Integration team builds the code, and create a release as well as installation guide to the operations team.
The operations team follow the guide and install the software into multiple environments manually.
Identify the Improvement Area
In the above operation process, there are many steps that we can improve using continuous delivery.
The operations team gets a list of the installation guide. They follow the instructions to deploy the software in different environments manually.
Most of the time, these instructions aren’t 100% correct. May not make clear meaning to the people who are following those instructions.
The software may behave differently because instructions are interpreted differently.
You may also see slight variations in all of the environments. Because the different members of the operation team manage the different environments.
Eventually, deployments will take a long time and produce error-prone delivery.
The continuous delivery concept is here to solve these issues and improve the delivery process.
What is Continuous Delivery – Big Picture
Now you know what you can improve, let’s see if we can do so with continuous delivery and improve the operation process.
Continuous Delivery says:Continuous Delivery (CD) is a software operation discipline where you CAN deliver the software to the production at any point in time.Click To Tweet
Implementing Continuous Delivery
Traditionally, the operations team gets the installation steps from the integration team. They follow the instructions to deploy the software in different environments manually.
This happens at the end of each iteration.
Like we discussed, in continuous integration, developers design and build the code and merge it to the main line at least once in a day.
In continuous delivery, we take the software and process it into a ‘Release Pipeline’.
1. Release Pipeline
To implement continuous delivery, you need to design ‘release pipeline’, the way you have created ‘automated build pipeline’ in continuous integration.
To do so, you need to write an automated script to create or update the environment, and infrastructure using PowerShell or any other tool.
Alternatively, you can also use Docker Container Technology to create environments very quickly.
Additionally, you also need to design an automated code to perform the steps from the installation guide.
These automated steps perform different activities and deploy the software to different environments like QA, DEV, etc automatically.
With this approach, all of your environments would be the same, without any differences. Environments would not take a long time and will be error free.
2. Infrastructure as a Code (IAC)
Like development team commits their code to the central repository, the operation team should also commit their infrastructure code and configurations (automated step to create an environment and deploy the software) to a central repository along with developers code.
Here, developers and operations team need to work together for the same goals.
CI & CD Culture Together
Now, the code for infrastructure and the software both are in central source control (SCM).
The ‘automated build pipeline’ pulls the latest code from the SCM, compiles it, and perform testing with automated tests.
Next, ‘release pipeline’ picks up the result and perform operation’s tasks like setting up the infrastructure, create or update environments, on multiple servers.
Moreover, there is one separate team you can call them “quality assurance team”. They perform more tests that can’t be executed automatically in build pipeline and release pipeline.
Based on the final result, this team takes a call to release the software to the production environment for the end users.
It is important to note that build pipeline is completely automated whereas release pipeline is partially automated.
In continuous delivery, releasing the software to the production is always a manual decision.
Continuous Delivery Principles
- Should have continuous integration in place: Continuous delivery works effectively only when continuous integration is already in place.
- Different teams should work together: Operation team and development team should work together to make the continuous delivery process successful.
- Infrastructure as a code (IaC): You should treat your infrastructure as a code artifact like we treat development artifacts.
- Automate release process: Release pipeline should be automated as much as possible like creating an environment, installing software to multiple environments including production, and running acceptance tests on stage or production environments.
- On-demand release: Everything in the release pipeline is on demand, where we decide carefully to release anything to any environment.
Benefits of Continuous Delivery
- Releases take fewer efforts: Releasing software takes much fewer efforts as steps are automated by keeping control on the process.
- Frequent releases: Because steps are automated, which speeds up the whole process, resulting frequently release.
- Reduced Feedback Cycle: Developers and Operations will get feedback so frequently, as releases are happening quite often.
I hope this article helped you to understand Continuous Delivery (CD) Culture and how CI-CD together help us to achieve High Quality, Faster Delivery, Lower Price, and More Flexibility.
CI-CD is like a backbone of development and delivery process. Every other thing in the DevOps just revolves around these concepts only.
Let me know if you have any questions or you face any issue while implementing CI & CD in your project.
Share your thoughts in the comment section.
Do you know someone who can benefit from the information in the article? Share it with them on Facebook, LinkedIn, Twitter or Google Plus.
For Further Reading :
- What is Continuous Integration – Big Picture
- How Automated Testing Tools Work
- Are You a Technical Tester?
- How to Learn Automation Testing Easily