A method and device for deploying a proxy container

By deploying the agent container on the node server and using the container management platform to manage the life cycle, the problem of high workload and missing expansion of agent process installation and update in the cluster is solved, automated deployment and running status monitoring are realized, and costs are reduced.

CN111679888BActive Publication Date: 2025-01-24WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010501424.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-04
Publication Date
2025-01-24
Estimated Expiration
2040-06-04

AI Technical Summary

Technical Problem

In a cluster with hundreds or thousands of hosts, the existing technology requires the installation or update of the business agent process for each node server separately. It has a lot of work and consumes huge manpower and material resources. It is easy to miss installation during capacity expansion, resulting in data loss .

Method used

By deploying proxy containers on the node server, using the container management platform to manage the life cycle of the container, and obtain the application file configuration from the file server to the proxy container to achieve the automation deployment and operation of the proxy process.

Benefits of technology

The automated deployment of the business process is realized, the resource usage is saved, the deployment cost is reduced, and the problem of missing installation during expansion is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111679888B_ABST
    Figure CN111679888B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method and device for deploying a proxy container, the method comprising: a node server generates a container management instance with a proxy setting function based on a container generation instruction of a container management platform; the container generation instruction is triggered by the container management platform based on a proxy generation instruction of a proxy server; the proxy generation instruction is used to instruct the node server to deploy a container with a proxy setting function; the node server generates a proxy container based on the container management instance; the life cycle of the proxy container is managed by the container management platform; the node server obtains an application file corresponding to the proxy setting function from a file server based on the container management instance, and configures the application file to the proxy container, so that the proxy container has the proxy setting function. The above method can realize the automatic deployment of business processes and the monitoring of the running status, save resource usage, and reduce deployment costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology of financial technology (Fintech), and in particular to a method and device for deploying a proxy container. Background Art

[0002] In recent years, with the development of computer technology, more and more technologies are applied in the financial field. The traditional financial industry is gradually transforming to financial technology (Fintech). However, due to the security and real-time requirements of the financial industry, higher requirements are also placed on technology. The implementation of computer technology requires the installation of corresponding business processes in the computer; such as log processes, monitoring processes, etc., so that the computer can handle business normally.

[0003] In the prior art, the business proxy process in the node server is installed directly on the host by using SSH (Secure Shell)\SCP (SSH copy); however, when installing or updating the business proxy process in a cluster with hundreds or thousands of hosts, this method requires installing or updating the business proxy process for each node server separately, which is a large workload and consumes huge manpower and material resources; the number of business proxy processes in the node server is large, and when the cluster is expanded, it is easy to miss the installation of the business proxy process on the expanded node server, resulting in data loss. Alternatively, the binary executable file of the business proxy process is directly built into the operating system image of the node server and installed with the host initialization. However, when the business proxy process needs to be updated, this method requires the node server's operating system to be repackaged and the system to be reinstalled through the existing server, which consumes server resources and still has a large workload. Summary of the invention

[0004] The embodiments of the present invention provide a method and device for deploying a proxy container, which are used to realize automatic deployment of a business process and monitoring of the running status, save resource usage, and reduce deployment costs.

[0005] In a first aspect, an embodiment of the present invention provides a method for deploying a proxy container, the method comprising:

[0006] The node server generates a container management instance with a set proxy function based on a container generation instruction of a container management platform; the container generation instruction is triggered by the container management platform based on an agent generation instruction of an agent server; the agent generation instruction is used to instruct the node server to deploy a container with the set proxy function; the node server generates a proxy container based on the container management instance; the life cycle of the proxy container is managed by the container management platform; the node server obtains an application file corresponding to the set proxy function from a file server based on the container management instance, and configures the application file to the proxy container, so that the proxy container has the set proxy function.

[0007] Using the above method, the proxy server generates a proxy generation instruction and sends the proxy generation instruction to the container management platform. The container management platform is triggered by the proxy generation instruction to obtain the container generation instruction, and then distributes the container generation instruction to each node server, so that each node server generates a container management instance with a set proxy function. In this way, the container management instance in each node server is the same. Further, each node server generates a proxy container according to the container management instance, obtains the application file corresponding to the set proxy function from the file server, and configures the application file into the proxy container, so that the proxy container has a proxy function. In this way, the automatic deployment of the proxy process in each node server is realized through the proxy server, the container management platform, the file server, and each node server. In addition, the container management platform can monitor the running status of the proxy container and the business process of the proxy container, and manage the life cycle of the proxy container. The automatic deployment of the business process and the running status monitoring are realized, which saves resource usage and reduces deployment costs.

[0008] In a possible design, the node server generates a proxy container based on the container management instance, including: the node server obtains a container image file from an image server based on the container management instance to generate the proxy container.

