CN111427605B - Docker-based distributed code automatic update deployment method and system - Google Patents
Docker-based distributed code automatic update deployment method and system Download PDFInfo
- Publication number
- CN111427605B CN111427605B CN202010539935.2A CN202010539935A CN111427605B CN 111427605 B CN111427605 B CN 111427605B CN 202010539935 A CN202010539935 A CN 202010539935A CN 111427605 B CN111427605 B CN 111427605B
- Authority
- CN
- China
- Prior art keywords
- test
- node
- code
- production environment
- docker
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 15
- 238000012360 testing method Methods 0.000 claims abstract description 237
- 238000004519 manufacturing process Methods 0.000 claims abstract description 132
- 238000011161 development Methods 0.000 description 6
- 238000007726 management method Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000010354 integration Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 244000035744 Hura crepitans Species 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3698—Environments for analysis, debugging or testing of software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
技术领域technical field
本发明涉及软件代码的更新部署技术领域,特别涉及一种基于docker的分布式代码自动更新部署方法及系统。The invention relates to the technical field of software code update and deployment, in particular to a docker-based distributed code automatic update and deployment method and system.
背景技术Background technique
随着云计算的快速发展,容器技术也日趋成熟,并且越来越在各领域应用越来越广泛,在平时的开发或日常的部署中,我们传统的项目管理往往是通过git或svn手动提交代码到服务器,然后再由运维人员手动同步最新版本的代码到生产环境,该传统项目管理存在以下缺点:1、项目代码与生产环境处于同一个服务器,只要生成服务器宕机,生成环境立即访问不了;2、存在人工提交代码与更新代码的人工操作,认为失误率比较高;3、更新代码时会存在服务中断的情况,影响生产环境使用。With the rapid development of cloud computing, container technology is becoming more and more mature, and it is becoming more and more widely used in various fields. In normal development or daily deployment, our traditional project management is often submitted manually through git or svn The code is sent to the server, and then the operation and maintenance personnel manually synchronize the latest version of the code to the production environment. This traditional project management has the following disadvantages: 1. The project code and the production environment are on the same server. As long as the generation server is down, the generation environment will be accessed immediately No; 2. There is manual operation of manually submitting code and updating code, and it is considered that the error rate is relatively high; 3. There will be service interruption when updating code, which will affect the use of the production environment.
发明内容SUMMARY OF THE INVENTION
本发明要解决的技术问题在于,提供一种基于docker的分布式代码自动更新部署方法及系统,引入docker容器技术还有分布式存储,并且利用多节点更新切换,实现对项目代码更新时做到无感知无缝更新切换,并且代码与生成环境服务器进行分离,使环境更加稳定安全。The technical problem to be solved by the present invention is to provide a docker-based distributed code automatic update deployment method and system, introduce docker container technology and distributed storage, and use multi-node update and switch to realize the update of project code. Unaware seamless update switching, and the code is separated from the generation environment server, making the environment more stable and secure.
为解决上述技术问题,本发明提供如下技术方案:一种基于docker的分布式代码自动更新部署方法,包括以下步骤:In order to solve the above-mentioned technical problems, the present invention provides the following technical solutions: a docker-based distributed code automatic update deployment method, comprising the following steps:
S1、将第一NFS存储单元中的GIT版本管理器挂载到测试环境docker节点;S1. Mount the GIT version manager in the first NFS storage unit to the test environment docker node;
S2、GIT版本管理器接收测试代码,并将测试代码发送至测试环境docker节点进行测试;S2, the GIT version manager receives the test code and sends the test code to the test environment docker node for testing;
S3、测试环境docker节点将通过测试的测试代码反馈给GIT版本管理器;S3. The docker node of the test environment will feed back the test code that has passed the test to the GIT version manager;
S4、GIT版本管理器将通过测试的测试代码同步推送至第二NFS存储单元的第一稳定代码节点和第二稳定代码节点;S4, the GIT version manager synchronously pushes the test code that has passed the test to the first stable code node and the second stable code node of the second NFS storage unit;
S5、将第二NFS存储单元中第一稳定代码节点和第二稳定代码节点分别挂载到第一生产环境docker节点、第二生产环境docker节点;S5, mount the first stable code node and the second stable code node in the second NFS storage unit to the first production environment docker node and the second production environment docker node respectively;
S6、网关入口把访问流量全部先切换到第二生产环境docker节点;S6. The gateway entrance switches all the access traffic to the second production environment docker node first;
S7、第一稳定代码节点将通过测试的测试代码挂载至第一生产环境docker节点;S7, the first stable code node mounts the test code that has passed the test to the first production environment docker node;
S8、第一生产环境docker节点接收通过测试的测试代码并进行更新后,S8. After the docker node of the first production environment receives the test code that passes the test and updates it,
网关入口将访问流量切换到第一生产环境docker节点;The gateway entry switches the access traffic to the first production environment docker node;
S9、第二稳定代码节点将通过测试的测试代码挂载至第二生产环境docker节点,第二生产环境docker节点接收通过测试的测试代码并进行更新;S9, the second stable code node mounts the test code that passed the test to the docker node of the second production environment, and the docker node of the second production environment receives the test code that passed the test and updates it;
S10、网关入口均重新开启第一生产环境docker节点、第二生产环境docker节点进行访问流量的连接,通过测试的测试代码更新部署结束。S10 , the gateway entrance both reopens the first production environment docker node and the second production environment docker node to connect the access traffic, and the test code update and deployment that passes the test ends.
具体的,所述步骤S3还包括:测试环境docker节点将没有通过测试的测试代码反馈给GIT版本管理器;Specifically, the step S3 further includes: the test environment docker node feeds back the test code that fails the test to the GIT version manager;
GIT版本管理器将没有通过测试的测试代码同步推送至第二NFS存储单元的第一稳定代码节点和第二稳定代码节点;The GIT version manager synchronously pushes the test code that fails the test to the first stable code node and the second stable code node of the second NFS storage unit;
将第二NFS存储单元中第一稳定代码节点和第二稳定代码节点分别挂载到第一生产环境docker节点、第二生产环境docker节点,并将没有通过测试的测试代码同步推送到第一生产环境docker节点和第二生产环境docker节点,没有通过测试的测试代码更新部署结束。Mount the first stable code node and the second stable code node in the second NFS storage unit to the first production environment docker node and the second production environment docker node, respectively, and push the test code that fails the test to the first production synchronously For the environment docker node and the second production environment docker node, the test code update deployment that does not pass the test ends.
具体的,所述步骤S3中,测试环境docker节点将通过测试的测试代码通过CICD流水线反馈给GIT版本管理器;Specifically, in the step S3, the test environment docker node feeds back the test code that has passed the test to the GIT version manager through the CICD pipeline;
所述S4中,GIT版本管理器通过CICD流水线将通过测试的测试代码同步推送至第二NFS存储单元的第一稳定代码节点和第二稳定代码节点。In the S4, the GIT version manager synchronously pushes the test code that has passed the test to the first stable code node and the second stable code node of the second NFS storage unit through the CICD pipeline.
具体的,所述测试环境docker节点将没有通过测试的测试代码通过CICD流水线反馈给GIT版本管理器;Specifically, the test environment docker node feeds back the test code that fails the test to the GIT version manager through the CICD pipeline;
GIT版本管理器将没有通过测试的测试代码通过CICD流水线同步推送至第二NFS存储单元的第一稳定代码节点和第二稳定代码节点;The GIT version manager synchronously pushes the test code that fails the test to the first stable code node and the second stable code node of the second NFS storage unit through the CICD pipeline;
将第二NFS存储单元中第一稳定代码节点和第二稳定代码节点分别挂载到第一生产环境docker节点、第二生产环境docker节点,并将没有通过测试的测试代码通过CICD流水线同步推送到第一生产环境docker节点和第二生产环境docker节点。Mount the first stable code node and the second stable code node in the second NFS storage unit to the docker node of the first production environment and the docker node of the second production environment, respectively, and push the test code that does not pass the test to the CICD pipeline synchronously. The first production environment docker node and the second production environment docker node.
本发明另一目的是提供一种基于docker的分布式代码自动更新部署系统,包括第一NFS存储单元、第二NFS存储单元、测试环境单元、线上生产环境单元以及网关入口单元,所述第一NFS存储单元包括GIT版本管理器,所述第二NFS存储单元包括第一稳定代码节点模块和第二稳定代码节点模块,所述测试环境单元包括测试环境docker节点模块,所述线上生产环境单元包括第一生产环境docker节点模块和第二生产环境docker节点模块;Another object of the present invention is to provide a docker-based distributed code automatic update and deployment system, including a first NFS storage unit, a second NFS storage unit, a test environment unit, an online production environment unit, and a gateway entry unit. An NFS storage unit includes a GIT version manager, the second NFS storage unit includes a first stable code node module and a second stable code node module, the test environment unit includes a test environment docker node module, and the online production environment The unit includes a first production environment docker node module and a second production environment docker node module;
所述第一NFS存储单元用于将其GIT版本管理器挂载到测试环境docker节点模块;The first NFS storage unit is used to mount its GIT version manager to the test environment docker node module;
所述GIT版本管理器用于接收测试代码,并将测试代码发送至所述测试环境单元的测试环境docker节点模块;The GIT version manager is used to receive the test code, and send the test code to the test environment docker node module of the test environment unit;
所述测试环境docker节点模块用于对测试代码进行测试,并确认测试代码是否通过测试;The test environment docker node module is used to test the test code and confirm whether the test code passes the test;
所述测试环境docker节点模块还用于将通过测试的测试代码反馈给所述GIT版本管理器;The test environment docker node module is also used to feed back the test code that has passed the test to the GIT version manager;
所述GIT版本管理器还用于将通过测试的测试代码同步推送至所述第二NFS存储单元的第一稳定代码节点模块和第二稳定代码节点模块;The GIT version manager is further configured to synchronously push the test code that has passed the test to the first stable code node module and the second stable code node module of the second NFS storage unit;
所述第二NFS存储单元用于将第一稳定代码节点模块和第二稳定代码节点模块分别挂载到所述线上生产环境单元的第一生产环境docker节点模块、第二生产环境docker节点模块;The second NFS storage unit is used to mount the first stable code node module and the second stable code node module to the first production environment docker node module and the second production environment docker node module of the online production environment unit, respectively ;
所述网关入口单元用于把访问流量全部切换到第一生产环境docker节点模块或者第二生产环境docker节点模块;所述网关入口单元还用于重新一起开启第一生产环境docker节点模块和第二生产环境docker节点模块进行访问流量的连接;The gateway entry unit is used to switch all access traffic to the first production environment docker node module or the second production environment docker node module; the gateway entry unit is also used to re-open the first production environment docker node module and the second production environment docker node module together. The production environment docker node module connects the access traffic;
所述第一稳定代码节点模块用于:当所述网关入口单元把访问流量全部先切换到所述第二生产环境docker节点模块时,所述第一稳定代码节点模块用于将通过测试的测试代码挂载至第一生产环境docker节点模块;所述第一生产环境docker节点模块用于接收通过测试的测试代码并进行更新;The first stable code node module is used for: when the gateway entry unit switches all access traffic to the second production environment docker node module first, the first stable code node module is used to pass the test of the test. The code is mounted to the first production environment docker node module; the first production environment docker node module is used to receive and update the test code that has passed the test;
所述第二稳定代码节点模块用于:当所述网关入口单元把访问流量全部先切换到所述第一生产环境docker节点模块时,所述第二稳定代码节点模块用于将通过测试的测试代码挂载至第二生产环境docker节点模块;所述第二生产环境docker节点模块用于接收通过测试的测试代码并进行更新。The second stable code node module is used for: when the gateway entry unit switches all access traffic to the first production environment docker node module first, the second stable code node module is used to pass the test of the test. The code is mounted to the second production environment docker node module; the second production environment docker node module is used to receive and update the test code that has passed the test.
具体的,所述测试环境docker节点模块还用于将没有通过测试的测试代码反馈给所述GIT版本管理器,所述GIT版本管理器用于将没有通过测试的测试代码同步推送至所述第二NFS存储单元的第一稳定代码节点模块和第二稳定代码节点模块;Specifically, the test environment docker node module is further configured to feed back the test code that fails the test to the GIT version manager, and the GIT version manager is configured to synchronously push the test code that fails the test to the second The first stable code node module and the second stable code node module of the NFS storage unit;
所述第二NFS存储单元用于将第一稳定代码节点模块和第二稳定代码节点模块分别挂载到第一生产环境docker节点模块、第二生产环境docker节点模块,并将没有通过测试的测试代码同步推送到第一生产环境docker节点模块和第二生产环境docker节点模块。The second NFS storage unit is used to mount the first stable code node module and the second stable code node module to the docker node module of the first production environment and the docker node module of the second production environment, respectively, and store the tests that fail the test. The code is pushed to the docker node module of the first production environment and the docker node module of the second production environment synchronously.
采用上述技术方案后,本发明至少具有如下有益效果:本发明通过对生产环境、测试环境、稳定代码、测试代码部分进行完全分离,通过NFS存储技术进行挂载到生成环境的docker容器中,开发人员只需关心代码提交后是否测试通过,若通过则自动发布到稳定代码节点中,而且不用关心生成环境的docker节点,运维人员只需监控服务器是否正常,整个更新部署流程达到一个高可用,稳定性极高的方案;After the above technical solution is adopted, the present invention has at least the following beneficial effects: the present invention completely separates the production environment, the test environment, the stable code and the test code, and mounts it into the docker container of the production environment through the NFS storage technology, and develops The personnel only need to care whether the test passes after the code is submitted. If it passes, it will be automatically released to the stable code node, and they do not need to care about the docker node of the generation environment. The operation and maintenance personnel only need to monitor whether the server is normal, and the entire update and deployment process achieves a high availability. A very stable solution;
本发明代码节点与生产环境节点完全分离,安全性和稳定性得到比较大的提高;The code node of the present invention is completely separated from the production environment node, and the security and stability are greatly improved;
本发明分布式节点更新部署,当其中一个节点出问题时另外一节点还能正常使用,达到高可用;The distributed node update and deployment of the present invention, when one of the nodes fails, the other node can still be used normally, so as to achieve high availability;
本发明当代码稳定时并且成功同步推送到生产环境才会同时重新开放两个节点,任何情况下保持最少一个节点对外服务,断流更新控制,达到无感知不断服务更新。The present invention will reopen two nodes at the same time when the code is stable and successfully pushed to the production environment synchronously. In any case, at least one node is maintained to provide external services, and the current update control is interrupted, so as to achieve continuous service update without perception.
附图说明Description of drawings
图1为本发明基于docker的分布式代码自动更新部署方法步骤流程图;Fig. 1 is a flow chart of the steps of the method for automatic update and deployment of distributed code based on docker of the present invention;
图2为本发明基于docker的分布式代码自动更新部署系统框架图。FIG. 2 is a frame diagram of a docker-based distributed code automatic update deployment system of the present invention.
具体实施方式Detailed ways
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互结合,下面结合附图和具体实施例对本申请作进一步详细说明。It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict, and the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
实施例1Example 1
如图1所示,本发明公开一种基于docker的分布式代码自动更新部署方法,步骤包括:As shown in Figure 1, the present invention discloses a docker-based distributed code automatic update and deployment method, the steps include:
S11、将第一NFS存储单元中的GIT版本管理器挂载到测试环境docker节点;S11. Mount the GIT version manager in the first NFS storage unit to the test environment docker node;
S12、GIT版本管理器接收测试代码,并将测试代码发送至测试环境docker节点进行测试;测试环境docker节点判断测试代码是否通过测试;S12. The GIT version manager receives the test code and sends the test code to the test environment docker node for testing; the test environment docker node judges whether the test code passes the test;
S13、当测试代码在通过测试的情况下,测试环境docker节点将通过测试的测试代码反馈给GIT版本管理器;优选的,测试环境docker节点将通过测试的测试代码通过CICD流水线反馈给GIT版本管理器;S13. When the test code passes the test, the test environment docker node feeds back the passed test code to the GIT version manager; preferably, the test environment docker node feeds back the passed test code to the GIT version management through the CICD pipeline device;
S14、GIT版本管理器将通过测试的测试代码同步推送至第二NFS存储单元的第一稳定代码节点和第二稳定代码节点;优选的GIT版本管理器通过CICD流水线将通过测试的测试代码同步推送至第二NFS存储单元的第一稳定代码节点和第二稳定代码节点;S14. The GIT version manager synchronously pushes the test code that passed the test to the first stable code node and the second stable code node of the second NFS storage unit; the preferred GIT version manager synchronously pushes the test code that passed the test through the CICD pipeline to the first stable code node and the second stable code node of the second NFS storage unit;
S15、将第二NFS存储单元中第一稳定代码节点和第二稳定代码节点分别挂载到第一生产环境docker节点、第二生产环境docker节点;S15, mount the first stable code node and the second stable code node in the second NFS storage unit to the first production environment docker node and the second production environment docker node respectively;
S16、网关入口把访问流量全部先切换到第二生产环境docker节点;S16. The gateway entrance switches all the access traffic to the second production environment docker node first;
S17、第一稳定代码节点将通过测试的测试代码挂载至第一生产环境docker节点;S17, the first stable code node mounts the test code that has passed the test to the first production environment docker node;
S18、第一生产环境docker节点接收通过测试的测试代码并进行更新后,网关入口将访问流量切换到第一生产环境docker节点;S18. After the docker node of the first production environment receives and updates the test code that has passed the test, the gateway entry switches the access traffic to the docker node of the first production environment;
S19、第二稳定代码节点将通过测试的测试代码挂载至第二生产环境docker节点,第二生产环境docker节点接收代码并进行更新;S19, the second stable code node mounts the test code that has passed the test to the second production environment docker node, and the second production environment docker node receives the code and updates it;
S20、网关入口均重新开启第一生产环境docker节点、第二生产环境docker节点进行访问流量的连接,通过测试的测试代码更新部署结束。In S20, the gateway entrance both re-open the first production environment docker node and the second production environment docker node to connect the access traffic, and the test code update and deployment that has passed the test is completed.
另外,步骤S13还包括:当测试代码在没有通过测试的情况下,测试环境docker节点将没有通过测试的测试代码反馈给GIT版本管理器;具体的,测试环境docker节点将没有通过测试的测试代码通过CICD流水线反馈给GIT版本管理器;In addition, step S13 further includes: when the test code fails the test, the docker node of the test environment feeds back the test code that fails the test to the GIT version manager; specifically, the docker node of the test environment will not pass the test code of the test Feedback to the GIT version manager through the CICD pipeline;
GIT版本管理器将没有通过测试的测试代码同步推送至第二NFS存储单元的第一稳定代码节点和第二稳定代码节点;具体的,GIT版本管理器将没有通过测试的测试代码通过CICD流水线同步推送至第二NFS存储单元的第一稳定代码节点和第二稳定代码节点;The GIT version manager synchronously pushes the test code that fails the test to the first stable code node and the second stable code node of the second NFS storage unit; specifically, the GIT version manager synchronizes the test code that fails the test through the CICD pipeline Pushing to the first stable code node and the second stable code node of the second NFS storage unit;
将第二NFS存储单元中第一稳定代码节点和第二稳定代码节点分别挂载到第一生产环境docker节点、第二生产环境docker节点,并将没有通过测试的测试代码同步推送到第一生产环境docker节点和第二生产环境docker节点,没有通过测试的测试代码更新部署结束;具体的,第二NFS存储单元将没有通过测试的测试代码通过CICD流水线同步推送到第一生产环境docker节点和第二生产环境docker节点。Mount the first stable code node and the second stable code node in the second NFS storage unit to the first production environment docker node and the second production environment docker node, respectively, and push the test code that fails the test to the first production synchronously The environment docker node and the second production environment docker node, the test code that fails the test is updated and deployed; specifically, the second NFS storage unit synchronously pushes the test code that fails the test to the first production environment docker node and the first production environment through the CICD pipeline. Two production environment docker nodes.
上述中,Docker、NFS、Git和CICD都是开发领域中常用的技术手段;其中,Docker是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux机器或Windows机器上,也可以实现虚拟化,容器是完全使用沙箱机制,相互之间不会有任何接口;NFS指的是网络文件系统,英文全称为NetworkFile System,是由SUN公司研制的UNIX表示层协议(presentation layer protocol),能使使用者访问网络上别处的文件就像在使用自己的计算机一样;Git是一个开源的分布式版本控制系统,可以有效、高速地处理从很小到非常大的项目版本管理,Git是为了管理Linux内核开发而开发的一个开放源码的版本控制软件。Among the above, Docker, NFS, Git and CICD are all commonly used technical means in the development field; among them, Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable container, Then publish it to any popular Linux machine or Windows machine, and it can also be virtualized. The container completely uses the sandbox mechanism and will not have any interface with each other; NFS refers to the network file system, which is called Network File System in English. It is a UNIX presentation layer protocol (presentation layer protocol) developed by SUN, which enables users to access files elsewhere on the network as if they were using their own computer; Git is an open source distributed version control system that can be effective and fast. To handle the version management of small to very large projects, Git is an open source version control software developed to manage Linux kernel development.
CICD流水线为开发领域的常规技术手段,具体指代为:CI是持续集成,通过持续集成,开发人员能够频繁地将其代码集成到公共代码仓库的主分支中,开发人员能够在任何时候多次向仓库提交作品,而不是独立地开发每个功能模块并在开发周期结束时一一提交;CD是持续部署,持续部署扩展了持续交付,以便软件构建在通过所有测试时自动部署,在这样的流程中,不需要人为决定何时及如何投入生产环境;CI、CD系统的最后一步将在构建后的组件、包退出流水线时自动部署,此类自动部署可以配置为快速向客户分发组件、功能模块或修复补丁,并准确说明当前提供的内容。The CICD pipeline is a conventional technical means in the development field, which specifically refers to: CI is continuous integration. Through continuous integration, developers can frequently integrate their code into the main branch of the public code repository, and developers can at any time Repositories commit work, rather than developing each feature module independently and committing them one by one at the end of the development cycle; CD is continuous deployment, and continuous deployment extends continuous delivery so that software builds are automatically deployed when they pass all tests, in such a process There is no need to manually decide when and how to put it into the production environment; the last step of the CI and CD system will be automatically deployed when the built components and packages exit the pipeline. Such automatic deployment can be configured to quickly distribute components and function modules to customers Or fix a patch and state exactly what is currently available.
实施例2Example 2
本实施是在实施例1的基础上提供一种基于docker的分布式代码自动更新部署系统,如图2所示,包括第一NFS存储单元、第二NFS存储单元、测试环境单元、线上生产环境单元以及网关入口单元,所述第一NFS存储单元包括GIT版本管理器,所述第二NFS存储单元包括第一稳定代码节点模块和第二稳定代码节点模块,所述测试环境单元包括测试环境docker节点模块,所述线上生产环境单元包括第一生产环境docker节点模块和第二生产环境docker节点模块;This implementation provides a docker-based distributed code automatic update and deployment system based on Embodiment 1, as shown in Figure 2, including a first NFS storage unit, a second NFS storage unit, a test environment unit, and an online production unit. An environment unit and a gateway entry unit, the first NFS storage unit includes a GIT version manager, the second NFS storage unit includes a first stable code node module and a second stable code node module, and the test environment unit includes a test environment docker node module, the online production environment unit includes a first production environment docker node module and a second production environment docker node module;
所述第一NFS存储单元用于将其GIT版本管理器挂载到测试环境docker节点模块;The first NFS storage unit is used to mount its GIT version manager to the test environment docker node module;
所述GIT版本管理器用于接收测试代码,并将测试代码发送至所述测试环境单元的测试环境docker节点模块;The GIT version manager is used to receive the test code, and send the test code to the test environment docker node module of the test environment unit;
所述测试环境docker节点模块用于对测试代码进行测试,并确认测试代码是否通过测试;The test environment docker node module is used to test the test code and confirm whether the test code passes the test;
所述测试环境docker节点模块还用于将通过测试的测试代码反馈给所述GIT版本管理器;The test environment docker node module is also used to feed back the test code that has passed the test to the GIT version manager;
所述GIT版本管理器还用于将通过测试的测试代码同步推送至所述第二NFS存储单元的第一稳定代码节点模块和第二稳定代码节点模块;The GIT version manager is further configured to synchronously push the test code that has passed the test to the first stable code node module and the second stable code node module of the second NFS storage unit;
所述第二NFS存储单元用于将第一稳定代码节点模块和第二稳定代码节点模块分别挂载到所述线上生产环境单元的第一生产环境docker节点模块、第二生产环境docker节点模块;The second NFS storage unit is used to mount the first stable code node module and the second stable code node module to the first production environment docker node module and the second production environment docker node module of the online production environment unit, respectively ;
所述网关入口单元用于把访问流量全部切换到第一生产环境docker节点模块或者第二生产环境docker节点模块;所述网关入口单元还用于重新一起开启第一生产环境docker节点模块和第二生产环境docker节点模块进行访问流量的连接;The gateway entry unit is used to switch all access traffic to the first production environment docker node module or the second production environment docker node module; the gateway entry unit is also used to re-open the first production environment docker node module and the second production environment docker node module together. The production environment docker node module connects the access traffic;
所述第一稳定代码节点模块用于:当所述网关入口单元把访问流量全部先切换到所述第二生产环境docker节点模块时,所述第一稳定代码节点模块用于将通过测试的测试代码挂载至第一生产环境docker节点模块;所述第一生产环境docker节点模块用于接收通过测试的测试代码并进行更新;The first stable code node module is used for: when the gateway entry unit switches all access traffic to the second production environment docker node module first, the first stable code node module is used to pass the test of the test. The code is mounted to the first production environment docker node module; the first production environment docker node module is used to receive and update the test code that has passed the test;
所述第二稳定代码节点模块用于:当所述网关入口单元把访问流量全部先切换到所述第一生产环境docker节点模块时,所述第二稳定代码节点模块用于将通过测试的测试代码挂载至第二生产环境docker节点模块;所述第二生产环境docker节点模块用于接收通过测试的测试代码并进行更新。The second stable code node module is used for: when the gateway entry unit switches all access traffic to the first production environment docker node module first, the second stable code node module is used to pass the test of the test. The code is mounted to the second production environment docker node module; the second production environment docker node module is used to receive and update the test code that has passed the test.
所述测试环境docker节点模块还用于将没有通过测试的测试代码反馈给所述GIT版本管理器,所述GIT版本管理器用于将没有通过测试的测试代码同步推送至所述第二NFS存储单元的第一稳定代码节点模块和第二稳定代码节点模块;The test environment docker node module is further configured to feed back the test code that fails the test to the GIT version manager, and the GIT version manager is configured to synchronously push the test code that fails the test to the second NFS storage unit The first stable code node module and the second stable code node module;
所述第二NFS存储单元用于将第一稳定代码节点模块和第二稳定代码节点模块分别挂载到第一生产环境docker节点模块、第二生产环境docker节点模块,并将没有通过测试的测试代码同步推送到第一生产环境docker节点模块和第二生产环境docker节点模块。The second NFS storage unit is used to mount the first stable code node module and the second stable code node module to the docker node module of the first production environment and the docker node module of the second production environment, respectively, and store the tests that fail the test. The code is pushed to the docker node module of the first production environment and the docker node module of the second production environment synchronously.
尽管已经示出和描述了本发明的实施例,对于本领域的普通技术人员而言,可以理解的是,在不脱离本发明的原理和精神的情况下可以对这些实施例进行多种等效的变化、修改、替换和变型,本发明的范围由所附权利要求及其等同范围限定。Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various equivalents may be made to these embodiments without departing from the principle and spirit of the invention Changes, modifications, substitutions and alterations, the scope of the invention is defined by the appended claims and their equivalents.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010539935.2A CN111427605B (en) | 2020-06-15 | 2020-06-15 | Docker-based distributed code automatic update deployment method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010539935.2A CN111427605B (en) | 2020-06-15 | 2020-06-15 | Docker-based distributed code automatic update deployment method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111427605A CN111427605A (en) | 2020-07-17 |
CN111427605B true CN111427605B (en) | 2020-10-16 |
Family
ID=71551399
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010539935.2A Active CN111427605B (en) | 2020-06-15 | 2020-06-15 | Docker-based distributed code automatic update deployment method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111427605B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112269591A (en) * | 2020-11-11 | 2021-01-26 | 北京凌云雀科技有限公司 | Version release method, device, equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105187500A (en) * | 2015-08-07 | 2015-12-23 | 浪潮(北京)电子信息产业有限公司 | Container-based distributed storage system deployment method |
CN108959547A (en) * | 2018-07-02 | 2018-12-07 | 山东汇贸电子口岸有限公司 | A kind of PV snapshot distributed experiment & measurement system restoration methods |
CN109324819A (en) * | 2018-09-28 | 2019-02-12 | 中国平安财产保险股份有限公司 | Server code deployment method, device, server device and storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6944788B2 (en) * | 2002-03-12 | 2005-09-13 | Sun Microsystems, Inc. | System and method for enabling failover for an application server cluster |
CN105045601A (en) * | 2015-08-14 | 2015-11-11 | 广东能龙教育股份有限公司 | Product publishing and deploying system based on cloud platform |
US10396997B2 (en) * | 2016-12-14 | 2019-08-27 | International Business Machines Corporation | Container-based operating system and method |
US10656927B2 (en) * | 2017-10-27 | 2020-05-19 | Intuit Inc. | Methods, systems, and computer program products for automating releases and deployment of a softawre application along the pipeline in continuous release and deployment of software application delivery models |
CN108076159A (en) * | 2018-01-26 | 2018-05-25 | 成都精灵云科技有限公司 | A kind of cloud platform based on Docker builds device |
CN110727446A (en) * | 2019-09-25 | 2020-01-24 | 光通天下网络科技股份有限公司 | Automatic deployment method, device, equipment and medium |
CN111131146B (en) * | 2019-11-08 | 2021-04-09 | 北京航空航天大学 | A software system deployment and incremental update method for multiple supercomputing centers in a wide-area environment |
-
2020
- 2020-06-15 CN CN202010539935.2A patent/CN111427605B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105187500A (en) * | 2015-08-07 | 2015-12-23 | 浪潮(北京)电子信息产业有限公司 | Container-based distributed storage system deployment method |
CN108959547A (en) * | 2018-07-02 | 2018-12-07 | 山东汇贸电子口岸有限公司 | A kind of PV snapshot distributed experiment & measurement system restoration methods |
CN109324819A (en) * | 2018-09-28 | 2019-02-12 | 中国平安财产保险股份有限公司 | Server code deployment method, device, server device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111427605A (en) | 2020-07-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110389900B (en) | A distributed database cluster testing method, device and storage medium | |
RU2417416C2 (en) | Solution deployment in server farm | |
US10394550B2 (en) | System and method for supporting patching in a multitenant application server environment | |
US10983775B2 (en) | System and method for creating and deploying a release package | |
CN107256178B (en) | Container management platform | |
US20190227791A1 (en) | Distributed incremental updating of trays using a source control system | |
US20100162226A1 (en) | Zero downtime mechanism for software upgrade of a distributed computer system | |
CN111930465A (en) | Kubernetes-based dreams master-slave cluster deployment method and device | |
CN102254031A (en) | Batch processing request-based Microsoft SQL server database cluster | |
US10379916B2 (en) | Integrating transaction processing system interfaces with event-driven polyglot runtime modules | |
US11226978B2 (en) | Systems and methods for dynamic creation of schemas | |
EP3654188B1 (en) | Configuration management identification rule testing | |
CN111026430A (en) | Method and system for flexible node composition on local or distributed computer system | |
CN111427605B (en) | Docker-based distributed code automatic update deployment method and system | |
CN114385504A (en) | Microservice application development and debugging method and device | |
US20210149709A1 (en) | Method and apparatus for processing transaction | |
US10776134B2 (en) | Management of application properties | |
CN117009184A (en) | Method for maintaining version consistency without stopping upgrading and application under Yun Yuan | |
CN113032477A (en) | Long-distance data synchronization method and device based on GTID and computing equipment | |
WO2023071724A1 (en) | Configuration management method, apparatus and system, and storage medium and program product | |
CN104301355A (en) | Cluster heat disposition method and system based on single machine complete disposition and new old node pool | |
CN114826892A (en) | Cluster node control method, device, equipment and medium | |
CN113050983A (en) | Method and system for designing middleware, electronic device and readable storage medium | |
US12314142B2 (en) | Service/workload recovery and restoration in container orchestration systems | |
CN114466026B (en) | Update method and device of application program interface, storage medium and computing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |