当前位置:网站首页>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
边栏推荐
- 思科模拟器简单校园网设计,期末作业难度
- Prometheus 2.28.0 新特性
- weserver发布地图服务
- 自主可控再下一城!首套国产ARTIQ架构量子计算测控系统发布
- LeCun用62页论文公布未来十年研究计划:AI自主智能
- Cvpr2022 𞓜 loss problem in weakly supervised multi label classification
- Repoptimizer: it's actually repvgg2
- iMile 利用 Zadig 多云环境周部署千次,跨云跨地域持续交付全球业务
- Deecamp2022 officially opened! Likaifu and zhangyaqin personally teach master courses 𞓜 innovation
- 维修记录导出的excel表格太大怎么办?
猜你喜欢

Acwing 234 abandoning testing

Create an API rapid development platform, awesome!

weserver发布地图服务

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

C language memory function

What if the excel table exported from the repair record is too large?

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

Server monitoring netdata panel configuring mail service

Lecun published a research plan for the next decade: AI autonomous intelligence with a 62 page paper

weserver發布地圖服務
随机推荐
Weserver publishing map service
LeCun用62页论文公布未来十年研究计划:AI自主智能
Openssl证书工具使用手册
B+ tree | MySQL index usage principle
Weserver Publishing Map Service
高校女生穿旗袍答辩!网友:导师说论文要是和旗袍一样漂亮就好了
Netdata data data persistence configuration
Cisco simulator simple campus network design, final assignment difficulty
#yyds干货盘点# 解决剑指offer:在二叉树中找到两个节点的最近公共祖先
C语言的指针详解
[untitled] error in installation dependency: refusing to install package with name "* * *" under a package
项目管理复习题
##Mondo Rescue制作镜像文件(有利于镜像损坏恢复)
The imshow function of Matplotlib displays grayscale images. Vmin and vmax2 parameters should be set
Prometheus 2.28.0 新特性
Force buckle: merging two ordered linked lists
AOSP ~ logcat persistence
Check yaml file security configuration: kubesec
Getting started with mybaits (including example tutorial and source code)
@Table burst red