[0009] By adopting the above method, the node server can obtain the container image file from the image server based on the container management instance; that is, the container image file of the proxy container with different proxy functions can be stored in the image server, so that the proxy containers with different proxy functions share a container image file, and the proxy containers in different node servers and the same node server share a container image file. In this way, the operating environment of all proxy containers in the cluster is the same, the operating environment of the proxy container is unified, and the problem of incompatibility between the proxy process and the node server environment caused by the different versions or configurations of each node server is eliminated; the application files of the proxy containers with different proxy functions are stored in the file server, so that the proxy containers with different proxy functions have application files corresponding to different proxy functions, thereby realizing that the proxy containers have different proxy functions; in this way, the container image file of each proxy container with a proxy function is coupled with the application file, and the complete proxy container file of each proxy container with a proxy function is set with a container image file, which occupies resources.

[0010] In a possible design, before generating a container management instance with a set proxy function, it also includes: the node server receives the container generation instruction sent by the custom controller of the container management platform; the node server obtains the container image file from the image server based on the container management instance to generate the proxy container, including: the container management instance of the node server obtains the container image file from the image server through the container engine Dockerd; the container engine Dockerd of the node server generates the proxy container through the container image file.

[0011] By adopting the above method, the custom controller in the container platform generates the container generation instruction according to the proxy generation instruction, and the container generation instruction is uniformly generated by the custom controller, so that the container generation instruction can be applied to node servers of different versions and operating systems, so that node servers of different operating environments can obtain the same container management instance according to the container generation instruction. The container management instance obtains the container image file from the image server through the container engine Dockerd, and further the container engine Dockerd can generate a proxy container according to the container image file, without setting a container image file for each proxy container, which can reduce the cost of resource occupation.

[0012] In a possible design, the node server generates a proxy container based on the container management instance, including: the node server generates a proxy container with a proxy management process based on the container management instance; the node server obtains the application file corresponding to the set proxy function from the file server based on the container management instance, including: the node server generates a proxy container with a proxy management process based on the container management instance, and obtains the application file from the file server through the proxy management process; configuring the application file to the proxy container, including: generating a proxy process running in the proxy container through the application file.

[0013] By adopting the above method, the node server generates a proxy container with a proxy management process based on the container management instance, and can obtain application files from the file server through the proxy management process, and then configure the application files into the proxy container, and generate a proxy process running in the proxy container. In this way, the automatic deployment of proxy containers with different proxy functions is realized.

[0014] In a possible design, after configuring the application file to the proxy container, the method further includes:

[0015] The node server receives an agent update instruction, which is sent by the agent service end; the node server obtains the update file corresponding to the agent update instruction from the file server through the agent management process; the node server closes the agent process through the agent management process, and generates an updated agent process according to the update file.

[0016] With the above method, the proxy server sends a proxy update instruction to the node server, so that the proxy management process in the node server obtains the update file from the file server, further closes the current proxy process, and generates an updated proxy process according to the obtained update file. In this way, it is possible to automatically update the proxy process in a cluster including at least one node server. Compared with the manual update of each server in the prior art, the update speed is accelerated, saving manpower and time costs.

[0017] In a possible design, it also includes: the node server receives a proxy deletion instruction; the proxy deletion instruction is sent by the proxy server through the container management platform; and the node server deletes the proxy container indicated by the proxy deletion instruction through the container management platform.

[0018] By adopting the above method, the proxy server can send a proxy deletion instruction to the container management platform, so that the container management platform distributes the proxy deletion instruction to at least one node server in the cluster, so that at least one node server deletes the proxy container corresponding to the proxy deletion instruction. Alternatively, the container management platform may monitor that the running status of the proxy container of at least one node server is abnormal, and the proxy container needs to be deleted, and then send the proxy deletion instruction to the corresponding node server. In this way, the automatic uninstallation of the proxy process in the cluster is realized, saving manpower and time costs.

[0019] In a possible design, the container image file is integrated through the agent general framework and the container general framework.

[0020] By adopting the above method, the general framework of the agent and the general framework of the container are integrated in the container image file, so that the proxy containers with different proxy functions share a common set of general frameworks. In this way, only one set of container image files of the general framework needs to be stored in the image server, so that when each subsequent node server generates a proxy container, the container image file can be obtained, thereby reducing resource usage.

[0021] In a second aspect, an embodiment of the present invention provides a method for deploying a proxy container, the method comprising:

[0022] The container management platform receives the proxy generation instruction sent by the proxy server; the container management platform sends the container generation instruction to the node server based on the proxy generation instruction; the container generation instruction is used to instruct the node server to generate a proxy container; the proxy container is used to obtain the corresponding application file from the file server based on the container generation instruction, and configure the application file to the proxy container.

[0023] Using the above method, the container management platform receives the proxy generation instruction sent by the proxy server, generates the container generation instruction according to the proxy generation instruction, and distributes it to each node server, so that each node server generates a proxy container, and then the proxy container obtains the corresponding application file from the file server according to the container generation instruction, and configures the application file to the proxy container. In this way, even if the operating system or configuration of each node server in the server cluster is different, it can receive the container generation instruction sent by the container management platform, and generate the corresponding proxy container according to the container generation instruction, and further generate proxy containers with different proxy functions according to the obtained application files. Realize the automated deployment of proxy containers with proxy functions in the server cluster. Save manpower and time costs.

[0024] In one possible design, the container management platform sends a container generation instruction to a node server based on the agent generation instruction, including: the container management platform sends the container generation instruction to a container management platform interface through a custom controller based on the agent generation instruction, so that the node server receives the container generation instruction sent by the container management platform interface.

[0025] Using the above method, the container management platform sends the container generation instruction to the container management platform interface through the custom controller based on the proxy generation instruction. In this way, the custom controller can define the container generation instruction as a format that can be received by node servers corresponding to different operating systems or configurations, thereby eliminating the obstacle of installing the same proxy container on node servers corresponding to different operating systems or configurations.

[0026] In a possible design, it also includes: the container management platform receives an agent deletion instruction; the agent deletion instruction is sent by the agent server; the container management platform sends the agent deletion instruction to the node server, so that the node server deletes the agent container indicated by the agent deletion instruction.

[0027] By adopting the above method, the container management platform receives the proxy deletion instruction sent by the proxy server, and sends the proxy deletion instruction to at least one node server, so that the at least one node server automatically deletes the corresponding proxy container according to the proxy deletion instruction, reducing labor costs and time costs.

[0028] In a third aspect, an embodiment of the present invention provides a deployment device for a proxy container, the device comprising:

[0029] A processing module, configured to generate a container management instance with a proxy setting function based on a container generation instruction of a container management platform; the container generation instruction is triggered by the container management platform based on an agent generation instruction of an agent server; the agent generation instruction is used to instruct to deploy a container with the proxy setting function on the node server;

[0030] The processing module is further used to generate a proxy container based on the container management instance; the life cycle of the proxy container is managed by the container management platform;

[0031] The acquisition module is used to acquire the application file corresponding to the set proxy function from the file server based on the container management instance, and configure the application file to the proxy container, so that the proxy container has the set proxy function.

[0032] In a fourth aspect, an embodiment of the present invention provides a deployment device for a proxy container, the device comprising:

[0033] The transceiver module is used to receive the proxy generation instruction sent by the proxy server;

[0034] The transceiver module is also used to send a container generation instruction to the node server based on the proxy generation instruction; the container generation instruction is used to instruct the node server to generate a proxy container; the proxy container is used to obtain the corresponding application file from the file server based on the container generation instruction, and configure the application file to the proxy container.

[0035] In a fifth aspect, an embodiment of the present invention further provides a computing device, comprising: a memory for storing a computer program; a processor for calling the computer program stored in the memory, and executing the methods described in various possible designs of the first aspect and the second aspect according to the obtained program.

[0036] In the sixth aspect, an embodiment of the present invention further provides a computer-readable non-volatile storage medium, comprising a computer-readable program. When a computer reads and executes the computer-readable program, the computer executes the methods described in various possible designs of the first aspect and the second aspect.

[0037] These implementations or other implementations of the present invention will be more concise and understandable in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0039] Figure 1 A schematic diagram of the architecture of a method for deploying a proxy container provided by an embodiment of the present invention;

[0040] Figure 2 A schematic diagram of the architecture of a node server provided in an embodiment of the present invention;

[0041] Figure 3 A schematic diagram of a process flow of a method for deploying a proxy container provided by an embodiment of the present invention;

[0042] Figure 4 A schematic diagram of the structure of a container image file provided by an embodiment of the present invention;

[0043] Figure 5 A schematic diagram of a process flow of a method for deploying a proxy container provided by an embodiment of the present invention;

[0044] Figure 6A schematic diagram of a process flow of a method for deploying a proxy container provided by an embodiment of the present invention;

[0045] Figure 7 A schematic diagram of a process flow of a method for deploying a proxy container provided by an embodiment of the present invention;

[0046] Figure 8 A schematic diagram of a deployment device for a proxy container provided by an embodiment of the present invention;

[0047] Fig. 9 A schematic diagram of a deployment device for a proxy container provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] As shown in the figure, a schematic diagram of the architecture of a method for deploying a proxy container provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the proxy server 101 sends the proxy generation instruction to the container management platform 102; the container management platform 102 receives the proxy generation instruction, and generates a container generation instruction according to the proxy generation instruction, and the container management platform 102 distributes the container generation instruction to the server cluster 105, and the server cluster 105 is composed of at least one node server 106; after receiving the container generation instruction, the node server 106 generates a container management instance according to the container generation instruction, and obtains the container image file from the image server 104 according to the container management instance, and generates a proxy container according to the container image file. Further, the node server 106 obtains the application file corresponding to the set proxy function from the file server 103 according to the container management instance, and configures the application file to the proxy container, thereby obtaining a proxy container with the set proxy function. A schematic diagram of the architecture of a node server provided in an embodiment of the present invention; as shown Figure 2As shown, after the container management instance is generated in the node server 106, a proxy container including a proxy management process is generated according to the obtained container image file, and a proxy process is generated according to the obtained application file corresponding to the set proxy function, to obtain a proxy container with the set proxy function. In this way, after the container management instance is generated in the node server 106, a proxy container including a proxy management process is generated according to the obtained container image file, and the proxy management process in the proxy container obtains the application file corresponding to the set proxy function from the file server 103 according to the container management instance in the node server 106, and generates a proxy process in the proxy container according to the application file.

[0050] Based on this, the embodiment of the present application provides a process of a method for deploying a proxy container, such as Figure 3 As shown, including:

[0051] Step 301: The node server generates a container management instance with a set proxy function based on a container generation instruction of a container management platform; the container generation instruction is triggered by the container management platform based on an agent generation instruction of an agent server; the agent generation instruction is used to instruct the deployment of a container with the set proxy function on the node server;

[0052] Here, the node server can be a node server in a server cluster that performs various tasks. For example, bank accounting and settlement services can process a large amount of data through a server cluster that performs accounting and settlement tasks; in this way, each node server in the server cluster needs to set up an agent container with an accounting agent function and a proxy container with a settlement agent function. Among them, a proxy server can be set up for the server cluster to receive the user's trigger instruction to generate an agent generation instruction, and convert the agent generation instruction into a form that can be received by the container management platform; the user can configure the relevant parameters of the agent container on the proxy server, so that the agent generation instruction contains the relevant parameters, and then perform corresponding function restrictions, function activation, determine the agent type, etc. on the generated agent container; for example, limit the relevant parameters such as the access of the agent container to the host file. The container management platform can generate a container generation instruction according to the agent generation instruction, and distribute the container generation instruction to each node server in the server cluster, so that node servers with different operating systems and different configurations can receive the container generation instruction, so that the node server generates a container management instance according to the container generation instruction, and the container management instance is used to deploy a container with a set agent function. For example, in the previous example, the container management instance is used to deploy the proxy container with the accounting agent function and set up the proxy container with the settlement agent function. In addition, when the business operation pressure in the cluster is high, or the business is expanded, etc., and it is necessary to add node servers, a new node server is added to the cluster, and the container management platform deploys the container management instance in the new node server. In this way, the container management instance in the new node server will automatically generate a proxy container. When the business operation in the cluster does not require too many node servers, or the node server fails, etc., and the node server needs to be removed, the container management instance will shut down the proxy container on the node server. The container management instance can shut down the proxy container by receiving instructions from the container management platform, or by pre-setting the corresponding program in the container management instance, etc. The specific implementation method is not limited here.

[0053] Step 302: The node server generates a proxy container based on the container management instance; the life cycle of the proxy container is managed by the container management platform;

[0054] Here, in the previous example, the lifecycles of the proxy container with accounting proxy function and the proxy container with settlement proxy function are managed by the container management platform. For example, when the proxy container with accounting proxy function completes the accounting work, in order to save server resources, the container management platform can shut down the proxy container with accounting proxy function in each node server.

[0055] Step 303: The node server obtains the application file corresponding to the set proxy function from the file server based on the container management instance, and configures the application file to the proxy container, so that the proxy container has the set proxy function.

[0056] Here, in the previous example, the generation of an agent container with an accounting agent function requires obtaining an application file corresponding to the accounting agent function; the generation of an agent container with a settlement agent function requires obtaining an application file corresponding to the settlement agent function. The file server can provide application files corresponding to various agent functions.

[0057] Using the above method, the proxy server generates a proxy generation instruction and sends the proxy generation instruction to the container management platform. The container management platform is triggered by the proxy generation instruction to obtain the container generation instruction, and then distributes the container generation instruction to each node server, so that each node server generates a container management instance with a set proxy function. In this way, the container management instance in each node server is the same. Further, each node server generates a proxy container according to the container management instance, obtains the application file corresponding to the set proxy function from the file server, and configures the application file into the proxy container, so that the proxy container has a proxy function. In this way, the automatic deployment of the proxy process in each node server is realized through the proxy server, the container management platform, the file server, and each node server. In addition, the container management platform can monitor the running status of the proxy container and the business process of the proxy container, and manage the life cycle of the proxy container. The automatic deployment of the business process and the running status monitoring are realized, which saves resource usage and reduces deployment costs.

