当前位置:网站首页>[cloud native] what is ci/cd| Ci/cd to smooth delivery obstacles
[cloud native] what is ci/cd| Ci/cd to smooth delivery obstacles
2022-07-28 21:09:00 【Digital China cloud base】
【 Cloud native 】 What is? CI/CD ?| Common problems in software delivery
In the first article , We learned some common practices in the software delivery process , And a series of problems caused by them . These problems have become a stumbling block for software delivery , How to solve these thorny problems ,CI/CD Gives a satisfactory answer , Helped us smooth out one obstacle after another on the road .

Smooth delivery obstacles CI/CD
that CI/CD What is it ?
What is? CI/CD
Simply speaking ,CI/CD The core idea of is to deploy an automated pipeline , Specifically, it refers to the implementation of the application from building 、 Deploy 、 Automation of the whole process from test to release . Combine highly automated testing and deployment with comprehensive configuration management , Realize one click software release . in other words , We just need to click the mouse , The software can be deployed to any target environment , Including development environment 、 Test environment or production environment .
Because the process details of software delivery in each organization may be different , Therefore, it will be different in the specific practice of assembly line , But the principle behind it is always the same . Here is a simple example of deployment pipeline , To illustrate its general working mode .

A simple pipeline example
First , The working feature of this assembly line is , Each change will automatically trigger the creation of a new pipeline instance , For example, the application configuration changes 、 Source code 、 Changes in environment or data .
One of the first steps in the pipeline is to create binaries and installation packages , The rest is a series of tests based on the products of the first step , Used to prove that it meets the release quality . Every step you pass , I will trust these binary files more 、 Configuration information 、 The special combination of environment and data can work normally . If this product passes all the tests , Then it can be released .
Then after understanding CI/CD After the basic idea of , For the above ( What is? CI/CD ?| Common problems in software delivery ) Some common problems listed in ,CI/CD And how to solve it ?
Solutions to common problems
1. Manually deploy software
The common problem of manually deploying software is that it is easy to make human errors . To avoid this problem , A reasonable and necessary approach is to automate deployment , namely CI/CD. Why do you say CI/CD be necessary , This is because it is not achieved CI/CD It will inevitably lead to the following series of problems :
- If the deployment process is not fully automated , Then every time you deploy It's hard not to make mistakes , Even with good deployment testing , There are some Mistakes are also difficult to trace , So the problem of every deployment is “ Whether the error is serious or not ” nothing more .
- If the deployment process is not automated , Then it is Neither repeatable nor reliable , Thus, we waste a lot of time in the process of debugging deployment errors .
- If the deployment process is not automated , Then the deployment process has to be written in the document , Here will be The problem of document maintenance . Document maintenance is a complex and time-consuming task , It involves collaboration among many people , Therefore, documents are usually either incomplete , Or it is not updated in time , As a result, the deployment work often cannot be carried out smoothly . Take a set of Automated Deployment scripts as documents , It will always be up-to-date and complete .
- If the deployment process is not automated , Then the document is usually just a memo for the implementation deployer , It is difficult to be understood by others . And Automated Deployment essentially encourages collaboration , Everything is in one script , Cover all at one glance .
- If the deployment process is not automated , The manual deployment process often Rely on deployment experts . Once deployed personnel leave or leave , It will cause great trouble .
- If the deployment process is not automated , Then we can't give full play to the professional value of more operation and maintenance deployment experts . Although manual deployment is boring and highly repetitive , But a considerable degree of expertise is still needed . It's boring to ask experts to do this 、 repeat , But for tasks with technical requirements, there must be various human errors . However, automated deployment can bring those high-cost senior high-tech personnel Liberate from overwork , Let them devote themselves to higher value work activities .
- If the deployment process is not automated , The only way to test the deployment process is to do it intact ( Or several times ), This often Time consuming , It will also cause High money costs , The deployment process of test automation is both cheap and easy .
- If the deployment process is not automated , Manually deployed Scripts are more difficult to audit , Because for a manual process , No one can guarantee that its executors will follow the document very strictly , Automated deployment is completely auditable .
- If the deployment process is not automated , Then we The success rate of actual deployment cannot be guaranteed . And if you implement automated deployment , Use the same script to deploy the software to various environments , When it is necessary to deploy to the production environment on the day of release , This script has been validated hundreds of times . If there are any problems with the release , We can be 100% sure that it is the specific configuration of the environment , It's not about deploying scripts .
2. Deploy to class production environment after development
Deploy to class production environment after development , This practice often leads to a series of problems , For example, new defects are not found until the application is deployed to the trial run environment , It was found that there were wrong assumptions about the production environment in the system design , Another example is the lack of collaboration between the development team and the people who actually perform deployment tasks .
To address these issues ,CI/CD Our countermeasure is Will test 、 Deployment and release activities are also included in the development process , Make them a normal part of the development process . In this case , When the system is ready for release, there is little or no risk , Because we have been in many environments , It has even been repeated many times in similar production environments , It's equivalent to having been tested many times . And to do this, it emphasizes that all teams should work closely together , Everyone needs to be part of this software delivery process , Whether it's building a publishing team 、 Or developers and testers , All need to work together from the beginning of the project .
3. Manual configuration management of production environment
The problem of manually managing configuration is also that it is very error prone , Too many configuration details may make mistakes , We cannot fully grasp any configuration information of the production environment , You cannot repeatedly create every infrastructure on which the developed application depends . On the contrary , We hope to have the following abilities :
- We should have Record or test changes The ability of . There will be some changes at the end of almost every release , For example, modify the login account of the database or update the external services used URL. We should use some method to introduce such changes , So that these changes can be recorded and tested .
- We should be Fully grasp any information in the production environment The ability of . Every change in the production environment should be recorded , And it can be consulted in the future . Deployment failures are often caused by someone patching the production environment during the last deployment , But this modification was not recorded .
- We should have Rebuild the production environment The ability of .
- We should also be able to make mistakes in deployment , Through the same automated process, the system Roll back To the previous version .
To achieve these goals ,CI/CD Our approach is to integrate configuration management into an automated process , For the test environment 、 All aspects of the commissioning environment and production environment , In particular, the configuration of any third-party elements in the system , Version control should be carried out through an automated process , This means the operating system 、 patch level 、 Operating system configuration 、 Other software and its configuration that the application depends on 、 The configuration of infrastructure is under control . Changes will first be submitted to the version control system , Then update the production environment through an automated process .
in fact , The problems listed above are only part of many problems in the delivery process , In the final analysis, the problem we are trying to solve is the problem of software delivery , That is, how to be efficient 、 Fast 、 Deliver high-quality and valuable software reliably . If the most fundamental problem is solved , Then all the problems behind it will be solved . In the next article in this series , We'll see CI/CD How to specifically solve this source problem .
reference :Jez HumBle,David Farley,《 Continuous delivery —— A systematic approach to distributing reliable software 》
( Some pictures are from the Internet , If there is any infringement , Delete... Now )
边栏推荐
- Interpretation of ue4.25 slate source code
- 什么是 CI/CD? | 实现更快更好的软件交付
- 【云原生】什么是 CI/CD ? | 摆平交付障碍的 CI/CD
- Confusing knowledge points of software designer examination
- MoCo V1:视觉领域也能自监督啦
- Jiuxin intelligence officially joined opengauss community
- (转)冒泡排序及优化详解
- Eureka registers with each other, only showing each other or only showing problems in one
- Random talk on GIS data (VI) - projection coordinate system
- Laser slam:logo-loam --- code compilation, installation and gazebo test
猜你喜欢

