Multi-cloud container deployment environment configuration method, system, device and storage medium

By analyzing deployment commands and matching the environment configuration information in the namespace library, the automated configuration of the multi-cloud container deployment environment is realized, solving the problems of configuration errors and inconsistent docking processes in the existing technology, and improving configuration accuracy and user experience.

CN113918279BActive Publication Date: 2025-04-01E SURFING IOT CO LTD
1 Cites 0 Cited by

Patent Information

Application Number
CN202111142526.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-28
Publication Date
2025-04-01
Estimated Expiration
2041-09-28

Smart Images

  • Figure CN113918279B_ABST
    Figure CN113918279B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-cloud container deployment environment configuration method, system, device and storage medium, which can be applied to the field of cloud service technology. After obtaining the deployment command sent by the local continuous deployment system, the method of the present invention parses the deployment command to obtain the namespace and cloud resource account information, then matches the environment configuration information in the namespace library according to the namespace and cloud resource account information, and then deploys the application packaged by the local continuous deployment system to the cloud resource pool corresponding to the environment configuration information, thereby completing the environment configuration process of cloud resources without manual configuration or the user filling in too much information, improving the configuration accuracy, and simplifying the user operation content of the local continuous deployment system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud service technology, and in particular to a multi-cloud container deployment environment configuration method, system, device and storage medium. Background Art

[0002] In cloud computing, the environment information deployed by containerization often includes key information such as "cluster" and "namespace". The creation and naming of this type of information is often defined by resource managers or project managers. The application environment naming information between different resource pools and clusters may often be repeated. The current deployment method often uses manual docking configuration, which is prone to configuration errors. In the application process of cloud computing, commercial enterprises may use cloud resources of different manufacturers and standards to implement application deployment and production operations based on the cost-effectiveness evaluation of cloud resources. Different cloud resource pool specification information often has different docking processes when docking with the local continuous deployment system, which is very unfriendly to the user experience of the local continuous deployment system. Summary of the invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a multi-cloud container deployment environment configuration method, system, device and storage medium, which can improve the configuration accuracy and simplify the user operation content of the local continuous deployment system.

[0004] On the one hand, an embodiment of the present invention provides a method for configuring a multi-cloud container deployment environment, comprising the following steps:

[0005] Get the deployment command sent by the local continuous deployment system;

[0006] Parsing the deployment command to obtain namespace and cloud resource account information;

[0007] Matching environment configuration information in a namespace library according to the namespace and the cloud resource account information;

[0008] Deploy the application packaged by the local continuous deployment system to the cloud resource pool corresponding to the environment configuration information.

[0009] In some embodiments, matching the environment configuration information in the namespace library according to the namespace and the cloud resource account information includes:

[0010] Get the namespace dictionary tree pre-built according to the namespace library;

[0011] Traversing the namespace dictionary tree according to the namespace and the cloud resource account information;

[0012] When the namespace exists in the namespace dictionary tree, determining a node corresponding to the namespace in the namespace dictionary tree;

[0013] Obtain environment configuration information corresponding to the namespace from the node.

[0014] In some embodiments, after traversing the namespace dictionary tree according to the namespace and the cloud resource account information, the method further includes the following steps:

[0015] When the namespace does not exist in the namespace dictionary tree, adding a node in the namespace dictionary tree, and applying to the cloud resource pool to create the namespace;

[0016] The environment configuration information of the created namespace is saved to the newly added node.

[0017] In some embodiments, the environment configuration information includes a cloud resource pool and a cluster corresponding to the node.

[0018] On the other hand, an embodiment of the present invention provides a multi-cloud container deployment environment configuration system, including:

[0019] Local continuous deployment system, used to send deployment commands and package application deployment;

[0020] A deployment pre-parsing module is used to parse the deployment command to obtain the namespace and cloud resource account information; match the environment configuration information in the namespace library according to the namespace and the cloud resource account information; and deploy the application packaged by the local continuous deployment system to the cloud resource pool corresponding to the environment configuration information.

[0021] In some embodiments, matching the environment configuration information in the namespace library according to the namespace and the cloud resource account information includes:

[0022] Get the namespace dictionary tree pre-built according to the namespace library;

