DevOps: CI/CD
Nisha Keswani
Consultant - Automation Developer@Capgemini | AICamp Community Manager | Tech Enthusiast |??2x Azure Certified | RedHat Linux Certified (RHCSA) | WomenTech Network Global Ambassador | Technical Content Creator | Ex-IBM
Well! If we closely look at the diagram of DevOps, It actually contains two automated process: Continuous Integration and Continuous Delivery/ Deployment.
Refer my first blog “DevOps: let the journey begin”?https://medium.com/@nishakeswani.keswani/devops-let-the-journey-begin-a6d3169dfd3d
Generally, Two teams work together to achieve the target i.e. developers team and operations team.
Let’s See, How it actually works!
Here , Different developers write their codes to create a software and keep them in a centralized repository which is known as?Version Control System(VCS).?Developers pull and push their codes multiple times on a regular basis from such repositories.
Let’s Suppose developers have written their code completely.
Now, Build server will fetch the code ,test and evaluate it which will generate the software artifacts.
These software artifacts will get packaged in some specific format like Zip/tar/exe/dll etc. and get stored in software repository from where it will be shipped to the servers for further testing.
Once the code pass the testing process, It is than shipped to the production server and that's how the whole process works!
Now, What if software testers find lot of bugs and errors in the code. What if it fails at build process itself and unable to create proper software artifacts? Developers took so much time to complete that code. Now this would be difficult for them to rewrite the code and resolve the issue.
Don’t you think this could have been much easier if the bugs and errors were detected at the early stage of the process? The solution to this is a very simple. Rather than waiting for the complete code , team can implement a continuous process that will take the code after every commit, built and test it and if find any error send back to the developer to re-commit with new code but as developers do this several times in a day, so it’s not possible to build, test & release every time manually.
Its better to automate the process!
So now whenever the developer commits any code and the automated process will fetch the code, build and test it and if finds any bug or error, it automatically send a notification to the developer. Than, he or she will fix the code and commit it again. If all seems good, then it will generate the artifact and store it in a software repository.
领英推荐
This automated process is called?continuous integration(CI).
Continuous Delivery(CD)?is also an automated process. Let’s see how!
Well, we have already seen in the CI process that every time developer commit the code it will be build and get tested automatically .The goal of CI is to detect defects in the beginning itself and smoothen the process.
Once artifacts get generated from CI, Ops team is requested to deploy those artifacts on servers for further testing and at times this deployment also fails, on which both the teams need to work together to fix the issues.
Deployment is not just about shipping the software to the servers. It’s actually more than that which include server provisioning, installation, configuration, networking etc.
After the manual deployment, information will be sent to the Quality assurance team for testing. There is too much of human intervention and manual work in this process.
So, Its better to automate it as well.
There are a lot of automation tools available in the market , like ansible, puppet, chef for system configuration, terraform for cloud infrastructure, Jenkins for CICD automation and many more.
Ops team will write automation code for deployment, testers will write automation code for software testing and sync it with developers source code.
So now we have a automated process where all three teams and processes are integrated together.
This is a?continuous delivery (CD).
Happy Learning :)