Space shooting Lesson 11: sound and music

Explain the camera in unity and its application

Confession of a graduate student: why am I addicted to opengauss community?

Explain prefabrication in unity in detail

数据库--explain的使用

How to build a foreign environment for the self-supporting number of express evaluation? How much does it cost?

MoCo V1:视觉领域也能自监督啦

Guo Mingxuan: meta contraction is conducive to the development of VR competitors, and apple XR headshow will change the industry rules

【周周有奖】云原生编程挑战赛“边缘容器”赛道邀你来战!

DeiT:注意力Attention也能蒸馏
随机推荐
广和通&高通物联网技术开放日成功举办
什么是“安全感”?沃尔沃用它自己独特的理解以及行动来告诉你
SSM-使用@Async和创建ThreadPoolTaskExecutor线程池
It is not only convenient, safe + intelligent, but also beautiful. Fluorite releases the Big Dipper face lock dl30f and Aurora face video lock y3000fv
mfc wpf winform(工业用mfc还是qt)
C # basic 3-value type and reference type, packing and unpacking
Looking at SQL optimization from the whole process of one query
使用缓冲的方式采集视频
向往的开源之多YOUNG新生 | 从开源到就业的避坑指南来啦!
Explain the camera in unity and its application
MySQL sorts out the review content -- with mind map
Confession of a graduate student: why am I addicted to opengauss community?
3D laser slam: Interpretation of logo-loam paper - Introduction
Link with bracket sequence I (state based multidimensional DP)
程序员最大的浪漫~
【input 身份证号】星号 代替,input 切割成 多个 小格格(类似)
MobileViT:挑战MobileNet端侧霸主
Eureka相互注册,只显示对方或只在一个中显示问题
Zcmu--5066: dark corridor
ctfshow 网络迷踪做题记录(2)