[0058] The embodiment of the present application also provides a method for deploying a proxy container, that is, the node server generates a proxy container based on the container management instance, including: the node server obtains a container image file from an image server based on the container management instance to generate the proxy container.

[0059] Here, an embodiment of the present invention provides a schematic diagram of the structure of a container image file; Figure 4 As shown, the structure of the container image file can be set to executable program, configuration file, tool\library, file system, for example, the executable program can be Agent BIN, the configuration file can be Agent CONIF, the tool\library can be Python\java, and the file system can be Alpine Linux 3.11.2. The structure and hierarchy of the container image file here are just examples and are not specifically limited.

[0060] An embodiment of the present application provides another method for deploying a proxy container, which, before generating a container management instance with a set proxy function, also includes: the node server receives the container generation instruction sent by the custom controller of the container management platform; the node server obtains the container image file from the image server based on the container management instance to generate the proxy container, including: the container management instance of the node server obtains the container image file from the image server through the container engine Dockerd; the container engine Dockerd of the node server generates the proxy container through the container image file.

[0061] Here, a custom controller can be installed on the container management platform, so that the container generation instruction can be sent through the custom controller. The node server includes a container engine Dockerd, which triggers the container engine Dockerd to obtain the container image file after the container management instance is generated. The trigger action can be generated by the component deployed on the node server by the container management platform, so that the proxy container generated by the container engine Dockerd of each node server according to the container image file has the same operating environment.

[0062] An embodiment of the present application provides another method for deploying a proxy container, wherein a node server generates a proxy container based on the container management instance, including: the node server generates a proxy container with a proxy management process based on the container management instance; the node server obtains an application file corresponding to the set proxy function from a file server based on the container management instance, including: the node server generates a proxy container with a proxy management process based on the container management instance, and obtains the application file from the file server through the proxy management process; configuring the application file to the proxy container, including: generating a proxy process running in the proxy container through the application file.

[0063] Here, if Figure 2 As shown, the proxy container generated by the node server based on the container management instance includes a proxy management process, and the proxy management process obtains application files including corresponding proxy function files from the file server and configures them in the proxy container, so that a corresponding proxy process is generated in the proxy container. The proxy management process can manage the operation of the proxy process. For example, when an abnormality occurs in the proxy process, the proxy management process will actively shut down the abnormal proxy process and pull up the normal corresponding proxy process to ensure that the tasks of the node server are carried out normally.

[0064] An embodiment of the present application provides a method for updating a proxy process, wherein, after configuring the application file to the proxy container, it also includes: the node server receiving a proxy update instruction, wherein the proxy update instruction is sent by the proxy server; the node server obtains an update file corresponding to the proxy update instruction from the file server through the proxy management process; the node server closes the proxy process through the proxy management process, and generates an updated proxy process according to the update file.

[0065] Here, when the proxy container is deployed, when the proxy process in the proxy container undergoes vulnerability repair, parameter configuration change, upgrade, etc., the updated application file can be stored in the file server to replace the original application file. In this way, the proxy server sends the proxy update instruction to the proxy management process of the node server, and the proxy management process obtains the update file corresponding to the proxy update instruction, that is, the updated application file, and closes the current proxy process, and generates an updated proxy process based on the obtained updated application file.

[0066] An embodiment of the present application provides a method for deleting a proxy container, comprising: the node server receiving a proxy deletion instruction; the proxy deletion instruction is sent by the proxy server through the container management platform; the node server deletes the proxy container indicated by the proxy deletion instruction through the container management platform.

[0067] Here, the container management platform can be used to monitor the running status of the proxy container and the proxy process, and to set rules for the generation and closing of the proxy container and the proxy process. When an abnormality occurs in the running status of the proxy container or the proxy process, the container management platform generates a proxy deletion instruction to close the proxy container or the proxy process. Alternatively, the container management platform sets the rule that the resources occupied by the proxy container or the proxy process shall not exceed one percent of the CPU resources of the node server; if the resource usage exceeds this amount, the container management platform generates a proxy deletion instruction to close the proxy container or the proxy process. Here, the proxy deletion instruction of the container management platform can also be triggered by the proxy server, and the proxy deletion instruction of the proxy server can also be triggered by the user. Here, the trigger source of the proxy deletion instruction is not specifically limited.

[0068] An embodiment of the present application provides a method for integrating a container image file, that is, the container image file is integrated through an agent general framework and a container general framework.

[0069] Based on this, the embodiment of the present application provides a process of a method for deploying a proxy container, such as Figure 5 As shown, including:

[0070] Step 501: The container management platform receives an agent generation instruction sent by the agent server;

[0071] Step 502: The container management platform sends a container generation instruction to the node server based on the proxy generation instruction; the container generation instruction is used to instruct the node server to generate a proxy container; the proxy container is used to obtain the corresponding application file from the file server based on the container generation instruction, and configure the application file to the proxy container.

