CN112379969B - Continuous integrated delivery method based on containerized application and related equipment - Google Patents

Continuous integrated delivery method based on containerized application and related equipment Download PDF

Info

Publication number
CN112379969B
CN112379969B CN202011270487.7A CN202011270487A CN112379969B CN 112379969 B CN112379969 B CN 112379969B CN 202011270487 A CN202011270487 A CN 202011270487A CN 112379969 B CN112379969 B CN 112379969B
Authority
CN
China
Prior art keywords
application
test
file
image
continuous integration
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
Application number
CN202011270487.7A
Other languages
Chinese (zh)
Other versions
CN112379969A (en
Inventor
张青南
张凯磊
李明泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Life Insurance Co ltd
Original Assignee
China Life Insurance Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Life Insurance Co ltd filed Critical China Life Insurance Co ltd
Priority to CN202011270487.7A priority Critical patent/CN112379969B/en
Publication of CN112379969A publication Critical patent/CN112379969A/en
Application granted granted Critical
Publication of CN112379969B publication Critical patent/CN112379969B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances

Abstract

One or more embodiments of the present specification provide a continuous integrated delivery method and related apparatus based on containerized applications, the method including: defining a first file under a root directory of a code project, wherein the first file is used for describing the dependency relationship of a continuous integration process and related tools so as to execute the continuous integration process; and performing trigger starting setting on the continuous integration process defined in the first file, wherein the trigger starting of the continuous integration process is integrated on a module visual interface. The definition process of continuous integration is preposed, and the developer defines the continuous integration task in the program coding stage, so that the personnel waste is reduced.

Description

Continuous integrated delivery method based on containerized application and related equipment
Technical Field
One or more embodiments of the present disclosure relate to the field of containerized applications, and in particular, to a continuous integrated delivery method and related devices based on containerized applications.
Background
An assembly line in a factory produces consumer products from raw materials in a rapid, automated, repeatable manner. Also, the software delivery pipeline generates release versions from source code in a quick, automated, and repeatable manner. Among these, the process of starting an assembly line is called "continuous integration" (CI), and the overall design of how this is done is called "continuous delivery" (CD).
The explosive development of container technology drives the change of CI/CD work, and the mirror image delivery is derived from traditional program delivery, script delivery and configuration delivery. Fragmented outcome delivery is gradually replaced by mirror image delivery.
Compared with the traditional construction and program release efficiency, the continuous integration step has the advantages that special post personnel are required to be configured between the program coding stage and the program construction stage to set task configuration files on which continuous integration tasks are dependent, so that the efficiency is improved, and the labor cost is increased; in addition, in the deployment test stage of the application, the multi-service is generally deployed and upgraded through a non-visual back-end script, so that the program is tedious and easy to make mistakes. In the continuous delivery step, the completion of the continuous delivery is greatly reduced due to the current situation of network isolation of the test environment and the production environment.
Disclosure of Invention
In view of this, it is an object of one or more embodiments of the present disclosure to provide a continuous integrated delivery method and related apparatus based on containerized applications, which solves the problems encountered in the prior art with respect to continuous integration and continuous delivery processes.
In view of the above, one or more embodiments of the present specification provide a continuous integrated delivery method based on containerized applications, including:
defining a first file under a root directory of a code project, wherein the first file is used for describing the dependency relationship of a continuous integration process and related tools so as to execute the continuous integration process;
performing trigger starting setting on the continuous integration process defined in the first file, wherein the trigger starting of the continuous integration process is integrated on a module visual interface; and the trigger starting setting and the first file are matched together to complete the triggering and execution of the continuous integration process.
Further, the continuous integration process includes:
pulling a source code project of a program coding stage to a program construction platform to obtain a program construction result;
performing quality detection, safety scanning and automatic testing on the program construction result;
packaging the program construction result passing the test into a Docker application mirror image;
deploying an application formed by at least one Docker application mirror image to a test scanner platform through a first set of configuration files by one key, and carrying out functional test on the application;
the first set of configuration files and a second set of configuration files describing the application are stored in a test application store.
Further, the first file is a jenkinsfile file.
Further, the deploying the application formed by at least one Docker application image on the test scanner platform through a first set of configuration files by one key, and performing a functional test on the application, including:
the jenkinsfile file invokes a random container management platform open api interface built based on a cattle scheduling frame through a shell command, triggers deployment test action, and deploys an application formed by at least one Docker application image in a harbor image warehouse to a test random platform through a first set of configuration files by one key;
performing a functionality test on the application;
and writing a problem repair code aiming at the problems encountered in the application test process, and submitting the problem repair code to a gitlab tool, thereby automatically triggering the continuous integration process.
Further, the storing the first set of configuration files and the second set of configuration files describing the application in a test application store includes:
defining a first set of configuration files related to the operation mode of the system related to the corresponding service of the Docker application mirror image and the association relation between the services, and placing the configuration files in a test application store; the first set of configuration files are used for deploying an application one-key formed by at least one dock application mirror image passing the test to a test scanner platform for running;
a second set of configuration files describing the application is defined and placed in a test application store.
Further, the method further comprises the following steps:
submitting at least one Docker application image for forming the application to a buffer image warehouse from a harbor image warehouse, and submitting the Docker application image to a production application image warehouse from the buffer image warehouse;
and transmitting the configuration file in the test application store to a production application store, and executing a deployment action to realize that the application formed by at least one Docker application image is deployed to a production scanner platform to run through one key of the configuration file in the production application store.
Further, the firewall between the harbor mirror image warehouse and the buffer mirror image warehouse and the firewall between the buffer mirror image warehouse and the production application mirror image warehouse are destroyed by a black and white list or a port release strategy, so that mirror image files in the three mirror image warehouses can be sequentially transferred.
Based on the same inventive concept, one or more embodiments of the present specification also disclose a continuous integrated delivery apparatus based on containerized applications, comprising:
the program coding submodule defines a first file under a root directory of the code engineering, wherein the first file is used for describing the dependency relationship between a continuous integration process and related tools so as to execute the continuous integration process;
the continuous integration task definition sub-module is used for carrying out trigger starting setting on the continuous integration process defined in the first file, wherein the trigger starting of the continuous integration process is integrated on a module visual interface; and the trigger starting setting and the first file are matched together to complete the triggering and execution of the continuous integration process.
Based on the same inventive concept, one or more embodiments of the present specification also disclose an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the above method when executing the program.
Based on the same inventive concept, one or more embodiments of the present specification also disclose that the non-transitory computer-readable storage medium stores computer instructions for causing the computer to perform the above-described method.
From the foregoing, it can be seen that, in one or more embodiments of the present disclosure, a persistent integrated delivery method and related device based on containerized applications are provided, where a definition process of persistent integration is pre-set, a developer defines a persistent integration task in a program coding stage, a dock tool stores a construction result in a mirror image manner to a mirror image warehouse, and an application is automatically deployed and run under a multiple test environment by means of an open api provided by a test scanner management platform implemented based on a cattle scheduling framework, so as to provide multiple verification environments for developers and testers. In addition, a connection channel between a test environment and a production environment is established, and an application image is pushed to a buffer image application warehouse in an automatic mode, so that a deployment team does not need to copy and move a release achievement (such as a Docker application image) again; the deployment or upgrading of the application is completed by one key directly by means of the function of a production application store on the production scanner management platform.
Drawings
For a clearer description of one or more embodiments of the present description or of the solutions of the prior art, the drawings that are necessary for the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description below are only one or more embodiments of the present description, from which other drawings can be obtained, without inventive effort, for a person skilled in the art.
FIG. 1 is a flow diagram of a containerized application-based continuous integrated delivery method in accordance with one or more embodiments of the present disclosure;
FIG. 2 is a flow diagram of the continuous integration step of one or more embodiments of the present disclosure;
FIG. 3 is a flow diagram of the deployment test phase of one or more embodiments of the present disclosure;
FIG. 4 is a schematic diagram of the continuous delivery step of one or more embodiments of the present disclosure;
FIG. 5 is a schematic structural view of a containerized application-based continuous integrated delivery apparatus according to one or more embodiments of the present disclosure;
FIG. 6 is a schematic diagram of the continuously integrated module of one or more embodiments of the present disclosure;
FIG. 7 is a schematic diagram of the persistent delivery module of one or more embodiments of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to one or more embodiments of the present disclosure.
Detailed Description
For the purposes of promoting an understanding of the principles and advantages of the disclosure, reference will now be made to the embodiments illustrated in the drawings and specific language will be used to describe the same.
It should be noted that unless otherwise defined, technical or scientific terms used in one or more embodiments of the present specification should be given the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure pertains. The use of the terms "first," "second," and the like in one or more embodiments of the present description does not denote any order, quantity, or importance, but rather the terms "first," "second," and the like are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
As described in the background art, in the continuous integration flow in the prior art, a technician with a special post needs to build a task configuration file on which a continuous integration task depends, which consumes labor; in addition, in the deployment test stage of the application, the multi-service is generally deployed and upgraded through a non-visual back-end script, so that the program is tedious and easy to make mistakes.
Explanation of related technical terms;
jenkins: continuous construction platform of open source
SonarQube-open source code quality management platform
gitlab/svn: open source code management tool
JFrog Artifactory/Nexus Repository binary storage management tool
Fortify: safety scanning tool
Selenium: automatic test tool
Rancher: open source container management platform
Harbor: open source mirror image management warehouse
Rancher: containerized management platform
Catole: containerized dispatch frame
In view of the foregoing problems with the prior art, and with reference to fig. 1, one or more embodiments of the present disclosure provide a continuous integrated delivery method based on containerized applications, including:
s101, a continuous integration step, which is used for continuously integrating source code engineering in a test environment to form at least one Docker application mirror image, wherein the at least one Docker application mirror image forms an application to run and test; setting a configuration file for deploying the application on the test scanner platform by one key, wherein the configuration file is stored in a test application store;
s102, continuously delivering at least one Docker application image forming the application to a production application image warehouse of a production environment, and transmitting a configuration file in the test application store to a production application store; at least one Docker application image in the production application image warehouse is deployed on a production scanner platform through a configuration file in the production application store by one key.
Wherein the continuous integration step is performed in a test environment and the continuous delivery step is performed in a production environment.
It should be noted that, before the continuous integration flow, the integration platform and the third party platform on which the continuous integration platform depends need to be built, which is specifically as follows:
and (3) building an integrated platform, namely building an operation platform by means of jenkins tools, wherein the platform integrates open source tools maven and dock, the two tools are support tools necessary for completing continuous integration and continuous delivery, each tool is integrated to the jenkins platform in a jenkins plug-in mode, and each tool can be repeatedly used by all pipeline operations.
And building a third-party platform, namely building servers for code security scanning, code quality scanning and code automation testing respectively, namely building a code security scanning server, a code quality scanning server and a code automation testing server respectively by means of fortify, sonarytpe, selenium and other tools, and after the building of the servers is completed, configuring server addresses to jenkins platforms respectively.
Referring to fig. 2, the continuous integration step includes a program coding phase, a continuous integration task definition phase, a program construction phase, a code testing phase, a packaging phase, a deployment testing phase, and a test application store delivery phase, which are sequentially arranged;
s201, a program coding stage comprises the steps that a developer defines a first file and a second file under a root directory of a code project, wherein the first file is used for describing the dependency relationship of a continuous integration process and related tools so as to execute the continuous integration process; the second file is used for defining configuration items on which the application runs;
in this phase, the code developed by the developer is submitted to the gitlab tool.
In this embodiment, the definition process of continuous integration is pre-set to the program coding stage, that is, the developer sets the task configuration file on which the continuous integration process depends in the program coding stage, and no special post personnel are required to be configured to set the configuration file in the continuous integration task definition stage.
Further, the first file may be a jenkinsfile, and the second file may be a dockerfile file.
Further, the continuous integration process includes:
a program construction stage, namely pulling a source code project of a program coding stage to a program construction platform to obtain a program construction result;
a code testing stage, which is to perform quality detection, security scanning and automatic testing on the program construction result;
packaging, namely packaging the program construction result passing the test into a Docker application mirror image;
a deployment test stage, namely deploying an application formed by at least one Docker application mirror image to a test scanner platform through a first group of configuration files by one key, and carrying out functional test on the application;
a test application store delivery phase, storing the first set of configuration files and a second set of configuration files describing the application in a test application store;
the first set of configuration files define an operation mode related to the service corresponding to the Docker application mirror image and an association relation among the services.
The stages involved in the continuous integration process will be described in detail in the following embodiments.
Further, the dependency of the continuous integration process and related tools is exemplified as follows: in the program construction stage, a maven tool can be used for pulling source code engineering on a gitlab tool to a jenkins platform; in the code testing stage, a sonarytpe tool can be used for carrying out quality scanning action on a source code, a fortify tool can be used for carrying out security scanning on the source code, and a Selenium tool can be used for carrying out code automation testing; in the packing stage, a Commit tool can be used for packing the binary program package into a Docker mirror image;
further, the configuration items may be embodied as base images (e.g., ubuntu, centos, etc.), running environments (e.g., tomcat, weblogic, etc.), service ports (e.g., 8080, 8088, 7001, etc.), etc.
S202, a continuous integration task definition stage comprises the steps that a developer carries out trigger starting setting on each continuous integration process defined in a first file through a jenkins platform, and the trigger starting of each integration process is integrated on a module visual interface; and the trigger starting setting and the first file are matched together to complete the triggering and execution of the continuous integration process.
For example, in the program build phase, because the source code project is stored on the gitlab tool and the program build is performed on the jenkins platform, the source code project on the gitlab tool needs to be pulled to the jenkins platform for build, when the pull is triggered, the pull needs to be performed in the continuous integration task definition phase.
The trigger starting mode can be manual trigger or timing trigger, and the two operation flows have no difference after starting in any mode.
In this embodiment, the configuration file is not required to be set in the process, so that a technician with special post is not required to be equipped, and the labor waste is reduced.
S203, a program construction stage comprises a process of pulling the source code engineering of the program coding stage to the program construction platform, and obtaining a program construction result.
Specifically, the jenkins platform pulls the source code project on the gitlab to the jenkins platform through an integrated maven tool according to the jenkins file, compiles the source code, and a third party jar relied on in the compiling stage automatically obtains the source code project from the internal network maven warehouse Nexus response platform through a component warehouse address configured in the code project.
S204, a code testing stage comprising quality detection, security scanning and automatic testing processes of the program construction result.
Specifically, after program construction is finished, according to the jenkinsfile, the continuous integration task triggers and starts quality detection of the program construction result, the quality detection action is finished by a sonarytpe tool, the service address of the tool is configured on the jenkins platform, and the code quality scanning result can be checked after scanning is finished.
After the quality detection is finished, according to the jenkinsfile, the continuous integration task is triggered to start the security scanning of the program construction result, the scanning action is completed by a fortify tool, the process improves the system security inspection to the initial stage of encoding, and the cost and influence surface of later program repair are reduced.
After the security scanning is finished, according to the jenkinsfile, the continuous integration task triggers and starts the automatic test of the program construction result, the automatic test action is finished by the Selenium tool, the Selenium automatic test tool operates in a container mode, after the automatic test is finished, the Selenium container is automatically destroyed, that is, a set of operation mode without a service architecture is provided for the automatic test by the continuous integration platform, and the waste of resources is reduced.
It should be noted that, the execution sequence of the three processes of quality detection, security scanning and automation test is performed according to the defined sequence of the jenkinsfile, and the sequence of this embodiment is only illustrative and is not limited to this execution sequence.
S205, a packaging stage, which comprises a process of packaging program construction results passing through the code testing stage into a Docker application mirror image.
Specifically, after the code testing stage is finished, the starting packaging stage is triggered by the continuous integration task according to the jenkinsfile, namely, a Docker tool on the jenkinsfile platform is utilized to read the dockerfile file under the source code engineering, a program construction result is packaged into a Docker application mirror image through a Commit tool, and a harbor mirror image warehouse is automatically uploaded after tags of the Docker application mirror image are marked.
S206, deploying a test stage, which comprises deploying an application formed by at least one Docker application mirror image to a test router platform through a first group of configuration files by one key, and carrying out a functional test on the application;
specifically, referring to fig. 3, the deployment test phase includes:
s301, the jenkinsfile file invokes a random container management platform open api interface built on the basis of a cattle scheduling frame through a shell command, triggers deployment test action, and deploys an application formed by at least one Docker application image in a harbor image warehouse to a test random platform through a first set of configuration files by one key;
s302, performing a functional test on the application;
s303, writing a problem repair code aiming at the problems encountered in the application test process, and submitting the problem repair code to a gitlab tool, so as to automatically trigger the continuous integration process (namely, sequentially triggering a program construction stage, a code test stage, a packaging stage and a deployment test stage).
The configuration file defines the operation mode related to the corresponding service of the Docker application mirror image and the association relation between the services.
Specifically, after the packaging stage is finished, a deployment test stage is started according to the jenkinsfile triggered by the continuous integration task, preferably, the jenkinsfile invokes a random container management platform open api interface built based on a cattle scheduling frame through a shell command, and triggers a deployment test action to realize that an application formed by at least one dock application mirror image in the harbor mirror image warehouse is deployed on a test random platform through a first set of configuration file one key; in the automatic deployment process, a first group of configuration files to be used are a Docker-composition file and a scanner-composition file, wherein the Docker-composition file is a Docker general configuration, so that the relationship between services corresponding to a Docker application mirror image and the mirror image on which the service operation depends is defined; the configuration file is a specific configuration file of the test scanner platform, is complementary to the Docker-configuration file, defines the number of instances of the running container under the service, and is set up so that the application formed by at least one Docker application mirror image is deployed on the test scanner platform for one-key deployment. Then, a tester performs functional test on the application, the tester feeds back the problems encountered in the test process to a developer, and the developer writes a problem repair code and submits the problem repair code to a gitlab tool; then, according to the jenkinsfile file, the continuous integration task sequentially triggers a program construction stage, a code test stage, a packaging stage and a deployment test stage, namely, the repaired application is deployed to the test scanner platform again, namely, when the program is converted from a static code to a container to run, the process is automatic.
It should be noted that, the configuration file one-key deployment process in this embodiment solves the problems of tedious procedure and easy error caused by deployment and upgrade of multiple services through a non-visual back-end script in the prior art. In addition, the prior art invokes the api interface provided by K8S through the kubectl tool provided by the K8S scheduling framework, the K8S scheduling framework relied on by the technology is heavier, and the cattle is relatively lighter and more efficient.
S207, a test application store delivery phase, comprising a process of storing the first set of configuration files and a second set of configuration files describing the application in the test application store.
That is, the configuration files in the test application store include at least the first set of configuration files and the second set of configuration files.
Specifically, the first set of configuration files have been specifically described in the deployment test stage, and will not be described again; the second group of configuration files comprises icon files with a catogicon header and config.xml global definition files; the icon file that the catalogic icon is headed can be cattleogicon-xxx. Icon; the config. Xml file defines the name, description, version, etc. of the application.
The two groups of configuration files in the application store are tested, so that development and operation staff can easily upgrade a plurality of services in parallel when facing tens or hundreds of micro services.
In addition, in the prior art, the continuous delivery mode of the Docker application mirror image is as follows: the development configuration post manually packages at least one Docker application image used for forming the application in the harbor image warehouse into a tgz file, the tgz file is uploaded to the ftp, tgz files on the ftp are copied to a certain production server by production operation and maintenance personnel, and finally the tgz file is uploaded to the production application image warehouse. The problem in the continuous delivery process in the prior art is that the testing environment is isolated from the production environment by a network, and the main reason of the network isolation is that a firewall is arranged between a harbor mirror image warehouse of the testing environment and a production application mirror image warehouse of the production environment, so that the firewall needs to be avoided for carrying out multiple uploading and copying processes, and the completion degree of continuous delivery is greatly reduced.
To solve the above-mentioned problem, as an alternative embodiment, referring to fig. 4, the continuous delivering step is configured to continuously deliver at least one Docker application image forming the application to a production application image warehouse of a production environment, and to transfer a configuration file in the test application store to the production application store; at least one Docker application image in the production application image warehouse is deployed on a production scanner platform through a configuration file in the production application store by one key; comprising the following steps:
s401, submitting at least one Docker application image for forming the application to a buffer image warehouse from a harbor image warehouse, and submitting the Docker application image to a production application image warehouse from the buffer image warehouse; the firewall between the hardor mirror image warehouse and the buffer mirror image warehouse and the firewall between the buffer mirror image warehouse and the production application mirror image warehouse are destroyed by a black-white list or a port release strategy, so that mirror image files in the three mirror image warehouses can be sequentially transferred.
S402, transmitting the configuration file in the test application store to a production application store, executing a deployment action, and deploying the application formed by at least one dock application image to a production scanner platform through one key of the configuration file in the production application store for operation.
And manually uploading the first set of configuration files and the second set of configuration files of the delivery stage of the test application store into the production application store to obtain the configuration files of the production application store, in other words, the configuration files in the production application store are the same as the configuration files in the test application store, and the configuration files are not repeated.
It should be noted that the methods of one or more embodiments of the present description may be performed by a single device, such as a computer or server. The method of the embodiment can also be applied to a distributed scene, and is completed by mutually matching a plurality of devices. In the case of such a distributed scenario, one of the devices may perform only one or more steps of the methods of one or more embodiments of the present description, the devices interacting with each other to accomplish the methods.
It should be noted that the foregoing describes specific embodiments of the present invention. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Based on the same inventive concept, one or more embodiments of the present disclosure also provide a continuous integrated delivery apparatus based on a containerized application, corresponding to the method of any of the embodiments described above.
Referring to fig. 5, the persistent integrated delivery device based on containerized applications includes a persistent integration module 501 and a persistent delivery module 502;
referring to fig. 6, the continuous integration module includes:
a program encoding submodule 601 configured to define a first file and a second file under a root directory of a code project, wherein the first file is used for describing the dependency relationship of a continuous integration process and related tools, and the second file is used for defining configuration items on which an application runs;
a continuous integration task definition sub-module 602 configured to perform trigger start setting on each continuous integration process defined in the first file through a jenkins platform, where the trigger start of each integration process is integrated on a module visual interface;
a program construction sub-module 603 configured to pull the source code project of the program encoding stage to the program construction platform and obtain a program construction result;
a code test sub-module 604 configured to perform quality detection, security scanning, and automated test procedures on program build results;
a packing sub-module 605 configured to pack the program build results passing the code test into a Docker application image;
a deployment test sub-module 606 configured to deploy an application formed by at least one Docker application image to a test scanner platform through a first set of configuration files by one key, and perform a functionality test on the application;
a test application store delivery sub-module 607 configured to store the first set of configuration files and a second set of configuration files describing the application in a test application store.
Referring to fig. 7, the persistent delivery module 702 includes:
a submitting sub-module 701, configured to submit at least one Docker application image for forming the application from a harbor image repository to a buffer image repository, and from the buffer image repository to a production application image repository;
the deployment production sub-module 702 transmits the configuration file in the test application store to the production application store, executes deployment action, and realizes that the application formed by at least one Docker application image is deployed to the production scanner platform to run through one key of the configuration file in the production application store.
For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, the functions of each module may be implemented in one or more pieces of software and/or hardware when implementing one or more embodiments of the present description.
The device of the foregoing embodiment is configured to implement a persistent integrated delivery method based on a containerized application according to any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Based on the same inventive concept, corresponding to the method of any embodiment, one or more embodiments of the present disclosure further provide an electronic device, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, where the processor executes the program to implement the persistent integrated delivery method based on the containerized application according to any embodiment.
Fig. 8 shows a more specific hardware architecture of an electronic device according to this embodiment, where the device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 implement communication connections therebetween within the device via a bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit ), microprocessor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc. for executing relevant programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory ), static storage device, dynamic storage device, or the like. Memory 1020 may store an operating system and other application programs, and when the embodiments of the present specification are implemented in software or firmware, the associated program code is stored in memory 1020 and executed by processor 1010.
The input/output interface 1030 is used to connect with an input/output module for inputting and outputting information. The input/output module may be configured as a component in a device (not shown) or may be external to the device to provide corresponding functionality. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various types of sensors, etc., and the output devices may include a display, speaker, vibrator, indicator lights, etc.
Communication interface 1040 is used to connect communication modules (not shown) to enable communication interactions of the present device with other devices. The communication module may implement communication through a wired manner (such as USB, network cable, etc.), or may implement communication through a wireless manner (such as mobile network, WIFI, bluetooth, etc.).
Bus 1050 includes a path for transferring information between components of the device (e.g., processor 1010, memory 1020, input/output interface 1030, and communication interface 1040).
It should be noted that although the above-described device only shows processor 1010, memory 1020, input/output interface 1030, communication interface 1040, and bus 1050, in an implementation, the device may include other components necessary to achieve proper operation. Furthermore, it will be understood by those skilled in the art that the above-described apparatus may include only the components necessary to implement the embodiments of the present description, and not all the components shown in the drawings.
The electronic device of the foregoing embodiment is configured to implement a persistent integrated delivery method based on a containerized application according to any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein.
Based on the same inventive concept, one or more embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform a containerized application-based persistent integrated delivery method according to any of the embodiments above, corresponding to the method of any of the embodiments above.
The computer readable media of the present embodiments, including both permanent and non-permanent, removable and non-removable media, may be used to implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device.
The storage medium of the foregoing embodiments stores computer instructions for causing the computer to perform a persistent integrated delivery method based on a containerized application according to any one of the foregoing embodiments, and has the advantages of the corresponding method embodiments, which are not described herein.
One of ordinary skill in the art will appreciate that: the discussion of any of the embodiments above is merely exemplary and is not intended to suggest that the scope of the disclosure, including the claims, is limited to these examples; combinations of features of the above embodiments or in different embodiments are also possible within the spirit of the present disclosure, steps may be implemented in any order, and there are many other variations of the different aspects of one or more embodiments described above which are not provided in detail for the sake of brevity.
Additionally, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures, in order to simplify the illustration and discussion, and so as not to obscure one or more embodiments of the present description. Furthermore, the apparatus may be shown in block diagram form in order to avoid obscuring the one or more embodiments of the present description, and also in view of the fact that specifics with respect to implementation of such block diagram apparatus are highly dependent upon the platform within which the one or more embodiments of the present description are to be implemented (i.e., such specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the disclosure, it should be apparent to one skilled in the art that one or more embodiments of the disclosure can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative in nature and not as restrictive.
While the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of those embodiments will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
The present disclosure is intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Any omissions, modifications, equivalents, improvements, and the like, which are within the spirit and principles of the one or more embodiments of the disclosure, are therefore intended to be included within the scope of the disclosure.

Claims (6)

1. A containerized application-based continuous integrated delivery method, characterized in that a definition process for continuous integration is pre-arranged to a program coding stage; the method comprises the following steps:
defining a first file under a root directory of a code project, wherein the first file is used for describing the dependency relationship of a continuous integration process and related tools so as to execute the continuous integration process; the first file is a jenkinsfile file;
the continuous integration process includes:
pulling a source code project of a program coding stage to a program construction platform to obtain a program construction result;
performing quality detection, safety scanning and automatic testing on the program construction result;
packaging the program construction result passing the test into a Docker application mirror image;
deploying an application formed by at least one Docker application mirror image to a test scanner platform through a first set of configuration files by one key, and carrying out functional test on the application;
the deploying the application formed by at least one Docker application mirror image to a test scanner platform through a first set of configuration files by one key, and performing functional test on the application comprises the following steps: the jenkinsfile file invokes a random container management platform open api interface built based on a cattle scheduling frame through a shell command, triggers deployment test action, and deploys an application formed by at least one Docker application image in a harbor image warehouse to a test random platform through a first set of configuration files by one key; performing a functionality test on the application; writing a problem repair code aiming at the problems encountered in the application test process, and submitting the problem repair code to a gitlab tool, thereby automatically triggering the continuous integration process;
storing the first set of configuration files and a second set of configuration files describing the application in a test application store; the first group of configuration files define an operation mode related to the service corresponding to the Docker application mirror image and an association relation among the services;
performing trigger starting setting on the continuous integration process defined in the first file, wherein the trigger starting of the continuous integration process is integrated on a module visual interface; the trigger starting setting and the first file are matched together to complete the triggering and execution of the continuous integration process;
submitting at least one Docker application image for forming the application to a buffer image warehouse from a harbor image warehouse, and submitting the Docker application image to a production application image warehouse from the buffer image warehouse;
and transmitting the configuration file in the test application store to a production application store, and executing a deployment action to realize that the application formed by at least one Docker application image is deployed to a production scanner platform to run through one key of the configuration file in the production application store.
2. The method of claim 1, wherein storing the first set of configuration files and a second set of configuration files describing the application in a test application store comprises:
defining a first set of configuration files related to the operation mode of the system related to the corresponding service of the Docker application mirror image and the association relation between the services, and placing the configuration files in a test application store; the first set of configuration files are used for deploying an application one-key formed by at least one dock application mirror image passing the test to a test scanner platform for running;
a second set of configuration files describing the application is defined and placed in a test application store.
3. The method of claim 1, wherein a firewall between the harbor image repository and the buffer image repository, a firewall between the buffer image repository and the production application image repository are broken by a black and white list or port release policy so that image files in three image repositories can be transferred in sequence.
4. A containerized application-based persistent integrated delivery device characterized by pre-loading a definition process for persistent integration into a program encoding phase; the device comprises:
the program coding submodule defines a first file under a root directory of the code engineering, wherein the first file is used for describing the dependency relationship between a continuous integration process and related tools so as to execute the continuous integration process; the first file is a jenkinsfile file;
the continuous integration process includes:
pulling a source code project of a program coding stage to a program construction platform to obtain a program construction result;
performing quality detection, safety scanning and automatic testing on the program construction result;
packaging the program construction result passing the test into a Docker application mirror image;
deploying an application formed by at least one Docker application mirror image to a test scanner platform through a first set of configuration files by one key, and carrying out functional test on the application;
the deploying the application formed by at least one Docker application mirror image to a test scanner platform through a first set of configuration files by one key, and performing functional test on the application comprises the following steps: the jenkinsfile file invokes a random container management platform open api interface built based on a cattle scheduling frame through a shell command, triggers deployment test action, and deploys an application formed by at least one Docker application image in a harbor image warehouse to a test random platform through a first set of configuration files by one key; performing a functionality test on the application; writing a problem repair code aiming at the problems encountered in the application test process, and submitting the problem repair code to a gitlab tool, thereby automatically triggering the continuous integration process;
storing the first set of configuration files and a second set of configuration files describing the application in a test application store; the first group of configuration files define an operation mode related to the service corresponding to the Docker application mirror image and an association relation among the services;
the continuous integration task definition sub-module is used for carrying out trigger starting setting on the continuous integration process defined in the first file, wherein the trigger starting of the continuous integration process is integrated on a module visual interface; the trigger starting setting and the first file are matched together to complete the triggering and execution of the continuous integration process;
a continuous delivery sub-module for submitting at least one Docker application image for forming the application to a buffer image warehouse from a harbor image warehouse and submitting the Docker application image to a production application image warehouse from the buffer image warehouse;
and transmitting the configuration file in the test application store to a production application store, and executing a deployment action to realize that the application formed by at least one Docker application image is deployed to a production scanner platform to run through one key of the configuration file in the production application store.
5. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of claims 1 to 3 when the program is executed.
6. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1 to 3.
CN202011270487.7A 2020-11-13 2020-11-13 Continuous integrated delivery method based on containerized application and related equipment Active CN112379969B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011270487.7A CN112379969B (en) 2020-11-13 2020-11-13 Continuous integrated delivery method based on containerized application and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011270487.7A CN112379969B (en) 2020-11-13 2020-11-13 Continuous integrated delivery method based on containerized application and related equipment

Publications (2)

Publication Number Publication Date
CN112379969A CN112379969A (en) 2021-02-19
CN112379969B true CN112379969B (en) 2024-04-16

Family

ID=74582288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011270487.7A Active CN112379969B (en) 2020-11-13 2020-11-13 Continuous integrated delivery method based on containerized application and related equipment

Country Status (1)

Country Link
CN (1) CN112379969B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113190447A (en) * 2021-04-30 2021-07-30 成都新潮传媒集团有限公司 Method, device, equipment and storage medium for automatically merging codes
CN113535334B (en) * 2021-08-17 2023-09-05 成都长城开发科技股份有限公司 Project construction method, device and storage medium based on Docker
CN114327478A (en) * 2021-12-27 2022-04-12 海信集团控股股份有限公司 Automatic application program delivery method and device
CN117114019B (en) * 2023-10-23 2024-01-12 天津异乡好居网络科技股份有限公司 Internationalized resource file extraction and back-filling method and device and continuous integration platform thereof

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108334437A (en) * 2018-03-02 2018-07-27 江苏电力信息技术有限公司 It is a kind of that acceptance method is delivered based on the software continuous of continuous integrating and automatic test
CN109814879A (en) * 2019-01-16 2019-05-28 福建省天奕网络科技有限公司 Automate CI/CD project dispositions method, storage medium
CN110083369A (en) * 2019-04-25 2019-08-02 中电科嘉兴新型智慧城市科技发展有限公司 A kind of continuous integrating and lasting delivery method based on container scheme
US10402302B1 (en) * 2018-03-13 2019-09-03 Red Hat Israel, Ltd. Reproduction of testing scenarios in a continuous integration environment
KR102118487B1 (en) * 2019-11-04 2020-06-03 주식회사 인재아이엔씨 Automatic quality inspection system and method of container based application for ci/cd
CN111259406A (en) * 2020-01-14 2020-06-09 中国传媒大学 Automatic construction method and system for cloud native application vulnerability reproduction environment
CN111552629A (en) * 2020-03-20 2020-08-18 北京海致星图科技有限公司 Docker-based continuous integration test environment construction method and system
CN111831396A (en) * 2020-07-10 2020-10-27 融慧金科金融服务外包(北京)有限公司 Docker software and hardware integration-based delivery method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190303187A1 (en) * 2018-03-29 2019-10-03 The United States Of America As Represented By The Secretary Of The Navy Methods, devices, and systems for distributing software to and deploying software in a target environment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108334437A (en) * 2018-03-02 2018-07-27 江苏电力信息技术有限公司 It is a kind of that acceptance method is delivered based on the software continuous of continuous integrating and automatic test
US10402302B1 (en) * 2018-03-13 2019-09-03 Red Hat Israel, Ltd. Reproduction of testing scenarios in a continuous integration environment
CN109814879A (en) * 2019-01-16 2019-05-28 福建省天奕网络科技有限公司 Automate CI/CD project dispositions method, storage medium
CN110083369A (en) * 2019-04-25 2019-08-02 中电科嘉兴新型智慧城市科技发展有限公司 A kind of continuous integrating and lasting delivery method based on container scheme
KR102118487B1 (en) * 2019-11-04 2020-06-03 주식회사 인재아이엔씨 Automatic quality inspection system and method of container based application for ci/cd
CN111259406A (en) * 2020-01-14 2020-06-09 中国传媒大学 Automatic construction method and system for cloud native application vulnerability reproduction environment
CN111552629A (en) * 2020-03-20 2020-08-18 北京海致星图科技有限公司 Docker-based continuous integration test environment construction method and system
CN111831396A (en) * 2020-07-10 2020-10-27 融慧金科金融服务外包(北京)有限公司 Docker software and hardware integration-based delivery method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于容器的持续集成和部署方法研究;丘晖;;广东通信技术;20171015(第10期);第66-70页 *

Also Published As

Publication number Publication date
CN112379969A (en) 2021-02-19

Similar Documents

Publication Publication Date Title
CN112379969B (en) Continuous integrated delivery method based on containerized application and related equipment
CN105164644B (en) Hook frame
US20180113799A1 (en) Model generation for model-based application testing
US11226830B2 (en) System for building, managing, deploying and executing reusable analytical solution modules for industry applications
CN111026403A (en) Packing deployment method and device, computer equipment and storage medium
CN111858370B (en) Method, device and computer readable medium for implementing DevOps
CN107704238B (en) Method and device for packaging items
CN111414172A (en) Automatic deployment and release system and method for application software
CN109117170B (en) Operation environment building method and device and code incorporating method and system
CN110647470B (en) Test method, manufacturing method, device, medium and electronic equipment
WO2020252081A1 (en) Systems and methods for robotic process automation
US10310964B2 (en) System and method for determining relevance of application software maintenance
CN111259406A (en) Automatic construction method and system for cloud native application vulnerability reproduction environment
US8661414B2 (en) Method and system for testing an order management system
CN112564989A (en) Application deployment method and device
CN112732561A (en) Project deployment method and device, computer equipment and storage medium
CN111782518A (en) Test method and device and electronic equipment
US8473943B2 (en) Using ecoprint for cloning of applications
CN112597037B (en) Java and Python combined automatic script development method and device
CN114115982A (en) Code issuing method, device, equipment and storage medium
US11347533B2 (en) Enhanced virtual machine image management system
Ete et al. Data quality monitoring tools ready
CN117270886B (en) Micro-service system development and deployment method, equipment and medium
CN114924754A (en) Application stack automatic deployment method based on cloud platform and related equipment
CN117093286B (en) Plug-in generation method, device, equipment and computer readable storage medium

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