Mirror image directional construction and domain division management system and method for cloud application
By introducing mirror-oriented construction and domain-based management systems on the cloud platform, the problem of insufficient flexibility in mirror management in the existing technology is solved, efficient mirror delivery and maintenance is achieved, and cloud node resource utilization and scheduling management efficiency are improved.
Patent Information
- Application Number
- CN202510556589.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-04-29
AI Technical Summary
The existing cloud platform lacks flexibility in mirror management, which makes it difficult to achieve full automation by relying on professional operation and maintenance personnel for mirror delivery and maintenance, which increases the threshold for use and reduces delivery efficiency.
It provides a mirror-oriented construction and domain management system for cloud applications, including node actuator components, mirror manager components, mirror console components, domain group controller components, interface server components and metadatabase components. Through the coordinated work of these components, mirror-oriented construction and efficient distribution and node domain group caching strategies across the entire domain of the cloud platform.
It improves the resource utilization rate and scheduling management efficiency of cloud nodes in the cluster, realizes efficient targeted construction and distribution of mirrors, reduces dependence on professional operation and maintenance personnel, and improves delivery efficiency and convenience of use.
Smart Images

Figure CN120223708A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cloud computing, and particularly to a system and method for mirror image directed construction and domain group management of cloud applications. Background Art
[0002] In the context of the rapid development of cloud native and containerization technologies, application mirror image construction and management are important links for cloud platforms to achieve efficient application delivery and operation and maintenance. The efficiency of integrated mirror image repositories in the full life cycle management of mirror images has become a widely recommended solution in the industry. Most tools rely on Devops pipelines or C / S architectures to assemble Dockerfile data to complete mirror image construction, with rich functions and high scalability. However, the strong binding characteristics of these tools with nodes limit the flexibility of mirror image management.
[0003] In medium and large-scale cloud platform cluster environments, a class or group of applications are usually restricted to run on a certain domain group of nodes according to node labels. For example, N application containers of the health-monitor project run on worker1~5 cloud nodes, and M application containers of the mission-plan project run on worker6~9 cloud nodes, rather than being discretely distributed within the entire domain. This deployment and scheduling method improves the efficiency of the scheduling mechanism and also poses a requirement for global mirror image management that does not require all cloud nodes to locally cache all mirror images. In actual projects, mirror image delivery and maintenance work still rely on professional operation and maintenance personnel, making it difficult to achieve full automation. The requirement for users and developers to have certain cloud native knowledge and Linux operation and maintenance foundation is relatively harsh, increasing the usage threshold and reducing the delivery efficiency. Summary of the Invention
[0004] Aiming at the deficiencies in the prior art, the present invention provides a system and method for mirror image directed construction and domain group management for cloud applications, which are used to optimize the construction and storage processes, support users to complete application delivery with higher quality and efficiency, support mirror image directed construction and efficient distribution within the entire cloud platform and node domain group caching strategies, and avoid unnecessary local caching.
[0005] In a first aspect, a system for mirror image directed construction and domain group management of cloud applications provided by the present invention includes a node executor component, a mirror image manager component, a mirror image console component, a domain group controller component, an interface server component, and a meta database component; The node executor component is used to regularly report node heartbeats and process mirror image construction requests and management operations from the mirror image console component; The mirror image manager component is used to store global mirror image files of the cloud platform, receive and process operation requests of the mirror image repository, and send the feedback results to the mirror image console component or the domain group controller component for parsing and output; The mirror console component is used to aggregate the heartbeat status of node executor components in the cluster, send management operation requests for the project domain, node domain group, application dependency relationship, mirror full life cycle management, and the mirror repository in the mirror manager component to the corresponding components for processing, and parse and display the feedback results; The domain group controller component is used to monitor changes in the project domain, node domain group, and application dependency relationship data in the meta-database component, and trigger status synchronization updates for corresponding resource objects in the cluster; The interface server component directly interacts with the meta-database component, and is used to receive and process change requests for the project domain, node domain group, and application dependency relationship data in the meta-database component from the mirror console component and the domain group controller component, and return the processing results to the task source component for visualization or log output after completion; The meta-database component is used to store the project domain, node domain group, and application dependency relationship data in the cluster, receive the add, delete, modify, and query requests for the project domain, node domain group, and application dependency relationship data submitted by the mirror console component to the interface server component, and feedback the processing results for the mirror console component to display; The domain group controller component and the mirror console component only interact with the meta-database component through the interface server component.
[0006] As can be seen from the above technical solutions, a mirror-oriented construction and domain-based management system for cloud applications provided by the present invention considers the optimization of the scheduling strategy for the application running area in an actual project, restricts all applications of the project to run on nodes within the specified project domain, rather than randomly distributing or load balancing within the global scope, thereby improving the resource utilization rate and scheduling management efficiency of cloud nodes in the cluster; the project domain, node domain group, and application dependency relationship data of the present invention are all uniformly managed by the meta-database component, and the domain group controller component listens through the interface server component and triggers the target state synchronization function of these three types of data to ensure the real-time and associated consistency of the project domain identifier, node domain group, and application mirror data on cloud nodes in the cluster.
[0007] Optionally, the node executor component is specifically used for: Regularly report the heartbeat to the mirror console component according to the current state of the node for the mirror console component to parse and display the online state of the node; Receive a node metadata information query request, call the local container Runtime API interface to obtain mirror information, node hostname, IP address, and node domain group annotation information, and feedback them to the mirror console component for parsing and display; Receive mirror import, rename, pull, push, and delete requests, call the local container Runtime API interface to complete the corresponding processing, and feedback the processing results to the mirror console component for parsing and display; Receive the image building requests and building information submitted by the mirror console component, call the local container RuntimeAPI interface to parse and load the building information, complete the application image encapsulation operation according to the building information, and return the building result; When the newly added image name on the node local is none, trigger the cleaning mechanism to delete the invalid image files and release the node resource space.
[0008] As can be seen from the above technical solutions, the present invention can perform node-directed selection, directly transfer the image building information to the node executor component within the application subordinate project domain for execution, avoid the situation where the application image is stored on the nodes of other project domains, effectively save the space resources of other nodes in the cluster, and improve the node resource utilization rate.
[0009] Optionally, the mirror manager component is specifically used for: Receive and store the image data pushed by the node executor component to complete the image file storage operation; Receive and process the operation requests for connection detection, connection authentication, and connection deletion of the target image repository from the mirror console component, and feedback the results to the mirror console component for display; Receive the information list of the existing images in the image repository from the mirror console component for its interface to parse and perform visual display; Receive the target image deletion operation submitted by the mirror console component and return the processing result for its display.
[0010] Optionally, the domain group controller component is specifically used for: Listen to the change operations of the project domain data in the meta database component through the interface server component, trigger the update of the node domain group data of the project domain identifier, and at the same time change the corresponding node label of the target project domain to the interface server component; Listen to the change operations of the node domain group data in the meta database component through the interface server component, and synchronously update the node project domain identifier to the interface server component according to the corresponding operation combination change information; Listen to the change operations of the application subordinate relationship data in the meta database component through the interface server component, traverse and obtain the node domain group data with the project domain identifier and image ID as the unique key for comparison, combine it into the corresponding node application image operation request of the target project domain identifier and send it to the node executor component for processing, and output the feedback result to the log for easy traceability.
[0011] As can be seen from the above technical solutions, the domain group controller component listens and triggers the target state synchronization function through the interface server component to ensure the real-time and associated consistency of the project domain identifier, node domain group, and application image data of the three types of data on the cloud node.
[0012] Optionally, the interface server component is specifically configured to: Establish a long connection in the List-watch mechanism to monitor change events of the project domain, node domain group, and application dependency relationship in the meta-database component, and push them to the domain group controller component; for the domain group controller component to parse to achieve the consistency between the actual state of the node and the state of the project domain in the meta-database component.
[0013] Optionally, the project domain data includes the identifier, alias, description, and project domain remarks of the project domain; the node domain group data includes the host name, node IP, project domain identifier, and node remarks; the application dependency relationship data includes the application name, project domain identifier, image name, image version, image ID, image creation time, image volume size, whether to retain, and image remarks.
[0014] In a second aspect, a method for mirror image directed construction and domain-based management of cloud applications provided by the present invention realizes the mirror image directed construction and domain-based management of cloud applications based on the mirror image directed construction and domain-based management system provided in the first aspect; wherein the method for mirror image directed construction of cloud applications includes: The mirror console component obtains the project domain, node domain group data, and application dependency relationship data through the interface server component, maps the status data information reported by the node executor at regular intervals, and visually presents the node project domain information; According to the user's selection operation on the online node, generate a data stream in the Dockerfile file format for the application mirror construction data and forward it to the node executor component of the user-selected node; after receiving the mirror construction data through the localContainerRuntime.GetDockerfile interface of the node executor component, parse it, and call localContainerRuntime.BuildImage to start the construction process and feedback the execution progress until the construction is completed; The node executor component automatically pushes the completed application mirror to the mirror repository and feeds back the push result to the mirror console component.
[0015] It can be seen from the above technical solutions that the present invention can achieve node-directed selection, directly transmit the mirror construction information to the node executor component within the application-dependent project domain, avoid the situation where the application mirror is stored on nodes in other project domains, effectively save the space resources of other nodes in the cluster, and improve the node resource utilization rate.
[0016] Optionally, the method for changing the project domain information includes: After the mirror console component obtains the user's change operation on the project domain to be changed, the domain group controller component listens through the interface server component to obtain the change event and identify the change type; The domain group controller component queries, through the interface server component, the node domain group information, the corresponding node data and application image data in the application dependency information with the project domain to be changed as the project domain identifier, and converts them into task information for the domain label change of the corresponding node regarding the project domain to be changed and the application image change of the corresponding node regarding the application image corresponding to the project domain to be changed; The interface server component obtains and executes the change task of the project domain label of the node regarding the project domain to be changed, and the node executor of the node within the project domain to be changed obtains and executes the change task of the application image of the node regarding the project domain to be changed.
[0017] Optionally, the method for changing the node domain group information includes: After the mirror console component obtains the user's change operation on the project domain identifier of the node, the domain group controller component listens through the interface server component to obtain this change event and identifies the change type; The domain group controller component, through the interface server component, completes the change operation of the project domain identifier of the specified node, and generates operation information for the application image of this node and forwards it to the node executor component to complete the synchronization of the application dependency relationship; The interface server component completes the synchronization operation of the project domain label of the corresponding node according to the change event of the project domain of the specified node; the corresponding node executor component receives the application image operation request of the project domain identifier and completes the synchronization operation of the application dependency relationship on the specified node.
[0018] Optionally, the method for changing the application dependency information includes: After the mirror console component obtains the user's change operation on the application dependency relationship, the domain group controller component listens through the interface server component to obtain this change event and identifies the change type; The domain group controller component, through the interface server component, completes the change operation of the application dependency data in the meta-database component, and parses the change event and converts it into a change processing task for the application image on the node under the corresponding project domain identifier; The domain group controller component forwards a task request to the node executor component of the corresponding node to complete the change operation of the application dependency data, and pulls / deletes the application image on the node corresponding to the project domain identifier according to whether the application image is retained.
[0019] Adopting the above technical solution, the present application has the following beneficial effects: The present invention considers the optimization of the scheduling strategy for the application running area in the actual project, restricts all applications of this project to run on the nodes within the specified project domain, rather than randomly distributed or load-balanced within the global scope, thereby improving the resource utilization rate and scheduling management efficiency of cloud nodes in the cluster; The project domain, node domain group, and application dependency relationship data of the present invention are all uniformly managed by the meta-database component. The domain group controller component listens and triggers the target state synchronization function through the interface server component to ensure the real-time and associated consistency of the project domain identifier, node domain group, and application image data of these three types of data on the cloud nodes within the cluster. Different from the local image construction method, the present invention can perform node-directed selection and directly transfer the image construction information to the node executor component within the application-dependent project domain to complete, avoiding the situation where the application image is stored on the nodes of other project domains, effectively saving the space resources of other nodes within the cluster and improving the node resource utilization rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0021] Figure 1 FIG. shows a schematic diagram of a mirror-directed construction and domain-based management system for a cloud application provided by an embodiment of the present invention; Figure 2 FIG. shows a flowchart of a mirror-directed construction method provided by an embodiment of the present invention; Figure 3 FIG. shows a flowchart of a method for changing project domain information provided by an embodiment of the present invention; Figure 4 FIG. shows a flowchart of a method for changing node domain group information provided by an embodiment of the present invention; Figure 5 FIG. shows a flowchart of a method for changing application dependency relationship information provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0022] The following will describe in detail the embodiments of the technical solutions of the present invention with reference to the drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are therefore only examples and cannot be used to limit the protection scope of the present invention.
[0023] It should be noted that unless otherwise specified, the technical terms or scientific terms used in this application should have the ordinary meaning understood by those skilled in the art to which the present invention belongs.
[0024] In one embodiment, to address the current medium- and large-scale cloud platform cluster environment, a class or group of applications are restricted to run on a certain domain group of nodes according to node labels, rather than being discretely distributed across the entire domain, thereby reducing the dependence on professional operation and maintenance personnel. A cloud application mirror-oriented construction and domain-based management system is provided. As Figure 1 shown, it includes a node executor component, a mirror manager component, a mirror console component, a domain group controller component, an interface server component, and a meta-database component; The node executor component runs as a DaemonSet daemon process set on all cloud nodes in the cluster, and is used to regularly report node heartbeats and process mirror construction requests and management operations from the mirror console component. It is the foundation for the mirror-oriented construction and domain-based management functions of application images. The mirror manager component is used to store the global mirror files of the cloud platform, receive and process operation requests from the mirror repository, and send the feedback results to the mirror console component or the domain group controller component for parsing and output. The mirror console component is used to aggregate the heartbeat status of the node executor components in the cluster, send management operation requests for the project domain, node domain group, application subordination relationship, mirror full life cycle management, and the mirror repository in the mirror manager component to the corresponding components for processing according to user requests, and parse and display the feedback results. It is an important portal for human-computer interaction. The domain group controller component is used to monitor changes in the project domain, node domain group, and application subordination relationship data in the meta-database component, and trigger status synchronization updates of the corresponding resource objects in the cluster. The interface server component directly interacts with the meta-database component, and is used to receive and process change requests for the project domain, node domain group, and application subordination relationship data in the meta-database component from the mirror console component and the domain group controller component. After completion, it returns the processing results to the task source component for visualization or log output. The meta-database component is used to store the project domain, node domain group, and application subordination relationship data in the cluster, receive add, delete, modify, and query requests for the project domain, node domain group, and application subordination relationship data submitted by the mirror console component to the interface server component, and feedback the processing results for display by the mirror console component. The domain group controller component and the mirror console component only interact with the meta-database component through the interface server component.
[0025] Based on the above system, the scheduling strategy optimization of the application running area in the actual project is considered. All applications of this project are restricted to run on the nodes within the specified project domain, rather than being randomly distributed or load-balanced globally, thereby improving the resource utilization rate and scheduling management efficiency of cloud nodes in the cluster. At the same time, the data of the project domain, node domain group, and application subordination relationship are all uniformly managed by the metadata database component, and the domain group controller component listens through the interface server component and triggers the target state synchronization function of these three types of data to ensure the real-time and associated consistency of the project domain identifier, node domain group, and application image data on the cloud nodes in the cluster.
[0026] The above six components in the system all run on the cloud platform in a containerized manner. Relying on domestic hardware platforms such as Feiteng 2000+, D2000, and Kunpeng 920S, they are adapted to the Galaxy Kylin National Defense Edition V10 server operating system and adopt a "3+3+N" deployment mode (that is, a mode of 3 management nodes, 3 storage nodes, and N computing nodes). Among them, the 3 management nodes form a cluster mode to provide redundancy and avoid single-point failures of management nodes; the 3 storage nodes provide a distributed storage system to ensure the high availability of business data; the N computing nodes serve as the carriers for running containerized business services and provide computing resources such as CPU and memory. In actual deployment, the scale of cloud nodes is required to be at least 3 or more, and the mode of full overlap and cross-deployment of management nodes, storage nodes, and computing nodes is the minimum scale (the minimum scale is not recommended for the production environment and is usually used for debugging and development environments).
[0027] Optionally, the node executor component (node-executor) is specifically used for: (1.1) Report the heartbeat to the image console component regularly (preset 10 seconds, configurable) according to the current state of the node for the image console component to parse and display the online state of the node; (1.2) Receive the node metadata information query request, call the local container Runtime API interface to obtain the image information (including image name, image version, image ID, image creation time, image volume size), node hostname, IP address, and node domain group annotation information (i.e., project domain identifier), and feedback it to the image console component for parsing and display; (1.3) Receive the requests for image import, renaming, pulling, pushing, and deletion, call the local container Runtime API interface to complete the corresponding processing, and feedback the processing result to the image console component for parsing and display; (1.4) Receive the image building request and building information submitted by the image console component, call the local container Runtime API interface to parse and load the building information, complete the application image encapsulation operation according to the building information, and return the building result; Among them, the local container Runtime API is a container runtime interface that can recognize mainstream container runtime tools such as common Docker, Podman, BuildKit, and nerdctl to implement container management operations, such as local image building, container start / stop, and image management (pulling, pushing, renaming, etc.).
[0028] (1.5)When the name of the newly added local image on the monitoring node is none, the cleaning mechanism is triggered to delete invalid image files and release the node resource space.
[0029] Optionally, the image console component (image-console) retrieves the image holding status information of the on-demand node and the remote image repository, and uses the timeout judgment mechanism to identify the real status of the node and the remote image repository, reducing unnecessary network overhead and maintaining the validity of the status data. Specifically, it is used for: (2.1)Manage the project domain information on the cloud platform, submit the add, delete, modify, and query requests of the project domain information to the interface server component to complete the unified interaction and processing with the meta-database component, and parse and visually feedback the detailed project domain classification information. The delete request must be carefully confirmed; (2.2)Submit the user's request to add, delete, modify, and query the project domain identifier (only the value of node.domain.group / app can be changed) of one or more nodes in the cloud platform cluster to the interface server component, and the corresponding processing result is then feedback to the image console component for display. The delete request must be carefully confirmed; (2.3)Edit and submit the add, delete, modify, and query requests of the subordinate relationship information between the application and the project domain to the interface server component, which interacts and processes with the meta-database component, parses the feedback application subordinate relationship list data and visualizes it; the newly added optional image information is retrieved from the warehouse of the image manager component; (2.4)Parse the heartbeat data reported by all cloud nodes in the cluster at regular intervals. If the node is online, it is in the Ready state. If there is no response after the heartbeat timeout (preset 30 seconds, configurable), the node is judged to be in the NotReady state; (2.5)The user selects to submit the mirror package data to be uploaded to the specified node executor component to complete the local import operation; (2.6)Enter the specified node, select a mirror to be renamed, edit and submit the new name and version information to the node executor component to update the target mirror tag, and display the update result; (2.7)Submit the target mirror pull request existing in a mirror repository of the specified node to the node executor component, which completes the target mirror pull task and displays the task processing result; (2.8) The user selects a node and submits a request to push a local image to a remote image repository, and receives and prompts the processing result information returned by the image manager component; (2.9) The user specifies a cloud node to submit an image deletion request (it can be deleted if the "retain or not" value of the application image in the application dependency data detected by the meta-database component is 0), and the target image is deleted by the node executor component of this node; (2.10) The user specifies a node to edit the tags of the image to be built (including image name, version information), base image, image type (base image, application image, and none), environment variables, package management type (yum / apt), target software source address, software packages to be installed information, pre-built files (file type, selected file, target file container path), and startup command information, etc. The data is verified and combined into a Dockerfile file data stream and submitted to the specified node executor component to complete the image building operation, and the feedback result of the building operation is received and displayed. The newly created image is default pushed to the image repository; Among them, the image name strictly follows the format of "project domain identifier / application abbreviation", such as health-monitor / configserver; the image version information strictly follows the format of "vx.x.x.x-yyyymmdd", such as v1.0.0.3-20241208; the two are concatenated with ":" to form an image tag (it can only contain lowercase letters, numbers, and separators ("-"), and must start with a lowercase letter and end with a letter or number).
[0030] (2.11) Periodically (preset 30 seconds, configurable) detect the availability of the connection to the remote image repository. If it is online and available, display the Ready status, otherwise display the NotReady status; (2.12) The user specifies an image repository and obtains its image list information, and displays the image name, ID, image volume, and creation time information; (2.13) The user edits the name, username, repository address, and password information of the remote image repository to be newly added, submits it to the image manager component for authentication, receives and displays the returned authentication result. If the authentication is passed, it is added to the repository list for display, otherwise it prompts that the addition fails; (2.14) Send the image repository addition request submitted by the user to the image manager component for authentication, parse the returned authentication result. If it passes, it prompts that the addition is successful, otherwise it prompts that the addition fails; (2.15) The user submits a request to delete the image repository to the image manager component to complete the deletion of the image repository connection, and receives and prompts the deletion processing result; (2.16)The user specifies a mirror repository to submit a deletion request for the target mirror (detecting that the "retain or not" value in the application dependency data in the meta-database component is 0 and can be approved for deletion). The mirror manager component deletes the target mirror and feeds back the processing result to the mirror console component for display.
[0031] Through the mirror console component, the functions of importing, batch exporting, pushing, and deleting application images on specified cloud nodes within the cluster are remotely completed with a more optimized human-computer interaction interface, and the functions of adding, authenticating, deleting remote mirror repositories and deleting images within the repository are supported, reducing the complexity of user mirror management.
[0032] Optionally, the mirror manager component (image-manager) is specifically used for: (3.1) Receiving and storing the mirror data pushed by the node executor component to complete the mirror file storage operation; (3.2) Receiving and processing the operation requests for the mirror repository from the mirror console component and feeding back the results to the mirror console component for display; the operation requests for the mirror repository include detection, retrieval, addition, authentication, deletion, and deletion of images within the mirror repository; (3.3) Receiving the operation of obtaining the information list of the existing images in the mirror repository by the mirror console component for its interface to parse and perform visual display; (3.4) Receiving the target mirror deletion operation submitted by the mirror console component and returning the processing result for its display.
[0033] Optionally, the domain group controller component (domain-group-controller) is specifically used for: (4.1) Listening for the change operations of the project domain identifier in the meta-database component through the interface server component, triggering the update of the node domain group data for clearing the project domain identifier, and at the same time changing the node label corresponding to the target project domain to the interface server component.
[0034] Among them, the project domain identifier corresponds one-to-one with the namespace in the cloud platform and is used as a fixed identification number without modification. For example, the project domain identifier of the health monitoring system and the namespace name in the cloud platform are both identified as health-monitor.
[0035] (4.2) Listening for the change operations of the node domain group data in the meta-database component through the interface server component, and synchronously updating the node project domain identifier to the interface server component according to the corresponding operation combination change information.
[0036] (4.3)Monitor the changes (additions and deletions) of the application dependency data in the meta-database component through the interface server component. Traverse and obtain the node domain group data for comparison using the project domain identifier and image ID as the unique key, and combine it into a pull / delete request for the corresponding node application image of the target project domain identifier and send it to the node executor component for processing. Output the feedback result to the log for easy tracing. (If the image does not exist in the image repository, feedback that there is no such image); If new application dependency data is added, combine it into a data structure for image pulling or deletion on the corresponding node of the project domain identifier, and hand it over to the specified node to complete and feedback the result, which is output to the log by the domain group controller component.
[0037] The domain group controller component listens to and triggers the target state synchronization function through the interface server component to ensure the real-time and associated consistency of the three types of data (project domain identifier, node domain group, and application image data) on the cloud node.
[0038] Optionally, the interface server component (api-server) is specifically used for: (5.1)Receive the requests for adding, deleting, modifying, and querying the three types of data (project domain, node domain group, and application dependency relationship) of the meta-database component submitted by the user through the image console component, and feedback the results to the image console component for parsing and display.
[0039] (5.2)Establish a long connection to monitor the change events of the project domain, node domain group, and application dependency relationship in the meta-database component using the List-watch mechanism, and push them to the domain group controller component; for the domain group controller component to parse to achieve the consistency between the actual state of the node and the project domain state in the meta-database component.
[0040] The meta-database component (meta-database) is used to store the project domain, node domain group, and application dependency relationship data in the cluster, receive the requests for adding, deleting, modifying, and querying these three types of data submitted by the image console component to the interface server component, and feedback the processing results for it to display. In the present invention, the domain group controller component and the image console component can and can only interact with the meta-database component through the interface server component.
[0041] The following explains the three types of data: project domain, node domain group, and application dependency relationship.
[0042] As shown in Table 1, the project domain data consists of the identifier, alias, description, and remarks of the project domain. For example, the project domain identifier: health-monitor, alias: Health Monitoring System Project, project description: used to monitor and display the health status of equipment.
[0043] Table 1
[0044] As shown in Table 2, the node domain group data consists of the node hostname, node IP, project domain identifier, and remarks information. For example, the node hostname is worker1, the node IP is 192.168.30.111, the project domain identifier is health-monitor, and the remarks are the node domain group for the application operation of the health monitoring system project.
[0045] Table 2
[0046] As shown in Table 3, the application dependency data consists of the application name, project domain identifier, image name, image version, image ID, image creation time, image volume size, whether to retain, and remarks information. The image ID is used as the unique primary key to avoid duplication. The image name + image version forms the image tag. For example, the application name is the configuration center, the project domain identifier is health-monitor, the image name is health-monitor / configserver, the image version is v1.0.0.3-20241208, the image ID is d1546dc5eebc, the creation time is 3 months ago, the volume size is 516M, whether to retain is 1 (1 means to retain, 0 means to be idle, used to identify valid in-use images), and the remarks are to centrally manage the configuration files of multiple services in the health-monitor project. In the application dependency data, the "whether to retain" attribute is added to the application image. Only the application image with a value of 0 for this attribute is allowed to be deleted. A value of 1 means that the application image must be cached on the nodes of the specified project domain, facilitating users to distinguish the validity of the application image and standardize management, and avoiding accidental deletion of in-use application images.
[0047] Table 3
[0048] In one embodiment, a method for mirror-oriented construction and domain-based management of cloud applications is provided. Based on the cloud application mirror-oriented construction and domain-based management system provided in the foregoing embodiment, the mirror-oriented construction and domain-based management of cloud applications are realized.
[0049] Among them, as Figure 2 shown, the mirror-oriented construction method of cloud applications includes: The mirror console component obtains the project domain, node domain group data, and application dependency data through the interface server component, maps the status data information reported by the node executor at regular intervals, and visually presents the node project domain information; According to the user's selection operation on the online node, the data stream in the format of a Dockerfile generated from the application image building data is forwarded to the node executor component of the user-selected node; after receiving the image building data through the localContanerRuntime.GetDockerfile interface of the node executor component, it is parsed, and localContanerRuntime.BuildImage is called to start the building process and feedback the execution progress until the building is completed; The node executor component automatically pushes the built application image to the image repository and feeds back the push result to the image console component.
[0050] The present invention can achieve node-directed selection, directly transmit the image building information to the node executor component within the application subordinate project domain, avoid the situation where the application image is stored on the nodes of other project domains, effectively save the space resources of other nodes in the cluster, and improve the utilization rate of node resources.
[0051] The mirror directed building processing flow. To ensure the unified management of the global mirror in the cloud domain, after the user directionally selects a cloud node to complete the application image building, it is automatically pushed to the image repository in the image manager component. The following combines Figure 2 , taking the image building of the configserver application in the health-monitor project's configuration center as an example, to specifically illustrate the specific implementation process of mirror directed building, including: S101. The user logs in to the cloud platform node management interface, obtains the project domain and node domain group data through the interface server component, maps the status data information reported by the node executor regularly, and visually presents the node project domain information for the user to accurately select the online node for the target application image to be built (nodes judged to be timed out or offline for 30 seconds are regarded as NotReady and are not selected); verify the correctness of the image building information submitted and edited by the user to avoid format errors during delivery to the specified node and affecting the image building process; S102. If the user needs to build the application image of the health-monitor project, a cloud node with the project domain identifier health-monitor and the status of Ready should be selected for building; S103. After the user triggers the image building function, the user needs to edit the image name, base image, image type, environment variables (if any), installation of dependent software packages, pre-built files, and startup command information to form the application image building data.
[0052] Among them, the image name consists of the project domain identifier, application name, and version. For example, health-monitor / configserver:v1.0.0.3-20250320, which must not contain Chinese characters, capital letters, Chinese symbols (), or English symbols (). The base image is queried by the image console component from the image repository in the image manager component for users to select. The image types are divided into Application (application image) and Base (base image). Set the key-value pair of the environment variable, such as MY_NODE_IP:master1. For the installation of dependent software packages, the package manager type (yum, apt), the target software source address (automatically detected for availability after filling, such as http: / / [software source IP address] / Kylin-4.0.2), and the names of the software packages to be installed (such as httpd, jdk, python3, etc., separated by half-width commas between multiple software package names) must be set. The pre-built file requires uploading the application execution file and the absolute path information of its copy to the container file. Its function is to store the application file in the specified directory in the container for runtime invocation when building the image. The start command is the command line or script content that the application finally executes. Based on the pre-built file information, environment variables, and dependent software package information, a preliminary availability judgment is made to determine whether it is executable.
[0053] S104. After completing the editing and format verification of the above application image construction information, generate a data stream in the Dockerfile format and forward it to the node executor component of the user-specified node. S105. After receiving the image construction information through the localContanerRuntime.GetDockerfile interface of the node executor component, it is parsed, and localContanerRuntime.BuildImage is called to start the construction process and feedback the execution progress until the construction is completed. S106. The node executor component automatically pushes the built application image to the image repository and feedbacks the push result to the image console component.
[0054] Compared with the traditional application image construction method, the implementation steps of the above image-oriented construction can be associated with the application subordination relationship and project domain, realizing a more accurate cloud node-directed image construction process orchestration, providing visualization and wizard-style construction information editing and verification functions, and greatly improving the efficiency of users in packaging applications.
[0055] Such as Figure 3As shown in the figure, the change operations for project domain information in domain management include: After the mirror console component obtains the change operation of the user for the project domain to be changed, the domain group controller component listens for the change event through the interface server component and identifies the change type. The domain group controller component queries the node domain group information and the corresponding node data and application image data in the application dependency relationship information with the project domain to be changed as the project domain identifier through the interface server component, and converts them into task information for the domain label change of the corresponding node for the project domain to be changed and the application image change of the corresponding node for the application image corresponding to the project domain to be changed. The interface server component obtains and executes the change task of the project domain label of the node for the project domain to be changed, and the node executor of the node in the project domain to be changed obtains and executes the change task of the application image of the node for the project domain to be changed.
[0056] To illustrate the change operation of project domain information, the following takes the deletion of project domain information as an example. The implementation process includes the following steps: S201. Listen for the project domain data of node.domain.group / app in the meta database through the interface server component, such as health-monitor (monitoring and detection system project), mission-plan (task planning system project), etc. S202. After the user confirms the deletion of the project domain health-monitor through the mirror console component, the domain group controller component listens for the change event through the interface server component's watch and identifies the change type as delete. S203. According to the health-monitor project domain delete event, the domain group controller component queries the node domain group information and the corresponding node data and application image data in the application dependency relationship information with health-monitor as the project domain identifier through the interface server component, and converts them into task information for deleting the health-monitor domain label of the corresponding node and deleting the application image corresponding to the health-monitor of the corresponding node. S204. Forward the task of deleting the health-monitor project domain label of the node to the interface server component for execution, and send the task information of deleting the application image corresponding to the health-monitor of the node to the node executor of the node in the health-monitor project domain for execution. S205. The interface server component completes the operation of clearing the project domain label of the corresponding node according to the deletion of the health-monitor project domain label (delete the health-monitor project domain label on the worker1 node). S206. The corresponding node executor component receives an application image deletion operation request associated with the project domain identifier (delete the application image belonging to the health-monitor project domain on the worker1 node).
[0057] The project domain identifier corresponds one-to-one with the namespace in k8s, and both are used as fixed identification numbers without modification. That is, the project domain identifier of the health monitoring system and the namespace name in the cloud platform are both health-monitor. For the change operation of project domain data, it can trigger the synchronization operation of the project domain identifier and application image of the corresponding cloud node according to the user's management of the project domain data, and automatically maintain the real-time and consistency efficiency of the project domain data.
[0058] Such as Figure 4 shown, the change operations for the node domain group information in domain-based management include: After the image console component obtains the user's change operation on the project domain identifier of the node, the domain group controller component listens for this change event through the interface server component and identifies the change type; The domain group controller component completes the change operation on the project domain identifier of the specified node through the interface server component, and generates the operation information for the application image of this node and forwards it to the node executor component to complete the synchronization of the application dependency relationship; The interface server component completes the synchronization operation of the corresponding node project domain label according to the change event of the specified node project domain; the corresponding node executor component receives the application image operation request of the project domain identifier and completes the synchronization operation of the application dependency relationship on the specified node.
[0059] Taking the add, delete, update, query operations of the node domain group information as an example (the query operation does not involve changes and only needs to receive the query result, so this embodiment will not be described in detail), the implementation process includes the following steps: S301. Listen to the node domain group data (node hostname, node IP, project domain identifier) in the meta-database through the interface server component, such as worker1:192.168.30.111:health-monitor (health monitoring project domain), worker4:192.168.30.114:mission-plan (mission planning system project domain); S302. After the user confirms the addition, deletion, modification, or query of the project domain identifier of the worker1 node in the health monitoring project domain through the mirror console component, the domain group controller component obtains the change event by listening through the interface server component's watch, and identifies the change event as of the add, delete, or update type, such as adding the project domain identifier of worker10 node as health - monitor, deleting the project domain identifier health - monitor of worker5 node, updating the project domain identifier of worker1 node from health - monitor to mission - plan, and other similar events; S303. Based on the change event information of the specified node's project domain obtained by listening, the domain group controller component completes the change operation of the specified node's project domain identifier through the interface server component, and generates the information of pulling or deleting the application image for the node and forwards it to the node executor component to complete the synchronization of the application dependency relationship.
[0060] For example, in the event of adding the project domain identifier of worker10 node as health - monitor, it means that the health - monitor health monitoring system project application can run on the worker10 node. The domain group controller component queries the application dependency relationship data in the meta - database component through the interface server component, parses out the application image information involved in the health - monitor project domain identifier, and converts this information into a request for the worker10 node to urgently pull the local image and sends it to the worker10 node executor component to complete; In the event of deleting the project domain identifier health - monitor of worker5 node, it means that the health monitoring system project domain is removed from the worker5 node and the relevant applications of this project will no longer run. The domain group controller component then queries the application dependency relationship data in the meta - database component through the interface server component, parses out the application image information involved in the health - monitor project domain identifier, and converts this information into a request for the worker5 node to urgently clear the local application image and sends it to the worker5 node executor component to complete; The event of updating the project domain identifier of the worker1 node from health-monitor to mission-plan means that the worker1 node is removed from the health-monitor health monitoring system project domain and added to the mission-plan mission planning system project domain. The domain group controller component merges the deletion and addition operations into one event, queries the metadata database component through the interface server component to obtain the image information involved in the application affiliation data corresponding to the health-monitor and mission-plan project domain identifiers, and sends the health-monitor project application image deletion and mission-plan project application image pull requests to the worker1 node to complete the processing.
[0061] S304. The interface server component completes the synchronization operation of the corresponding node project domain label according to the change event of the specified node project domain; S305. The corresponding node executor component receives the application image deletion and pull operation request associated with the project domain identifier, and completes the state synchronization of the application subordination relationship on the specified node.
[0062] For the change operation of node domain group information, the project domain identification relationship of the corresponding cloud node and the linkage synchronization operation of the node local application image are triggered according to the user's management of the node domain group data, so that the application correspondence relationship between the node local application image and its subordinate project domain can be guaranteed to be consistent without manual intervention.
[0063] like Figure 5 As shown in the figure, the change operations for application affiliation information in domain management include: After the mirror console component obtains the user's change operation on the application affiliation, the domain group controller component obtains the change event through the interface server component and identifies the change type; The domain group controller component completes the change operation of the application subordinate relationship data in the metadata library component through the interface server component, and parses the change event and converts it into the change processing task of the application image on the node under the corresponding project domain identifier; The domain group controller component forwards the task request to the node executor component of the corresponding node to complete the change operation of the application subordinate data, and pulls / deletes the application image on the node corresponding to the project domain identifier according to whether the application image is retained.
[0064] The following is a specific description of the application subordinate relationship data addition, deletion, modification and query (add, delete, update, query) operation as an example (because the query operation does not involve changes, only the query result needs to be received, so this embodiment will not be described in detail). The implementation process includes the following steps: S401. The domain group controller component listens for application dependency data in the metadata database through the interface server component. For example, a sample of application dependency data is as follows: the application name is the configuration center, the project domain identifier is health - monitor, the image name is health - monitor / configserver, the image version is v1.0.0.3 - 20241208, the image ID is d1546dc5eebc, the creation time is 3 months ago, the volume size is 516M, whether to retain it: 1 (1 means retain, 0 means idle, used to identify valid in - use images), and the note: application function description; S402. The user submits add, delete, or update operations on the application dependency through the image console component. The domain group controller component obtains the change event through the interface server component's watch and identifies the change type as add, delete, or update. For example, adding the application image health - monitor / configserver:v1.0.0.3 - 20241208 within the health - monitor project domain. All images are obtained by querying the image repository of the image manager component and are selected by the user; deleting the application image health - monitor / configserver:v1.0.0.3 - 20241208 within the health - monitor project domain; for updates, only the 3 attributes of the application name, whether to retain it, and the note are allowed to be modified, without triggering status synchronization processing operations of other components in the domain. Among them, the change of the "whether to retain" attribute of the image in the application dependency data must be carefully confirmed. Only the application image with the "whether to retain" value of 0 can be deleted; S403. Based on the change event information of the application dependency data obtained by listening, the domain group controller component completes the change operation of the application dependency data in the metadata database component through the interface server component, and parses the change event into an application image change processing task on the node under the corresponding project domain identifier; S404. Add the "task center" application, such as the image health - monitor / taskservice:v1.0.0.3 - 20241208, and identify it as belonging to the health - monitor project domain. The domain group controller component forwards the task request to the node executor component of the corresponding node to complete the pulling of the image file to the local cache, and submits an operation to add the application image dependency data to the interface server component domain; S405. If the application image health-monitor / taskservice:v1.0.0.3-20241208 of the "Health Monitoring System Project" is deleted, the domain group controller component issues a deletion instruction to the node executor component of the nodes corresponding to the health-monitor project domain to complete the task of clearing the local image cache. At the same time, it forwards the deletion request to the interface server component to complete the corresponding operation of clearing the application dependency data; S406. If the application name, retention status, and remarks information of the application image health-monitor / taskservice:v1.0.0.3-20241208 of the "Health Monitoring System Project" are modified, the domain group controller sends them to the interface server component for corresponding data changes in the meta-database component, and the node executor component is not involved in the processing; It should be noted that all application image tag data comes from the image repository of the image manager component. The three attributes of image ID, image creation event, and volume size are not modified to avoid destroying the global uniqueness of the application image. However, it is allowed for the same application image to have multiple image tags. For example, the image with image ID fdca45bc85e0 can have multiple image tags, such as health-monitor / taskservice:v1.0.0.3-20241208, mission-plan / inference:v1.0.0.3-20241208. However, once the image is built, the values of the three attributes of image ID, volume size, and creation time are fixed values.
[0065] In the above-described embodiments, based on the node executor component, image manager component, image console component, domain group controller component, interface server component, and meta-database component, by adopting the method of automatically identifying change events, choreographing and distributing tasks, and efficiently coordinating components, the image console component parses and identifies the image construction requests submitted by the user side and the change requests for project domain, node domain group, and application dependency data, and transforms them into specific execution tasks for distribution and processing tasks to the interface server component and the node executor component to cooperate with the meta-database component and the domain group controller component to jointly complete, efficiently realizing the application image construction and effectively maintaining the real-time and consistency of the global project domain, node domain group, and application dependency data.
[0066] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A cloud application mirror-oriented construction and domain management system, characterized in that: It includes a node executor component, an image manager component, an image console component, a domain group controller component, an interface server component and a metadata database component; The node executor component is used to regularly report node heartbeats and process operation requests from the mirror console component; The image manager component is used to store the application images of the entire cloud platform, receive and process the operation requests of the image repository, and feed back the results to the image console component or the domain group controller component for parsing and output; The mirror console component is used to aggregate the heartbeat status of the node actuator components in the cluster, send it to the corresponding component for processing according to the user's operation request, and parse and display the feedback results; The domain group controller component is used to monitor changes in project domains, node domain groups, and application affiliation data in the metadata library component, and trigger synchronous updates of the status of corresponding resource objects in the cluster; The interface server component directly interacts with the metadata library component to receive and process change requests from the mirror console component and the domain group controller component for the project domain, node domain group, and application affiliation data in the metadata library component, and returns the processing results to the task source component for visualization or log output after completion; The metadata library component is used to store project domains, node domain groups, and application affiliation data in the cluster, receive change requests for project domains, node domain groups, and application affiliation data submitted by the mirror console component to the interface server component, and feed back processing results for display by the mirror console component; The domain group controller component and the mirror console component interact with the metadata repository component only through the interface server component.
2. The system according to claim 1, characterized in that The node executor component is specifically used for: Report heartbeats to the mirror console component regularly based on the current state of the node, so that the mirror console component can analyze and display the online state of the node; Receive data query requests about nodes, call the local container Runtime API interface to obtain data, and feed it back to the image console component for parsing and display; Receive change requests for application images, call the local container Runtime API interface to complete the corresponding processing, and feed back the processing results to the image console component for analysis and display; Receive the image building request and building information submitted by the image console component, call the local container Runtime API interface to parse and load the building information, complete the application image packaging operation according to the building information, and return the building result; The monitoring node adds a new image locally. When the image name is none, the cleanup mechanism is triggered to release resources.
3. The system according to claim 1, characterized in that The image manager component is specifically used for: Receive and store the image data pushed by the node executor component to complete the image file storage operation; Receive and process operation requests from the image console component to the target image repository, and feed back the results to the image console component for display; Receive the information list of existing images in the image repository of the image console component for interface parsing and visual display; Receives the target image deletion operation of the image console component and returns the processing result for display.
4. The system according to claim 3, characterized in that The domain group controller component is specifically used for: The interface server component monitors the change operation of the project domain data in the metadata library component, and triggers the update of the node domain group data of the project domain identifier, and at the same time changes the node label corresponding to the target project domain to the interface server component; Monitor the change operation of the node domain group data in the metadata library component through the interface server component, and send the change information to the interface server component according to the corresponding operation combination to synchronize and update the node project domain identifier; The interface server component monitors the change operations of the application dependency data in the metadata library component, uses the project domain identifier and image ID as the unique key to traverse and obtain the node domain group data for comparison, and combines them into an operation request for applying the image on the node corresponding to the target project domain identifier, which is sent to the node executor component for processing, and the feedback results are output to the log.
5. The system according to claim 4, characterized in that The interface server component is specifically used for: A long connection is established with the List-watch mechanism to monitor the change events of the project domain, node domain group, and application affiliation in the metadata library component, and push them to the domain group controller component; they are used for the domain group controller component to parse to achieve consistency between the actual node status and the project domain status in the metadata library component.
6. The system according to claim 1, characterized in that The project domain data includes the project domain identifier, alias, description and project domain notes; the node domain group data includes the host name, node IP, project domain identifier and node notes; the application affiliation data includes the application name, project domain identifier, image name, image version, image ID, image creation time, image size, whether to retain and image notes.
7. A method for image-oriented construction and domain management of cloud applications, characterized in that: Based on the system described in any one of claims 1 to 6, the mirror-oriented construction and domain management of cloud applications are realized; The image-oriented construction method of cloud applications includes: The mirror console component obtains the project domain, node domain group data, and application affiliation data through the interface server component, maps the status data information regularly reported by the node executor, and visualizes the node project domain information; According to the user's selection of online nodes, the data stream in the Dockerfile file format is generated from the application image building data and forwarded to the node executor component of the node selected by the user; the node executor component localContainerRuntime.GetDockerfile interface receives the image building data and parses it, calls localContainerRuntime.BuildImage to start the building process and feedback the execution progress until the building is completed; The node executor component automatically pushes the built application image to the image repository and feeds back the push result to the image console component.
8. The method according to claim 7, characterized in that Methods for changing project domain information include: After the image console component obtains the user's change operation on the project domain to be changed, the domain group controller component obtains the change event through the interface server component and identifies the change type; The domain group controller component queries the node domain group information with the project domain to be changed as the project domain identifier, the corresponding node data and application image data in the application affiliation information through the interface server component, and converts them into task information of the domain label change of the corresponding node regarding the project domain to be changed and the application image change corresponding to the project domain to be changed; The interface server component obtains the node's change task regarding the project domain label of the project domain to be changed and executes it, and the node executor of the node in the project domain to be changed obtains the node's change task regarding the application image of the project domain to be changed and executes it.
9. The method according to claim 7, characterized in that: Methods for changing node domain group information include: After the image console component obtains the user's change operation on the project domain identifier of the node, the domain group controller component obtains the change event through the interface server component and identifies the change type; The domain group controller component completes the change operation of the project domain identifier of the specified node through the interface server component, and generates operation information for the application image of the node and forwards it to the node executor component to complete the synchronization of the application affiliation; The interface server component completes the synchronization operation of the corresponding node project domain label according to the change event of the specified node project domain; the corresponding node executor component receives the application mirror operation request of the project domain identifier and completes the synchronization operation of the application subordination relationship on the specified node.
10. The method according to claim 7, characterized in that Methods for changing application dependency information include: After the mirror console component obtains the user's change operation on the application affiliation, the domain group controller component obtains the change event through the interface server component and identifies the change type; The domain group controller component completes the change operation of the application subordinate relationship data in the metadata library component through the interface server component, and parses the change event and converts it into the change processing task of the application image on the node under the corresponding project domain identifier; The domain group controller component forwards the task request to the node executor component of the corresponding node to complete the change operation of the application subordinate data, and pulls / deletes the application image on the node corresponding to the project domain identifier according to whether the application image is retained.
Citation Information
Patent Citations
Deployment system and deployment method of application program
CN105867955A
Mirror image pulling method and device for Kubernetes system
CN111459611A
Regulation and control system containerized application operation management method and system, equipment and medium
CN112099917A
Platform management system and method for realizing side-cloud collaborative intelligent instant service
CN112272234A
Application processing method and device, electronic equipment and storage medium
CN113687907A
