Nothing Special   »   [go: up one dir, main page]

CN111679888A - Method and device for deploying proxy container - Google Patents

Method and device for deploying proxy container Download PDF

Info

Publication number
CN111679888A
CN111679888A CN202010501424.1A CN202010501424A CN111679888A CN 111679888 A CN111679888 A CN 111679888A CN 202010501424 A CN202010501424 A CN 202010501424A CN 111679888 A CN111679888 A CN 111679888A
Authority
CN
China
Prior art keywords
container
proxy
server
node server
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010501424.1A
Other languages
Chinese (zh)
Other versions
CN111679888B (en
Inventor
卢道和
杨军
陈广镇
黎君
李焕
刘乐
胡仲臣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN202010501424.1A priority Critical patent/CN111679888B/en
Publication of CN111679888A publication Critical patent/CN111679888A/en
Application granted granted Critical
Publication of CN111679888B publication Critical patent/CN111679888B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例提供一种代理容器的部署方法及装置,该方法包括:节点服务器基于容器管理平台的容器生成指令,生成具有设定代理功能的容器管理实例;该容器生成指令是容器管理平台基于代理服务端的代理生成指令触发的;代理生成指令则用于指示在节点服务器部署具有设定代理功能的容器;节点服务器基于容器管理实例,生成代理容器;代理容器的生命周期由容器管理平台管理;节点服务器基于容器管理实例从文件服务器获取设定代理功能对应的应用文件,并将该应用文件配置至代理容器,从而使代理容器具有设定代理功能。采用上述方法,可以实现业务进程的自动化部署以及运行状态监控,节省资源使用量,降低部署成本。

Figure 202010501424

Embodiments of the present invention provide a method and device for deploying a proxy container. The method includes: a node server generates a container management instance with a proxy setting function based on a container generation instruction of the container management platform; the container generation instruction is based on the container management platform. Triggered by the proxy generation instruction of the proxy server; the proxy generation instruction is used to instruct the node server to deploy the container with the set proxy function; the node server generates the 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 the application file corresponding to the proxy function setting 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 proxy setting function. By using the above method, automatic deployment of business processes and monitoring of running status can be realized, resource usage can be saved, and deployment costs can be reduced.

Figure 202010501424

Description

一种代理容器的部署方法及装置Method and device for deploying proxy container

技术领域technical field

本申请涉及金融科技(Fintech)的网络技术领域,尤其涉及一种代理容器的部署方法及装置。The present application relates to the network technology field of financial technology (Fintech), and in particular, to a method and apparatus for deploying a proxy container.

背景技术Background technique

近年来,随着计算机技术的发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变,但由于金融行业的安全性、实时性要求,也对技术提出更高的要求。而在计算机技术的实现需要在计算机中安装对应的业务进程;如,日志进程,监控进程等等,使得计算机可以正常处理业务。In recent years, with the development of computer technology, more and more technologies have been applied in the financial field, and the traditional financial industry is gradually transforming into financial technology (Fintech). higher requirement. In the implementation of computer technology, corresponding business processes, such as log processes, monitoring processes, etc., need to be installed in the computer, so that the computer can process the business normally.

现有技术中节点服务器中的业务代理进程是通过SSH(Secure Shell,安全外壳协议)\SCP(SSH copy的简称)将业务代理进程的二进制可执行文件直接在主机上安装;但在拥有成百上千台主机的集群中安装或更新业务代理进程时,这种方式则需要对每台节点服务器分别安装或更新业务代理进程,工作量大,耗费巨大的人力物力;在节点服务器中的业务代理进程数量大,对集群扩容时,容易在扩容的节点服务器上遗漏业务代理进程的安装,造成数据缺失。或者,直接将业务代理进程的二进制可执行文件内置到节点服务器的操作系统镜像中,随主机初始化安装。但这种方式在业务代理进程需要更新时,则需要将节点服务器的操作系统重新打包,通过存量服务器进行系统重装,耗费服务器资源,且仍工作量大。In the prior art, the service agent process in the node server directly installs the binary executable file of the service agent process on the host through SSH (Secure Shell, Secure Shell Protocol)\SCP (abbreviation for SSH copy). When installing or updating the business agent process in a cluster of thousands of hosts, this method needs to install or update the business agent process for each node server separately, which requires a lot of work and consumes huge manpower and material resources; the business agent in the node server The number of processes is large. When expanding the cluster, it is easy to miss the installation of the business agent process on the expanded node server, resulting in data loss. Or, directly build the binary executable file of the business agent process into the operating system image of the node server, and install it with the host. However, in this way, when the business agent process needs to be updated, the operating system of the node server needs to be repackaged, and the system is reinstalled through the stock server, which consumes server resources and still has a large workload.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种代理容器的部署方法及装置,用于实现业务进程的自动化部署以及运行状态监控,节省资源使用量,降低部署成本。Embodiments of the present invention provide a method and device for deploying a proxy container, which are used to realize automatic deployment of business processes and monitoring of running status, save resource usage, and reduce deployment costs.

第一方面,本发明实施例提供一种代理容器的部署方法,该方法包括:In a first aspect, an embodiment of the present invention provides a method for deploying a proxy container, the method comprising:

节点服务器基于容器管理平台的容器生成指令,生成具有设定代理功能的容器管理实例;所述容器生成指令是所述容器管理平台基于代理服务端的代理生成指令触发的;所述代理生成指令用于指示在所述节点服务器部署具有所述设定代理功能的容器;节点服务器基于所述容器管理实例,生成代理容器;所述代理容器的生命周期由所述容器管理平台管理;所述节点服务器基于所述容器管理实例从文件服务器获取所述设定代理功能对应的应用文件,并将所述应用文件配置至所述代理容器,从而使所述代理容器具有所述设定代理功能。The node server generates a container management instance with an agent setting function based on the container generation instruction of the container management platform; the container generation instruction is triggered by the container management platform based on the agent generation instruction of the proxy server; the agent generation instruction is used for Instruct the node server to deploy the 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 is based on The container management instance acquires an application file corresponding to the proxy setting function from a file server, and configures the application file to the proxy container, so that the proxy container has the proxy setting function.

采用上述方法,代理服务端生成代理生成指令,并将代理生成指令发送至容器管理平台,容器管理平台被该代理生成指令触发得到容器生成指令,进而将容器生成指令分发至各个节点服务器,使各个节点服务器生成具有设定代理功能的容器管理实例。如此,使得各个节点服务器中的容器管理实例相同。进一步,各个节点服务器根据容器管理实例生成代理容器,并从文件服务器获取设定代理功能对应的应用文件,并将该应用文件配置到该代理容器中,使得该代理容器具有代理功能。如此,通过代理服务端、容器管理平台、文件服务器、各个节点服务器实现各个节点服务器中代理进程的自动化部署。且,容器管理平台可以对代理容器和代理容器的业务进程的运行状态进行监控,并管理代理容器的生命周期。实现业务进程的自动化部署以及运行状态监控,节省资源使用量,降低部署成本。Using the above method, the proxy server generates the 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 The node server generates a container management instance with the function of setting proxy. In this way, the container management instances in each node server are the same. Further, each node server generates a proxy container according to the container management instance, obtains the application file corresponding to the proxy function setting from the file server, and configures the application file into the proxy container, so that the proxy container has the 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. Moreover, the container management platform can monitor the running state of the proxy container and the business process of the proxy container, and manage the life cycle of the proxy container. It realizes the automatic deployment and running status monitoring of business processes, saves resource usage and reduces deployment costs.

在一种可能的设计中,节点服务器基于所述容器管理实例,生成代理容器,包括:所述节点服务器基于所述容器管理实例,从镜像服务器获取容器镜像文件,生成所述代理容器。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, and generates the proxy container.

采用上述方法,节点服务器基于容器管理实例,可以从镜像服务器中获取容器镜像文件;也就是说,可以将具有不同设定代理功能的代理容器的容器镜像文件存储在镜像服务器中,使得不同设定代理功能的代理容器共用一个容器镜像文件,不同节点服务器和同一节点服务器中的代理容器共用一个容器镜像文件。如此,使得集群中的所有代理容器的运行环境相同,统一了代理容器的运行环境,消除了因为各节点服务器可能存在的版本或配置等不同,所造成的代理进程与节点服务器环境不能兼容的问题;将不同设定代理功能的代理容器的应用文件存储在文件服务器,使得不同设定代理功能的代理容器拥有不同代理功能对应的应用文件,进而实现代理容器具有不同代理功能;以此消除因为每种设定代理功能的代理容器的容器镜像文件与应用文件耦合,每种设定代理功能的代理容器的完整代理容器文件都设置有容器镜像文件,而占用资源的情况。With 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 different settings The proxy containers of the proxy function share a container image file, and the proxy containers in different node servers and the same node server share the same container image file. In this way, the running environment of all the proxy containers in the cluster is the same, the running 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 may be eliminated. ; Store the application files of the proxy containers with different proxy functions 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; A container image file of a proxy container with proxy function set is coupled with an application file, and the complete proxy container file of each proxy container set with proxy function is set with a container image file, which occupies resources.

在一种可能的设计中,所述生成具有设定代理功能的容器管理实例之前,还包括:所述节点服务器接收所述容器管理平台的自定义控制器发送的所述容器生成指令;所述节点服务器基于所述容器管理实例,从镜像服务器获取容器镜像文件,生成所述代理容器,包括:所述节点服务器的所述容器管理实例通过容器引擎Dockerd从所述镜像服务器中获取所述容器镜像文件;所述节点服务器的所述容器引擎Dockerd通过所述容器镜像文件,生成所述代理容器。In a possible design, before the generating the container management instance with the setting proxy function, the method further includes: receiving, by the node server, 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 from the image server through the container engine Dockerd file; the container engine Dockerd of the node server generates the proxy container through the container image file.

采用上述方法,容器平台中的自定义控制器根据代理生成指令,生成容器生成指令,通过自定义控制器统一生成容器生成指令,使得该容器生成指令可以适用于不同版本和操作系统的节点服务器,使得不同运行环境的节点服务器都可以根据容器生成指令得到相同的容器管理实例。容器管理实例通过容器引擎Dockerd从镜像服务器中获取容器镜像文件,进一步该容器引擎Dockerd可以根据容器镜像文件生成代理容器,而不需要为每个代理容器设置一个容器镜像文件,可以减少资源占用的成本。Using 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 through the custom controller, so that the container generation instruction can be applied to node servers of different versions and operating systems. This enables node servers in different operating environments to 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. Further, the container engine Dockerd can generate the 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 .

在一种可能的设计中,节点服务器基于所述容器管理实例,生成代理容器,包括:节点服务器基于所述容器管理实例,生成具有代理管理进程的代理容器;所述节点服务器基于所述容器管理实例从文件服务器获取所述设定代理功能对应的应用文件,包括:所述节点服务器基于所述容器管理实例,生成具有代理管理进程的代理容器,并通过所述代理管理进程从所述文件服务器获取所述应用文件;将所述应用文件配置至所述代理容器,包括:通过所述应用文件生成运行在所述代理容器中的代理进程。In a possible design, the node server generates an agent container based on the container management instance, including: the node server generates an agent container with an agent management process based on the container management instance; the node server manages an agent container based on the container management instance; The instance obtains the application file corresponding to the set proxy function from the file server, including: the node server generates a proxy container with a proxy management process based on the container management instance, and uses the proxy management process to generate a proxy container from the file server through the proxy management process. Acquiring the application file; configuring the application file to the proxy container includes: generating a proxy process running in the proxy container by using the application file.

采用上述方法,节点服务器基于容器管理实例,生成具有代理管理进程的代理容器,可以实现通过代理管理进程从文件服务器中获取应用文件,进而将应用文件配置到代理容器中,生成运行在代理容器中的代理进程。如此,实现自动部署具有不同代理功能的代理容器。Using the above method, the node server generates an agent container with an agent management process based on the container management instance, and can obtain application files from the file server through the agent management process, and then configure the application files into the agent container to generate and run in the agent container. agent process. In this way, agent containers with different agent functions are automatically deployed.

在一种可能的设计中,将所述应用文件配置至所述代理容器之后,还包括:In a possible design, after configuring the application file to the proxy container, the method further includes:

所述节点服务器接收代理更新指令,所述代理更新指令是所述代理服务端发送的;所述节点服务器通过所述代理管理进程从所述文件服务器中获取所述代理更新指令对应的更新文件;所述节点服务器通过所述代理管理进程关闭所述代理进程,并根据所述更新文件生成更新的代理进程。The node server receives the proxy update instruction, and the proxy update instruction is sent by the proxy 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.

采用上述方法,代理服务端发送代理更新指令至节点服务器,以使得节点服务器中的代理管理进程从文件服务器中获取更新文件,进一步关闭当前代理进程,根据获取的更新文件生成更新的代理进程。如此,可以实现在包含至少一个节点服务器中的集群中,自动化全量更新代理进程。相比于现有技术中通过人工逐台更新来说,加快了更新速度,节省了人力与时间成本。Using the above method, the proxy server sends the 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 acquired update file. In this way, it can be implemented in a cluster including at least one node server to automate and fully update the agent process. Compared with the manual update one by one in the prior art, the update speed is accelerated, and labor and time costs are saved.

在一种可能的设计中,还包括:所述节点服务器接收代理删除指令;所述代理删除指令是所述代理服务端通过所述容器管理平台发送的;所述节点服务器通过所述容器管理平台删除所述代理删除指令指示的代理容器。In a possible design, it further includes: the node server receives a proxy deletion instruction; the proxy deletion instruction is sent by the proxy server through the container management platform; the node server through the container management platform The proxy container indicated by the proxy deletion instruction is deleted.

采用上述方法,代理服务端可以发送代理删除指令至容器管理平台,使得容器管理平台将代理删除指令分发至集群中的至少一个节点服务器,以使至少一个节点服务器删除该代理删除指令对应的代理容器。或者,也可以是容器管理平台监控到至少一个节点服务器的代理容器的运行状态异常等状况,需要将该代理容器删除,则发送代理删除指令至对应的节点服务器。如此,实现集群中代理进程的自动化卸载,节省了人力与时间成本。With the above method, the proxy server can send the 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 the abnormal running state of the proxy container of at least one node server. If the proxy container needs to be deleted, it sends a proxy deletion instruction to the corresponding node server. In this way, the automatic unloading of the agent process in the cluster is realized, which saves manpower and time costs.

在一种可能的设计中,所述容器镜像文件是通过代理通用框架和容器通用框架集成的。In a possible design, the container image file is integrated through the proxy common framework and the container common framework.

采用上述方法,将代理的通用框架和容器的通用框架集成在容器镜像文件中,实现不同代理功能的代理容器的共用一套通用框架,如此,只需在镜像服务器中存储一套通用框架的容器镜像文件,使得后续各节点服务器生成代理容器时,都获取该容器镜像文件即可,减少资源占用。Using the above method, the general framework of the agent and the general framework of the container are integrated into the container image file, and the common framework of the agent container with different agent functions is realized. Mirror file, so that each subsequent node server can obtain the container mirror file when generating the proxy container, reducing resource occupation.

第二方面,本发明实施例提供一种代理容器的部署方法,该方法包括:In a second aspect, an embodiment of the present invention provides a method for deploying a proxy container, the method comprising:

容器管理平台接收代理服务端发送的代理生成指令;所述容器管理平台基于所述代理生成指令,向节点服务器发送容器生成指令;所述容器生成指令用于指示所述节点服务器生成代理容器;所述代理容器用于基于所述容器生成指令从文件服务器获取对应的应用文件,并将所述应用文件配置至所述代理容器。The container management platform receives the agent generation instruction sent by the agent server; the container management platform sends the container generation instruction to the node server based on the agent generation instruction; the container generation instruction is used to instruct the node server to generate the agent container; The proxy container is configured to obtain a corresponding application file from a file server based on the container generation instruction, and configure the application file to the proxy container.

采用上述方法,容器管理平台接收代理服务端发送的代理生成指令,根据代理生成指令生成容器生成指令,并分发至各节点服务器,使得各节点服务器生成代理容器,进而使得代理容器根据容器生成指令从文件服务器获取对应的应用文件,并将应用文件配置至代理容器。如此,即使服务器集群中各节点服务器的操作系统或配置等不同,也可以接收容器管理平台发送的容器生成指令,并根据容器生成指令生成对应的代理容器,进一步根据获取的应用文件生成不同代理功能的代理容器。实现服务器集群中具有代理功能的代理容器的自动化部署。节省人力与时间成本。Using the above method, the container management platform receives the agent generation instruction sent by the agent server, generates the container generation instruction according to the agent generation instruction, and distributes it to each node server, so that each node server generates the agent container, and then makes the agent container generate the agent container according to the container generation instruction. The file server obtains the corresponding application file 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, generate the corresponding proxy container according to the container generation instruction, and further generate different proxy functions according to the obtained application file. proxy container. Enables automated deployment of proxy containers with proxy capabilities in server clusters. Save labor and time costs.

在一种可能的设计中,所述容器管理平台基于所述代理生成指令,向节点服务器发送容器生成指令,包括:所述容器管理平台基于所述代理生成指令,通过自定义控制器向容器管理平台接口发送所述容器生成指令,使得所述节点服务器接收所述容器管理平台接口发送的所述容器生成指令。In a possible design, the container management platform sends the container generation instruction to the node server based on the agent generation instruction, including: the container management platform generates the instruction based on the agent, and sends the container management instruction to the container management platform through the custom controller. The platform interface sends the container generation instruction, so that the node server receives the container generation instruction sent by the container management platform interface.

采用上述方法,容器管理平台基于代理生成指令通过自定义控制器向容器管理平台接口发送容器生成指令。如此,自定义控制器可以将容器生成指令定义为,不同的操作系统或配置等对应的节点服务器均可接收的格式;消除了不同操作系统或配置等对应的节点服务器均安装相同的代理容器的障碍。With 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 agent 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; eliminating the need for node servers corresponding to different operating systems or configurations to install the same proxy container obstacle.

在一种可能的设计中,还包括:所述容器管理平台接收代理删除指令;所述代理删除指令是所述代理服务端发送的;所述容器管理平台将所述代理删除指发送至所述节点服务器,使得所述节点服务器删除所述代理删除指令指示的代理容器。In a possible design, it further includes: the container management platform receives 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 The node server causes the node server to delete the proxy container indicated by the proxy deletion instruction.

采用上述方法,容器管理平台接收代理服务端发送的代理删除指令,将该代理删除指令发送至至少一个节点服务器,使得该至少一个节点服务器根据该代理删除指令自动删除对应的代理容器,减少人力成本与时间成本。Using 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, thereby reducing labor costs. with time cost.

第三方面,本发明实施例提供一种代理容器的部署装置,该装置包括:In a third aspect, an embodiment of the present invention provides an apparatus for deploying a proxy container, where the apparatus includes:

处理模块,用于基于容器管理平台的容器生成指令,生成具有设定代理功能的容器管理实例;所述容器生成指令是所述容器管理平台基于代理服务端的代理生成指令触发的;所述代理生成指令用于指示在所述节点服务器部署具有所述设定代理功能的容器;a processing module, configured to generate a container management instance with a proxy setting function based on the container generation instruction of the container management platform; the container generation instruction is triggered by the container management platform based on the agent generation instruction of the agent server; the agent generates The instruction is used to instruct to deploy the container with the set proxy function on the node server;

所述处理模块还用于,基于所述容器管理实例,生成代理容器;所述代理容器的生命周期由所述容器管理平台管理;The processing module is further configured to, based on the container management instance, generate a proxy container; the life cycle of the proxy container is managed by the container management platform;

获取模块,用于基于所述容器管理实例从文件服务器获取所述设定代理功能对应的应用文件,并将所述应用文件配置至所述代理容器,从而使所述代理容器具有所述设定代理功能。an obtaining module, configured to obtain an application file corresponding to the set proxy function from a file server based on the container management instance, and configure the application file to the proxy container, so that the proxy container has the setting proxy function.

第四方面,本发明实施例提供一种代理容器的部署装置,该装置包括:In a fourth aspect, an embodiment of the present invention provides an apparatus for deploying a proxy container, where the apparatus includes:

收发模块,用于接收代理服务端发送的代理生成指令;The transceiver module is used to receive the proxy generation instruction sent by the proxy server;

所述收发模块还用于,基于所述代理生成指令,向节点服务器发送容器生成指令;所述容器生成指令用于指示所述节点服务器生成代理容器;所述代理容器用于基于所述容器生成指令从文件服务器获取对应的应用文件,并将所述应用文件配置至所述代理容器。The transceiver module is further configured to, based on the proxy generation instruction, send a container generation instruction to a node server; the container generation instruction is used to instruct the node server to generate a proxy container; the proxy container is used to generate a proxy container based on the container The instruction obtains the corresponding application file from the file server, and configures the application file to the proxy container.

第五方面,本发明实施例还提供一种计算设备,包括:存储器,用于存储计算机程序;处理器,用于调用所述存储器中存储的计算机程序,按照获得的程序执行如第一方面、第二方面的各种可能的设计中所述的方法。In a fifth aspect, an embodiment of the present invention further provides a computing device, including: a memory for storing a computer program; a processor for calling the computer program stored in the memory, and executing the first aspect, The method described in various possible designs of the second aspect.

第六方面,本发明实施例还提供一种计算机可读非易失性存储介质,包括计算机可读程序,当计算机读取并执行所述计算机可读程序时,使得计算机执行如第一方面、第二方面的各种可能的设计中所述的方法。In a sixth aspect, an embodiment of the present invention further provides a computer-readable non-volatile storage medium, comprising a computer-readable program, when the computer reads and executes the computer-readable program, the computer executes the first aspect, The method described in various possible designs of the second aspect.

本发明的这些实现方式或其他实现方式在以下实施例的描述中会更加简明易懂。These implementations or other implementations of the present invention will be more clearly understood in the description of the following embodiments.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.

图1为本发明实施例提供的一种代理容器的部署方法的架构示意图;FIG. 1 is a schematic structural diagram of a method for deploying a proxy container according to an embodiment of the present invention;

图2为本发明实施例提供的一种节点服务器的架构示意图;FIG. 2 is a schematic diagram of the architecture of a node server according to an embodiment of the present invention;

图3为本发明实施例提供的一种代理容器的部署方法的流程示意图;3 is a schematic flowchart of a method for deploying a proxy container according to an embodiment of the present invention;

图4为本发明实施例提供的一种容器镜像文件的结构示意图;FIG. 4 is a schematic structural diagram of a container image file provided by an embodiment of the present invention;

图5为本发明实施例提供的一种代理容器的部署方法的流程示意图;5 is a schematic flowchart of a method for deploying a proxy container according to an embodiment of the present invention;

图6为本发明实施例提供的一种代理容器的部署方法的流程示意图;6 is a schematic flowchart of a method for deploying a proxy container according to an embodiment of the present invention;

图7为本发明实施例提供的一种代理容器的部署方法的流程示意图;7 is a schematic flowchart of a method for deploying a proxy container according to an embodiment of the present invention;

图8为本发明实施例提供的一种代理容器的部署装置示意图;FIG. 8 is a schematic diagram of an apparatus for deploying a proxy container according to an embodiment of the present invention;

图9为本发明实施例提供的一种代理容器的部署装置示意图。FIG. 9 is a schematic diagram of an apparatus for deploying a proxy container according to an embodiment of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions 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 a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

如图所示,本发明实施例提供的一种代理容器的部署方法的架构示意图,如图1所示,代理服务端101将代理生成指令发送至容器管理平台102;容器管理平台102接收代理生成指令,并根据该代理生成指令生成容器生成指令,容器管理平台102将该容器生成指令分发至服务器集群105,服务器集群105由至少一个节点服务器106组成;节点服务器106接收到该容器生成指令后,根据该容器生成指令生成容器管理实例,并根据该容器管理实例向镜像服务器104获取容器镜像文件,根据该容器镜像文件生成代理容器,进一步,节点服务器106根据该容器管理实例向文件服务器103获取该设定代理功能对应的应用文件,并将该应用文件配置至代理容器,进而得到具有该设定代理功能的代理容器。本发明实施例提供的一种节点服务器的架构示意图;如图2所示,节点服务器106中生成容器管理实例后,根据获取的容器镜像文件生成包含代理管理进程的代理容器,并根据获取的设定代理功能对应的应用文件生成代理进程,获得具有设定代理功能的代理容器。如此,节点服务器106中生成容器管理实例后,根据获取的容器镜像文件生成包含代理管理进程的代理容器,该代理容器中的代理管理进程根据节点服务器106中该容器管理实例,向文件服务器103获取该设定代理功能对应的应用文件,并根据该应用文件在代理容器中生成代理进程。As shown in the figure, an architectural schematic diagram of a method for deploying a proxy container provided by an embodiment of the present invention, as shown in FIG. 1 , 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 instruction, and generate the container generation instruction according to the proxy generation instruction, 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 the node server 106 receives the container generation instruction, A container management instance is generated according to the container generation instruction, and a container image file is obtained from the mirror server 104 according to the container management instance, and a proxy container is generated according to the container image file. Further, the node server 106 obtains the container image file from the file server 103 according to the container management instance. The application file corresponding to the proxy function is set, and the application file is configured to the proxy container, so as to obtain the proxy container with the set proxy function. A schematic diagram of the architecture of a node server provided by an embodiment of the present invention; as shown in FIG. 2 , after a container management instance is generated in the node server 106, an agent container including an agent management process is generated according to the obtained container image file, and according to the obtained configuration The application file corresponding to the set proxy function generates a proxy process, and the proxy container with the set proxy function is obtained. In this way, after the container management instance is generated in the node server 106, a proxy container including the proxy management process is generated according to the obtained container image file, and the proxy management process in the proxy container obtains from the file server 103 according to the container management instance in the node server 106. The application file corresponding to the proxy function is set, and the proxy process is generated in the proxy container according to the application file.

基于此,本申请实施例提供了一种代理容器的部署方法的流程,如图3所示,包括:Based on this, an embodiment of the present application provides a flow of a method for deploying a proxy container, as shown in FIG. 3 , including:

步骤301、节点服务器基于容器管理平台的容器生成指令,生成具有设定代理功能的容器管理实例;所述容器生成指令是所述容器管理平台基于代理服务端的代理生成指令触发的;所述代理生成指令用于指示在所述节点服务器部署具有所述设定代理功能的容器;Step 301: The node server generates a container management instance with an agent setting function based on the container generation instruction of the container management platform; the container generation instruction is triggered by the container management platform based on the agent generation instruction of the proxy server; the agent generates The instruction is used to instruct to deploy the container with the set proxy function on the node server;

此处,节点服务器可以为执行各种任务的服务器集群中的节点服务器。例如,银行记账以及结算等业务,可以通过执行记账和结算任务的服务器集群来处理大量的数据;如此,该服务器集群中各节点服务器需要设置具有记账代理功能的代理容器和设置具有结算代理功能的代理容器。其中,针对该服务器集群可以设置代理服务端,用于接收用户的触发指令生成代理生成指令,并将该代理生成指令转化为容器管理平台可接收的形式;用户可以在代理服务端配置该代理容器的相关参数,使得代理生成指令中包含该相关参数,进而对生成的代理容器进行相应的功能限制、功能开通、确定代理类型等;例如,限制该代理容器对主机文件的访问等相关参数。容器管理平台可以根据代理生成指令生成容器生成指令,并将该容器生成指令分发至该服务器集群中的各节点服务器,使得不同操作系统和不同配置的节点服务器都可以接收该容生成指令,使得节点服务器根据该容器生成指令生成容器管理实例,该容器管理实例用于部署具有设定代理功能的容器。如,在上一个示例中,该容器管理实例用于部署该具有记账代理功能的代理容器和设置具有结算代理功能的代理容器。另外,当集群中发生业务运行压力较大,或扩展业务等情况,需要增加节点服务器时,则在集群中加入新节点服务器,并由容器管理平台在新节点服务器中部署容器管理实例,如此,新节点服务器中的容器管理实例会自行生成代理容器。当集群中的业务运行不需要过多的节点服务器,或节点服务器出现故障等情况,需要剔除节点服务器时,容器管理实例会将该节点服务器上的代理容器关闭。容器管理实例将代理容器关闭可以通过接收容器管理平台的指令,或者容器管理实例中预先设好相应程序等实现,这里实现方式具体不做限定。Here, the node server may be a node server in a server cluster that performs various tasks. For example, for bank accounting and settlement services, a large amount of data can be processed through a server cluster that performs accounting and settlement tasks; thus, each node server in the server cluster needs to set up an agent container with the function of accounting agent and set up an agent container with settlement function. Proxy container for proxy functions. Among them, a proxy server can be set for the server cluster, which is used to receive the user's trigger command to generate the proxy generation command, and convert the proxy generation command into a form that can be received by the container management platform; the user can configure the proxy container on the proxy server related parameters, so that the proxy generation instruction includes the related parameters, and then the generated proxy container is subjected to corresponding function restrictions, function activation, determination of the proxy type, etc.; for example, the proxy container is restricted from accessing the host file and other related parameters. The container management platform can generate the 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 the node servers with different operating systems and different configurations can receive the container generation instruction, so that the node server can receive the container generation instruction. The server generates a container management instance according to the container generation instruction, and the container management instance is used for deploying a container with a function of setting an agent. For example, in the previous example, the container management instance is used for deploying the agent container with the function of accounting agent and setting the agent container with the function of settlement agent. In addition, when the business operation pressure is high in the cluster, or the business needs to be expanded, and node servers need to be added, 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 generates the proxy container itself. When the business operation in the cluster does not require too many node servers, or the node server fails, and the node server needs to be eliminated, the container management instance will close the proxy container on the node server. The container management instance can close the proxy container by receiving an instruction from the container management platform, or by presetting a corresponding program in the container management instance, etc. The implementation method is not specifically limited here.

步骤302、节点服务器基于所述容器管理实例,生成代理容器;所述代理容器的生命周期由所述容器管理平台管理;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;

此处,再上一个示例中,具有记账代理功能的代理容器和具有结算代理功能的代理容器的生命周期由容器管理平台管理。例如,当具有记账代理功能的代理容器完成记账工作后,为了节省服务器资源,容器管理平台可以关掉各节点服务器中的该具有记账代理功能的代理容器。Here, in the previous example, the life cycles of the proxy container with the billing proxy function and the proxy container with the settlement proxy function are managed by the container management platform. For example, after the proxy container with the accounting proxy function completes the accounting work, in order to save server resources, the container management platform can turn off the proxy container with the accounting proxy function in each node server.

步骤303、所述节点服务器基于所述容器管理实例从文件服务器获取所述设定代理功能对应的应用文件,并将所述应用文件配置至所述代理容器,从而使所述代理容器具有所述设定代理功能。Step 303: The node server obtains the application file corresponding to the proxy setting 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 proxy container. Set proxy function.

此处,再上一个示例中,具有记账代理功能的代理容器的生成,需要获取记账代理功能对应的应用文件;具有结算代理功能的代理容器的生成,需要获取结算代理功能对应的应用文件。文件服务器可以提供各种代理功能对应的应用文件。Here, in the last example, the generation of the proxy container with the billing proxy function requires the acquisition of the application file corresponding to the billing proxy function; the generation of the proxy container with the settlement proxy function requires the acquisition of the application file corresponding to the settlement proxy function . The file server can provide application files corresponding to various proxy functions.

采用上述方法,代理服务端生成代理生成指令,并将代理生成指令发送至容器管理平台,容器管理平台被该代理生成指令触发得到容器生成指令,进而将容器生成指令分发至各个节点服务器,使各个节点服务器生成具有设定代理功能的容器管理实例。如此,使得各个节点服务器中的容器管理实例相同。进一步,各个节点服务器根据容器管理实例生成代理容器,并从文件服务器获取设定代理功能对应的应用文件,并将该应用文件配置到该代理容器中,使得该代理容器具有代理功能。如此,通过代理服务端、容器管理平台、文件服务器、各个节点服务器实现各个节点服务器中代理进程的自动化部署。且,容器管理平台可以对代理容器和代理容器的业务进程的运行状态进行监控,并管理代理容器的生命周期。实现业务进程的自动化部署以及运行状态监控,节省资源使用量,降低部署成本。Using the above method, the proxy server generates the 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 The node server generates a container management instance with the function of setting proxy. In this way, the container management instances in each node server are the same. Further, each node server generates a proxy container according to the container management instance, obtains the application file corresponding to the proxy function setting from the file server, and configures the application file into the proxy container, so that the proxy container has the 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. Moreover, the container management platform can monitor the running state of the proxy container and the business process of the proxy container, and manage the life cycle of the proxy container. It realizes the automatic deployment and running status monitoring of business processes, saves resource usage and reduces deployment costs.

本申请实施例还提供了一种代理容器的部署方法,即节点服务器基于所述容器管理实例,生成代理容器,包括:所述节点服务器基于所述容器管理实例,从镜像服务器获取容器镜像文件,生成所述代理容器。The embodiment of the present application also provides a method for deploying a proxy container, that is, a 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, The proxy container is generated.

此处,本发明实施例提供了的一种容器镜像文件的结构示意图;如图4所示,该容器镜像文件的结构可以设置为可执行程序、配置文件、工具\类库、文件系统,例如,可执行程序可以为Agent BIN,配置文件可以为Agent CONIF,工具\类库可以为Python\java,文件系统可以为Alpine Linux 3.11.2。这里容器镜像文件的结构以及层级只是一种示例,具体不做限定。Here, an embodiment of the present invention provides a schematic structural diagram of a container image file; as shown in FIG. 4 , the structure of the container image file can be set to an executable program, a configuration file, a tool\class library, and a file system, such as , the executable program can be Agent BIN, the configuration file can be Agent CONIF, the tool\class 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 an example, and are not specifically limited.

本申请实施例提供又一种代理容器的部署方法,所述生成具有设定代理功能的容器管理实例之前,还包括:所述节点服务器接收所述容器管理平台的自定义控制器发送的所述容器生成指令;所述节点服务器基于所述容器管理实例,从镜像服务器获取容器镜像文件,生成所述代理容器,包括:所述节点服务器的所述容器管理实例通过容器引擎Dockerd从所述镜像服务器中获取所述容器镜像文件;所述节点服务器的所述容器引擎Dockerd通过所述容器镜像文件,生成所述代理容器。An embodiment of the present application provides another method for deploying a proxy container. Before generating a container management instance with a proxy setting function, the method further includes: receiving, by the node server, the data sent by the custom controller of the container management platform. A container generation instruction; the node server obtains a container image file from an image server based on the container management instance, and generates the proxy container, including: the container management instance of the node server obtains a container image file from the image server through the container engine Dockerd The container image file is obtained in ; the container engine Dockerd of the node server generates the proxy container through the container image file.

此处,可以在容器管理平台安装自定义控制器,从而通过自定义控制器发送容器生成指令。节点服务器中包括容器引擎Dockerd,在生成容器管理实例后,触发容器引擎Dockerd获取容器镜像文件。该触发动作可以由容器管理平台部署在节点服务器上的组件生成,使得各节点服务器的容器引擎Dockerd根据容器镜像文件生成的代理容器具有相同的运行环境。Here, a custom controller can be installed on the container management platform to send container generation instructions through the custom controller. The node server includes the container engine Dockerd. After the container management instance is generated, the container engine Dockerd is triggered to obtain the container image file. The trigger action can be generated by a 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 running environment.

本申请实施例提供又一种代理容器的部署方法,其中,节点服务器基于所述容器管理实例,生成代理容器,包括:节点服务器基于所述容器管理实例,生成具有代理管理进程的代理容器;所述节点服务器基于所述容器管理实例从文件服务器获取所述设定代理功能对应的应用文件,包括:所述节点服务器基于所述容器管理实例,生成具有代理管理进程的代理容器,并通过所述代理管理进程从所述文件服务器获取所述应用文件;将所述应用文件配置至所述代理容器,包括:通过所述应用文件生成运行在所述代理容器中的代理进程。The embodiment of the present application provides another method for deploying a proxy container, wherein 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 uses the container management instance to generate a proxy container. The proxy management process obtains the application file from the file server; and configuring the application file to the proxy container includes: generating an proxy process running in the proxy container by using the application file.

此处,如图2所示,节点服务器基于容器管理实例所生成的代理容器中包含代理管理进程,该代理管理进程从文件服务器中获取包括对应代理功能文件的应用文件,并配置到代理容器中,使得代理容器中生成对应的代理进程。该代理管理进程可以管理代理进程的运行,例如,当代理进程发生异常,代理管理进程会主动关掉异常代理进程,并拉起正常的对应代理进程,以保证该节点服务器的任务正常进行。Here, as shown in FIG. 2 , the proxy container generated by the node server based on the container management instance includes the proxy management process, and the proxy management process obtains the application file including the corresponding proxy function file from the file server, and configures it into the proxy container , so that the corresponding agent process is generated in the agent container. The proxy management process can manage the running of the proxy process. For example, when the proxy process is abnormal, the proxy management process will actively shut down the abnormal proxy process and start the normal corresponding proxy process, so as to ensure the normal execution of the tasks of the node server.

本申请实施例提供一种代理进程的更新方法,其中,在将所述应用文件配置至所述代理容器之后,还包括:所述节点服务器接收代理更新指令,所述代理更新指令是所述代理服务端发送的;所述节点服务器通过所述代理管理进程从所述文件服务器中获取所述代理更新指令对应的更新文件;所述节点服务器通过所述代理管理进程关闭所述代理进程,并根据所述更新文件生成更新的代理进程。An embodiment of the present application provides a method for updating a proxy process, wherein after configuring the application file in the proxy container, the method further includes: receiving, by the node server, a proxy update instruction, where the proxy update instruction is the proxy update instruction. sent by the 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 according to The update file generates an updated agent process.

此处,当代理容器部署完成后,当代理容器中的代理进程发生漏洞修复、参数配置改变、升级等情况时。可以将更新后的应用文件存储在文件服务器中,以替换原应用文件。以此,代理服务器将代理更新指令发生至节点服务器的代理管理进程,代理管理进程会获取代理更新指令对应的更新文件,也就是更新后的应用文件,并将当前代理进程关闭,根据获取的更新后的应用文件生成更新的代理进程。Here, after the deployment of the agent container is completed, the agent process in the agent container undergoes a situation such as vulnerability repair, parameter configuration change, and upgrade. The updated application files can be stored in the file server to replace the original application files. 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. After the application file generates the updated agent process.

本申请实施例提供一种代理容器的删除方法,包括:所述节点服务器接收代理删除指令;所述代理删除指令是所述代理服务端通过所述容器管理平台发送的;所述节点服务器通过所述容器管理平台删除所述代理删除指令指示的代理容器。An embodiment of the present application provides a method for deleting a proxy container, including: the node server receives a proxy deletion instruction; the proxy deletion instruction is sent by the proxy server through the container management platform; The container management platform deletes the proxy container indicated by the proxy deletion instruction.

此处,容器管理平台可以用来监控代理容器和代理进程的运行状态,以及设置代理容器和代理进程的生成和关闭的规则。当代理容器或代理进程的运行状态发生异常时,容器管理平台生成代理删除指令关闭该代理容器或代理进程。或者,容器管理平台设置规则为:代理容器或代理进程的占用资源不得超过节点服务器的CPU资源的百分之一;若超过该资源使用量,则容器管理平台生成代理删除指令关闭该代理容器或代理进程。这里,容器管理平台的代理删除指令也可以是代理服务端触发的,代理服务端的代理删除指令也可以是用户触发的。这里,代理删除指令的触发源具体不做限定。Here, the container management platform can be used to monitor the running status of proxy containers and proxy processes, and set rules for the generation and shutdown of proxy containers and proxy processes. When the running state of the agent container or agent process is abnormal, the container management platform generates an agent deletion instruction to close the agent container or agent process. Alternatively, the container management platform sets the rule as follows: the resource occupied by the proxy container or the proxy process shall not exceed 1% of the CPU resources of the node server; if the resource usage exceeds the resource usage, the container management platform will generate a proxy deletion instruction to close the proxy container or agent process. Here, the proxy deletion instruction of the container management platform may also be triggered by the proxy server, and the proxy deletion instruction of the proxy server may also be triggered by the user. Here, the trigger source of the proxy deletion instruction is not specifically limited.

本申请实施例提供一种容器镜像文件的集成方法,即,所述容器镜像文件是通过代理通用框架和容器通用框架集成的。The embodiment of the present application provides a method for integrating a container image file, that is, the container image file is integrated through the proxy general framework and the container general framework.

基于此,本申请实施例提供了一种代理容器的部署方法的流程,如图5所示,包括:Based on this, an embodiment of the present application provides a process flow of a method for deploying a proxy container, as shown in FIG. 5 , including:

步骤501、容器管理平台接收代理服务端发送的代理生成指令;Step 501, the container management platform receives the proxy generation instruction sent by the proxy server;

步骤502、所述容器管理平台基于所述代理生成指令,向节点服务器发送容器生成指令;所述容器生成指令用于指示所述节点服务器生成代理容器;所述代理容器用于基于所述容器生成指令从文件服务器获取对应的应用文件,并将所述应用文件配置至所述代理容器。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 generate a proxy container based on the container The instruction obtains the corresponding application file from the file server, and configures the application file to the proxy container.

此处,采用上述方法,容器管理平台接收代理服务端发送的代理生成指令,根据代理生成指令生成容器生成指令,并分发至各节点服务器,使得各节点服务器生成代理容器,进而使得代理容器根据容器生成指令从文件服务器获取对应的应用文件,并将应用文件配置至代理容器。如此,即使服务器集群中各节点服务器的操作系统或配置等不同,也可以接收容器管理平台发送的容器生成指令,并根据容器生成指令生成对应的代理容器,进一步根据获取的应用文件生成不同代理功能的代理容器。实现服务器集群中具有代理功能的代理容器的自动化部署。节省人力与时间成本。Here, 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 the proxy container, and then makes the proxy container generate the proxy container according to the container. The generation instruction obtains the corresponding application file from the file server, 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, generate the corresponding proxy container according to the container generation instruction, and further generate different proxy functions according to the obtained application file. proxy container. Enables automated deployment of proxy containers with proxy capabilities in server clusters. Save labor and time costs.

本申请实施例提供了一种代理容器的部署方法的流程,所述容器管理平台基于所述代理生成指令,向节点服务器发送容器生成指令,包括:所述容器管理平台基于所述代理生成指令,通过自定义控制器向容器管理平台接口发送所述容器生成指令,使得所述节点服务器接收所述容器管理平台接口发送的所述容器生成指令。An embodiment of the present application provides a process of a method for deploying a proxy container. The container management platform sends a container generation instruction to a node server based on the proxy generation instruction, including: the container management platform generates an instruction based on the proxy, 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.

此处,容器管理平台中设置有自定义控制器和容器管理平台接口,自定义控制器接收代理生成指令后生成容器生成指令,并将该容器生成指令发送至容器管理平台接口;使得容器管理平台接口发送该容器生成指令至,容器管理平台部署在节点服务器上的组件。Here, the container management platform is provided with a custom controller and a container management platform interface, the custom controller generates a container generation instruction after receiving the agent generation instruction, and sends the container generation instruction to the container management platform interface; The interface sends the container generation instruction to the component deployed on the node server by the container management platform.

基于上述流程,本申请实施例提供了又一种代理容器的部署方法的流程,示例性的,容器管理平台可以为Kubernetes应用所在平台,则容器管理平台部署在节点服务器上的组件为Kubelet,自定义控制器可以为Daemon Controller,容器管理平台接口可以为Kube-apiserver,容器管理实例可以为Daemon Pod。如图6所示,包括:Based on the above process, the embodiment of the present application provides a process of another method for deploying proxy containers. Exemplarily, the container management platform may 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 defined controller can be Daemon Controller, the container management platform interface can be Kube-apiserver, and the container management instance can be Daemon Pod. As shown in Figure 6, including:

步骤601、用户通过用户入口触发代理服务器。Step 601, the user triggers the proxy server through the user portal.

步骤602、代理服务器根据用户的触发指令和本地的配置规则生成代理生成指令。Step 602: The proxy server generates a proxy generation instruction according to the trigger instruction of the user and the local configuration rule.

步骤603、代理服务器将代理生成指令发送至Kubernetes,Kubernetes通过DaemonController生成容器生成指令,通过Kube-apiserver发送至各节点服务器。Step 603, the proxy server sends the proxy generation instruction to Kubernetes, Kubernetes generates the container generation instruction through DaemonController, and sends it to each node server through Kube-apiserver.

步骤604、各节点服务器通过Kubelet接收该容器生成指令后得到Daemon Pod,Kubelet发送container Runtime Interface至容器引擎Dockerd,触发容器引擎Dockerd获取容器镜像文件。Step 604: Each node server obtains the Daemon Pod after receiving the container generation instruction through the Kubelet, and the Kubelet sends the container Runtime Interface to the container engine Dockerd to trigger the container engine Dockerd to obtain the container image file.

步骤605、各节点服务器根据获取的容器镜像文件,根据容器镜像文件中的容器通用框架和代理通用框架生成代理容器,其中,代理的通用框架中包含Agent manager(代理管理进程)。Step 605 , each node server generates an agent container according to the obtained container image file and 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).

步骤606、Agent manager从文件服务器中获取代理生成指令中对应的代理进程的应用文件。Step 606: The Agent manager obtains the application file of the agent process corresponding to the agent generation instruction from the file server.

步骤607、Agent manager将获取的对应的代理进程的应用文件配置到代理容器中,获取具有设定功能的代理容器。Step 607: The Agent manager configures the obtained application file of the corresponding agent process into the agent container, and obtains the agent container with the setting function.

基于图6的流程,本申请实施例提供了一种代理更新的方法的流程,如图7所示,包括:Based on the process of FIG. 6 , an embodiment of the present application provides a process of a method for proxy updating, as shown in FIG. 7 , including:

步骤701、用户确认代理进程需要升级,则将升级的更新文件存储在文件服务器中,并触发代理服务端生成代理更新指令。Step 701: The user confirms that the agent process needs to be upgraded, stores the upgraded update file in the file server, and triggers the agent server to generate an agent update instruction.

步骤702、代理服务端生成代理更新指令后,将该代理更新指令发送至节点服务器中。Step 702: After the proxy server generates the proxy update instruction, the proxy server sends the proxy update instruction to the node server.

步骤703、节点服务器中对应代理更新指令的Agent manager接收该代理更新指令后,从文件服务器中获取更新文件。Step 703: After receiving the agent update instruction, the Agent manager corresponding to the agent update instruction in the node server acquires the update file from the file server.

步骤704、Agent manager关闭当前代理进程。Step 704, the Agent manager closes the current agent process.

步骤705、Agent manager将更新文件配置到代理容器中,生成更新后的代理进程。Step 705: The Agent manager configures the update file into the agent container, and generates an updated agent process.

需要说明的是,上述流程顺序并不唯一,如图7中的流程步骤703可以在步骤704后执行。It should be noted that the sequence of the above processes is not unique, and the process step 703 in FIG. 7 can be executed after step 704 .

此外,本申请还提供了一种容器镜像文件集成的方法;即,设置仓库管理系统,如,Gitlab。在Gitlab中存储容器镜像文件的源文件。设置操作系统,如,Jenkins。在Jenkins中定义一个轮询代码更新任务。设置持续集成系统,如,Docker Compose。在接收到轮询代码更新任务通知的代码更新后,将Gitlab中更新后的容器镜像文件的源文件代码集成,生成包括容器通用框架和代理通用框架的容器镜像文件。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 container image files in Gitlab. Set up the operating system, eg, Jenkins. Define a polling code update task in Jenkins. Set up a continuous integration system such as Docker Compose. After receiving the code update of the polling code update task notification, integrate the source file code of the updated container image file in Gitlab to generate a container image file including the container general framework and the agent general framework.

本申请还提供了一种代理容器测试和发布的方法,即,测试集群为模拟生产环境的集群,包括:代理服务端、文件服务器、镜像服务器、各节点服务器、容器管理平台。测试集群中的各服务器依照生产环境的运行方式运行,通过自动回归测试方式测试集成的容器镜像文件是否可以正常应用,确定可以正常应用后将该容器镜像文件和应用文件分别发送至生产环境的镜像服务器和文件服务器,进行生产应用。The present application also provides a method for testing and publishing proxy containers, that is, the test cluster is a cluster that simulates a production environment, including: proxy server, file server, mirror server, each node server, and a container management platform. Each server in the test cluster runs according to the operation mode of the production environment, and tests whether the integrated container image file can be applied normally through the automatic regression test method. After confirming that it can be applied normally, the container image file and the application file are respectively sent to the image of the production environment. Servers and file servers for production applications.

本申请还提供了一种监控系统的方法,即,可以设置一个监控系统以监控代理容器、代理进程、节点服务器等的关键指标,例如:CPU、内存、网络吞吐、带宽占用、磁盘I\O、磁盘使用量、代理进程状态等。监控系统可以包括时序数据库、告警系统、界面展示等,例如,时序数据库、告警系统、界面展示可以分别为Prometheus(用于收集监控数据,充当时序数据库)、AlertManager(用于管理告警,配置告警策略)、Grafana(用以提供界面,通过该界面展示数据)。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 the agent container, agent process, node server, etc., such as: CPU, memory, network throughput, bandwidth occupation, disk I\O , disk usage, agent process status, etc. The monitoring system can include time series database, alarm system, interface display, etc. For example, the time series database, alarm system, and interface display can be Prometheus (used to collect monitoring data and act as a time series database), AlertManager (used to manage alarms and configure alarm policies) ), Grafana (to provide an interface through which data is displayed).

基于同样的构思,本发明实施例提供一种代理容器的部署装置,图8为本申请实施例提供的一种代理容器的部署装置示意图,如图8示,包括:Based on the same concept, an embodiment of the present invention provides an apparatus for deploying a proxy container. FIG. 8 is a schematic diagram of an apparatus for deploying a proxy container provided by an embodiment of the present application, as shown in FIG. 8 , including:

处理模块801,用于基于容器管理平台的容器生成指令,生成具有设定代理功能的容器管理实例;所述容器生成指令是所述容器管理平台基于代理服务端的代理生成指令触发的;所述代理生成指令用于指示在所述节点服务器部署具有所述设定代理功能的容器;The processing module 801 is configured to generate a container management instance with a proxy setting function based on the container generation instruction of the container management platform; the container generation instruction is triggered by the container management platform based on the proxy generation instruction of the proxy server; the proxy generating an instruction for instructing to deploy the container with the setting proxy function on the node server;

所述处理模块801还用于,基于所述容器管理实例,生成代理容器;所述代理容器的生命周期由所述容器管理平台管理;The processing module 801 is further configured to, based on the container management instance, generate a proxy container; the life cycle of the proxy container is managed by the container management platform;

获取模块802,用于基于所述容器管理实例从文件服务器获取所述设定代理功能对应的应用文件,并将所述应用文件配置至所述代理容器,从而使所述代理容器具有所述设定代理功能。The obtaining module 802 is configured to obtain the application file corresponding to the setting 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 setting proxy function. Determining the proxy function.

在一种可能的设计中,所述处理模块801具体用于:基于所述容器管理实例,从镜像服务器获取容器镜像文件,生成所述代理容器。In a possible design, the processing module 801 is specifically configured to: obtain a container image file from an image server based on the container management instance, and generate the proxy container.

在一种可能的设计中,所述处理模块801还用于:接收所述容器管理平台的自定义控制器发送的所述容器生成指令;所述节点服务器基于所述容器管理实例,从镜像服务器获取容器镜像文件,生成所述代理容器,包括:所述节点服务器的所述容器管理实例通过容器引擎Dockerd从所述镜像服务器中获取所述容器镜像文件;所述节点服务器的所述容器引擎Dockerd通过所述容器镜像文件,生成所述代理容器。In a possible design, the processing module 801 is further configured to: receive the container generation instruction sent by the custom controller of the container management platform; the node server, based on the container management instance, from the image server Obtaining a container image file and generating the proxy container includes: 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 obtains the container image file from the image server; The proxy container is generated by using the container image file.

在一种可能的设计中,所述处理模块801具体用于:节点服务器基于所述容器管理实例,生成具有代理管理进程的代理容器;所述节点服务器基于所述容器管理实例从文件服务器获取所述设定代理功能对应的应用文件,包括:所述节点服务器基于所述容器管理实例,生成具有代理管理进程的代理容器,并通过所述代理管理进程从所述文件服务器获取所述应用文件;将所述应用文件配置至所述代理容器,包括:通过所述应用文件生成运行在所述代理容器中的代理进程。In a possible design, the processing module 801 is specifically configured to: the node server generates a proxy container with a proxy management process based on the container management instance; the node server obtains the information from the file server based on the container management instance The application file corresponding to the setting proxy function includes: 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: generating a proxy process running in the proxy container by using the application file.

在一种可能的设计中,所述处理模块801还用于:接收代理更新指令,所述代理更新指令是所述代理服务端发送的;所述节点服务器通过所述代理管理进程从所述文件服务器中获取所述代理更新指令对应的更新文件;所述节点服务器通过所述代理管理进程关闭所述代理进程,并根据所述更新文件生成更新的代理进程。In a possible design, the processing module 801 is further configured to: receive a proxy update instruction, the proxy update instruction is sent by the proxy server; the node server uses the proxy management process from the file The server obtains an update file corresponding to the proxy update instruction; the node server closes the proxy process through the proxy management process, and generates an updated proxy process according to the update file.

在一种可能的设计中,所述处理模块801还用于:接收代理删除指令;所述代理删除指令是所述代理服务端通过所述容器管理平台发送的;所述节点服务器通过所述容器管理平台删除所述代理删除指令指示的代理容器。In a possible design, the processing module 801 is further configured to: receive a proxy deletion instruction; the proxy deletion instruction is sent by the proxy server through the container management platform; the node server through the container The management platform deletes the proxy container indicated by the proxy deletion instruction.

在一种可能的设计中,所述容器镜像文件是通过代理通用框架和容器通用框架集成的。In a possible design, the container image file is integrated through the proxy common framework and the container common framework.

基于同样的构思,本发明实施例提供一种代理容器的部署装置,图9为本申请实施例提供的一种代理容器的部署装置示意图,如图9示,包括:Based on the same concept, an embodiment of the present invention provides an apparatus for deploying a proxy container. FIG. 9 is a schematic diagram of an apparatus for deploying a proxy container according to an embodiment of the present application, as shown in FIG. 9 , including:

收发模块901,用于接收代理服务端发送的代理生成指令;A transceiver module 901, configured to receive a proxy generation instruction sent by the proxy server;

所述收发模块901还用于,基于所述代理生成指令,向节点服务器发送容器生成指令;所述容器生成指令用于指示所述节点服务器生成代理容器;所述代理容器用于基于所述容器生成指令从文件服务器获取对应的应用文件,并将所述应用文件配置至所述代理容器。The transceiver module 901 is further configured to, based on the proxy generation instruction, send a container generation instruction to a node server; the container generation instruction is used to instruct the node server to generate a proxy container; the proxy container is used to generate a proxy container based on the container The generation instruction obtains the corresponding application file from the file server, and configures the application file to the proxy container.

在一种可能的设计中,所述收发模块901具体用于:基于所述代理生成指令,通过自定义控制器向容器管理平台接口发送所述容器生成指令,使得所述节点服务器接收所述容器管理平台接口发送的所述容器生成指令。In a possible design, the transceiver module 901 is specifically configured to: based on the proxy generation instruction, send the container generation instruction to the container management platform interface through a custom controller, so that the node server receives the container The container generation instruction sent by the management platform interface.

在一种可能的设计中,所述收发模块901还用于:接收代理删除指令;所述代理删除指令是所述代理服务端发送的;所述容器管理平台将所述代理删除指发送至所述节点服务器,使得所述节点服务器删除所述代理删除指令指示的代理容器。In a possible design, the transceiver module 901 is further configured 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 the node server, so that the node server deletes the proxy container indicated by the proxy deletion instruction.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by those skilled in the art, the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。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 (14)

1.一种代理容器的部署方法,其特征在于,所述方法包括:1. A method for deploying a proxy container, wherein the method comprises: 节点服务器基于容器管理平台的容器生成指令,生成具有设定代理功能的容器管理实例;所述容器生成指令是所述容器管理平台基于代理服务端的代理生成指令触发的;所述代理生成指令用于指示在所述节点服务器部署具有所述设定代理功能的容器;The node server generates a container management instance with an agent setting function based on the container generation instruction of the container management platform; the container generation instruction is triggered by the container management platform based on the agent generation instruction of the proxy server; the agent generation instruction is used for Instructing to deploy the container with the set proxy function on the node server; 节点服务器基于所述容器管理实例,生成代理容器;所述代理容器的生命周期由所述容器管理平台管理;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 acquires an application file corresponding to the setting 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. 2.如权利要求1所述的方法,其特征在于,节点服务器基于所述容器管理实例,生成代理容器,包括:2. The method of claim 1, wherein the node server generates a proxy container based on the container management instance, comprising: 所述节点服务器基于所述容器管理实例,从镜像服务器获取容器镜像文件,生成所述代理容器。The node server obtains a container image file from an image server based on the container management instance, and generates the proxy container. 3.如权利要求2所述的方法,其特征在于,所述生成具有设定代理功能的容器管理实例之前,还包括:3. The method according to claim 2, wherein before the generating a container management instance with a proxy setting function, the method further comprises: 所述节点服务器接收所述容器管理平台的自定义控制器发送的所述容器生成指令;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, and generates the proxy container, including: 所述节点服务器的所述容器管理实例通过容器引擎Dockerd从所述镜像服务器中获取所述容器镜像文件;The container management instance of the node server obtains the container image file from the image server through the container engine Dockerd; 所述节点服务器的所述容器引擎Dockerd通过所述容器镜像文件,生成所述代理容器。The container engine Dockerd of the node server generates the proxy container through the container image file. 4.如权利要求1所述的方法,其特征在于,节点服务器基于所述容器管理实例,生成代理容器,包括:4. The method of claim 1, wherein the node server generates a proxy container based on the container management instance, comprising: 节点服务器基于所述容器管理实例,生成具有代理管理进程的代理容器;The node server generates an agent container with an agent 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 an agent container with an agent management process based on the container management instance, and obtains the application file from the file server through the agent management process; 将所述应用文件配置至所述代理容器,包括:Configure the application file to the proxy container, including: 通过所述应用文件生成运行在所述代理容器中的代理进程。An agent process running in the agent container is generated through the application file. 5.如权利要求4所述的方法,其特征在于,将所述应用文件配置至所述代理容器之后,还包括:5. The method of claim 4, wherein after configuring the application file to the proxy container, the method further comprises: 所述节点服务器接收代理更新指令,所述代理更新指令是所述代理服务端发送的;The node server receives a proxy update instruction, and the proxy update instruction is sent by the proxy 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. 6.如权利要求1-5任一所述的方法,其特征在于,还包括:6. The method of any one of claims 1-5, further comprising: 所述节点服务器接收代理删除指令;所述代理删除指令是所述代理服务端通过所述容器管理平台发送的;The node server receives 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. 7.如权利要求6所述的方法,其特征在于,所述容器镜像文件是通过代理通用框架和容器通用框架集成的。7 . The method of claim 6 , wherein the container image file is integrated through the proxy common framework and the container common framework. 8 . 8.一种代理容器的部署方法,其特征在于,所述方法包括:8. A method for deploying a proxy container, wherein the method comprises: 容器管理平台接收代理服务端发送的代理生成指令;The container management platform receives the proxy generation instruction sent by the proxy server; 所述容器管理平台基于所述代理生成指令,向节点服务器发送容器生成指令;所述容器生成指令用于指示所述节点服务器生成代理容器;所述代理容器用于基于所述容器生成指令从文件服务器获取对应的应用文件,并将所述应用文件配置至所述代理容器。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 generate a proxy container from a file based on the container generation instruction The server obtains the corresponding application file, and configures the application file to the proxy container. 9.如权利要求8所述的方法,其特征在于,所述容器管理平台基于所述代理生成指令,向节点服务器发送容器生成指令,包括:9. The method according to claim 8, wherein the container management platform sends the container generation instruction to the node server based on the agent generation instruction, comprising: 所述容器管理平台基于所述代理生成指令,通过自定义控制器向容器管理平台接口发送所述容器生成指令,使得所述节点服务器接收所述容器管理平台接口发送的所述容器生成指令。The container management platform sends the container generation instruction to the container management platform interface through the 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. 10.如权利要求8、9任一所述的方法,其特征在于,还包括:10. The method according to any one of claims 8 and 9, further comprising: 所述容器管理平台接收代理删除指令;所述代理删除指令是所述代理服务端发送的;The container management platform receives 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. 11.一种代理容器的部署装置,其特征在于,所述装置包括:11. An apparatus for deploying a proxy container, wherein the apparatus comprises: 处理模块,用于基于容器管理平台的容器生成指令,生成具有设定代理功能的容器管理实例;所述容器生成指令是所述容器管理平台基于代理服务端的代理生成指令触发的;所述代理生成指令用于指示在所述节点服务器部署具有所述设定代理功能的容器;a processing module, configured to generate a container management instance with a proxy setting function based on the container generation instruction of the container management platform; the container generation instruction is triggered by the container management platform based on the agent generation instruction of the agent server; the agent generates The instruction is used to instruct to deploy the container with the set proxy function on the node server; 所述处理模块还用于,基于所述容器管理实例,生成代理容器;所述代理容器的生命周期由所述容器管理平台管理;The processing module is further configured to, based on the container management instance, generate a proxy container; the life cycle of the proxy container is managed by the container management platform; 获取模块,用于基于所述容器管理实例从文件服务器获取所述设定代理功能对应的应用文件,并将所述应用文件配置至所述代理容器,从而使所述代理容器具有所述设定代理功能。an obtaining module, configured to obtain an application file corresponding to the set proxy function from a file server based on the container management instance, and configure the application file to the proxy container, so that the proxy container has the setting proxy function. 12.一种代理容器的部署装置,其特征在于,所述装置包括:12. An apparatus for deploying a proxy container, wherein the apparatus comprises: 收发模块,用于接收代理服务端发送的代理生成指令;The transceiver module is used to receive the proxy generation instruction sent by the proxy server; 所述收发模块还用于,基于所述代理生成指令,向节点服务器发送容器生成指令;所述容器生成指令用于指示所述节点服务器生成代理容器;所述代理容器用于基于所述容器生成指令从文件服务器获取对应的应用文件,并将所述应用文件配置至所述代理容器。The transceiver module is further configured to, based on the proxy generation instruction, send a container generation instruction to a node server; the container generation instruction is used to instruct the node server to generate a proxy container; the proxy container is used to generate a proxy container based on the container The instruction obtains the corresponding application file from the file server, and configures the application file to the proxy container. 13.一种计算机可读存储介质,其特征在于,所述存储介质存储有程序,当所述程序在计算机上运行时,使得计算机实现执行权利要求1至7或8-10中任一项所述的方法。13. A computer-readable storage medium, characterized in that the storage medium stores a program, which, when the program is run on a computer, enables the computer to implement any one of claims 1 to 7 or 8-10. method described. 14.一种计算机设备,其特征在于,包括:14. A computer equipment, characterized in that, comprising: 存储器,用于存储计算机程序;memory for storing computer programs; 处理器,用于调用所述存储器中存储的计算机程序,按照获得的程序执行如权利要求1至7或8-10任一权利要求所述的方法。The processor is configured to call the computer program stored in the memory, and execute the method according to any one of claims 1 to 7 or 8 to 10 according to the obtained program.
CN202010501424.1A 2020-06-04 2020-06-04 A method and device for deploying a proxy container Active CN111679888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010501424.1A CN111679888B (en) 2020-06-04 2020-06-04 A method and device for deploying a proxy container

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010501424.1A CN111679888B (en) 2020-06-04 2020-06-04 A method and device for deploying a proxy container