[0023] Traversing the namespace dictionary tree according to the namespace and the cloud resource account information;

[0024] When the namespace exists in the namespace dictionary tree, determining a node corresponding to the namespace in the namespace dictionary tree;

[0025] Obtain environment configuration information corresponding to the namespace from the node.

[0026] In some embodiments, after traversing the namespace dictionary tree according to the namespace and the cloud resource account information, the method further includes the following steps:

[0027] When the namespace does not exist in the namespace dictionary tree, adding a node in the namespace dictionary tree, and applying to the cloud resource pool to create the namespace;

[0028] The environment configuration information of the created namespace is saved to the newly added node.

[0029] In some embodiments, the environment configuration information includes a cloud resource pool and a cluster corresponding to the node.

[0030] On the other hand, an embodiment of the present invention provides a multi-cloud container deployment environment configuration device, including:

[0031] at least one memory for storing a program;

[0032] At least one processor is used to load the program to execute the multi-cloud container deployment environment configuration method.

[0033] On the other hand, an embodiment of the present invention provides a storage medium, which stores a computer-executable program, and when the computer-executable program is executed by a processor, it is used to implement the multi-cloud container deployment environment configuration method.

[0034] A multi-cloud container deployment environment configuration method provided by an embodiment of the present invention has the following beneficial effects:

[0035] This embodiment parses the deployment command sent by the local continuous deployment system after obtaining it to obtain the namespace and cloud resource account information, then matches the environment configuration information in the namespace library according to the namespace and cloud resource account information, and then deploys the application packaged by the local continuous deployment system to the cloud resource pool corresponding to the environment configuration information. This does not require manual configuration or the user to fill in too much information, and can complete the environment configuration process of cloud resources, thereby improving configuration accuracy and simplifying user operations of the local continuous deployment system.

[0036] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The present invention will be further described below with reference to the accompanying drawings and embodiments, wherein:

[0038] Figure 1 A flowchart of a multi-cloud container deployment environment configuration method according to an embodiment of the present invention;

[0039] Figure 2 A module block diagram of a multi-cloud container deployment environment configuration system according to an embodiment of the present invention;

[0040] Figure 3 The present invention is a flowchart of a method in an application process according to an embodiment of the present invention. DETAILED DESCRIPTION

[0041] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0042] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0043] In the description of the present invention, "several" means more than one, "many" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0044] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0045] In the description of the present invention, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0046] Reference Figure 1 The embodiment of the present invention provides a multi-cloud container deployment environment configuration method, which is applied to Figure 2 The deployment pre-analysis module of the system shown, wherein the deployment pre-analysis module is arranged between the local continuous deployment system and the cloud resource pool. In the working process, this embodiment includes the following steps:

[0047] S11. Obtain the deployment command sent by the local continuous deployment system.

[0048] In the embodiment of the present application, the local continuous deployment system is located on the user's local device. After the user operates the local continuous deployment system on the local device, a deployment command is sent to the deployment pre-analysis module. Among them, the deployment command is the instruction uploaded by the user at the current moment to improve the timeliness of information processing.

[0049] S12. Parse the deployment command to obtain namespace and cloud resource account information.

[0050] In the embodiment of the present application, after receiving the deployment command, the deployment pre-analysis module parses the command to extract the namespace and cloud resource account information carried in the deployment command. The cloud resource account information refers to the account of the user managing his resources in the cloud resource pool.

[0051] S13. Match the environment configuration information in the namespace library according to the namespace and cloud resource account information.

[0052] In the embodiment of the present application, step S13 can be implemented by the following steps:

[0053] Get the namespace dictionary trie pre-built according to the namespace library.

[0054] The namespace dictionary tree is traversed according to the namespace and cloud resource account information. Specifically, the namespace dictionary tree includes multiple nodes, and each node is provided with environment configuration information corresponding to the namespace.

[0055] When a namespace exists in the namespace dictionary tree, the node corresponding to the namespace is determined in the namespace dictionary tree, and the environment configuration information corresponding to the namespace is obtained from the node. The environment configuration information includes the cloud resource pool and cluster corresponding to the node. The namespace on the namespace dictionary tree is the deployment environment resource allocated by each resource pool to the application.