[0072] Here, the above method is adopted, the container management platform receives the proxy generation instruction sent by the proxy server, generates the container generation instruction according to the proxy generation instruction, and distributes it to each node server, so that each node server generates a proxy container, and then the proxy container obtains the corresponding application file from the file server according to the container generation instruction, and configures the application file to the proxy container. In this way, even if the operating system or configuration of each node server in the server cluster is different, it can receive the container generation instruction sent by the container management platform, and generate the corresponding proxy container according to the container generation instruction, and further generate proxy containers with different proxy functions according to the obtained application files. Realize the automatic deployment of proxy containers with proxy functions in the server cluster. Save manpower and time costs.

[0073] An embodiment of the present application provides a process of a method for deploying a proxy container, wherein the container management platform sends a container generation instruction to a node server based on the proxy generation instruction, including: the container management platform sends the container generation instruction to a container management platform interface through a custom controller based on the proxy generation instruction, so that the node server receives the container generation instruction sent by the container management platform interface.

[0074] Here, a custom controller and a container management platform interface are set in the container management platform. After receiving the agent generation instruction, the custom controller generates a container generation instruction and sends the container generation instruction to the container management platform interface; so that the container management platform interface sends the container generation instruction to the component deployed by the container management platform on the node server.

[0075] Based on the above process, the embodiment of the present application provides another process of a method for deploying a proxy container. For example, the container management platform can be the platform where the Kubernetes application is located, and the component deployed on the node server by the container management platform is Kubelet, the custom controller can be Daemon Controller, the container management platform interface can be Kube-apiserver, and the container management instance can be Daemon Pod. Figure 6 As shown, including:

[0076] Step 601: A user triggers a proxy server through a user portal.

[0077] Step 602: The proxy server generates a proxy generation instruction according to the user's trigger instruction and local configuration rules.

[0078] Step 603: The proxy server sends the proxy generation instruction to Kubernetes. Kubernetes generates a container generation instruction through DaemonController and sends it to each node server through Kube-apiserver.

[0079] Step 604: After receiving the container generation instruction through Kubelet, each node server obtains the Daemon Pod. Kubelet sends the container Runtime Interface to the container engine Dockerd, triggering the container engine Dockerd to obtain the container image file.

[0080] Step 605: Each node server generates an agent container according to the obtained container image file, the container general framework and the agent general framework in the container image file, wherein the agent general framework includes an Agent manager (agent management process).

[0081] Step 606: The Agent manager obtains the application file of the agent process corresponding to the agent generation instruction from the file server.

[0082] Step 607: Agent manager configures the acquired application file of the corresponding agent process into the agent container, and acquires the agent container with the set function.

[0083] based on Figure 6 The present application embodiment provides a method process for proxy update, such as Figure 7 As shown, including:

[0084] Step 701: The user confirms that the proxy process needs to be upgraded, and then the upgraded update file is stored in the file server, and the proxy server is triggered to generate a proxy update instruction.

[0085] Step 702: After the proxy server generates the proxy update instruction, it sends the proxy update instruction to the node server.

[0086] Step 703: After receiving the agent update instruction, the Agent manager corresponding to the agent update instruction in the node server obtains the update file from the file server.

[0087] Step 704: Agent manager closes the current agent process.

[0088] Step 705: Agent manager configures the update file into the agent container and generates an updated agent process.

[0089] It should be noted that the above process sequence is not unique. Figure 7 Step 703 of the process may be performed after step 704.

[0090] In addition, the present application also provides a method for integrating container image files; that is, setting a warehouse management system, such as Gitlab. Store the source files of the container image files in Gitlab. Set an operating system, such as Jenkins. Define a polling code update task in Jenkins. Set up a continuous integration system, such as Docker Compose. After receiving the code update notification of the polling code update task, integrate the source file code of the updated container image file in Gitlab to generate a container image file including a container general framework and an agent general framework.

[0091] The present application also provides a method for testing and publishing a proxy container, that is, the test cluster is a cluster that simulates the production environment, including: a proxy server, a file server, a mirror server, each node server, and a container management platform. Each server in the test cluster operates in accordance with the operation mode of the production environment, and tests whether the integrated container image file can be applied normally through an automatic regression test method. After determining that it can be applied normally, the container image file and application file are sent to the mirror server and file server of the production environment respectively for production application.

[0092] The present application also provides a method for monitoring a system, that is, a monitoring system can be set up to monitor key indicators of proxy containers, proxy processes, node servers, etc., such as CPU, memory, network throughput, bandwidth usage, disk I\O, disk usage, proxy process status, etc. The monitoring system may include a time series database, an alarm system, an interface display, etc. For example, the time series database, the alarm system, and the interface display may be Prometheus (used to collect monitoring data and act as a time series database), AlertManager (used to manage alarms and configure alarm policies), and Grafana (used to provide an interface through which data is displayed).

