Process processing method and device, storage medium and computer equipment
By creating a daemon container group on the real node of a virtual node in a serverless container service and executing a daemon, the performance problems caused by the deployment of daemon and business processes in the same container group are solved, and execution performance is improved.
Patent Information
- Application Number
- CN202310513968.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2024-11-08
AI Technical Summary
In the serverless container service scenario, the execution performance of the daemon process is poor, mainly because the daemon process and business process are deployed in the same container group, resulting in mutual influence and inability to run normally.
By creating a daemon container group on the real node corresponding to the business container group of the virtual node and sending configuration files to the node to execute the daemon process, the daemon and business processes are avoided from running in the same container group, and the normal execution of the daemon process is achieved.
Improve the execution performance of daemons in serverless container services, avoid mutual influence problems during container group operation, and ensure the normal operation of daemons.
Smart Images

Figure CN118916114A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and more specifically, to a process processing method, device, storage medium and computer equipment. Background Art
[0002] Cloud computing is a computing model that distributes computing tasks on a resource pool consisting of a large number of computers, enabling various application systems to obtain computing power, storage space and information services according to their own business needs. "Cloud" is a collection of various types of resources existing in the server cluster of a cloud data center. A platform that provides computing, network and storage capabilities based on hardware and software resource services is usually called a cloud platform.
[0003] Kubernetes (K8s) is a container orchestration engine used to manage containerized applications on multiple hosts in a cloud platform. It supports container service scenarios such as automated deployment, large-scale scalability, and application containerization management. A K8s cluster is a group of node clusters running containerized applications, allowing the development, movement, and management of applications.
[0004] At present, in order to improve the efficiency of resource management and the stability of business network performance, the existing technology proposes a VirtualKubelet solution, that is, a serverless container service. However, the Kubernetes cluster cannot normally execute the daemon process on the virtual node in the serverless container service scenario, resulting in poor execution performance of the daemon process. Summary of the invention
[0005] The embodiments of the present application provide a process processing method, apparatus, storage medium, and computer device, which can improve the execution performance of the daemon process in a serverless container service by injecting the daemon process into the real node where the business container group on the virtual node is located.
[0006] On the one hand, an embodiment of the present application provides a process processing method, which includes: in response to an instruction to create a workload, creating a daemon container group in at least one virtual node; sending a configuration file corresponding to the workload to a real node corresponding to each business container group in each virtual node; receiving the configuration file through the real node, and executing the daemon process corresponding to the workload based on the configuration file; obtaining the execution result of the daemon process, and outputting the status of the daemon container group based on the execution result.
[0007] Optionally, in response to an instruction to create a workload, a daemon container group is created in at least one virtual node, including: creating the workload through a service component in response to an instruction to create the workload; obtaining a configuration file corresponding to the workload through a daemon controller; when the configuration file includes annotation information and the annotation information is a real label, creating a daemon container group in at least one virtual node through the daemon controller.
[0008] Optionally, before creating the workload through the service component in response to the creation instruction of the workload, the method also includes: determining whether a container group template is obtained, the container group template is used to create a daemon container group; when it is determined that the container group template is obtained, terminating the historical daemon container group on each real node and virtual node.
[0009] Optionally, sending a configuration file corresponding to the workload to a real node corresponding to each business container group in each virtual node includes: determining, through a first working unit, a business container group in at least one virtual node; determining a real node corresponding to each business container group; and sending, through the first working unit, a configuration file corresponding to the workload to a second working unit of each real node based on a call link.
[0010] Optionally, a configuration file is received through a real node, and a daemon process corresponding to the workload is executed based on the configuration file, including: receiving the configuration file based on a call link through a second working unit of the real node; creating a static container group as a target daemon container group based on the configuration file through the second working unit; and executing the daemon process corresponding to the workload according to the configuration file based on the target daemon container group.
[0011] Optionally, the execution result of the daemon process is obtained, and the status of the daemon container group is output based on the execution result, including: in response to a log viewing command, sending a viewing request to a second working unit in a real node through a first working unit; obtaining the execution result of the daemon process based on the viewing request through the second working unit; determining and outputting status data of the daemon container group based on the execution result through the second working unit; wherein the status data includes at least a field type, a status type, and a status description, and the field type includes at least a pre-set injection status.
[0012] Optionally, in response to a log viewing command, a viewing request is sent to a second working unit in the real node through the first working unit, including: determining, through the service component, a container name corresponding to the daemon container group in response to the log viewing command; generating, through the service component, a viewing request based on the container name, and sending the viewing request to the first working unit; and sending, through the first working unit, a viewing request to the second working unit in the real node based on the call link.
[0013] Optionally, after executing the daemon process corresponding to the workload based on the configuration file, the method also includes: in response to a container login command, determining the user identity and user permissions through the service component; sending a login request to the first work unit through the service component; sending a login request to the second work unit in the real node through the first work unit; determining whether the login request is from a legitimate source based on the second work unit and checking the user permissions; when it is determined that the login request is from a legitimate source, logging in to the daemon container specified in the login command according to the user permissions.
[0014] On the other hand, an embodiment of the present application also provides a process processing device, which includes: a creation module, which is used to create a daemon container group in at least one virtual node in response to a creation instruction for the workload; a sending model, which is used to send a configuration file corresponding to the workload to a real node corresponding to each business container group in each virtual node; an execution module, which is used to receive the configuration file through the real node, and execute the daemon process corresponding to the workload based on the configuration file; an output model, which is used to obtain the execution result of the daemon process, and output the status of the daemon container group based on the execution result.
[0015] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, which stores a program code, wherein the above-mentioned process processing method is executed when the program code is executed by a processor.
[0016] On the other hand, an embodiment of the present application further provides a computer device, which includes a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are called by the processor, the above-mentioned process processing method is executed.
[0017] On the other hand, an embodiment of the present application also provides a computer program product, which includes a computer program, which is stored in a storage medium; a processor of a computer device reads the computer program from the storage medium, and the processor executes the computer program, so that the computer device executes the steps in the above-mentioned process processing method.
[0018] The present application provides a process processing method, which can create a daemon container group in at least one virtual node in response to a creation instruction for a workload, and send a configuration file corresponding to the workload to the real node corresponding to each business container group in each virtual node, further, receive the configuration file through the real node, and execute the daemon process corresponding to the workload based on the configuration file, further, obtain the execution result of the daemon process, and output the status of the daemon container group based on the execution result. In this way, the daemon process can be executed in the real node corresponding to the business container group of the virtual node, avoiding the daemon process and the business process being in the same container to affect the normal operation of the container. Thereby, the execution performance of the daemon process in the serverless container service scenario is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 application, which are further used to explain the principles of the present application together with the specification. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A cluster diagram of a serverless container service provided in an embodiment of the present application is shown.
[0021] Figure 2 A flowchart of a process processing method provided in an embodiment of the present application is shown.
[0022] Figure 3 A flow chart of another process processing method provided in an embodiment of the present application is shown.
[0023] Figure 4 A scenario diagram of a serverless container service provided by an embodiment of the present application is shown.
[0024] Figure 5 A cluster architecture diagram of a serverless container service provided in an embodiment of the present application is shown.
[0025] Figure 6 A module block diagram of a process processing device provided in an embodiment of the present application is shown.
[0026] Figure 7 It is a module block diagram of a computer device provided in an embodiment of the present application.
[0027] Figure 8 It is a module block diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0029] In some processes described in the specification, claims and the above drawings, multiple steps appearing in a specific order are included, but it should be clearly understood that these steps may not be executed in the order in which they appear in this document or may be executed in parallel. The step numbers are only used to distinguish different steps, and the numbers themselves do not represent any execution order. In addition, the descriptions such as "first" and "second" in this document are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0030] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0031] It should be noted that in the specific implementation of this application, the workload, configuration files, user permissions and other related data involved, when applied to the specific products or technologies of the embodiments of this application, need to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions.
[0032] Serverless means that there are no physical server devices, operating systems, middleware and other software. Serverless technology is a new type of Internet architecture. Simply put, it is based on cloud technology, migrating applications on traditional servers and operating systems to the cloud, and also migrating applications, databases and analysis systems on physical servers to the cloud environment.
[0033] Serverless container service adds a virtual node to the classic Kubernetes cluster. This virtual node corresponds to a resource pool. The container group (Pod) on the virtual node corresponds to the real working node of the backend Kubernetes cluster to improve the management efficiency of node resources. Daemonset is a Kubernetes workload resource used to execute various types of daemons.
[0034] For example, cluster storage, log collection, node viewing, etc. Usually, the Daemonset workload resources provided by Kubernetes natively have one and only one container group instance associated with Daemonset on each node. However, in serverless container services, if the daemon process is started on the virtual node based on the working method of the native Daemonset, since one Pod occupies one virtual node exclusively, there is isolation between the Daemonset Pod and the business container. However, when the Daemonset Pod executes the daemon process, it cannot obtain relevant data from the business container, resulting in the daemon process failing to execute normally.
[0035] In addition, the existing technology uses the Sidecar mode to deploy the daemon process. However, since the daemon process related containers and the business process related containers are deployed in the same container group, the containers in the container group will affect each other when executing the corresponding processes, making the container group unable to operate normally. For example, the container status of the daemon process container will affect the status of the entire container group, and the update and release of the daemon process container requires restarting the entire container group. In short, the execution performance of the daemon process is poor in the serverless container service scenario.
[0036] In order to solve the above problems, the inventor has proposed a daemon execution method provided by the embodiment of the present application after research. The following is an introduction to the system architecture diagram of the task scheduling method involved in the present application. Figure 1 As shown, a schematic diagram of a container orchestration cluster under a serverless container service provided by an embodiment of the present application.
[0037] The container orchestration cluster can be applied to serverless container services in multi-tenant scenarios. The container orchestration cluster is a cluster set up based on the container orchestration tool. The container orchestration tool can create container groups to execute specific applications. The container orchestration tool can be used to create different resource objects, and the resource objects represent the system status corresponding to the container orchestration tool.
[0038] Resource objects are "target records". Once a container orchestration tool creates a resource object, it will continue to work to ensure the existence of the resource object. Each resource object has a manifest that contains the desired state and current state of the system. The container orchestration tool maintains a manifest of all resource objects and continuously polls each resource object to ensure that its desired state and current state are the same.
[0039] If a resource object is unresponsive, the container orchestration tool will replace it with a new version. If a resource object deviates from the list, the container orchestration tool will issue the necessary commands to return the resource object to the desired state. For example, the container orchestration tool can be Kubernetes (K8s) or other versions of orchestration tools with K8s as the core. K8s is an open source system for automatically deploying, scaling and managing containerized applications. It combines containers running applications into logical units for easy management and service discovery. K8s has a variety of resource objects for deploying applications. In an embodiment of the present application, a K8s cluster can be used as a container orchestration cluster.
[0040] In order to prevent the container services of each tenant from affecting each other, the container service of each tenant can be set in their own virtual machine. That is, it is equivalent to having a complete set of components for container service in the virtual machine. One container group occupies one virtual machine. The virtual machines do not share the physical machine, but are managed in a unified manner, thus forming a container orchestration cluster for serverless container service.
[0041] The cluster control end can be user-oriented. The service component of the cluster control end can be the unified entrance of the cluster, the coordinator of each component, and provide interface services. All operations of adding, deleting, modifying, checking and real-time acquisition of object resources are handled by the service component. The first working unit in the cluster control end is used to connect to the service component and carry the deletion and creation of all container groups. The deletion and creation of each container group can be transformed into a process of creating or deleting a lightweight virtual machine.
[0042] The second working unit in the virtual machine can be used to start the container group after the virtual machine is created. It can also be responsible for reporting the status of the container group, such as container group startup, container group operation termination, or container group update. The daemon controller can be used to continuously obtain messages from the service component on whether to create a daemon workload in the virtual machine. It can also create a daemon container group on the virtual machine.
[0043] It is worth noting that Figure 1 It is only a cluster diagram of a serverless container service provided by the embodiments of the present application. The K8s cluster described in the embodiments of the present application is to more clearly illustrate the technical solution of the embodiments of the present application, and does not constitute a limitation on the technical solution provided by the embodiments of the present application. For example, in an actual scenario, Figure 1The cluster control end shown may also include other types of control managers (Controller-Manager) and distributed key-value storage components (ETCD), etc. It is known to those skilled in the art that with the evolution of business architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0044] The process processing method proposed in this application mainly involves serverless container services under the cloud computing product system, where cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to achieve data computing, storage, processing and sharing. It is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model application, which can form a resource pool and be used on demand, flexibly and conveniently.
[0045] Cloud computing refers to the delivery and use of services in a broad sense, which is to obtain the required services through the network in an on-demand and easily scalable manner. This service can be related to IT and software, the Internet, or other services. Cloud computing is the product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, network storage technologies, and load balancing.
[0046] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of a process processing method provided by an embodiment of the present application. In a specific embodiment, the process processing method is applied to Figure 6 The process processing device 500 and the computer device 600 ( Figure 7 ).
[0047] The following will take a computer device as an example to illustrate the specific process of this embodiment. It can be understood that the computer device used in this embodiment can be a server or a terminal, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application. The process processing method can specifically include the following steps:
[0048] Step 110: In response to a creation instruction for a workload, create a daemon container group in at least one virtual node.
[0049] In actual application scenarios, the business containers of the container orchestration cluster will be mixed on the worker nodes, resulting in different businesses being on the same worker node. In this way, node management needs to face the problem of node resource planning, that is, to scale up and down at the right time and add worker nodes. In addition, mixed business distribution will bring about isolation issues. For example, some container groups need to enable and load certain kernel modules, but loading this module is only useful for themselves and not for other businesses.
[0050] The introduction of serverless container services can solve the above problems very well. Serverless container services can be simply understood as setting up independent virtual machines (that is, virtual nodes) on shared physical machines for different businesses, and scheduling container groups to virtual nodes. When the container group falls on the physical machine, the corresponding security sandbox can be started. Therefore, serverless container services enable unified management of virtual nodes and secure isolation of different businesses.
[0051] Among them, workload is the specific application running in the container group. In the embodiment of the present application, workload specifically refers to the daemon set. A daemon set is a daemon that ensures that a container group must be run on all or some nodes. A virtual node refers to a virtual node created on a physical machine. In the scenario of serverless container services, a physical machine can directly run a container group as a real node, or it can indirectly run a container group through a virtual node on it.
[0052] As an implementation manner, in response to the instruction to create a workload, the step of creating a daemon container group in at least one virtual node may include:
[0053] (1) A workload is created by a service component in response to a creation instruction for the workload.
[0054] The creation instruction may refer to an instruction received by a service component to create a daemon set. For example, a service component in a Kubernetes cluster may create a Daemonset workload when receiving a creation instruction for a workload submitted by a user.
[0055] (2) Obtain the configuration file corresponding to the workload through the guardian controller.
[0056] The configuration file is a user-defined file used to create a workload, and the format of the configuration file may include YAML or JSON. The configuration file may include a variety of configuration parameters, such as container images and environment parameters. In an embodiment of the present application, the configuration file may also include user-defined annotation information.
[0057] DaemonsetController refers to the controller of Daemonset workload. DaemonsetController can perform real-time checks on four resources: Daemonset workload, container group, node, and version controller (ControllerRevision). When one of these four resources changes, the daemon controller can be triggered to perform tuning operations on the corresponding resources, thereby completing operations such as creating container groups on suitable nodes for workloads, deleting container groups on unsuitable nodes, rolling updates of workloads, updating workload status, and cleaning up old versions of workloads.
[0058] For example, the daemon controller can determine in real time whether a service component has created a new workload. If it is determined that the service component has created a new workload, the configuration file corresponding to the workload can be obtained.
[0059] (3) When the configuration file includes annotation information and the annotation information is a real label, a daemon container group is created in at least one virtual node through a daemon controller.
[0060] Considering that in a native container orchestration cluster, when a user starts a daemon process on a real node, the user needs to submit the corresponding workload to the container orchestration cluster, and then the daemon controller will create a daemon container group (DaemonsetPod) on each real node to execute the daemon process. However, in serverless container services, by default, the daemon controller does not create a daemon container group for a virtual node.
[0061] To this end, the present application enables the daemon controller to create a daemon container group for the virtual node by adding specific annotation information (Annotation) in the configuration file corresponding to the workload in advance.
[0062] Specifically, when the daemon controller obtains the configuration file corresponding to the workload, it can check whether there is annotation information in the configuration file. If there is annotation information, the daemon controller can determine whether the annotation information is a real label. Further, if the annotation information is a real label, the daemon controller can create a daemon container group in at least one virtual node. For example, the annotation information Annotation: `daemosnet-injection: "true"` in the configuration file DaemonsetYAML, "true" can indicate that the Daemonset Controller can create a DaemonsetPod on a virtual node.
[0063] Step 120: Send a configuration file corresponding to the workload to a real node corresponding to each business container group in each virtual node.
[0064] Considering that the daemon container group and the business container group of the serverless container service in the prior art are isolated from each other, so that the normal daemon process cannot be executed. To this end, the present application creatively proposes a method for executing the daemon process. By formally creating a daemon container group and a business container group for a virtual node, and essentially starting the daemon process on the real node corresponding to the business container of the virtual node, the daemon process can be executed normally, thereby improving the performance of the serverless container service in executing the daemon process.
[0065] As an implementation manner, the step of sending a configuration file corresponding to the workload to a real node corresponding to each business container group in each virtual node may include:
[0066] (1) Determine, by means of a first working unit, a service container group in at least one virtual node.
[0067] In a native container orchestration cluster, the worker node has an agent component that is responsible for checking the running status of each node, that is, ensuring that all containers on the node are running normally. For example, the Kubelet of the worker node in the K8s cluster can handle starting, stopping, and maintaining containers according to the instructions of the cluster control end. Correspondingly, in the serverless container service, the agent component can be abstracted into two working units; the first working unit and the second working unit.
[0068] Among them, the first working unit can be set in the master node (Master Node) of the container orchestration cluster to connect to the service component, and the second working unit can be set in the worker node (Worker Node) of the container orchestration cluster, that is, the real node. The first working unit and the second working unit can establish a call link based on the communication protocol for data transmission. For example, a call link can be established based on the general remote procedure call protocol (G-Remote Procedure Calls, GRPC), and the type of communication protocol is not limited here.
[0069] In some embodiments, the first working unit can determine in real time from the service component whether to schedule the daemon container group on the virtual node, and if it is determined that the daemon container group is scheduled on the virtual node, the business container group scheduled in the virtual node can be determined. Optionally, the state of the daemon container group can also be set to indicate that the injection operation of the daemon process is performed.
[0070] (2) Determine the real node corresponding to each business container group.
[0071] In the serverless container service, the business container group on the virtual node will correspond to a real node on the physical machine, which can also be called a "sandbox". The real node can include a second working unit, which can be responsible for starting the container group and managing the life cycle process of the container group.
[0072] Optionally, when the container group is started, the required Configmap, Secret, and cluster network Service updates can all be implemented by the second work unit. In the serverless container service, each virtual node needs to maintain its own status, which can be maintained through real-time reporting by the second work unit.
[0073] In some embodiments, the real node corresponding to each service container group can be determined. Furthermore, the second working unit in the real node can transmit the configuration file with the first working unit through the call link, so as to complete the injection of the daemon process.
[0074] (3) Through the first working unit, a configuration file corresponding to the workload is sent to the second working unit of each real node based on the call link.
[0075] The container orchestration cluster can support the creation of resource objects or workloads in YAML and JSON formats. Since JSON format is used for message transmission between interfaces and is suitable for development, while YAML format is used for configuration and management and is suitable for cloud platform management, this application can use YAML format configuration files to create workloads. The content of the configuration file is edited by the user.
[0076] Exemplarily, when determining the real node corresponding to each business container group, the configuration file corresponding to the workload can be sent to the second working unit of each real node based on the call link through the first working unit. For example, the YAML file corresponding to the workload is sent to the second working unit of each real node based on the GRPC communication protocol through the first working unit.
[0077] Step 130: Receive the configuration file through the real node, and execute the daemon process corresponding to the workload based on the configuration file.
[0078] When the real node receives the configuration file, it can start the daemon process, which is equivalent to executing the daemon process for the business container group and the daemon container group on the virtual node. This avoids the problem that in the serverless container service, different types of containers in the container group affect each other when executing the corresponding processes because the business process and the daemon process are deployed in the same container group, resulting in operation errors, thereby improving the performance of the serverless container service in executing the daemon process.
[0079] For example, when the daemon image fails to be pulled, the entire container group cannot be started normally to the Running / Ready state, causing the business process to be unable to provide services normally. When the container group is running normally, if the daemon configuration / image needs to be updated, the entire container group will be restarted, and the business process must also be restarted. The container group can only reference the configmap under the same namespace. If there are multiple container groups under a namespace on a virtual node, it is necessary to create a configmap in each namespace, which results in data redundancy and high maintenance costs. In addition, the same container group can only use one Service Account to communicate with the API server, the daemon's access to the cluster is limited by the business process, and the same container group can only use one SecurityContext for security settings. The SecurityContext specifies the user ID and primary group ID of all processes in the container group, and the daemon's access to the sandbox is limited by the business process.
[0080] As an implementation mode, the step of receiving the configuration file through the real node and executing the daemon process corresponding to the workload based on the configuration file may include:
[0081] (1) The second working unit of the real node receives the configuration file based on the call link.
[0082] In some embodiments, when the first working unit sends a configuration file corresponding to the workload to the second working unit of each real node based on the call link, the second working unit of the real node can receive the configuration file based on the call link.
[0083] (2) Through the second working unit, a static container group is created based on the configuration file as the target daemon container group.
[0084] Among them, the static container group (Static Pod) refers to the container group managed by the second work unit on the real node. The static container group is always bound to a second work unit and always runs on the same node. Since the static container group can start services such as log collection (Fluentd) and network components (kube-proxy) on each node, the static container group can be used as a daemon container group to start the daemon process.
[0085] In some embodiments, a static container group can be created as a target daemon container group based on a configuration file by a second working unit. Specifically, environment variable configuration parameters in the configuration file can be configured, and then, a static container group can be created as a target daemon container group by a second working unit.
[0086] Optionally, the definition declaration file of the static container group can also be placed in a specified path of the real node where the second working unit is located, or in a specified Uniform Resource Locator (URL). The second working unit can read the definition file of the static container group at the specified path or URL and start the static container group.
[0087] It should be noted that in the embodiment of the present application, by presetting, that is, modifying the source code of the container orchestration tool, the static container group will not register information with the service component. This is because in the native container orchestration tool, the static container group will create a mirror container group (Mirror Pod) on the service component of the container orchestration tool. Therefore, the status of the static container group can be queried in the service component.
[0088] However, in a serverless container service, if the static container group corresponding to the daemon process of all virtual nodes is allowed to register information with the service component, it will cause great pressure on the service component. For this reason, the embodiment of the present application prohibits the static container group from registering information with the service component in order to reduce the effect of the computing resources of the service component and improve the performance of the serverless container service in executing the daemon process. In addition, the embodiment of the present application modifies the source code of the container orchestration tool so that the static container group can use resource objects such as Service Account, Configmap, Secret, etc., in order to improve the efficiency of executing the daemon process.
[0089] (3) Based on the target daemon container group, execute the daemon process corresponding to the workload according to the configuration file.
[0090] In some embodiments, when a static container group is created as a target daemon container group based on a configuration file by the second working unit, a daemon process corresponding to the workload can be executed according to the configuration file based on the target daemon container group.
[0091] Because the target daemon container group is created on the real node corresponding to the business container group in the virtual node, the target daemon container group can execute the daemon process normally. For example, when performing the log collection daemon process, the target daemon container group can obtain the log data of the business container.
[0092] This enables the use of native Daemonset workloads to execute daemons, eliminating the need for users to set up additional custom workload resources or deploy additional controllers. Daemons can be executed in serverless container services simply by creating native Daemonset workloads.
[0093] Step 140: Obtain the execution result of the daemon process, and output the status of the daemon container group based on the execution result.
[0094] After creating a workload resource, the container orchestration cluster can periodically obtain the running status of the workload resource to ensure that the actual state (Actual State) of the workload resource is consistent with the desired state (DesiredState) when it is running, so as to achieve the purpose of automating the work of the workload resource. In turn, it can ensure that the workload resource can smoothly execute various processes.
[0095] To this end, after creating a Daemonset workload, when executing the daemon process corresponding to the workload according to the configuration file based on the target daemon container group, the execution result of the daemon process can be obtained to determine the running status of the target daemon container group.
[0096] As an implementation manner, the step of obtaining the execution result of the daemon process and outputting the status of the daemon container group based on the execution result may include:
[0097] (1) In response to the log viewing command, a viewing request is sent to the second working unit in the real node through the first working unit.
[0098] Specifically, the service component can determine the container name corresponding to the daemon container group in response to the log viewing command. The service component can generate a viewing request based on the container name and send the viewing request to the first working unit. Furthermore, the first working unit can send the viewing request to the second working unit in the real node based on the call link.
[0099] (2) Obtain the execution result of the daemon process based on the viewing request through the second working unit.
[0100] Specifically, when the first working unit sends a viewing request to the second working unit in the real node based on the call link, the second working unit can obtain the execution result of the daemon process from the target daemon container group based on the viewing request.
[0101] (3) Determine and output the status data of the target daemon container group based on the execution result through the second working unit.
[0102] Among them, the status data at least includes the field type (Type), status type (Status), status description (Message) and the last state transition time (LastTransitionTime), etc. The field type at least includes the pre-set injection status (InjectPod), and the injection status is set by pre-modifying the source code of the container orchestration tool in this application.
[0103] Specifically, the second working unit can determine and output the field type, state type, state description, and last state transition time of the target daemon container group as the state of the daemon container group on the virtual node based on the execution result of the daemon process. Optionally, the user can view the state of the daemon container group by editing the command line for viewing the state data.
[0104] In an embodiment of the present application, in response to a creation instruction for a workload, a daemon container group can be created in at least one virtual node, and a configuration file corresponding to the workload can be sent to a real node corresponding to each business container group in each virtual node. Further, the configuration file can be received through the real node, and the daemon process corresponding to the workload can be executed based on the configuration file. Further, the execution result of the daemon process can be obtained, and the status of the daemon container group can be output based on the execution result. In this way, the daemon process can be executed normally in the real node corresponding to the business container group, and the daemon process and the business process can be avoided in the same container to affect the container operation. Thereby, the execution performance of the daemon process in the serverless container service scenario is improved.
[0105] In combination with the method described in the above embodiment, the method will be further described in detail with examples below.
[0106] The process processing method provided in this embodiment specifically relates to cloud computing technology. The following will take the process processing device specifically integrated in a computer device as an example for explanation, and will also focus on Figure 3 The process shown combines Figure 4 The application scenario shown in the figure is described in detail. The computer device can be a server or a terminal device, etc. Figure 3 , Figure 3Another process processing method provided by the embodiment of the present application is shown. In a specific embodiment, the process processing method can be applied to Figure 4 In the serverless container service scenario shown.
[0107] The serverless container service provider provides a cloud computing service platform, which may include a server 310 and a client 320. The server 310 may be a container cloud framework based on the K8s cluster, providing necessary support for the operation, management and maintenance of upper-level services. Users can submit multiple pending tasks to the server through the client 320, such as neural network training tasks. When the client 320 receives the submitted multiple pending tasks, it can perform cloud computing on the multiple pending tasks through the server 310. During the cloud computing process, the K8s cluster needs to execute a daemon process to ensure the normal operation of the entire cloud computing platform.
[0108] The user can control the K8s cluster on the server 310 by editing different command lines on the client 320. For example, the user can use the command line to create a daemon resource object (workload), view the injection status of the daemon, view the log of the daemon, or log in to the container where the daemon is located.
[0109] It should be noted that Figure 4 It is only a schematic diagram of an application scenario provided by an embodiment of the present application. The application scenario described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application. For example, in other cases, in order to improve the efficiency of task processing, a K8s cluster group, that is, a multi-cloud K8s cluster, can be built based on multiple K8s clusters. It is known to those of ordinary skill in the art that with the evolution of the system architecture and the emergence of new application scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems. The process processing method may specifically include the following steps:
[0110] Step 210: The computer device determines whether the container group template is obtained.
[0111] The Daemonset workload natively provided by K8s can update the daemon process in place. For this reason, in-place updates of daemons can also be provided in serverless container services. When updating the daemon, a new container group template (Pod Template) needs to be obtained in order to create a new daemon container group (Daemonset Pod).
[0112] Exemplarily, a user may submit a request to create a new Daemonset workload to a service component (API server) through client 320, thereby generating a creation instruction, and a daemonset controller (Daemonset Controller) may obtain a new Pod Template.
[0113] Step 220: When the computer device determines that the container group template is obtained, the historical daemon container group on each real node and virtual node is terminated.
[0114] Exemplarily, when the Daemonset Controller on the server 310 determines that a new PodTemplate is obtained, the historical Daemonset Pod on each real node and virtual node may be terminated. Optionally, during the daemon process update, at most only one Pod of the DaemonSet may run on each node.
[0115] Step 230: The computer device creates a daemon container group in at least one virtual node in response to the instruction to create the workload.
[0116] In the scenario of serverless container services, physical machines can directly run container groups (Pods) as real nodes, or they can indirectly run container groups through virtual nodes on them.
[0117] As an implementation manner, in response to an instruction to create a workload, the step of creating a daemon container group in at least one virtual node may include:
[0118] (1) The computer device creates a workload through a service component in response to an instruction to create a workload.
[0119] Exemplarily, the API server on the server 310 may create a Daemonset workload in response to a creation instruction for the Daemonset workload.
[0120] (2) The computer device obtains the configuration file corresponding to the workload through the guardian controller.
[0121] Exemplarily, the Daemonset Controller on the server 310 may obtain a YAML file corresponding to the Daemonset workload.
[0122] (3) When the configuration file includes annotation information and the annotation information is a real label, the computer device creates a daemon container group in at least one virtual node through the daemon controller.
[0123] Exemplarily, when there is annotation information Annotation in the YAML file and there is "annotation: `daemosnet-injection: "true"`, the Daemonset Controller on the server 310 can create a Daemonset Pod on at least one virtual node according to the PodTemplate. Optionally, when the first working unit learns that a new Daemonset Pod is created, it can send a new PodYAML to the second working unit, and then the second working unit restarts the new Static Pod to execute the new daemon process.
[0124] Step 240: The computer device sends a configuration file corresponding to the workload to a real node corresponding to each business container group in each virtual node.
[0125] The present application formally creates a daemon container group and a business container group for a virtual node, and essentially starts a daemon process on a real node corresponding to the business container of the virtual node, so that the daemon process can be executed normally, thereby improving the performance of the serverless container service executing the daemon process.
[0126] As an implementation manner, the step of sending, by the computer device, a configuration file corresponding to the workload to a real node corresponding to each business container group in each virtual node may include:
[0127] (1) The computer device determines a service container group in at least one virtual node through a first working unit.
[0128] Exemplarily, the first working unit on the server 310 can determine in real time from the API server whether to schedule the Daemonset Pod on the virtual node, and when it is determined that the Daemonset Pod is scheduled on the virtual node, the business container group (business Pod) scheduled in the virtual node is determined. Optionally, the state of the Daemonset Pod can also be set to indicate that the injection operation of the daemon process is performed.
[0129] (2) The computer device determines the real node corresponding to each service container group.
[0130] Exemplarily, the server 310 may determine the real node corresponding to each business Pod. Then, the second working unit in the real node may send the YAML file to the first working unit through GRCP, thereby completing the injection of the daemon process.
[0131] (3) The computer device sends a configuration file corresponding to the workload to the second working unit of each real node based on the call link through the first working unit.
[0132] Exemplarily, when determining the real node corresponding to each business container group, the first working unit on the server 310 can send a YAML file corresponding to the Daemonset workload to the second working unit of each real node based on GRCP.
[0133] Step 250: The computer device receives the configuration file through the real node, and executes the daemon process corresponding to the workload based on the configuration file.
[0134] When the real node receives the configuration file, it can start the daemon process, which is equivalent to executing the daemon process for the business container group and the daemon container group on the virtual node. This avoids the container operation problems caused by deploying the business process and the daemon process in the same container group in the serverless container service, thereby improving the performance of the serverless container service in executing the daemon process.
[0135] As an implementation manner, the step of receiving the configuration file through the real node and executing the daemon process corresponding to the workload based on the configuration file may include:
[0136] (1) The computer device receives the configuration file based on the call link through the second working unit of the real node.
[0137] Exemplarily, when the first working unit on the server 310 sends the YAML file corresponding to the Daemonset workload to the second working unit of each real node based on GRCP, the second working unit of the real node can receive the YAML file based on GRCP.
[0138] (2) The computer device creates a static container group as a target daemon container group based on the configuration file through the second working unit.
[0139] Exemplarily, the second working unit on the server 310 can create a Static Pod as the target daemon container group based on the YAML file. Specifically, the environment variable configuration parameters in the configuration file can be configured, and then, the Static Pod group is created as the target daemon container group through the second working unit.
[0140] (3) The computer device executes the daemon process corresponding to the workload according to the configuration file based on the target daemon container group.
[0141] Exemplarily, when the second working unit on the server 310 creates a Static Pod as a target daemon container group based on a YAML file, the daemon process (Daemonset) corresponding to the Daemonset workload can be executed based on the target daemon container group according to the YAML file.
[0142] Step 260: The computer device obtains the execution result of the daemon process and outputs the status of the daemon container group based on the execution result.
[0143] After creating the Daemonset workload, when executing the daemon process corresponding to the workload based on the target daemon container group according to the configuration file, the execution result of the daemon process can be obtained to determine the running status of the target daemon container group.
[0144] As an implementation, in response to the log viewing command "kubectl logs", the computer device sends a viewing request to the second work unit in the real node through the first work unit. Specifically, the service component can determine the container name corresponding to the daemon container group in response to the log viewing command, and based on the container name, generate a viewing request through the service component and send the viewing request to the first work unit. Then, through the first work unit, the viewing request is sent to the second work unit in the real node based on the call link.
[0145] Furthermore, the computer device can obtain the execution result of the daemon process through the second work unit, and determine and output the status data of the daemon container group based on the execution result through the second work unit.
[0146] For example, the user can edit the log viewing command "kubectl logs" on the client 320. For example, kubectl logs <business pod> -c <container name of the daemonset>. Then, when the API server receives kubectl logs, the first work unit can send the request to view the logs to the second work unit in the real node through GRCP. After receiving the request, it can determine the business Pod, determine the container corresponding to the business Pod that executes the daemon process according to the container name, and then obtain the status data of the container. All the status data is classified into the business Pod.
[0147] Optionally, the user can log in to the terminal of the daemon process, that is, the container that specifically executes the daemon process. Specifically, the service component API server can send a login request to the first work unit, and the first work unit can send a login request to the second work unit in the real node. Furthermore, based on the second work unit, it is determined whether the login request is from a legitimate source and the user permissions are checked. When it is determined that the login request is from a legitimate source, log in to the specified daemon container according to the user permissions.
[0148] For example, the user can edit the login command "kubectl exec" on the client 320. For example, kubectl exec <business pod> -c <container name of the daemonset>. Further, when the API server receives kubectl exec, the first working unit can send the login request to the second working unit, and the second working unit can determine whether the login request is from a legitimate source and check the user permissions. When the second working unit determines that the login request is from a legitimate source, it can log in to the daemon container specified in the login command according to the user permissions.
[0149] Exemplarily, please refer to Figure 5 , Figure 5 which shows a cluster architecture diagram of a serverless container service. As Figure 5 shown, the serverless container service is based on the native K8s cluster as the basic framework. The K8s cluster can include a master node 401, worker nodes 402, 404, 406, 408, and 410.
[0150] Among them, the master node 401 can include the API server, Controller Manager, and the first working component of the K8s control plane. The worker nodes 402, 404, 406, and 408 are real nodes, and the worker node 410 is a virtual node, which can be used to execute the training tasks of the neural network. The worker node 410 can include two business Pods: business Pod-1 and business Pod-2. Business Pod-1 corresponds to the worker node 406, and business Pod-2 corresponds to the worker node 408. The worker nodes 402 and 404 can be used in the scenario of the serverful container service as real nodes. Each Pod creates a corresponding container.
[0151] When the user communicates with the K8s cluster by providing a new or updated object manifest, it is actually communicating with the API server. Specifically, the API server can verify the request to update the object and act as a unified interface to query the current state of the K8s cluster.
[0152] Among them, the Controller Manager can obtain the state of the k8s cluster through the API server and check whether the current state of the cluster meets the expected state. If the actual state is different from the expected state, the Controller Manager will change it through the API server in an attempt to push the cluster to the desired state. The Controller Manager is composed of a group of controllers, each of which is responsible for managing a specific type of resource object on the cluster. In the embodiment of the present application, the Daemonset Controller is mainly used. There is a proxy component corresponding to the working node 406 and the working node 408, that is, the second working unit. The second working unit can establish a call link with the first working component through the GRCP communication protocol to facilitate process data transmission.
[0153] Specifically, the user can call the API server to create a Daemonset workload and mark it in the annotation, allowing the creation of a Daemonset Pod (Ds Pod) on the virtual node. When the Daemonset Controller learns that the API server has created a Daemonset workload, it can create a DaemonsetPod for the worker node 410 and set spec.nodename to the node name of the worker node 410.
[0154] Furthermore, the first working unit may continue to determine from the API server whether the working node 410 is scheduled with a Daemonset Pod. When the first working unit determines from the API server that the working node 410 is scheduled with a Daemonset Pod, the state of the Daemonset Pod may be changed to "Injection".
[0155] Furthermore, the first working unit can inject daemons into the business Pod-1 and business Pod-2 on the working node 410, respectively. Specifically, the first working unit can send a YAML of a Static Pod to the second working unit through the GRCP communication protocol. Then, the second working unit can pull up the Static Pod on the working nodes 406 and 408 corresponding to the business Pod-1 and business Pod-2, respectively, according to the YAML, to start the daemon.
[0156] In an embodiment of the present application, it can be determined whether a container group template is obtained. When it is determined that a container group template is obtained, the historical daemon container group on each real node and virtual node is terminated in response to the creation instruction of the workload, a daemon container group is created in at least one virtual node, and a configuration file corresponding to the workload is sent to the real node corresponding to each business container group in each virtual node. Further, the configuration file is received through the real node, and the daemon process corresponding to the workload is executed based on the configuration file. Further, the execution result of the daemon process is obtained, and the status of the daemon container group is output based on the execution result. In this way, the daemon process can be executed normally in the real node corresponding to the business container group, and the daemon process and the business process are prevented from being in the same container to affect the operation of the container. Thereby, the execution performance of the daemon process in the serverless container service scenario is improved.
[0157] See also Figure 6 , which shows a structural block diagram of a process processing device 500 provided in an embodiment of the present application. The process processing device 500 includes: a creation module 510, which is used to create a daemon container group in at least one virtual node in response to a creation instruction for a workload; a sending model 520, which is used to send a configuration file corresponding to the workload to a real node corresponding to each business container group in each virtual node; an execution module 530, which is used to receive the configuration file through the real node and execute the daemon process corresponding to the workload based on the configuration file; an output module 540, which is used to obtain the execution result of the daemon process and output the status of the daemon container group based on the execution result.
[0158] In some embodiments, the creation module 510 may include: a load creation unit, a file acquisition unit, and a container creation unit. The load creation unit is used to create a workload in response to a creation instruction for the workload through a service component; the file acquisition unit is used to obtain a configuration file corresponding to the workload through a daemon controller; and the container creation unit is used to create a daemon container group in at least one virtual node through a daemon controller when the configuration file includes annotation information and the annotation information is a real label.
[0159] In some embodiments, the creation module 510 may further include: a judgment unit and a termination unit. The judgment unit is used to judge whether a container group template is obtained, and the container group template is used to create a guardian container group; the termination unit is used to terminate the historical guardian container group on each real node and virtual node when it is determined that the container group template is obtained.
[0160] In some embodiments, the sending model 520 can be specifically used to: determine the business container group in at least one virtual node through the first working unit; determine the real node corresponding to each business container group; and send the configuration file corresponding to the workload to the second working unit of each real node based on the call link through the first working unit.
[0161] In some embodiments, the execution module 530 can be specifically used to: receive a configuration file based on a call link through a second working unit of a real node; create a static container group as a target daemon container group based on the configuration file through the second working unit; and execute a daemon process corresponding to the workload according to the configuration file based on the target daemon container group.
[0162] In some embodiments, the output model 540 may include: a request sending unit, a request obtaining unit, and a status output unit. The request sending unit is used to send a viewing request to the second working unit in the real node through the first working unit in response to the log viewing command; the request obtaining unit is used to obtain the execution result of the daemon process based on the viewing request through the second working unit; the status output unit is used to determine and output the status data of the daemon container group based on the execution result through the second working unit; wherein the status data at least includes a field type, a status type, and a status description, and the field type at least includes a preset injection status.
[0163] In some embodiments, the request sending unit can be specifically used to determine the container name corresponding to the daemon container group in response to the log viewing command through the service component; generate a viewing request based on the container name through the service component, and send the viewing request to the first working unit; and send the viewing request to the second working unit in the real node based on the call link through the first working unit.
[0164] In some embodiments, the process processing device 500 may further include: a command response module, a login request module, a request sending module, a request checking module and a login module. The command response module is used to respond to the container login command and determine the user identity and user authority through the service component; the login request module is used to send the login request to the first working unit through the service component; the request sending module is used to send the login request to the second working unit in the real node through the first working unit; the request checking module is used to determine whether the login request is from a legitimate source based on the second working unit and check the user authority; the login module is used to log in to the daemon container specified in the login command according to the user authority when it is determined that the login request is from a legitimate source.
[0165] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0166] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0167] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0168] The solution provided by the present application can create a daemon container group in at least one virtual node in response to a creation instruction for a workload, and send a configuration file corresponding to the workload to the real node corresponding to each business container group in each virtual node. Further, the configuration file is received through the real node, and the daemon process corresponding to the workload is executed based on the configuration file. Further, the execution result of the daemon process is obtained, and the status of the daemon container group is output based on the execution result. In this way, the daemon process can be executed normally in the real node corresponding to the business container group, and the daemon process and the business process are prevented from being in the same container to affect the container operation. Thereby, the execution performance of the daemon process in the serverless container service scenario is improved.
[0169] like Figure 7 As shown, the embodiment of the present application also provides a computer device 600, which includes a processor 610, a memory 620, a power supply 630 and an input unit 640. The memory 620 stores computer program instructions. When the computer program instructions are called by the processor 610, the various method steps provided in the above embodiments can be implemented. Those skilled in the art can understand that the structure of the computer device shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0170] The processor 610 may include one or more processing cores. The processor 610 uses various interfaces and lines to connect various parts of the entire battery management system, and by running or executing instructions, programs, code sets or instruction sets stored in the memory 620, calls the data stored in the memory 620, executes various functions of the battery management system and processes data, and executes various functions and processes data of the computer device, thereby controlling the computer device as a whole. Optionally, the processor 610 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 610 can integrate one or a combination of a central processing unit 610 (CPU), a graphics processing unit 610 (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 610, but may be implemented separately through a communication chip.
[0171] The memory 620 may include a random access memory 620 (Random Access Memory, RAM), and may also include a read-only memory 620 (Read-Only Memory). The memory 620 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 620 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the various method embodiments described below, etc. The data storage area may also store data (such as a phone book and audio and video data) created by the computer device during use. Accordingly, the memory 620 may also include a memory controller to provide the processor 610 with access to the memory 620.
[0172] The power supply 630 can be logically connected to the processor 610 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 630 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
[0173] The input unit 640 can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0174] Although not shown, the computer device 600 may also include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 610 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 620 according to the following instructions, and the processor 610 will run the application programs stored in the memory 620, thereby implementing the various method steps provided in the aforementioned embodiments.
[0175] like Figure 8 As shown, the embodiment of the present application further provides a computer-readable storage medium 800, in which a computer program 710 is stored. The computer program 710 can be called by a processor to execute various method steps provided in the embodiment of the present application.
[0176] The computer readable storage medium may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium includes a non-volatile computer readable storage medium (Non-Transitory Computer-Readable Storage Medium). The computer readable storage medium 800 has storage space for a computer program that executes any of the method steps in the above embodiments. These computer programs can be read from or written to one or more computer program products. The computer program can be compressed in an appropriate form.
[0177] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the various method steps provided in the above embodiment. Computer-readable storage medium 700.
[0178] The above are only preferred embodiments of the present application, and are not intended to limit the present application in any form. Although the present application has been disclosed as above with preferred embodiments, it is not intended to limit the present application. Any technical personnel in the field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present application. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.
Claims
1. A process processing method, characterized in that: The method comprises: In response to a creation instruction for the workload, creating a daemon container group in at least one virtual node; Sending a configuration file corresponding to the workload to a real node corresponding to each business container group in each of the virtual nodes; receiving the configuration file through the real node, and executing the daemon process corresponding to the workload based on the configuration file; An execution result of the daemon process is obtained, and a status of the daemon container group is output based on the execution result.
2. The method according to claim 1, characterized in that The step of creating a daemon container group in at least one virtual node in response to a creation instruction for a workload includes: Creating a workload by a service component in response to a creation instruction for the workload; Obtaining the configuration file corresponding to the workload through the daemon controller; When the configuration file includes annotation information, and the annotation information is a real label, a daemon container group is created in at least one virtual node through the daemon controller.
3. The method according to claim 2, characterized in that Before creating the workload by the service component in response to the instruction to create the workload, the method further includes: Determine whether a container group template is obtained, where the container group template is used to create a daemon container group; When it is determined that the container group template is obtained, the historical daemon container group on each real node and virtual node is terminated.
4. The method according to any one of claims 1 to 3, characterized in that: The sending the configuration file corresponding to the workload to the real node corresponding to each business container group in each virtual node includes: Determine, by a first working unit, a service container group in the at least one virtual node; Determine the real node corresponding to each of the service container groups; The configuration file corresponding to the workload is sent to the second working unit of each real node based on the call link through the first working unit.
5. The method according to claim 1, characterized in that: The receiving the configuration file through the real node and executing the daemon process corresponding to the workload based on the configuration file includes: Receiving the configuration file based on the call link by the second working unit of the real node; By means of the second working unit, a static container group is created based on the configuration file as a target daemon container group; Based on the target daemon container group, the daemon process corresponding to the workload is executed according to the configuration file.
6. The method according to claim 1, characterized in that The obtaining the execution result of the daemon process and outputting the state of the daemon container group based on the execution result includes: In response to the log viewing command, sending a viewing request to a second working unit in the real node through the first working unit; Obtaining, by the second working unit, an execution result of the daemon process based on the viewing request; Determine and output, by the second working unit, the state data of the daemon container group based on the execution result; The state data at least includes a field type, a state type and a state description, and the field type at least includes a preset injection state.
7. The method according to claim 6, characterized in that The step of sending a log viewing request to a second working unit in a real node through the first working unit in response to the log viewing command includes: Determine, by the service component, a container name corresponding to the daemon container group in response to a log viewing command; Generate a view request based on the container name through a service component, and send the view request to the first working unit; Through the first working unit, a viewing request is sent to the second working unit in the real node based on the call link.
8. The method according to claim 1, characterized in that After executing the daemon process corresponding to the workload based on the configuration file, the method further includes: In response to the container login command, determining the user identity and user authority through the service component; Sending a login request to the first working unit through the service component; Sending a login request to a second working unit in the real node through the first working unit; Determine whether the login request is from a legitimate source and check user authority based on the second working unit; When it is determined that the login request is from a legitimate source, the daemon container specified in the login command is logged in according to the user authority.
9. A process processing device, characterized in that: The device comprises: A creation module, configured to create a daemon container group in at least one virtual node in response to a creation instruction for a workload; A sending model, used to send a configuration file corresponding to the workload to a real node corresponding to each business container group in each virtual node; An execution module, configured to receive the configuration file through the real node, and execute the daemon process corresponding to the workload based on the configuration file; The output model is used to obtain the execution result of the daemon process and output the state of the daemon container group based on the execution result.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which can be called by a processor to execute the method according to any one of claims 1 to 8.
11. A computer device, characterized in that: include: Memory; One or more processors coupled to the memory; One or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and the one or more computer programs are configured to execute the method according to any one of claims 1 to 8.
12. A computer program product, characterized in that The computer program product includes a computer program, which is stored in a storage medium; a processor of a computer device reads the computer program from the storage medium, and the processor executes the computer program, so that the computer device executes the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Virtual machine process monitoring system and method
CN107741876A
Container starting method and device, computer equipment and storage medium
CN114860344A
Virtual machine snapshot management method and system and computer readable medium
CN115048190A
Resource object management method and device
CN115080229A
Daemon service deployment method and device based on Yarn, medium and equipment
CN115794130A