[0056] When the namespace does not exist in the namespace dictionary tree, a new node is added to the namespace dictionary tree, and an application is made to the cloud resource pool to create a namespace, and then the environment configuration information of the created namespace is saved to the new node.

[0057] The search parameters of the dictionary tree in this embodiment are namespace and cloud resource account information. When the namespace account information rules used by different cloud resource pools are inconsistent, the use of a dictionary tree search algorithm can simplify the search efficiency and improve the uniqueness representation under the same namespace naming. At the same time, the environmental configuration information of different cloud resource pools and different user accounts can be saved in the node, which is conducive to the expansion of the local continuous deployment system to connect to multiple cloud resource pools. When the searched "namespace + account information" dictionary tree has a corresponding node, the environmental configuration information corresponding to the target namespace is obtained from the node to complete the docking process of different cloud resources.

[0058] S14. Deploy the application packaged by the local continuous deployment system to the cloud resource pool corresponding to the environment configuration information.

[0059] In some embodiments, Figure 3 As shown, the steps of the above embodiment in the actual application process include:

[0060] The local continuous deployment system sends deployment commands to the front-end deployment parsing module;

[0061] S31, the deployment pre-parsing module receives the deployment command and parses the deployment command to extract the "namespace" and "cloud resource pool user account";

[0062] S32, deploying a pre-parsing module to traverse the namespace dictionary tree pre-established according to the namespace library to check whether the parsed namespace exists; if not, executing step S33; if yes, executing step S34;

[0063] S33, requesting the namespace library to add a new node;

[0064] S34. Search the node corresponding to the namespace from the namespace dictionary tree, obtain the environment configuration information corresponding to the target namespace from the node, and execute application deployment to the resources pointed to by the environment configuration information.

[0065] It can be seen from this that this embodiment deploys a pre-parsing module with "namespace" and "cloud resource account information" as parsing parameters, and searches for unique environment configuration information in the namespace library to achieve the uniqueness of the "namespace" when the local continuous deployment system implements application deployment to the cloud resource pool, so as to avoid local deployment errors caused by repeated naming problems among users when allocating space and naming in the cloud resource pool.

[0066] Reference Figure 2 , an embodiment of the present invention provides a multi-cloud container deployment environment configuration system, including:

[0067] The local continuous deployment system is used to send deployment commands and package application deployment. Specifically, the local continuous deployment system is located on the user's local device. After the user operates the local continuous deployment system on the local device, the deployment command is sent to the deployment pre-analysis module. Among them, the deployment command is the instruction uploaded by the user at the current moment to improve the timeliness of information processing.

[0068] The deployment pre-parsing module is used to parse the deployment command to obtain the namespace and cloud resource account information; match the environment configuration information in the namespace library according to the namespace and cloud resource account information; and deploy the application packaged by the local continuous deployment system to the cloud resource pool corresponding to the environment configuration information.

[0069] Specifically, after receiving the deployment command, the deployment pre-analysis module parses the command to extract the namespace and cloud resource account information carried in the deployment command. The cloud resource account information refers to the account of the user who manages his resources in the cloud resource pool. Then the following process is performed:

[0070] Get the namespace dictionary trie pre-built according to the namespace library.

[0071] The namespace dictionary tree is traversed according to the namespace and cloud resource account information. Specifically, the namespace dictionary tree includes multiple nodes, and each node is provided with environment configuration information corresponding to the namespace.

[0072] When a namespace exists in the namespace dictionary tree, the node corresponding to the namespace is determined in the namespace dictionary tree, and the environment configuration information corresponding to the namespace is obtained from the node. The environment configuration information includes the cloud resource pool and cluster corresponding to the node. The namespace on the namespace dictionary tree is the deployment environment resource allocated by each resource pool to the application.

[0073] When the namespace does not exist in the namespace dictionary tree, a new node is added to the namespace dictionary tree, and an application is made to the cloud resource pool to create a namespace, and then the environment configuration information of the created namespace is saved to the new node.