[0093] Based on the same concept, an embodiment of the present invention provides a deployment device for a proxy container. Figure 8 A schematic diagram of a deployment device for a proxy container provided in an embodiment of the present application, such as Figure 8 Including:

[0094] Processing module 801, used to generate a container management instance with a set proxy function based on a container generation instruction of a container management platform; the container generation instruction is triggered by the container management platform based on an agent generation instruction of an agent server; the agent generation instruction is used to instruct to deploy a container with the set proxy function on the node server;

[0095] The processing module 801 is also used to generate a proxy container based on the container management instance; the life cycle of the proxy container is managed by the container management platform;

[0096] The acquisition module 802 is used to acquire the application file corresponding to the set proxy function from the file server based on the container management instance, and configure the application file to the proxy container, so that the proxy container has the set proxy function.

[0097] In a possible design, the processing module 801 is specifically used to: based on the container management instance, obtain the container image file from the image server and generate the proxy container.

[0098] In a possible design, the processing module 801 is also used to: receive the container generation instruction sent by the custom controller of the container management platform; the node server obtains the container image file from the image server based on the container management instance, and generates the proxy container, including: the container management instance of the node server obtains the container image file from the image server through the container engine Dockerd; the container engine Dockerd of the node server generates the proxy container through the container image file.

[0099] In one possible design, the processing module 801 is specifically used for: the node server generates a proxy container with a proxy management process based on the container management instance; the node server obtains the application file corresponding to the set proxy function from the file server based on the container management instance, including: the node server generates a proxy container with a proxy management process based on the container management instance, and obtains the application file from the file server through the proxy management process; the application file is configured to the proxy container, including: generating a proxy process running in the proxy container through the application file.

[0100] In one possible design, the processing module 801 is also used to: receive an agent update instruction, which is sent by the agent server; the node server obtains the update file corresponding to the agent update instruction from the file server through the agent management process; the node server closes the agent process through the agent management process, and generates an updated agent process based on the update file.

[0101] In a possible design, the processing module 801 is also used to: receive a proxy deletion instruction; the proxy deletion instruction is sent by the proxy server through the container management platform; the node server deletes the proxy container indicated by the proxy deletion instruction through the container management platform.

[0102] In a possible design, the container image file is integrated through the agent general framework and the container general framework.

[0103] Based on the same concept, an embodiment of the present invention provides a deployment device for a proxy container. Fig. 9 A schematic diagram of a deployment device for a proxy container provided in an embodiment of the present application, such as Fig. 9 Including:

[0104] The transceiver module 901 is used to receive the proxy generation instruction sent by the proxy server;

[0105] The transceiver module 901 is also used to send a container generation instruction to the node server based on the proxy generation instruction; the container generation instruction is used to instruct the node server to generate a proxy container; the proxy container is used to obtain the corresponding application file from the file server based on the container generation instruction, and configure the application file to the proxy container.

[0106] In a possible design, the transceiver module 901 is specifically used to: based on the agent generation instruction, send the container generation instruction to the container management platform interface through the custom controller, so that the node server receives the container generation instruction sent by the container management platform interface.

[0107] In a possible design, the transceiver module 901 is also used to: receive a proxy deletion instruction; the proxy deletion instruction is sent by the proxy server; the container management platform sends the proxy deletion instruction to the node server, so that the node server deletes the proxy container indicated by the proxy deletion instruction.

[0108] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0109] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0110] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0112] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for deploying a proxy container, characterized in that: The method comprises: The node server generates a container management instance with a set proxy function based on a container generation instruction of a container management platform; the container generation instruction is triggered by the container management platform based on an agent generation instruction of an agent server; the agent generation instruction is received by the agent server from a user's trigger instruction and converted into a form receivable by the container management platform, the agent generation instruction includes relevant parameters of an agent container with a set proxy function, and the agent generation instruction is used to instruct the node server to deploy a container with the set proxy function; the node server is one of a plurality of node servers, and the container generation instruction is distributed to the plurality of node servers by the container management platform; The node server obtains the container image file from the image server based on the container management instance and generates a proxy container; the life cycle of the proxy container is managed by the container management platform; The node server obtains the application file corresponding to the set proxy function from the file server based on the container management instance, and configures the application file to the proxy container, so that the proxy container has the set proxy function.

2. The method according to claim 1, characterized in that Before generating the container management instance with the proxy setting function, the method further includes: The node server receives the container generation instruction sent by the custom controller of the container management platform; The node server obtains the container image file from the image server based on the container management instance to generate the proxy container, including: The container management instance of the node server obtains the container image file from the image server through the container engine Dockerd; The container engine Dockerd of the node server generates the proxy container through the container image file.

