DevOps Knowledge Points - 3C

2021-11-26 13:05:02
Jing
Original 3202
Summary : CI / CD are the two cornerstones of any DevOps operation. It is a way to develop software that aims to produce fast and powerful software and sustainably release updates at any time. When code is changed routinely, the development cycle becomes more frequent, meaningful, and faster. We can ensure that only known good code can become part of the software product through this process. Continuous Integration, Continuous Delivery, and Continuous Deployment constitute the 3C of DevOps. This article will be elaborated on the following aspects: Traditional Integration, Continuous Integration and Process, Continuous Delivery, Continuous Deployment, and 3C advantages.
CI / CD are the two cornerstones of any DevOps operation. It is a way to develop software that aims to produce fast and powerful software and sustainably release updates at any time. When code is changed routinely, the development cycle becomes more frequent, meaningful, and faster. We can ensure that only known good code can become part of the software product through this process.

Continuous Integration, Continuous Delivery, and Continuous Deployment constitute the 3C of DevOps. This article will be elaborated on the following aspects: Traditional Integration, Continuous Integration and Process, Continuous Delivery, Continuous Deployment, and 3C advantages.


1. Traditional Integration


In traditional integration, the team does not have any central build server. Source code can be stored in a central source code repository, but developers do not regularly commit changes. Sometimes before planning to release, developers may manually integrate changes, which will lead to many problems, such as last-minute conflicts caused by many developers integrating simultaneously or component failures caused by integration. Some disadvantages of traditional integration are as follows: Developers do not often incorporate code, Resulting in hidden dangers at the last moment, Slow feedback loop, The problem cannot be easily solved because many components need to be repaired, Difficult to deliver products on time, High-Cost. To overcome these problems, CI and CD came into being. They have many advantages from both technical and business perspectives.


2. Continuous Integration


Continuous integration is a development practice that requires developers to integrate code into a shared repository many times a day to avoid code conflicts. Each check-in is then validated by an automated build, allowing the team to identify problems early. This allows the team to spend less time backtracking and more time building new functionality. The concept here is that there are multiple developers on a project to keep the main branch of the resource library in the latest form of source code, so each developer can check out or extract from the latest code to avoid conflicts.


Integration Process

                                                                                                                                          Source: graph 1


Developers develop their capabilities in their specific branches and then push their new extensions to the collaborative repository. Automated unit and integration tests run and notify the team of errors and other code quality problems. Once the automatic test passes, the developer creates a pull request. Developers and reviewers can comment directly on changes submitted by developers to the main branch. After the review process is completed and the new code is merged into the main branch, the function development and error repair cycle will continue from the main branch of the integration. This usually happens multiple times a day within a team (especially a large team where everyone is dealing with many small tasks), which means everyone works on the same joint code base. This dramatically reduces the code differences and related problems caused by the lack of synchronization between functional developers.


3. Continuous Delivery


Continuous delivery is when code changes are automatically built, tested, and prepared for a release to the production environment. The software can be released to the production environment at any time. The continuously integrated code commits are further tested for performance and function until the release is approved. To perform continuous delivery effectively, strong continuous integration is required. If implemented correctly, developers will always have deployable build artifacts that have passed the standardized testing process. This process starts when the developer submits the code and ends after testing in the staging environment to deploy the code to the production environment. If any error or bug occurs during the automatic test, the CI tool will automatically inform the developer through any notification (such as e-mail or SMS). Continuous delivery usually involves a staging area similar to production, which needs to be manually accepted before publishing changes to production. Decisions released to the production environment are more business decisions than technical decisions.


4. Continuous Deployment


Continuous deployment is very similar to continuous delivery. The only difference is that all code submissions that pass the automated test phase will be automatically released to the production environment in constant deployment. Continuous deployment does not require any manual testing in the staging environment, as automated testing will be performed in all phases of the release. Both CDs rely on real-time infrastructure configuration and application monitoring tools to find problems that have not been found in the test feedback cycle due to the lack of manual verification before deployment.


Source: graph2


5. Benefits of 3C’s


1)  Risk Mitigation

Many developers face the problem that applications can run in a local environment but cannot run in the face of more advanced availability. This is because there may be many differences in the local environment and put into production. Some quality assurance tasks, such as browser testing, can reduce the risk of spreading bugs to the active site.

2)  Accelerate Time to Market

The application of continuous integration and delivery can enable the team to find and repair faults faster to improve the software release rate and accelerate the delivery speed.

3)   Single Source of Truth

All team members must use the same source repository to maintain their code. You can see what changes have been made to the code base and by whom.

4)   Improve Code Coverage

The CI server checks the test coverage for each build. No matter where you submit a new code of untested classes, the server will display errors because there is insufficient code coverage. Therefore, developers will strive to increase the range of low-level availability so that there will be no problems related to code coverage when deploying to higher-level availability.

5)   Quality: From Good to Excellence

Ci helps testers spend 50% of their total project time running nominal tests for integration, finding bugs, and other minor issues. This enables the test team to study problems more deeply, test more scenarios, and produce better overall quality and results.

6)   Less Backlog

Incorporating CI / CDs into the team's development process can reduce the number of non-critical defects in the backlog. These minor defects will be detected before production and repaired before releasing to end-users.

7)   User Satisfaction

Ci helps testers spend 50% of their total project time running nominal tests for integration, finding bugs, and other minor issues. This enables the test team to study problems more deeply, test more scenarios, and produce better overall quality and results.

8)   Reduce Friction Between Team Members

Ensure that code that works with multiple developers across multiple locations is permanently integrated into a shared repository. This avoids confusion caused by extensive and conflicting code submissions.


Conclusion

In today's rapidly changing competitive environment, developers are trying to quickly put their products on the market. Without an appropriate and straight forward process, it is almost impossible to release high-quality code. Therefore, the shift to continuous integration and continuous deployment will significantly change the software development process. It will simplify the whole process to help the team provide more stable, safer, and better products.


Reference


1.   Krishnagayathri Gopinath. Continuous Integration And Delivery [OL]. (2020-04-27)



Write a Comment
Comment will be posted after it is reviewed.