Publications (2)

Publication Number Publication Date
CN111679888A true CN111679888A (en) 2020-09-18
CN111679888B CN111679888B (en) 2025-01-24

Family

ID=72434900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010501424.1A Active CN111679888B (en) 2020-06-04 2020-06-04 A method and device for deploying a proxy container

Country Status (1)

Country Link
CN (1) CN111679888B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112153049A (en) * 2020-09-24 2020-12-29 绿盟科技集团股份有限公司 Intrusion detection method and device
CN112328372A (en) * 2020-11-27 2021-02-05 新华智云科技有限公司 Kubernetes node self-healing method and system
CN113138834A (en) * 2021-03-19 2021-07-20 中国电子科技集团公司第二十九研究所 Cloud simulation platform lightweight deployment method based on Docker technology
CN113835844A (en) * 2021-09-29 2021-12-24 新华三大数据技术有限公司 Management method and device of container cluster and cloud computing platform
CN114398047A (en) * 2022-01-18 2022-04-26 深圳红途科技有限公司 Container self-adaptive deployment method and device, computer equipment and storage medium
CN114493548A (en) * 2022-02-22 2022-05-13 光大科技有限公司 Continuous delivery implementation method and device
CN114706767A (en) * 2022-03-24 2022-07-05 网易(杭州)网络有限公司 A code coverage collection method, device and device
CN115150291A (en) * 2022-07-05 2022-10-04 中国银行股份有限公司 Operation and maintenance system and method based on event driving

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020930A (en) * 2016-05-13 2016-10-12 深圳市中润四方信息技术有限公司 Application container based application management method and system
CN106648741A (en) * 2016-10-18 2017-05-10 广州视睿电子科技有限公司 Application system deployment method and device
WO2017129106A1 (en) * 2016-01-29 2017-08-03 腾讯科技(深圳)有限公司 Data request processing method, server and system
CN108958927A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Dispositions method, device, computer equipment and the storage medium of container application
CN109976771A (en) * 2019-03-28 2019-07-05 新华三技术有限公司 A kind of dispositions method and device of application
CN110995473A (en) * 2019-11-18 2020-04-10 腾讯科技(深圳)有限公司 Service node control method and related equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017129106A1 (en) * 2016-01-29 2017-08-03 腾讯科技(深圳)有限公司 Data request processing method, server and system
CN106020930A (en) * 2016-05-13 2016-10-12 深圳市中润四方信息技术有限公司 Application container based application management method and system
CN106648741A (en) * 2016-10-18 2017-05-10 广州视睿电子科技有限公司 Application system deployment method and device
CN108958927A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Dispositions method, device, computer equipment and the storage medium of container application
CN109976771A (en) * 2019-03-28 2019-07-05 新华三技术有限公司 A kind of dispositions method and device of application
CN110995473A (en) * 2019-11-18 2020-04-10 腾讯科技(深圳)有限公司 Service node control method and related equipment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ANQI ZHAO; QIANG HUANG; YITING HUANG; LIN ZOU; ZHENGXI CHEN; JIANGHANG SONG: "Research on resource prediction model based on Kubernetes container auto-scaling technology", IOP CONFERENCE SERIES: MATERIALS SCIENCE AND ENGINEERING, vol. 569, no. 5, 9 August 2019 (2019-08-09) *
余昌发;程学林;杨小虎;: "基于Kubernetes的分布式TensorFlow平台的设计与实现", 计算机科学, vol. 45, no. 2, 15 November 2018 (2018-11-15) *
张琦;: "基于Docker的CaaS管理平台架构研究与设计", 计算机应用与软件, vol. 35, no. 11, 12 November 2018 (2018-11-12) *
林晓雯: "电商平台服务器性能优化设计与实现", 中国优秀硕士学位论文全文数据库 (信息科技辑), no. 01, 15 January 2020 (2020-01-15) *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112153049A (en) * 2020-09-24 2020-12-29 绿盟科技集团股份有限公司 Intrusion detection method and device
CN112153049B (en) * 2020-09-24 2023-01-17 绿盟科技集团股份有限公司 Intrusion detection method, device, electronic equipment and computer readable medium
CN112328372A (en) * 2020-11-27 2021-02-05 新华智云科技有限公司 Kubernetes node self-healing method and system
CN113138834A (en) * 2021-03-19 2021-07-20 中国电子科技集团公司第二十九研究所 Cloud simulation platform lightweight deployment method based on Docker technology
CN113835844A (en) * 2021-09-29 2021-12-24 新华三大数据技术有限公司 Management method and device of container cluster and cloud computing platform
CN113835844B (en) * 2021-09-29 2024-05-24 新华三大数据技术有限公司 Container cluster management method and device and cloud computing platform
CN114398047A (en) * 2022-01-18 2022-04-26 深圳红途科技有限公司 Container self-adaptive deployment method and device, computer equipment and storage medium
CN114493548A (en) * 2022-02-22 2022-05-13 光大科技有限公司 Continuous delivery implementation method and device
CN114706767A (en) * 2022-03-24 2022-07-05 网易(杭州)网络有限公司 A code coverage collection method, device and device
CN115150291A (en) * 2022-07-05 2022-10-04 中国银行股份有限公司 Operation and maintenance system and method based on event driving
CN115150291B (en) * 2022-07-05 2024-10-25 中国银行股份有限公司 Operation and maintenance system and method based on event driving

Also Published As

Publication number Publication date
CN111679888B (en) 2025-01-24

Similar Documents

Publication Publication Date Title
CN111679888A (en) Method and device for deploying proxy container
US8910138B2 (en) Hot pluggable extensions for access management system
CN110196731B (en) Operation and maintenance system, method and storage medium
CN111596932B (en) Mirror image file generation method and device and computer readable storage medium
CN111262908A (en) Task construction method and system based on jenkins
CN101727343A (en) Software installation and deployment method for distributed server
CN111562950B (en) Distributed application parameter dynamic release system and method
CN112860282A (en) Upgrading method and device of cluster plug-in and server
CN115061717A (en) Application management method, application subscription method and related equipment
CN113590595A (en) Database multi-writing method and device and related equipment
CN111831567B (en) Application test environment configuration method, device, system and medium
CN113297031A (en) Container group protection method and device in container cluster
CN118626101A (en) Implementation method, device and electronic device of CI/CD of microservice cluster
CN114546588A (en) Task deployment method, device, storage medium, and electronic device
CN115480775A (en) Cloud and primary container platform integration method and system
CN111610992B (en) Deployment component update processing method and device and storage medium
CN114443059A (en) Kubernets cluster deployment method, device and equipment
CN116627437A (en) Deployment method and device of Airflow service, storage medium and computer equipment
CN114756227A (en) A method and device for processing resource release
CN114879977A (en) Application deployment method, device and storage medium
CN111008035A (en) Software operation and maintenance method, electronic equipment and storage medium
CN111381932A (en) Method and device for triggering application program change, electronic equipment and storage medium
CN118331592B (en) Python language-based deployment method, device, electronic equipment and medium
CN114443104B (en) Application deployment method and device, storage medium and electronic device
CN115604101B (en) System management method and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant