当前位置:网站首页>Cicd introduction [easy to understand]
Cicd introduction [easy to understand]
2022-06-29 13:47:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
CI/CD
CI/CD The emergence of has changed the way developers and testers release software .
Traditional software development and delivery methods are rapidly becoming obsolete . In the past agile Era , Most companies have a monthly software release cycle 、 Every quarter or even every year , And now DevOps Time , Once a week 、 Every day or even many times a day is normal . When SaaS( Software as a service ) This is especially true after becoming the mainstream of the industry , You can easily update your application dynamically , Instead of forcing users to download update components . A lot of times , Users won't even notice what's happening . The development team through the software delivery pipeline (Pipeline) Automation , To shorten the lead time , Most teams have automated processes to examine the code and deploy it to a new environment .
CI What is it? ?
Continuous integration
Definition : Frequently ( Many times a day ) Integrate the code into the trunk .CI It is a method of introducing automation To frequently deliver applications to customers .CI The core concept is continuous integration 、 Continuous delivery and continuous deployment . As a solution for development and operations teams ,CI It mainly aims at the problems caused by integrating new code ( Also known as “ Integrated hell ”).
Continuous integration emphasizes that after developers commit new code , Build immediately and automatically 、( unit ) test . According to the test results , We can determine whether the new code and the original code can be properly integrated .
The purpose of continuous integration
It's about making the product iterate quickly , At the same time, it can maintain high quality **.** Its core measure is , Before the code is integrated into the trunk , Must pass automated tests . As long as one test case fails , You can't integrate .
In the process of continuous integration, we attach great importance to automated test verification results , Early warning of possible problems , To ensure that there is no problem with the final merged code .
The role of continuous integration
- The more code inventory is overstocked , The less we can get production inspection , More backlog , The greater the probability of cross infection between codes , Next release (release) The higher the complexity and risk , Continuous integration can guarantee the quality of code submitted by team developers , Reduce the pressure of software release ;
- Any part of continuous integration is done automatically , No need for too much human intervention , It helps to reduce the number of repetitive processes to save time 、 Cost and workload ;
- Find problems in your code early , Solve as soon as possible , The earlier the code is pushed (PUSH) get out , The sooner users can use , Fast is the commercial value ;
characteristic
- It's an automated, periodic integration testing process , Check out code from 、 Compiling and constructing 、 Run the test 、 Result record 、 Test statistics, etc. are all done automatically , No manual intervention required ;
- A dedicated integration server is needed to perform integration builds ;
- Need to be supported by code hosting tools ;
CD What is it? ?
CI/CD Medium “CD” Refers to continuous delivery and / Or continue to deploy , These related concepts are sometimes used interchangeably . Both are related to the automation of the subsequent stages of the pipeline , But sometimes they are used alone , Used to illustrate the degree of automation .
Continuous delivery (Continuous delivery) refer to , Frequently put new versions of the software , Deliver to quality team or user , For review . If the review is passed , The code goes into production .
Continuous delivery can be seen as the next step of continuous integration . It emphasizes , No matter how it's updated , Software can be delivered anytime, anywhere . continued deliver It usually means that developers will automatically error test the application changes and upload them to the repository ( Such as GitHub Or container registry ), Then the operation and maintenance team will deploy it to the real-time production environment . This aims to solve the problem of poor visibility and communication between development and operation and maintenance teams . therefore , The goal of continuous delivery is to ensure that the amount of work required to deploy new code is minimized .
continued Deploy ( Another kind “CD”) It refers to automatically publishing developer changes from the repository to the production environment , For customer use . It is mainly to solve the problem that the manual process reduces the application delivery speed , So that the operation and maintenance team is overloaded . Continuous deployment is based on the advantages of continuous delivery , The automation of the subsequent stages of the pipeline is realized .
in the final analysis , We don't have to worry about the semantics , You just need to remember CI/CD It's actually a process ( It is usually expressed as a pipe ), It is used to realize high continuous automation and continuous monitoring in application development . It varies from case to case , The specific meaning of the term depends on CI/CD The degree of automation of the pipeline . Many companies start by adding CI, And then gradually automate delivery and deployment ( For example, as [ Cloud native application ] Part of ).
CICD Implementation process The assembly line in the factory is fast 、 automation 、 Produce consumer goods from raw materials in a repeatable way . Again , Software delivery pipeline to fast 、 Automated and repeatable way to generate releases from source . How to complete the overall design of this work is called “ Continuous delivery ”(CD). The process of starting an assembly line is called “ Continuous integration ”(CI). The process of ensuring quality is called “ Keep testing ”, The process of making the final product available to users is called “ Continuous deployment ”
Implementation process
1、 The operation and maintenance administrator creates gitlab project , establish Jenkins project
2、 The developers will code Submit to the corresponding gitlab in ( Can be triggered by Branch )
3、gitlab adopt webhook Trigger corresponding Jenkins project
4、 Get into CI link : take code Integrated into the standard docker In the mirror , And test ;
Successful integration and testing , Upload the integrated image to the warehouse ;
Integration or test failure , The end of this Jenkins, And send the reason to the developer and the operation and maintenance administrator by email .
5、 Get into CD link :
adopt Ansible take CI The successfully integrated image is deployed to all defined machines , And test .
If the test passes, complete the deployment , If the test fails, it will determine whether the project is deployed for the first time ;
If the project is not deployed for the first time , Roll back to the previous version of the container , And send the reason to the operation and maintenance administrator by email .
If the test fails, it will determine whether the project is deployed for the first time ;
If the project is not deployed for the first time , Roll back to the previous version of the container , And send the reason to the operation and maintenance administrator by email .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/132370.html Link to the original text :https://javaforall.cn
边栏推荐
- [system design] proximity service
- [graduation season] it's worth it all the way over the past four years -- advice from the senior students
- Cisco simulator simple campus network design, final assignment difficulty
- Gee - American landfire fire fire data set
- 韩国AI团队抄袭震动学界!1个导师带51个学生,还是抄袭惯犯
- matplotlib的imshow函数显示灰度图像要设置vmin和vmax2个参数
- 项目管理复习题
- sqlite3入门
- Learn from the official motor and BLDC control strategies, and make money as soon as you learn
- koa2+better-sqlite3实现增删改查
猜你喜欢

Three best practices help enterprises improve supply chain security

在线文本过滤小于指定长度工具

Weserver Publishing Map Service

Technology sharing | broadcast function design in integrated dispatching

华为机器学习服务语音识别功能,让应用绘“声”绘色

Leetcode game 299

Another "provincial capital university", coming!

Deecamp2022 officially opened! Likaifu and zhangyaqin personally teach master courses 𞓜 innovation

【无标题】安装依赖报错:Refusing to install package with name “***“ under a package

mysql调优
随机推荐
AOSP ~ initialization language
Deecamp2022 officially opened! Likaifu and zhangyaqin personally teach master courses 𞓜 innovation
Create an API rapid development platform, awesome!
Package folders as ISO
Hundreds of CVPR people were recruited as new champions. Emoji became a "court witness". M2 MBP was exposed that the hard disk speed was reduced. Today, more big news is here
Horizon development board configuration network segment
Solution to inconsistency between RTC time and world time on the server
How to set the safety line and safety margin for futures trading?
Win32 Tetris (essential for learning MFC)
编写一个shell脚本,求一个数的”逆序数“
win32版俄罗斯方块(学习MFC必不可少)
Pod security policy (PSP)
Getting started with SQLite3
sqlite3入门
June training (day 29) - divide and rule
Another "provincial capital university", coming!
Why is the integration of storage and computing a new direction of core making Collision school x Zhicun Technology
Prometheus 2.28.0 新特性
【毕业季】这四年一路走来都很值得——老学长の忠告
Notimplementederror: numpy() is only available when Eagle execution is enabled