[0074] In summary, this embodiment adds a new deployment pre-parsing module to uniformly parse the deployment commands of the continuous deployment system, and deploys the application to a specific cloud resource pool based on the parsing results, thereby achieving rapid, unique positioning and precise deployment of the application deployment environment. At the same time, the deployment pre-parsing module parses the "namespace" and "cloud resource account information" contained in the deployment command, and then obtains the cloud resource pool environment configuration information that matches the parsing results composed of the namespace and cloud resource account information, and deploys the application packaged by the continuous deployment system to a specific cloud resource pool based on the configuration information, thereby simplifying the user operation content.

[0075] An embodiment of the present invention provides a multi-cloud container deployment environment configuration device, including:

[0076] at least one memory for storing a program;

[0077] At least one processor for loading the program to execute Figure 1 The multi-cloud container deployment environment configuration method shown.

[0078] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0079] An embodiment of the present invention provides a storage medium, wherein a computer executable program is stored, and when the computer executable program is executed by a processor, it is used to implement Figure 1 The multi-cloud container deployment environment configuration method shown.

[0080] The embodiment of the present invention also discloses a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes Figure 1 The method shown.

[0081] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0082] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0083] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0084] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0085] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0086] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0087] The embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Various changes can be made within the knowledge of ordinary technicians in the relevant technical field without departing from the purpose of the present invention. In addition, the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

Claims

1. A multi-cloud container deployment environment configuration method, characterized in that: The following steps are involved: Get the deployment command sent by the local continuous deployment system; Parsing the deployment command to obtain namespace and cloud resource account information; Matching environment configuration information in a namespace library according to the namespace and the cloud resource account information; Deploy the application packaged by the local continuous deployment system to the cloud resource pool corresponding to the environment configuration information; The step of matching the environment configuration information in the namespace library according to the namespace and the cloud resource account information includes: Get the namespace dictionary tree pre-built according to the namespace library; Traversing the namespace dictionary tree according to the namespace and the cloud resource account information; When the namespace exists in the namespace dictionary tree, determining a node corresponding to the namespace in the namespace dictionary tree; Obtaining environment configuration information corresponding to the namespace from the node; After traversing the namespace dictionary tree according to the namespace and the cloud resource account information, the method further includes the following steps: When the namespace does not exist in the namespace dictionary tree, adding a node in the namespace dictionary tree, and applying to the cloud resource pool to create the namespace; The environment configuration information of the created namespace is saved to the newly added node.

2. A multi-cloud container deployment environment configuration method according to claim 1, characterized in that: The environment configuration information includes the cloud resource pool and cluster corresponding to the node.

3. A multi-cloud container deployment environment configuration system, characterized in that: include: Local continuous deployment system, used to send deployment commands and package application deployment; A deployment pre-parsing module is used to parse the deployment command to obtain the namespace and cloud resource account information; match the environment configuration information in the namespace library according to the namespace and the cloud resource account information; and deploy the application packaged by the local continuous deployment system to the cloud resource pool corresponding to the environment configuration information; The step of matching the environment configuration information in the namespace library according to the namespace and the cloud resource account information includes: Get the namespace dictionary tree pre-built according to the namespace library; Traversing the namespace dictionary tree according to the namespace and the cloud resource account information; When the namespace exists in the namespace dictionary tree, determining a node corresponding to the namespace in the namespace dictionary tree; Obtaining environment configuration information corresponding to the namespace from the node; After traversing the namespace dictionary tree according to the namespace and the cloud resource account information, the deployment pre-parsing module is further used to perform the following steps: When the namespace does not exist in the namespace dictionary tree, adding a node in the namespace dictionary tree, and applying to the cloud resource pool to create the namespace; The environment configuration information of the created namespace is saved to the newly added node.

4. A multi-cloud container deployment environment configuration system according to claim 3, characterized in that: The environment configuration information includes the cloud resource pool and cluster corresponding to the node.

5. A multi-cloud container deployment environment configuration device, characterized in that: include: at least one memory for storing a program; At least one processor is used to load the program to execute the multi-cloud container deployment environment configuration method according to any one of claims 1-2.

6. A storage medium, characterized in that: A computer-executable program is stored therein, and when the computer-executable program is executed by a processor, it is used to implement the multi-cloud container deployment environment configuration method according to any one of claims 1-2.

Citation Information

Patent Citations

  • Application-based visual container configuration management method, device and system

    CN110333877A