CN112835676A - Deployment method and device of containerized application, computer equipment and medium - Google Patents

Deployment method and device of containerized application, computer equipment and medium Download PDF

Info

Publication number
CN112835676A
CN112835676A CN202110114057.4A CN202110114057A CN112835676A CN 112835676 A CN112835676 A CN 112835676A CN 202110114057 A CN202110114057 A CN 202110114057A CN 112835676 A CN112835676 A CN 112835676A
Authority
CN
China
Prior art keywords
code
application
deployment
instruction
information
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.)
Pending
Application number
CN202110114057.4A
Other languages
Chinese (zh)
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.)
Beijing Yuanmeng Puhui Health Technology Co ltd
Original Assignee
Beijing Yuanmeng Puhui Health Technology 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 Beijing Yuanmeng Puhui Health Technology Co ltd filed Critical Beijing Yuanmeng Puhui Health Technology Co ltd
Priority to CN202110114057.4A priority Critical patent/CN112835676A/en
Publication of CN112835676A publication Critical patent/CN112835676A/en
Pending legal-status Critical Current

Links

Images

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
    • 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/45591Monitoring or debugging support

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention particularly provides a deployment method and device of containerized application, computer equipment and a medium. The deployment method comprises the following steps: receiving a code submitting operation instruction, and triggering a first reading instruction in real time based on the code submitting operation instruction so as to read a first configuration file according to the first reading instruction; and carrying out correctness test on the submitted code content according to the configuration information contained in the first configuration file, compiling and packaging the code content passing the correctness test, uploading an application formed by the packaged code content to a mirror image warehouse, and deploying the distributable application in the mirror image warehouse to a target server. The invention can realize the functions of automatic test, packaging, uploading, automatic deployment, automatic load balancing and the like of the codes after one-key submission, thereby greatly improving the deployment efficiency of containerized application, greatly reducing the operation cost of developers, obviously improving the deployment stability and usability and providing great convenience for users.

Description