3. The method according to claim 1, characterized in that The node server generates a proxy container based on the container management instance, including: The node server generates a proxy container with a proxy management process based on the container management instance; The node server obtains the application file corresponding to the setting proxy function from the file server based on the container management instance, including: The node server generates a proxy container with a proxy management process based on the container management instance, and obtains the application file from the file server through the proxy management process; Configuring the application file to the proxy container includes: A proxy process running in the proxy container is generated by the application file.

4. The method according to claim 3, characterized in that After configuring the application file to the proxy container, the method further includes: The node server receives an agent update instruction, where the agent update instruction is sent by the agent server; The node server obtains the update file corresponding to the proxy update instruction from the file server through the proxy management process; The node server closes the proxy process through the proxy management process and generates an updated proxy process according to the update file.

5. The method according to any one of claims 1 to 4, characterized in that: Also includes: The node server receives an agent deletion instruction; the agent deletion instruction is sent by the agent server through the container management platform; The node server deletes the proxy container indicated by the proxy deletion instruction through the container management platform.

6. The method according to claim 5, characterized in that The container image file is integrated through the agent general framework and the container general framework.

7. A method for deploying a proxy container, characterized in that: The method comprises: The container management platform receives the proxy generation instruction sent by the proxy server; The container management platform distributes the container generation instruction to multiple node servers based on the proxy generation instruction; the proxy generation instruction is received by the proxy server as a trigger instruction of the user and converted into a form receivable by the container management platform, the proxy generation instruction includes relevant parameters of the proxy container with the set proxy function, and the proxy generation instruction is used to instruct the deployment of the container with the set proxy function on the node server; the container generation instruction is used to instruct the node server to generate a container management instance with the set proxy function, and based on the container management instance, obtain the container image file from the image server to generate a proxy container; the proxy container is used to obtain the corresponding application file from the file server based on the container generation instruction, and configure the application file to the proxy container.

8. The method according to claim 7, characterized in that The container management platform sends a container generation instruction to the node server based on the agent generation instruction, including: The container management platform sends the container generation instruction to the container management platform interface through a custom controller based on the agent generation instruction, so that the node server receives the container generation instruction sent by the container management platform interface.

9. The method according to claim 7 or 8, characterized in that Also includes: The container management platform receives an agent deletion instruction; the agent deletion instruction is sent by the agent server; The container management platform sends the proxy deletion instruction to the node server, so that the node server deletes the proxy container indicated by the proxy deletion instruction.

10. A deployment device for a proxy container, characterized in that: The device comprises: A processing module, configured to generate a container management instance with a proxy setting function based on a container generation instruction of a container management platform; the container generation instruction is triggered by the container management platform based on a proxy generation instruction of a proxy server; the proxy generation instruction is received by a proxy server as a trigger instruction of a user and converted into a form receivable by the container management platform, the proxy generation instruction includes relevant parameters of a proxy container with a proxy setting function, and the proxy generation instruction is used to instruct a node server to deploy a container with the proxy setting function; the node server is one of a plurality of node servers, and the container generation instruction is distributed by the container management platform to the plurality of node servers; The processing module is further used to obtain a container image file from an image server based on the container management instance and generate a proxy container; the life cycle of the proxy container is managed by the container management platform; The acquisition module is used to acquire the application file corresponding to the set proxy function from the file server based on the container management instance, and configure the application file to the proxy container, so that the proxy container has the set proxy function.

11. A deployment device for a proxy container, characterized in that: The device comprises: The transceiver module is used to receive the proxy generation instruction sent by the proxy server; The transceiver module is also used to distribute container generation instructions to multiple node servers based on the proxy generation instruction; the proxy generation instruction is received by the proxy server as a trigger instruction of the user and converted into a form receivable by the container management platform, the proxy generation instruction includes relevant parameters of the proxy container with the set proxy function, and the proxy generation instruction is used to instruct the deployment of the container with the set proxy function on the node server; the container generation instruction is used to instruct the node server to generate a container management instance with the set proxy function, and based on the container management instance, obtain the container image file from the image server to generate a proxy container; the proxy container is used to obtain the corresponding application file from the file server based on the container generation instruction, and configure the application file to the proxy container.

12. A computer-readable storage medium, characterized in that: The storage medium stores a program, and when the program is run on a computer, the computer is enabled to implement the method according to any one of claims 1 to 6, or the method according to any one of claims 7 to 9.

13. A computer device, characterized in that: include: Memory for storing computer programs; A processor is used to call the computer program stored in the memory, and execute the method according to any one of claims 1 to 6 or any one of claims 7 to 9 according to the obtained program.

Citation Information

Patent Citations

  • Application container based application management method and system

    CN106020930A

  • Service node control method and related equipment

    CN110995473A