Deployment method and device of containerized application, computer equipment and medium
Technical Field
The invention relates to the technical field of containerization, in particular to a method and a device for deploying containerized applications, computer equipment and a medium.
Background
At present, in the process of deploying containerized applications, developers are often required to operate according to a set operation flow step by step, and in many operations, configuration files need to be written according to operation results, and deployment work such as testing, running and the like is performed on the basis of the written configuration files.
Therefore, in the prior art, a large amount of complicated deployment processes must be performed manually by developers, the degree of automation is low, the dependence on the personal working capacity of the developers is too large, but the problem of low deployment efficiency of containerized applications still often occurs, and the like, so improvement or optimization is urgently needed.
Disclosure of Invention
In order to solve at least one problem of the existing container application deployment scheme, the invention can provide a container application deployment method and device, computer equipment and medium, so as to achieve the technical purposes of improving the container application deployment efficiency and the like.
To achieve the above technical object, the present invention provides a deployment method of a containerized application, which may include, but is not limited to, at least one of the following steps.
A code commit operation instruction is received.
And triggering a first reading instruction in real time based on the code submission operation instruction so as to read a first configuration file according to the first reading instruction.
And carrying out correctness test on the submitted code content according to the configuration information contained in the first configuration file.
Compiling and packaging the code content passing the correctness test, and uploading an application formed by the packaged code content to a mirror image warehouse.
And deploying the distributable application in the mirror image warehouse to a target server.
Further, the deployment method further comprises:
and triggering a second reading instruction in real time based on the code submission operation instruction, reading a second configuration file according to the second reading instruction, and deploying the containerized application according to the second configuration file.
Wherein the configuration information in the second configuration file includes: setting at least one of a project name, a project description, a resource base address of a project code, an event triggering construction, an event construction mode, a mirror image warehouse address of a current release version, a project deployment target server and a project deployment script.
Further, the deployment method further comprises:
and recording the log information in the deployment process of the containerized application.
Wherein the log information includes: at least one of task name, task current state, task execution state, last execution time, and last successful execution time.
Further, the receiving the code commit operation instruction includes:
and receiving login information of the current user.
And respectively matching the login information with the information prestored by a plurality of users.
And reading the authority information corresponding to the login information based on the condition of successful matching.
And displaying the operable option information of one or more pieces of object codes corresponding to the authority information for the current user.
And receiving one or more code submission operation instructions sent by the current user according to the operable option information.
Further, before the correctness test, the method further comprises the following steps:
and automatically checking the code content.
Wherein the automatic check comprises at least one of a repeatability automatic check, a function nesting automatic check and a function parameter automatic check.
Further, uploading the application formed by the packaged code content to the mirror repository further comprises:
and automatically configuring the environment variables of the application running environment.
The environment variables comprise at least one of a runtime memory, a required hard disk space and a required CPU core number.
Further, after automatically configuring the environment variables, the method further comprises the following steps:
an application programming interface setting instruction is received.
And automatically packaging and integrating the application formed by the packaged code content based on the application programming interface setting instruction, and performing custom mapping of the application programming interface to form a uniform external application programming interface.
To achieve the above technical objects, one or more embodiments of the present invention can also provide a deployment apparatus for a containerized application, where the deployment apparatus may include, but is not limited to, an instruction receiving module, a file reading module, a code testing module, a code uploading module, and an application deployment module.
And the instruction receiving module is used for receiving the code submitting operation instruction.
And the file reading module is used for triggering a first reading instruction in real time based on the code submitting operation instruction so as to read a first configuration file according to the first reading instruction.
And the code testing module is used for testing the correctness of the submitted code content according to the configuration information contained in the first configuration file.
And the code uploading module is used for compiling and packaging the code content passing the correctness test and uploading an application formed by the packaged code content to the mirror image warehouse.
And the application deployment module is used for deploying the distributable application in the mirror image warehouse to the target server.
To achieve the above technical object, the present invention can also provide a computer device, which includes a memory and a processor, wherein the memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, cause the processor to execute the steps of the deployment method of the containerized application according to any embodiment of the present invention.
To achieve the above technical object, the present invention may provide a computer storage medium storing computer readable instructions, which when executed by one or more processors, cause the one or more processors to execute the steps of the deployment method of a containerized application according to any one of the embodiments of the present invention.
The invention has the beneficial effects that:
the invention can realize the functions of automatic testing, packaging, uploading, automatic deployment, automatic load balancing and the like of codes after the codes are submitted by one key of a user, and saves the time for writing the configuration files on site by the user based on the set configuration files, so the invention can greatly improve the deployment efficiency of containerized application, greatly reduce the operation cost of developers, obviously improve the stability and the usability of the containerized application deployment, and provide great convenience for the developers and other users.
The deployment platform integrated functional architecture formed on the basis of the invention can realize modularization, can still ensure application performance when facing larger data volume and more access users, is easy to realize flexible expansion of hardware resources, effectively ensures the long time and stable performance of healthy operation, can realize an automatic monitoring mechanism, can provide a unified and standardized shared service interface, avoids the problem that different interface applications need to be written respectively when different applications are called in the prior art, and greatly improves the deployment efficiency of containerized applications. In addition, the invention has low requirements on configuration environment and can realize light-weight deployment. In addition, the invention can provide a friendly operation interface according to the actual requirement, and has the advantages of easy operation and the like.
Drawings
Fig. 1 shows a flow diagram of a deployment method of a containerized application in one or more embodiments of the invention.
FIG. 2 shows a flow diagram of code submission, auto-triggering, and auto-pushing to a mirror repository of the present invention.
FIG. 3 illustrates a flow diagram for persistent integrated management of related tasks in one or more embodiments of the invention.
FIG. 4 shows a flow diagram of user management in one or more embodiments of the invention.
FIG. 5 is a flow diagram illustrating automated inspection, environment variable configuration, and external API interface configuration in one or more embodiments of the invention.
FIG. 6 illustrates a functional architecture diagram of a deployment platform for a containerized application formed in accordance with the present invention.
Detailed Description
The deployment method and apparatus, computer device, and medium for containerized applications provided by the present invention are explained and explained in detail below with reference to the drawings of the specification.
As shown in FIG. 1, and in conjunction with FIG. 2, one or more embodiments of the invention can provide a method for deploying containerized applications. More specifically, the deployment method may include, but is not limited to, at least one of the following steps.
The present invention allows developers to place code into a code repository (GitLab). The code warehouse is an open source tool for managing codes, and can assist developers in managing submitted project codes and branch codes generated by the codes in the development process.
A code commit operation instruction is received. Specifically, as shown in fig. 4, the receiving of the code commit operation instruction of the present invention includes: the method comprises the steps of receiving login information of a current user, respectively matching the login information with pre-stored information of a plurality of users, reading authority information corresponding to the login information based on a condition of successful matching, displaying operable option information of one or more sections of target codes corresponding to the authority information for the current user, and receiving one or more sections of code submitting operation instructions sent by the current user according to the operable option information. The login information involved therein may include, but is not limited to, a user name, login password information, and the like.
And triggering a first reading instruction in real time based on the code submission operation instruction so as to read the first configuration file according to the first reading instruction. And carrying out correctness test on the submitted code content according to the configuration information contained in the first configuration file.
More specifically, as shown in fig. 2, the present invention can implement some functions of the present invention by installing and registering a persistent integration tool (GitLab Runner) in a code repository (GitLab), for example, a generic GitLab Runner configuration file can be started and configured to test and package the correctness of a code submitted to a branch in the code repository, and then the code can be uploaded to a configured mirror repository after a mirror image is constructed.
As shown in fig. 3, the present invention can also trigger a second read instruction in real time based on the code submission operation instruction, so as to read a second configuration file according to the second read instruction, and deploy a containerized application according to the second configuration file; wherein, the configuration information in the second configuration file comprises: setting at least one of a project name, a project description, a resource base address of a project code, an event triggering construction, an event construction mode, a mirror image warehouse address of a current release version, a project deployment target server and a project deployment script.
It will be appreciated that the first configuration file and the second configuration file to which the present invention relates are formed on the basis of common general configuration components and can be used many times after only one complete configuration.
Compiling and packaging the code content passing the correctness test, and uploading an application (which can be a Docker mirror, for example) formed by the packaged code content to a mirror repository. The mirror image warehouse (Docker Repository) can be used for storing Docker mirror images submitted by packaging of various items, namely, the mirror image warehouse plays a role in mirror image storage, so that the download function of the Docker mirror images can be provided for a plurality of users with authority, and the purpose of being deployed everywhere after once development can be further achieved.
As shown in fig. 5, some embodiments of the invention further include, before performing the correctness test: and automatically checking the code content. Wherein the automatic check comprises at least one of a repeatability automatic check, a function nesting automatic check and a function parameter automatic check. For the automatic check of repeatability, the invention can be realized by traversing the project code line and then judging the repeated line; correspondingly numbering the project code lines, judging repeated lines, extracting, and recording corresponding storage positions; the specific threshold of the repeat line can be set according to actual needs, for example, 70 lines can be set, the original default value fails after a new threshold is set, and the invention can also automatically send code repeat exception information to the developer when the repeat code lines are too many, for example, the threshold is 200 lines, and can automatically check the repeat after receiving the revise reply of the developer. For automatic checking of function nesting, the method can judge the depth of the function nesting layer by layer, the depth is increased by 1 when one layer of function is nested, and if no function nesting exists, the depth of the function nesting is 0; the method marks the function with the function nesting depth exceeding the depth threshold, wherein the depth threshold can be 5, and the depth threshold can be updated according to the setting of a user; the invention can also automatically send the function nesting abnormal information to the developer when the depth threshold is overlarge, for example, the depth threshold is 8, and can automatically check the function nesting again after receiving the revise reply of the developer. For the automatic check of the function parameters, the number of the parameters can be counted according to each function dimension, the invention can correspondingly mark the functions of which the number of the function parameters exceeds the specified threshold, for example, the number of the specified thresholds can be 6, and certainly, the specified thresholds can be updated according to the setting of a user; the invention can also automatically send the abnormal information of the number of the functions to the developer when the number of the parameters is excessive, for example, the number of the functions is 15, and automatically check the number of the functions again after receiving the revising reply of the developer.
As shown in fig. 3, the present invention can record log information during the deployment of the containerized application during the entire deployment process; wherein the log information includes: at least one of task name, task current state, task execution state, last execution time, and last successful execution time.
The invention also comprises the following steps after uploading the application formed by the packaged code content to a mirror image warehouse: and automatically configuring the environment variables of the application running environment. The environment variable includes, but is not limited to, at least one of a run-time memory, a required hard disk space, and a required number of CPU cores. Some embodiments of the invention further comprise, after automatically configuring the environment variables: receiving an Application Programming Interface (API) setting instruction, performing automatic encapsulation and integration on an Application formed by the packed code content based on the API setting instruction, and performing custom mapping on the API to form a unified external API.
And finally, deploying the distributable application in the mirror image warehouse to the target server. Where the publishable application may be, for example, a specified version or a latest version. The invention can count the hardware resources of the deployment cluster, and can select the corresponding machine as the target server based on modes such as a greedy algorithm and the like. More specifically, the invention can pull the mirror image in the mirror image warehouse, and if the private mirror image warehouse exists, the mirror image is pulled from the private mirror image warehouse; and if the private mirror image warehouse does not exist, inquiring the mirror image from the public mirror image warehouse, pulling when the target mirror image exists, and otherwise, prompting the user in a page socket (socket) communication mode. The invention can obtain the resources of the whole executable environment, and respectively calculate the deployment time consumption and the safety evaluation of each program to be executed on the target server according to the load and storage requirements required by the execution of the application program: for example, the number of execution programs in each execution environment can be comprehensively calculated under the condition that the deployment time consumption is the same, and the execution environment with the small number of execution programs is preferentially selected; the invention can adopt a greedy strategy to allocate an optimal executable environment for executing the application program. Under the condition that a plurality of executing application programs are deployed simultaneously, the invention can adopt a uniform distribution mode to ensure that the executing application programs are respectively distributed to each Docker executable environment, and can ensure the connectivity of networks among the executing application programs by using a Docker intranet.
In summary, the implementation process of the present invention may be an implementation process of a continuous integration task, and the integration task is configured based on the configuration information in the second configuration file. The task configuration information is synchronized to the persistent integration engine instance through API call of the persistent integration engine, all task list information is inquired through task name and task state paging, and the task list information comprises but is not limited to the task name, the task current state, the task execution state, the last execution time and the last successful execution time. When the corresponding task is triggered to be executed, code pulling, compiling and packaging can be automatically carried out from the address of the resource library where the project code is located, namely the project code is released to the mirror image warehouse, the specified or latest version of the issuable program is deployed to the target server, and the project deployment script can be executed, so that one-time task construction is completed. It should be understood that in case of a task creation failure, the present invention can simultaneously change the current state and the task execution state of the task, record the task construction log, and transfer the task construction log to the task construction history list. If the task needs to be deleted, the invention can delete the task which is not executed. For the user management part, the invention can create or modify a continuous integration user, the user is only used for continuous integration and keeps synchronous with the user information in the continuous integration engine, the invention can inquire all user list information including the user name, the user state and other information by paging through the user name and the user state, the invention can delete the user information without task dependence, and if a certain task associated with the user is executed, the user is not allowed to be deleted. In addition, the invention can manage the corresponding certificate when the user is associated with the continuous integration task of the corresponding authority. The credential management is mainly to create or modify user information of a code resource library in a persistent integration task, and the user is only used for accessing the code resource library information of a corresponding project in a persistent integration tool and keeps synchronization with the user information in the persistent integration engine, and the user information mainly comprises user name and login password information. The invention can inquire all user list information by paging through the user name and the user state, and the user list information comprises but is not limited to the user name, the user state and the like. When the contact certificate of the user and the corresponding continuous integration task needs to be deleted, only one piece of user certificate information without task dependence is allowed to be deleted, and if the task is executed, the user certificate information is set to be not allowed to be deleted by default.
As shown in fig. 6, it can be understood that the deployment scheme of the containerized application provided by the present invention can be implemented based on Docker. The Docker is an open-source application container engine, and can allow developers to package applications and dependency packages into a portable container and then distribute the application and dependency packages to any popular Linux machine to realize virtualization; the Docker container fully uses a sandbox mechanism without any interfaces between each other, so that performance overhead is very low, it can run in machines and data centers, and it may not need to rely on any language, framework or wrapper system. In addition, the deployment scheme of the containerized application provided by the invention can also be realized based on a virtualization scheme such as Rancher and the like.
More specifically, the database in fig. 6 can provide storage services for upper layer applications. The basic services may include user management, message Channel (Channel) management, executive (Executor) management, Database (DB) management, and other basic service management. The third party application management is mainly responsible for managing a universal third party interface container and providing a unified Restful interface service externally. The container mirror load (Docker Loader) is used for taking charge of operations such as starting, stopping or updating of tasks in the whole platform. The container Monitor (Docker Monitor) is used for monitoring the disks, grids, health degree and the like of each running program in the whole platform. The GitLab used as a version control system is used for storing project source codes deployed to a platform and automatically packaging and uploading the project source codes to a mirror repository. The platform front-end display page (Web page) can be used for displaying the platform interface and the operable items to users such as operation and maintenance personnel for deploying the projects. The message channel management can be used as an entrance for program data access, and can register a corresponding data access entrance when a new program is deployed; the entry comprises an access data structure specification of the data, an identification and a distribution mode of a data subject and a corresponding program needing to process the access data; the system can register in the container monitor while registering the entrance, and then utilize the container monitor in the platform to perform real-time monitoring, including but not limited to monitoring the data loading rate, the data consumption rate and the like of the message channel; the message channel directly stores the data of the set data structure into the database, and can delete the relevant data of the unnecessary message channel through executing program management or database management. The database type used by the invention can include, but is not limited to, containerized databases such as Mysql, PostGreSQL, infiluxdb and the like, and can set runtime parameters such as runtime memory, disk, whether clustering (master-slave) is performed and the like, so that the database can be ensured to run normally. In addition, the invention can also set a Chinese visual configuration and monitoring interface on the platform, the specific monitoring range can cover the data channel, the executive program, the running number, the stopping number, the rolling updating number, the CPU use condition, the memory use rate, the disk use rate, the number of the data channel, the data input speed, the real-time data consumption rate and the like of the containers in the database, and the platform can be rapidly deployed or monitored by developers and business personnel who do not know the development technology conveniently.
It is understood that the present invention can also provide a deployment apparatus for containerized applications, which may include, but is not limited to, an instruction receiving module, a file reading module, a code testing module, a code uploading module, and an application deployment module.
The instruction receiving module is used for receiving a code submitting operation instruction. The instruction receiving module may be specifically configured to operate as follows: the method comprises the steps of receiving login information of a current user, respectively matching the login information with pre-stored information of a plurality of users, reading authority information corresponding to the login information based on a condition of successful matching, displaying operable option information of one or more sections of target codes corresponding to the authority information for the current user, and receiving one or more sections of code submitting operation instructions sent by the current user according to the operable option information.
The file reading module is used for triggering a first reading instruction in real time based on the code submitting operation instruction so as to read the first configuration file according to the first reading instruction. The file reading module can be further used for submitting an operation instruction based on the code to trigger a second reading instruction in real time, reading a second configuration file according to the second reading instruction, and deploying containerized application according to the second configuration file; wherein the configuration information in the second configuration file includes: setting at least one of a project name, a project description, a resource base address of a project code, an event triggering construction, an event construction mode, a mirror image warehouse address of a current release version, a project deployment target server and a project deployment script.
The code testing module is used for testing the correctness of the submitted code content according to the configuration information contained in the first configuration file.
The code uploading module is used for compiling and packaging the code content passing the correctness test, and uploading an application formed by the packaged code content to the mirror image warehouse.
The application deployment module is used for deploying the publishable application in the mirror repository to the target server.
It can be understood that the deployment apparatus can further include a logging module, an automation check module, an automation configuration module, and an external API setting module.
The log recording module is used for recording log information in the deployment process of the containerized application. Wherein, the log information may include: at least one of task name, task current state, task execution state, last execution time, and last successful execution time.
The automatic inspection module is used for automatically inspecting the code content. Wherein the automatic check comprises at least one of a repeatability automatic check, a function nesting automatic check and a function parameter automatic check.
And the automatic configuration module is used for automatically configuring the environment variables of the application running environment. The environment variables comprise at least one of runtime memory, required hard disk space and required CPU core number.
The external API setting module is used for receiving an application programming interface setting instruction, automatically packaging and integrating the application formed by the packaged code content based on the application programming interface setting instruction, and performing custom mapping on the application programming interface to form a uniform external application programming interface.
It will be appreciated that the invention can also provide a computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the method of deploying containerized applications of any of the embodiments of the invention. The deployment method of the containerized application may include, but is not limited to, at least one of the following steps: a code commit operation instruction is received. Specifically, the receiving of the code submission operation instruction of the present invention includes: the method comprises the steps of receiving login information of a current user, respectively matching the login information with pre-stored information of a plurality of users, reading authority information corresponding to the login information based on a condition of successful matching, displaying operable option information of one or more sections of target codes corresponding to the authority information for the current user, and receiving one or more sections of code submitting operation instructions sent by the current user according to the operable option information. And triggering a first reading instruction in real time based on the code submission operation instruction so as to read the first configuration file according to the first reading instruction. The method can also trigger a second reading instruction in real time based on the code submission operation instruction, so as to read a second configuration file according to the second reading instruction, and deploy containerized application according to the second configuration file; wherein, the configuration information in the second configuration file comprises: setting at least one of a project name, a project description, a resource base address of a project code, an event triggering construction, an event construction mode, a mirror image warehouse address of a current release version, a project deployment target server and a project deployment script. And carrying out correctness test on the submitted code content according to the configuration information contained in the first configuration file. Compiling and packaging the code content passing the correctness test, and uploading an application formed by the packaged code content to a mirror image warehouse. Some embodiments of the invention further comprise, before performing the correctness test: and automatically checking the code content. Wherein the automatic check comprises at least one of a repeatability automatic check, a function nesting automatic check and a function parameter automatic check. The invention can record the log information of the containerized application in the deployment process in the whole deployment process; wherein the log information includes: at least one of task name, task current state, task execution state, last execution time, and last successful execution time. The invention also comprises the following steps after uploading the application formed by the packaged code content to a mirror image warehouse: and automatically configuring the environment variables of the application running environment. The environment variables comprise at least one of runtime memory, required hard disk space and required CPU core number. Some embodiments of the invention may further comprise, after automatically configuring the environment variables: and receiving an application programming interface setting instruction, automatically packaging and integrating the application formed by the packaged code content based on the application programming interface setting instruction, and performing custom mapping on the application programming interface to form a uniform external application programming interface. And finally, deploying the distributable application in the mirror image warehouse to the target server.
It will be appreciated that the invention may also provide a computer storage medium having stored thereon computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the method of deploying containerized applications in any of the embodiments of the invention. The deployment method of the containerized application may include, but is not limited to, at least one of the following steps: a code commit operation instruction is received. Specifically, the receiving of the code submission operation instruction of the present invention includes: the method comprises the steps of receiving login information of a current user, respectively matching the login information with pre-stored information of a plurality of users, reading authority information corresponding to the login information based on a condition of successful matching, displaying operable option information of one or more sections of target codes corresponding to the authority information for the current user, and receiving one or more sections of code submitting operation instructions sent by the current user according to the operable option information. And triggering a first reading instruction in real time based on the code submission operation instruction so as to read the first configuration file according to the first reading instruction. The method can also trigger a second reading instruction in real time based on the code submission operation instruction, so as to read a second configuration file according to the second reading instruction, and deploy containerized application according to the second configuration file; wherein, the configuration information in the second configuration file comprises: setting at least one of a project name, a project description, a resource base address of a project code, an event triggering construction, an event construction mode, a mirror image warehouse address of a current release version, a project deployment target server and a project deployment script. And carrying out correctness test on the submitted code content according to the configuration information contained in the first configuration file. Compiling and packaging the code content passing the correctness test, and uploading an application formed by the packaged code content to a mirror image warehouse. Some embodiments of the invention further comprise, before performing the correctness test: and automatically checking the code content. Wherein the automatic check comprises at least one of a repeatability automatic check, a function nesting automatic check and a function parameter automatic check. The invention can record the log information of the containerized application in the deployment process in the whole deployment process; wherein the log information includes: at least one of task name, task current state, task execution state, last execution time, and last successful execution time. The invention also comprises the following steps after uploading the application formed by the packaged code content to a mirror image warehouse: and automatically configuring the environment variables of the application running environment. The environment variables comprise at least one of runtime memory, required hard disk space and required CPU core number. Some embodiments of the invention may further comprise, after automatically configuring the environment variables: and receiving an application programming interface setting instruction, automatically packaging and integrating the application formed by the packaged code content based on the application programming interface setting instruction, and performing custom mapping on the application programming interface to form a uniform external application programming interface. And finally, deploying the distributable application in the mirror image warehouse to the target server.
The logic and/or steps represented in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable storage medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable storage medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer cartridge (magnetic device), a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM-Only Memory, or flash Memory), an optical fiber device, and a portable Compact Disc Read-Only Memory (CDROM). Additionally, the computer-readable storage medium may even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic Gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic Gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "the present embodiment," "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and simplifications made in the spirit of the present invention are intended to be included in the scope of the present invention.

Claims (10)

1. A method for deploying a containerized application, comprising:
receiving a code submission operation instruction;
triggering a first reading instruction in real time based on the code submitting operation instruction so as to read a first configuration file according to the first reading instruction;
carrying out correctness test on submitted code contents according to configuration information contained in the first configuration file;
compiling and packaging the code content passing the correctness test, and uploading an application formed by the packaged code content to a mirror image warehouse;
and deploying the distributable application in the mirror image warehouse to a target server.
2. The deployment method of the containerized application of claim 1, further comprising:
submitting an operation instruction based on the code, triggering a second reading instruction in real time, reading a second configuration file according to the second reading instruction, and deploying containerized application according to the second configuration file;
wherein the configuration information in the second configuration file includes: setting at least one of a project name, a project description, a resource base address of a project code, an event triggering construction, an event construction mode, a mirror image warehouse address of a current release version, a project deployment target server and a project deployment script.
3. The deployment method of the containerized application of claim 1 or 2, further comprising:
recording the log information in the deployment process of the containerized application;
wherein the log information includes: at least one of task name, task current state, task execution state, last execution time, and last successful execution time.
4. The deployment method of the containerized application of claim 1 or 2, wherein the receiving the code submission operation instruction comprises:
receiving login information of a current user;
respectively matching the login information with a plurality of pieces of user pre-stored information;
reading the authority information corresponding to the login information based on the condition of successful matching;
displaying the operable option information of one or more sections of object codes corresponding to the authority information for the current user;
and receiving one or more code submission operation instructions sent by the current user according to the operable option information.
5. The deployment method of the containerized application of claim 1, further comprising, before performing the correctness test:
performing automatic inspection on the code content;
wherein the automatic check comprises at least one of a repeatability automatic check, a function nesting automatic check and a function parameter automatic check.
6. The deployment method of the containerized application of claim 1, wherein uploading the application formed by the packaged code content to the mirror repository further comprises:
automatically configuring the environment variables of the application running environment;
the environment variables comprise at least one of a runtime memory, a required hard disk space and a required CPU core number.
7. The deployment method of the containerized application of claim 6, further comprising, after automatically configuring the environment variables:
receiving an application programming interface setting instruction;
and automatically packaging and integrating the application formed by the packaged code content based on the application programming interface setting instruction, and performing custom mapping of the application programming interface to form a uniform external application programming interface.
8. A deployment apparatus for containerized applications, comprising:
the instruction receiving module is used for receiving a code submitting operation instruction;
the file reading module is used for triggering a first reading instruction in real time based on the code submitting operation instruction so as to read a first configuration file according to the first reading instruction;
the code testing module is used for testing the correctness of the submitted code content according to the configuration information contained in the first configuration file;
the code uploading module is used for compiling and packaging the code content passing the correctness test and uploading an application formed by the packaged code content to the mirror image warehouse;
and the application deployment module is used for deploying the distributable application in the mirror image warehouse to the target server.
9. A computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions which, when executed by the processor, cause the processor to carry out the steps of the method for deploying containerized applications according to any of claims 1 to 7.
10. A computer storage medium having computer-readable instructions stored thereon, which, when executed by one or more processors, cause the one or more processors to perform the steps of the method for deploying containerized applications according to any one of claims 1 to 7.
CN202110114057.4A 2021-01-27 2021-01-27 Deployment method and device of containerized application, computer equipment and medium Pending CN112835676A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110114057.4A CN112835676A (en) 2021-01-27 2021-01-27 Deployment method and device of containerized application, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110114057.4A CN112835676A (en) 2021-01-27 2021-01-27 Deployment method and device of containerized application, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN112835676A true CN112835676A (en) 2021-05-25

Family

ID=75930796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110114057.4A Pending CN112835676A (en) 2021-01-27 2021-01-27 Deployment method and device of containerized application, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN112835676A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113467931A (en) * 2021-06-04 2021-10-01 中国联合网络通信集团有限公司 Computing task processing method, device and system
CN113609019A (en) * 2021-08-09 2021-11-05 山东乾云启创信息科技股份有限公司 Cross-cluster deployment pipeline method and device for container cloud application
CN113743895A (en) * 2021-08-30 2021-12-03 深圳壹账通智能科技有限公司 Component management method and device, computer equipment and storage medium
CN113778549A (en) * 2021-08-16 2021-12-10 济南浪潮数据技术有限公司 Implementation method, device, equipment and medium for replacing rear-end environment variables
CN114625438A (en) * 2022-03-04 2022-06-14 中国—东盟信息港股份有限公司 Front-end application containerized local module loading method
CN115098105A (en) * 2022-02-22 2022-09-23 联信弘方(北京)科技股份有限公司 Container cloud performance test evaluation realization method, device, equipment and medium
CN115129429A (en) * 2022-09-01 2022-09-30 南京翼辉爱智物联技术有限公司 Container application management method and device, electronic equipment and storage medium

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113467931A (en) * 2021-06-04 2021-10-01 中国联合网络通信集团有限公司 Computing task processing method, device and system
CN113467931B (en) * 2021-06-04 2023-12-22 中国联合网络通信集团有限公司 Processing method, device and system of calculation task
CN113609019A (en) * 2021-08-09 2021-11-05 山东乾云启创信息科技股份有限公司 Cross-cluster deployment pipeline method and device for container cloud application
CN113609019B (en) * 2021-08-09 2024-03-08 山东乾云启创信息科技股份有限公司 Pipelining method and device for cross-cluster deployment of container cloud application
CN113778549A (en) * 2021-08-16 2021-12-10 济南浪潮数据技术有限公司 Implementation method, device, equipment and medium for replacing rear-end environment variables
CN113778549B (en) * 2021-08-16 2023-12-22 济南浪潮数据技术有限公司 Method, device, equipment and medium for realizing back-end environment variable replacement
CN113743895A (en) * 2021-08-30 2021-12-03 深圳壹账通智能科技有限公司 Component management method and device, computer equipment and storage medium
CN115098105A (en) * 2022-02-22 2022-09-23 联信弘方(北京)科技股份有限公司 Container cloud performance test evaluation realization method, device, equipment and medium
CN114625438A (en) * 2022-03-04 2022-06-14 中国—东盟信息港股份有限公司 Front-end application containerized local module loading method
CN115129429A (en) * 2022-09-01 2022-09-30 南京翼辉爱智物联技术有限公司 Container application management method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112835676A (en) Deployment method and device of containerized application, computer equipment and medium
US20190324772A1 (en) Method and device for processing smart contracts
US8296758B2 (en) Deployment and versioning of applications
US7653893B2 (en) Methods and apparatus for implementing checkin policies in source code control systems
US20170277524A1 (en) Dynamic container deployment with parallel conditional layers
US10552140B2 (en) Automated identification of deployment data for distributing discrete software deliverables
EP1582985A2 (en) Test case inheritance controlled via attributes
CN110096424B (en) Test processing method and device, electronic equipment and storage medium
JPH08234966A (en) System and method for decision of conformity of software package to rule and requirement of packaging
CN103632219A (en) Method and system for reallocating jobs for checking data quality
CN111158674A (en) Component management method, system, device and storage medium
CN110515647A (en) A kind of static resource management method, device, equipment and storage medium
US20230036357A1 (en) Method and apparatus for authority control, computer device and storage medium
CN111176722A (en) Method and device for detecting file version of third-party library and storage medium
US20120159515A1 (en) Sharing object representations
CN113568604B (en) Method and device for updating wind control strategy and computer readable storage medium
CN113434180B (en) Data processing method and device for application, server and storage medium
CN115495196A (en) Container mirror image compliance checking method and system for container cloud platform
CN113127367B (en) Defect detection method for Android dynamic permission application
CN115220873A (en) Method for running Open Harmony application in Android system
US20240095148A1 (en) Automatic assignment of changed permissions for diagnostic purposes for work container instances that have already been started
US7082376B1 (en) State full test method executor
CN111124931B (en) Java code compliance checking method and device
CN112000386A (en) Application implementation method and device
CN116661905B (en) Method and system for realizing automatic adaptation of equipment based on dynamic library loading

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