A cloud application mirror image directional construction and domain management system and method
By using cloud application image-oriented building and domain-based management system, the flexibility and automation issues of image management in medium-to-large-scale cloud platform cluster environments are solved, resource utilization and delivery efficiency are improved, and the technical threshold is lowered.
Patent Information
- Application Number
- CN202510556589.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-04-29
AI Technical Summary
In existing technologies, the flexibility of application image management in medium-to-large-scale cloud platform cluster environments is limited, making it difficult to achieve full automation. Furthermore, it places high demands on users and developers in terms of cloud-native knowledge and Linux operation and maintenance, thereby reducing delivery efficiency.
This invention provides a cloud application image-oriented building and domain-based management system, including a node executor, an image manager, an image console, a domain group controller, an interface server, and a metadata database component. By uniformly managing project domains, node domain groups, and application dependency data, it enables image-oriented building and domain-based management, optimizing the image building and storage process.
It improves the utilization rate of cloud node resources and scheduling management efficiency within the cluster, reduces unnecessary local caching, lowers the technical threshold for users and developers, and achieves efficient image delivery and management.
Smart Images

Figure CN120223708B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of cloud computing, in particular to a cloud application image directional construction and domain management system and method. BACKGROUND
[0002] Under the background of rapid development of cloud native and containerization technology, application image construction and management is an important link for cloud platform to realize efficient application delivery and operation and maintenance. The efficiency of integrating image repository in image full life cycle management has become a widely recommended solution in the industry. Most tools rely on Devops pipeline or C / S architecture to assemble Dockerfile data to complete image construction, which is rich in functions and has high extensibility, but the strong binding characteristics of these tools and nodes limit the flexibility of image management.
[0003] In a large-scale cloud platform cluster environment, a class or a group of applications is usually limited to running on certain domain group nodes according to node tags, such as N application containers of a health monitoring system project (health-monitor) running on worker1~5 cloud nodes, and M application containers of a mission planning system project (mission-plan) running on worker6~9 cloud nodes, rather than being scattered in the global range. This deployment and scheduling method improves the efficiency of the scheduling mechanism and also puts forward the requirement that all cloud nodes do not need to locally cache all images for global image management. In actual projects, image delivery and maintenance work still needs to rely on professional operation and maintenance personnel, and it is difficult to achieve complete automation, which requires users and developers to have certain cloud native knowledge and Linux operation and maintenance foundation, which is relatively harsh, and increases the use threshold and reduces the delivery efficiency. SUMMARY
[0004] In view of the defects in the prior art, the present application provides a cloud application image directional construction and domain management system and method to optimize the construction and storage process, support users to complete application delivery with higher quality and efficiency, support image directional construction and efficient distribution and node domain group caching strategy in the global range of the cloud platform, and avoid unnecessary local caching.
[0005] In a first aspect, the present application provides a cloud application image directional construction and domain management system, which comprises 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.
[0006] The node executor component is configured to periodically report node heartbeat and process image construction requests and management operations from the image console component.
[0007] The mirror manager component is used for storing cloud platform global mirror files, receiving and processing mirror warehouse operation requests, and feeding back results to the mirror console component or the domain group controller component for analysis and output.
[0008] The mirror console component is used for gathering heartbeat states of node executor components in a cluster, sending management operation requests of a project domain, a node domain group, application affiliation, mirror full life cycle management and a mirror warehouse in the mirror manager component to corresponding components for processing, and analyzing and displaying feedback results.
[0009] The domain group controller component is used for listening to changes of project domain, node domain group and application affiliation data in the meta database component, and triggering state synchronization update of corresponding resource objects in the cluster.
[0010] The interface server component directly interacts with the meta database component, and is used for receiving and processing change requests of project domain, node domain group and application affiliation data in the meta database component from the mirror console component and the domain group controller component, and returning processing results to the task source component for visualization or log output after completion.
[0011] The meta database component is used for storing project domain, node domain group and application affiliation data in the cluster, receiving addition, deletion, modification and query requests of the project domain, the node domain group and the application affiliation data submitted by the mirror console component to the interface server component, and feeding back processing results for the mirror console component to display.
[0012] The domain group controller component and the mirror console component only interact with the meta database component through the interface server component.
[0013] According to the technical solution, the cloud application mirror directional construction and domain management system considers the scheduling strategy optimization of application running areas in actual projects, limits all applications of the project to run on nodes in a project domain instead of randomly distributing or load balancing in a global range, thereby improving cloud node resource utilization and scheduling management efficiency in the cluster. The project domain, the node domain group and the application affiliation data are uniformly managed by the meta database component, the domain group controller component listens to and triggers state synchronization functions of the three types of data through the interface server component, and the real-time and consistent association of the project domain identifier, the node domain group and the application mirror data on the cloud nodes in the cluster is guaranteed.
[0014] Optionally, the node executor component is specifically used for:
[0015] reporting a heartbeat to the mirror console component according to a current state of the node, so that the mirror console component analyzes and displays an online state of the node;
[0016] The receiving node metadata information query request, calling the local container Runtime API interface to obtain image information, node hostname, IP address and node domain group annotation information, and feeding back to the image console component to parse and display;
[0017] Receiving image import, renaming, pulling, pushing and deleting requests, calling local container Runtime API interface to complete corresponding processing, and feeding back the processing results to the image console component for parsing and display;
[0018] Receiving image building request and building information submitted by the image console component, calling the local container Runtime API interface to parse and load the building information, completing the application image packaging operation according to the building information, and returning the building result;
[0019] Monitoring the newly added image name none on the node to trigger the cleaning mechanism to delete invalid image files and release node resource space.
[0020] From the above technical solutions, the application can select the node direction, directly transmit the image building information to the node executor component in the application dependent project domain, avoid the application image stored in other project domain nodes, effectively save the space resource of other nodes in the cluster, and improve the node resource utilization.
[0021] Optionally, the image manager component is specifically used for:
[0022] Receiving and storing image data pushed from the node executor component, completing image file storage operation;
[0023] Receiving and processing the operation request of connecting detection, connection authentication and connection deletion of the target image warehouse from the image console component, and feeding back the result to the image console component for display;
[0024] Receiving the information list of existing images in the image warehouse from the image console component, for interface parsing and visual display;
[0025] Receiving the target image deletion operation submitted by the image console component, and returning the processing result for its display.
[0026] Optionally, the domain group controller component is specifically used for:
[0027] Through the interface server component, the change operation of the project domain data in the meta database component is listened to, and the node domain group data of the project domain identifier is updated, and the change of the node label corresponding to the target project domain is made to the interface server component;
[0028] The interface server component listens to the change operation of the node domain group data in the meta database component, and combines the change information to the interface server component according to the corresponding operation to update the synchronization of the node project domain identifier;
[0029] The interface server component listens to the change operation of the application dependent relationship data in the meta database component, and traverses and obtains the node domain group data according to the project domain identifier and the mirror ID as the unique key to compare, combines the corresponding node application mirror operation request of the target project domain identifier, and sends the request to the node executor component to complete the processing, and outputs the feedback result to the log for easy tracing.
[0030] According to the above technical solution, the domain group controller component listens to and triggers the target state synchronization function through the interface server component, and guarantees the real-time and association consistency of the three types of data, i.e., the project domain identifier, the node domain group, and the application mirror data on the cloud node.
[0031] Optionally, the interface server component is specifically used for:
[0032] The List-watch mechanism is used to establish a long connection to listen to the change event of the project domain, the node domain group, and the application dependent relationship in the meta database component, and push to the domain group controller component; and the domain group controller component is used for analysis to realize the consistency of the node actual state and the project domain state in the meta database component.
[0033] Optionally, the project domain data includes the identifier, the alias, the description, and the project domain note of the project domain; the node domain group data includes the hostname, the node IP, the project domain identifier, and the node note; and the application dependent relationship data includes the application name, the project domain identifier, the mirror name, the mirror version, the mirror ID, the mirror creation time, the mirror volume size, whether to keep, and the mirror note.
[0034] In a second aspect, the application provides a cloud application mirror directional construction and domain management method based on the cloud application mirror directional construction and domain management system provided in the first aspect, to realize the cloud application mirror directional construction and domain management; wherein the cloud application mirror directional construction method comprises:
[0035] The mirror console component obtains the project domain, the node domain group data, and the application dependent relationship data through the interface server component, maps the state data information reported by the node executor at regular intervals, and visually presents the node project domain information.
[0036] According to the selection operation of the user on the online node, the application mirror construction data is forwarded to the node executor component of the user-selected node in the form of a Dockerfile file format data stream; the node executor component localContainerRuntime.GetDockerfile interface receives the mirror construction data and parses it, calls localContainerRuntime.BuildImage to start the construction process and feedback the execution progress until the construction is completed;
[0037] The node executor component automatically pushes the completed application mirror to the mirror warehouse, and feeds back the pushing result to the mirror console component.
[0038] According to the above technical solution, the node directivity selection can be realized, the mirror construction information is directly transmitted to the node executor component in the application dependent project domain, the application mirror stored in other project domain nodes is avoided, the space resource of other nodes in the cluster is effectively saved, and the node resource utilization is improved.
[0039] Optionally, the method for changing the project domain information comprises:
[0040] After the mirror console component obtains the change operation of the user on the to-be-changed project domain, the domain group controller component obtains the change event through the interface server component, and identifies the change type;
[0041] The domain group controller component queries the node domain group information, the application dependent relationship information, the corresponding node data and the application mirror data of the to-be-changed project domain as the project domain identifier through the interface server component, and converts the task information of the domain tag change of the corresponding node on the to-be-changed project domain and the application mirror change of the corresponding node on the to-be-changed project domain;
[0042] The interface server component obtains the change task of the project domain tag of the node on the to-be-changed project domain for execution, and the node executor of the node in the to-be-changed project domain obtains the change task of the application mirror of the node on the to-be-changed project domain for execution.
[0043] Optionally, the method for changing the node domain group information comprises:
[0044] After the mirror console component obtains the change operation of the user 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;
[0045] The domain group controller component completes the change operation of the project domain identifier of the specified node through the interface server component, generates the operation information of the application mirror of the node, and forwards the operation information to the node executor component to complete the synchronization of the application dependent relationship;
[0046] The interface server component performs a synchronization operation on the corresponding node project domain label according to a change event of the specified node project domain; and the corresponding node executor component receives an application mirror image operation request of the project domain identifier, and performs a synchronization operation on the application dependency relationship on the specified node.
[0047] Optionally, the method for changing the application dependency relationship information comprises:
[0048] After the mirror console component obtains the change operation of the user on the application dependency relationship, the domain group controller component obtains the change event through the interface server component, and identifies the change type;
[0049] The domain group controller component performs a change operation on the application dependency relationship data in the meta database component through the interface server component, and analyzes the change event to convert it into a change processing task of the application mirror image on the node corresponding to the project domain identifier;
[0050] 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 relationship data, and pulls / deletes the application mirror image on the node corresponding to the project domain identifier according to whether the application mirror image is retained.
[0051] By using the above technical solution, the present application has the following beneficial effects:
[0052] The present application considers the optimization of the scheduling strategy of the application running area in an actual project, limits all applications of the project to run on the nodes in the specified project domain, rather than randomly distributed or load balanced in the global range, thereby improving the resource utilization rate and scheduling management efficiency of the cloud nodes in the cluster;
[0053] The project domain, node domain group and application dependency relationship data of the present application are all managed by the meta database component, the target state synchronization function is triggered by the domain group controller component through the interface server component, and the real-time performance and correlation consistency of the three types of data, i.e., the project domain identifier, the node domain group and the application mirror image data, on the cloud nodes in the cluster are guaranteed;
[0054] Unlike the local mirror image construction method, the present application can be selected in a node-oriented manner, directly delivers the mirror image construction information to the node executor component in the application dependent project domain for completion, avoids the storage of the application mirror image on other project domain nodes, effectively saves the space resources of other nodes in the cluster and improves the node resource utilization rate. BRIEF DESCRIPTION OF DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the specific embodiments of the present application or the prior art, the drawings required to be used in the specific embodiments or prior art description will be briefly introduced below. 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 according to the actual proportions.
[0056] Figure 1 A schematic diagram of a cloud application mirror directional construction and domain management system provided by an embodiment of the present application is shown;
[0057] Figure 2 A flowchart of a mirror directional construction method provided by an embodiment of the present application is shown;
[0058] Figure 3 A flowchart of a change method for project domain information provided by an embodiment of the present application is shown;
[0059] Figure 4 A flowchart of a change method for node domain group information provided by an embodiment of the present application is shown;
[0060] Figure 5 A flowchart of a change method for application affiliation information provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0061] The embodiments of the technical solutions of the present application will be described in detail below with reference to the drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present application, and therefore only serve as examples, and cannot limit the protection scope of the present application.
[0062] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in the present application should be understood as the usual meanings understood by the skilled person in the field to which the present application belongs.
[0063] In one embodiment, in order to solve the current large-scale cloud platform cluster environment, a kind of cloud application mirror directional construction and domain management system is provided, which limits a kind of application or a group of applications to run on a certain domain group node according to node label, rather than in a dispersed manner in the whole domain range, thereby weakening the dependence on professional operation and maintenance personnel, as shown in Figure 1 The system 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.
[0064] The node executor component runs on all cloud nodes in the cluster as a DaemonSet daemon process set, is used to periodically report node heartbeat and process mirror construction request and management operation from the image console component, and is the bearing cornerstone of application mirror directional construction and domain management function.
[0065] Mirror manager component, for storing cloud platform global mirror file, receiving and processing mirror warehouse operation request, feeding back result to mirror console component or domain group controller component analysis output;
[0066] Mirror console component, for gathering cluster node executor component heartbeat state, according to user project domain, node domain group, application affiliation, mirror full life cycle management and mirror manager component mirror warehouse management operation request sent to corresponding component to complete processing, and analysis, display feedback result, is an important portal of human-computer interaction;
[0067] Domain group controller component, for listening to the change of project domain, node domain group, application affiliation data in meta database component, triggering the state synchronization update of corresponding resource object in cluster;
[0068] Interface server component, directly interact with meta database component, for receiving and processing the change request of project domain, node domain group, application affiliation data in meta database component from mirror console component, domain group controller component, returning the processing result to the task source component for visualization or log output after completion;
[0069] Meta database component, for storing project domain, node domain group, application affiliation data in cluster, receiving the add, delete, modify and query request of project domain, node domain group, application affiliation data submitted by mirror console component to interface server component, feeding back the processing result for mirror console component to display;
[0070] Domain group controller component and mirror console component only interact with meta database component through interface server component.
[0071] Based on the above system, the scheduling strategy optimization of application running area in actual project is considered, all applications of the project are limited to run on the nodes in the specified project domain, rather than randomly distributed or load balanced in the global range, so as to improve the utilization rate of cloud node resources and the scheduling management efficiency in cluster; At the same time, the project domain, node domain group and application affiliation data are all managed by meta database component, and domain group controller component listens and triggers the target state synchronization function of the three types of data through interface server component, so as to guarantee the real-time and correlation consistency of project domain identification, node domain group and application mirror data on cloud nodes in cluster.
[0072] The above six components in the system are operated in a containerized manner on a cloud platform, relying on hardware platforms such as Feiteng 2000+, D2000 and Kunpeng 920S, adapting to the Galaxy Kirin Defense Edition V10 server operating system, and adopting a "3+3+N" deployment mode (i.e., a mode of 3 management nodes, 3 storage nodes and N computing nodes). The 3 management nodes form a cluster mode to provide redundancy and avoid single-point failure of the management node. The 3 storage nodes provide a distributed storage system to ensure high availability of business data. The N computing nodes serve as the carrier for running containerized business services and provide computing resources such as CPU and memory. In actual deployment, the cloud node scale 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 production environment, and is usually used for debugging and development environment).
[0073] Optionally, the node executor component is specifically configured to:
[0074] (1.1) Report a heartbeat to the image console component according to the current state of the node (preset for 10 seconds, configurable) to provide the image console component with the node online state for analysis and display;
[0075] (1.2) Receive a node metadata information query request, call a local container Runtime API interface to obtain image information (including image name, image version, image ID, image creation time, image size), node hostname, IP address and node domain group annotation information (i.e., project domain identifier), and feed it back to the image console component for analysis and display;
[0076] (1.3) Receive image import, renaming, pulling, pushing and deletion requests, call a local container Runtime API interface to complete the corresponding processing, and feed the processing results back to the image console component for analysis and display;
[0077] (1.4) Receive the image building request and building information submitted by the image console component, call a 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;
[0078] Among them, the local container Runtime API is a container runtime interface that can identify common Docker, Podman, BuildKit and nerdctl mainstream container runtime tools to implement container management operations such as local image building, container start and stop, image management (pulling, pushing and renaming, etc.).
[0079] (1.5) Trigger the cleaning mechanism to delete invalid image files and release node resource space when the node local newly added image name is none.
[0080] Optionally, the image console component (image-console) is a just-in-time node and a remote image repository mirror holding state information, and identifies the real state of the node and the remote image repository with a timeout judgment mechanism, reduces unnecessary network overhead and maintains the validity of state data, which is specifically used for:
[0081] (2.1) Manage project domain information on the cloud platform, submit project domain information addition, deletion, modification, and query requests to the interface server component to complete unified interaction and processing with the meta database component, analyze and visualize the feedback project domain classification detail information, and carefully confirm the deletion request;
[0082] (2.2) Submit user requests for adding, deleting, modifying, and querying project domain identification (only node.domain.group / app value changes) of one or more nodes in the cloud platform cluster to the interface server component, which forwards the request to the meta database component for processing. The corresponding processing result is then fed back to the image console component for display, and the deletion request must be carefully confirmed;
[0083] (2.3) Edit and submit application and project domain subordination information addition, deletion, modification, and query requests to the interface server component, which interacts and processes with the meta database component, analyzes the application subordination list data returned by the interface server component, and visualizes it. New optional image information is obtained from the image manager component's repository;
[0084] (2.4) Analyze 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 the heartbeat is timed out (preset 30 seconds, configurable) and there is no response, the node is judged to be in the NotReady state;
[0085] (2.5) The user selects to submit the image package data to be uploaded to the specified node executor component to complete the local import operation;
[0086] (2.6) Select a to-be-renamed image in the specified node, edit and submit the new name and version information to the node executor component to update the target image tag, and display the update result;
[0087] (2.7) Submit a target image pull request in the specified node image repository to the node executor component, which completes the target image pull task and displays the task processing result;
[0088] (2.8) The user selects a node and submits a request to push a local image to a remote image repository, and receives the processing result information returned by the image manager component for prompt;
[0089] (2.9) The user specifies a cloud node to submit an image deletion request (the detection metadata database component applies the "whether to keep" value of the application image in the dependency data to 0, which can be deleted), and the node executor component deletes the target image;
[0090] (2.10) The user specifies a node to edit the label (including image name, version information), base image, image type (base image, application image, and none), environment variable, package management type (yum / apt), target software source address, software package information to be installed, pre-built file (file type, selected file, target file container path), and startup command information, etc. Data verification combination is Dockerfile file data stream submitted to the specified node executor component to complete the image building operation, and receive the building operation feedback result for display. The newly created image is pushed to the image repository by default;
[0091] Among them, the image name strictly follows the "project domain identifier / application abbreviation" format, such as health-monitor / configserver; the image version information strictly follows the "vx.x.x.x-yyyymmdd" format, such as v1.0.0.3-20241208; and the two are concatenated with ":" to form the image tag (only contains lowercase letters, numbers, and separators ("-"), and must start with lowercase letters and end with letters or numbers).
[0092] (2.11) Periodically (preset 30 seconds, configurable) detect remote image repository connection availability, display Ready state if online, otherwise display NotReady state;
[0093] (2.12) The user specifies an image repository and obtains its image list information, showing the image name, ID, image size, and creation time information;
[0094] (2.13) The user edits the name, username, repository address, and password information of the remote image repository to be added, submits the image manager component to complete authentication, receives and displays the returned authentication result, and if the authentication is successful, it is added to the repository list for display, otherwise it prompts that the addition fails;
[0095] (2.14) Send the user's image repository addition request to the image manager component for authentication, parse the returned authentication result, and if it is passed, prompt that the addition is successful, otherwise prompt that the addition fails;
[0096] (2.15) The user submits the image repository deletion request to the image manager component to complete the image repository connection deletion, receives and prompts the deletion processing result;
[0097] (2.16) The user specifies a mirror repository submission target image (detects the application from the dependent relationship data in the meta database component "whether to keep" value is 0 can be granted to delete) deletion request, the target image is deleted by the mirror manager component and the processing result is fed back to the mirror console component display.
[0098] Through the mirror console component, the application image import and batch export, push, delete functions on the specified cloud node in the cluster are remotely completed with a more optimized human-computer interaction interface, and the remote mirror repository connection addition, authentication, deletion and mirror deletion functions in the repository are supported, thereby reducing the complexity of user image management.
[0099] Optionally, the image manager component (image-manager) is specifically used for:
[0100] (3.1) Receiving and storing the image data pushed from the node executor component, completing the image file storage operation;
[0101] (3.2) Receiving and processing the operation request of the mirror console component to the mirror repository, and feeding back the result to the mirror console component display; the operation request to the mirror repository includes detection, retrieval, addition, authentication, deletion and mirror deletion operation in the mirror repository;
[0102] (3.3) Receiving the information list acquisition operation of the mirror console component to the existing mirror in the mirror repository, for interface analysis and visual display thereof;
[0103] (3.4) Receiving the target image deletion operation submitted by the mirror console component, and returning the processing result for display thereof.
[0104] Optionally, the domain group controller component (domain-group-controller) is specifically used for:
[0105] (4.1) The interface server component listens to the change operation of the project domain identifier in the meta database component, triggers to clear the node domain group data update of the project domain identifier, and changes the node label corresponding to the target project domain to the interface server component.
[0106] The project domain identifier is one-to-one corresponding to the namespace in the cloud platform, and is not modified as a fixed identifier, 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.
[0107] (4.2) The interface server component listens to the change operation of the node domain group data in the meta database component, and combines the change information according to the corresponding operation to update the node project domain identifier to the interface server component.
[0108] (4.3) The interface server component listens to the change (addition, deletion) operation of the application dependent relationship data in the meta database component, traverses and obtains the node domain group data with the project domain identifier and the mirror ID as the unique key, compares and combines the pull / delete request of the corresponding node application mirror of the target project domain identifier to the node executor component for processing, and outputs the feedback result to the log for traceability. (There is no such mirror in the mirror warehouse, and the feedback is that there is no such mirror); if the application dependent data is added, it is combined into the data structure of the project domain identifier corresponding to the node to be pulled or deleted, and is completed by the specified node and the feedback result is output to the log by the domain group controller component.
[0109] The domain group controller component listens to and triggers the target state synchronization function through the interface server component, and guarantees the real-time and association consistency of the three types of data, i.e., the project domain identifier, the node domain group, and the application mirror data on the cloud node.
[0110] Optionally, the interface server component (api-server) is specifically used for:
[0111] (5.1) Receiving the addition, deletion, modification and query operation request of the three types of data, i.e., the project domain, the node domain group, and the application dependent relationship in the meta database component submitted by the user through the mirror console component, and feeding back the result to the mirror console component for analysis and display.
[0112] (5.2) The List-watch mechanism is used to establish a long connection to listen to the change event of the project domain, the node domain group, and the application dependent relationship in the meta database component, and push it to the domain group controller component; the domain group controller component is used to analyze the actual state of the node and the state of the project domain in the meta database component.
[0113] The meta database component (meta-database) is used to store the project domain, the node domain group, and the application dependent relationship data in the cluster, receive the addition, deletion, modification and query request of the three types of data submitted by the mirror console component to the interface server component, and feed back the processing result for display. The domain group controller component and the mirror console component can only interact with the meta database component through the interface server component.
[0114] The three types of project domain, node domain group, and application dependent relationship data are described below.
[0115] As shown in Table 1, the project domain data is composed of the identifier, alias, description, and note of the project domain, such as the project domain identifier: health-monitor, the alias: health monitoring system project, and the project description: used for monitoring and displaying the health status of equipment.
[0116] Table 1
[0117]
[0118] As shown in Table 2, the node domain group data is composed of node host name, node IP, project domain identifier, and note information, such as node host name: worker1, node IP: 192.168.30.111, project domain identifier: health-monitor, and note: health monitoring system project application running node domain group.
[0119] Table 2
[0120]
[0121] As shown in Table 3, the application dependency data is composed of application name, project domain identifier, image name, image version, image ID, image creation time, image volume size, whether to keep, and note information, with image ID as the unique primary key to avoid duplication, and image name + image version forming the image tag. For example, the application name is 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 keep is 1 (1 for keeping, 0 for idle, used to identify valid in-use images), and the note is centralized management of configuration files of multiple services of the health-monitor project. The application dependency data adds the "whether to keep" attribute to the application image. The application image with a value of 0 for the attribute can be deleted, and a value of 1 means that the application image must be cached on the specified project domain node, which facilitates users to distinguish the effectiveness of the application image and standardize management, and avoids mistakenly deleting in-use application images.
[0122] Table 3
[0123]
[0124] In one embodiment, a cloud application image directed construction and domain management method is provided. Based on the cloud application image directed construction and domain management system provided in the foregoing embodiment, the cloud application image directed construction and domain management is realized.
[0125] As shown in Table 3, the application dependency data is composed of application name, project domain identifier, image name, image version, image ID, image creation time, image volume size, whether to keep, and note information, with image ID as the unique primary key to avoid duplication, and image name + image version forming the image tag. For example, the application name is 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 keep is 1 (1 for keeping, 0 for idle, used to identify valid in-use images), and the note is centralized management of configuration files of multiple services of the health-monitor project. The application dependency data adds the "whether to keep" attribute to the application image. The application image with a value of 0 for the attribute can be deleted, and a value of 1 means that the application image must be cached on the specified project domain node, which facilitates users to distinguish the effectiveness of the application image and standardize management, and avoids mistakenly deleting in-use application images. Figure 2
[0126] The image console component obtains the project domain, node domain group data, and application dependency data through the interface server component, maps the state data information reported by the node executor at regular intervals, and visualizes the node project domain information;
[0127] According to the selection operation of the user on the online node, the application mirror construction data is forwarded to the node executor component of the user-selected node in the form of a Dockerfile file format; the node executor component localContanerRuntime.GetDockerfile interface receives the mirror construction data and parses it, calls localContanerRuntime.BuildImage to start the construction process and feedback the execution progress until the construction is completed;
[0128] The node executor component automatically pushes the completed application mirror to the mirror warehouse, and feeds back the pushing result to the mirror console component.
[0129] The application can realize node directivity selection, directly deliver mirror construction information to the node executor component in the application dependent project domain, avoid the case that the application mirror is stored in other project domain nodes, effectively save other node space resources in the cluster, and improve the node resource utilization.
[0130] The mirror directional construction processing flow is used to ensure the unified management of the global mirror in the cloud domain, and after the user selects a cloud node to complete the application mirror construction, the application mirror is automatically pushed to the mirror warehouse in the mirror manager component. The following will be combined with Figure 2 The specific implementation process of the mirror directional construction will be specifically described by taking the health monitoring project (health-monitor) configuration center application (configserver) mirror construction as an example, including:
[0131] S101. The user logs in the node management interface of the cloud platform, obtains the project domain and node domain group data through the interface server component, maps the state data information reported by the node executor in time, and visually presents the node project domain information for the user to accurately select the online node (a node that is judged to be NotReady within 30 seconds or offline is not selected) to be constructed. Target application mirror; check the correctness of the mirror construction information edited by the user to avoid format errors when delivering the specified node execution and affect the mirror construction process;
[0132] S102. If the user needs to construct the application mirror of the health monitoring project, the user should select a cloud node holding the project domain identifier health-monitor and in the Ready state to construct;
[0133] S103. After the user triggers the mirror construction function, the user needs to edit the mirror name, base mirror, mirror type, environment variable (if any), dependent software package installation, pre-constructed file and start command information, so as to constitute the application mirror construction data.
[0134] The mirror name is composed of the project domain identifier, the application name and the version, such as health-monitor / configserver:v1.0.0.3-20250320, and cannot contain Chinese, capital letters, Chinese symbols (()) and English symbols ().
[0135] The base image is queried from the mirror warehouse in the mirror manager component by the mirror console component, and is selected by the user;
[0136] The mirror type is divided into Application (application mirror) and Base (base mirror).
[0137] The environment variable key-value pair is set, such as MY_NODE_IP:master1.
[0138] The installation of the dependent software package must set the package manager type (yum, apt), the target software source address (fill in the address after automatic detection of availability, such as http: / / [software source IP address] / Kylin-4.0.2), and the software package name to be installed (such as httpd, jdk, python3, etc., multiple software package names are separated by a comma).
[0139] The pre-built file needs to upload the application execution file and its copy to the absolute path information of the file in the container, which is used to store the application file in the specified directory in the container for runtime call when building the mirror.
[0140] The start command is the final execution command line or script content of the application, which is used to preliminarily judge whether it is executable according to the pre-built file information, environment variable and dependent software package information.
[0141] S104. After the above application mirror construction information is edited and format-verified, a data stream in the Dockerfile file format is generated and forwarded to the node executor component of the user-specified node.
[0142] S105. The localContanerRuntime.GetDockerfile interface of the node executor component receives the mirror construction information, parses it, calls the localContanerRuntime.BuildImage to start the construction process and feedback the execution progress until the construction is completed.
[0143] S106. The node executor component automatically pushes the completed application mirror to the mirror warehouse, and feeds back the pushing result to the mirror console component.
[0144] Compared with the traditional application image construction method, the implementation steps of the mirror orientation construction can be associated with the application dependency and the project domain, realize more accurate cloud node directionality image construction process arrangement, provide visual and guided construction information editing and checking functions, and greatly improve the efficiency of user encapsulated applications.
[0145] As shown in Figure 3 The change operation for the project domain information in the domain management includes:
[0146] After the mirror console component obtains the change operation of the user on the to-be-changed project domain, the domain group controller component obtains the change event through the interface server component, and identifies the change type;
[0147] The domain group controller component queries the node data and application image data corresponding to the node domain group information and application dependency information with the to-be-changed project domain as the project domain identifier through the interface server component, and converts the task information of the domain tag change of the corresponding node about the to-be-changed project domain and the application image change of the corresponding node about the to-be-changed project domain;
[0148] The interface server component obtains the change task of the project domain tag of the node about the to-be-changed project domain for execution, and the node executor of the node in the to-be-changed project domain obtains the change task of the application image of the node about the to-be-changed project domain for execution.
[0149] To illustrate the change operation of the project domain information, the following takes the deletion of the project domain information as an example, and the implementation process includes the following steps:
[0150] S201. The interface server component listens to the node.domain.group / app project domain data in the meta database, such as health-monitor (monitoring and detection system project) and mission-plan (task planning system project);
[0151] S202. After the user confirms to delete the project domain health-monitor through the mirror console component, the domain group controller component obtains the change event through the interface server component watch, and identifies that the change type is delete;
[0152] S203. According to the health-monitor project domain delete event, the domain group controller component queries the node data and application image data corresponding to the node domain group information and application dependency information with health-monitor as the project domain identifier through the interface server component, and converts the task information of the health-monitor domain tag deletion of the corresponding node and the health-monitor corresponding application image deletion of the corresponding node;
[0153] S204. The node health-monitor project domain tag deletion task is forwarded to the interface server component for execution, and the node health-monitor corresponding application image deletion task information is sent to the node executor of the health-monitor project domain for execution;
[0154] S205. The interface server component clears the corresponding node project domain tag according to the health-monitor project domain tag deletion processing completion (deletes the health-monitor project domain tag on the worker1 node);
[0155] S206. The corresponding node executor component receives the application image deletion operation request associated with the project domain identifier (deletes the application image belonging to the health-monitor project domain on the worker1 node).
[0156] The project domain identifier corresponds to the namespace in k8s one-to-one, and is not modified as a fixed identifier, that is, the health-monitor project domain identifier and the namespace name in the cloud platform are both health-monitor. For the change operation of the project domain data, the synchronization operation of the project domain identifier and the application image of the corresponding cloud node can be triggered according to the user's management of the project domain data, and the efficiency of automatically maintaining the real-time and consistency of the project domain data is improved.
[0157] As shown in FIG. 8, the change operation of the node domain group information in the domain management includes: Figure 4 After the image console component obtains the change operation of the project domain identifier of the node by the user, the domain group controller component obtains the change event through the interface server component and identifies the change type;
[0158] The domain group controller component completes the change operation of the project domain identifier of the specified node through the interface server component, generates the operation information of the application image of the node, and forwards it to the node executor component to complete the synchronization of the application dependency relationship;
[0159] The interface server component completes the synchronization operation of the corresponding node project domain tag according to the change event of the project domain of the specified node; and 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.
[0160] The following takes the add, delete, update and query (add, delete, update and query) operations of the node domain group information as an example (the query operation does not involve change, and only the query result needs to be received, so this embodiment will not be described in detail), and the implementation process includes the following steps:
[0161]
[0162] S301. Through the interface server component, the node domain group data (node hostname, node IP, project domain identifier) in the meta database is monitored, 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);
[0163] S302. After the user confirms the addition, deletion, modification and query of the project domain identifier of the health monitoring project domain worker1 node through the mirror console component, the domain group controller component obtains the change event through the interface server component watch, and identifies the change event as an add, delete, update type, such as adding the project domain identifier of the worker10 node as health-monitor, deleting the project domain identifier health-monitor of the worker5 node, updating the project domain identifier of the worker1 node from health-monitor to mission-plan, and the like.
[0164] S303. According to the change event information of the specified node project domain obtained through the listening, the domain group controller component completes the change operation of the specified node project domain identifier through the interface server component, and generates pull or delete operation information of the application mirror applied to the node to forward to the node executor component to complete the synchronization of the application dependency.
[0165] For example, the event of adding the project domain identifier of the worker10 node as health-monitor means that the health monitoring system project application can be run on the worker10 node, the domain group controller component queries the application dependency data in the meta database component through the interface server component, analyzes the application mirror information involved in the health-monitor project domain identifier, converts the information into a request for the worker10 node to urgently pull the local mirror, and sends the request to the worker10 node executor component for completion.
[0166] The event of deleting the project domain identifier health-monitor of the worker5 node means that the worker5 node removes the health monitoring system project domain and no longer runs the project related application. The domain group controller component queries the application dependency data in the meta database component through the interface server component, analyzes the application mirror information involved in the health-monitor project domain identifier, converts the information into a request for the worker5 node to urgently clear the local application mirror, and sends the request to the worker5 node executor component for completion.
[0167] The event that updates the project domain identifier of worker 1 from health-monitor to mission-plan indicates that worker 1 has been 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 combines the delete and add operations into a single event. Through the interface server, it queries the metadata repository component to obtain the image information related to the application dependency data corresponding to the health-monitor and mission-plan project domain identifiers. It then sends a request to delete the health-monitor application image and a request to pull the mission-plan application image to worker 1 for completion.
[0168] 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;
[0169] S305. The corresponding node executor component receives the application image deletion and pull operation request associated with the project domain identifier, and completes the status synchronization of the application dependency relationship on the specified node.
[0170] For changes to node domain group information, the project domain identification relationship of the corresponding cloud node and the linkage synchronization of the node local application image are triggered based on the user's management of the node domain group data. This ensures that the application correspondence between the node local application image and its subordinate project domain is consistent without manual intervention.
[0171] like Figure 5 As shown in the figure, the operations for changing application affiliation information in domain management include:
[0172] After the mirror console component obtains the user's change operation on the application affiliation, the domain group controller component monitors the change event through the interface server component and identifies the change type;
[0173] 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 and converts it into the change processing task of the application image on the node under the corresponding project domain identifier;
[0174] 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.
[0175] The following will be described in detail by taking the add, delete, update and query operations of application dependency data as an example (the query operation does not involve changes, and only the query result needs to be received, so this embodiment will not be described in detail), and the implementation process includes the following steps:
[0176] S401. The domain group controller component listens to the application dependency data in the meta database through the interface server component, for example, the application dependency data sample: the application name is 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 keep is 1 (1 for keeping, 0 for idle, used to identify valid in-use images), and the remarks are: application function description;
[0177] S402. The user submits the add, delete and update operations on the application dependency through the image console component, and the domain group controller component obtains the change event through the interface server component watch, and identifies that the change type is add, delete and update. For example, the new health-monitor project domain application image health-monitor / configserver:v1.0.0.3-20241208 is added, and the image is obtained by querying the image warehouse of the image manager component, which is selected by the user; the health-monitor project domain application image health-monitor / configserver:v1.0.0.3-20241208 is deleted; the change only allows modification of the application name, whether to keep and the remarks, and does not trigger the state synchronization processing operation of other components of the domain. Among them, the “whether to keep” attribute of the image in the application dependency data must be carefully confirmed, and the application image with the “whether to keep” value of 0 can be deleted;
[0178] S403. According to 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 meta database component through the interface server component, and parses the change event to convert it into an application image change processing task on the node under the corresponding project domain identifier;
[0179] S404. Add the "task center" application, such as the image health-monitor / taskservice:v1.0.0.3-20241208, identify that it belongs 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 image file pulling to the local cache, and submits the application image affiliation data addition operation to the interface server component domain;
[0180] S405. If the "health monitoring system project" application image health-monitor / taskservice:v1.0.0.3-20241208 is deleted, the domain group controller component sends a deletion instruction to the node executor component of the corresponding node belonging to the health-monitor project domain to complete the local image cache cleaning task, and forwards the deletion request to the interface server component to complete the corresponding application affiliation data cleaning operation;
[0181] S406. If the application name, whether to keep, and note information of the "health monitoring system project" application image health-monitor / taskservice:v1.0.0.3-20241208 are modified, the domain group controller sends it to the interface server component to change the corresponding data in the meta database component, which does not involve the node executor component to process;
[0182] It should be noted that all application image tag data comes from the image warehouse of the image manager component, and the image ID, image creation event, and volume size are not modified, so as not to damage the global uniqueness of the application image. But the same application image can have multiple image tags, such as image fdca45bc85e0 can have multiple image tags, such as health-monitor / taskservice:v1.0.0.3-20241208, mission-plan / inference:v1.0.0.3-20241208, but the image ID, volume size, and creation time are fixed values once the image is built.
[0183] The above-mentioned embodiments are based on the node executor component, the image manager component, the image console component, the domain group controller component, the interface server component and the metadata database component, and the change event automatic identification, task arrangement distribution and component efficient cooperation are adopted. The image console component analyzes and identifies the user-side mirror image construction request submission and the project domain, node domain group and application affiliation data change request, converts the specific execution task distribution processing task to the interface server component, the node executor component cooperates with the metadata database component and the domain group controller component to complete the task, and efficiently realizes the application mirror image construction and effectively maintains the real-time and consistency of the global project domain, node domain group and application affiliation data.
[0184] The above-mentioned embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it cannot be understood as the limitation of the patent scope of the present application. It should be pointed out that for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, 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, The node executor component, the mirror manager component, the mirror console component, the domain group controller component, the interface server component and the metadata database component are included; The node executor component is configured to periodically report node heartbeat and process operation requests from the mirror console component; The mirror manager component is configured to store application images of the whole cloud platform, receive and process operation requests of the mirror warehouse, and feed back results to the mirror console component or the domain group controller component for analysis and output; The mirror console component is configured to gather heartbeat states of the node executor components in the cluster, send operation requests of users to corresponding components for processing, and analyze and display feedback results; The domain group controller component is configured to listen to changes of project domain, node domain group and application affiliation data in the metadata database component, and trigger state synchronization update of corresponding resource objects in the cluster; the application affiliation data includes application name, project domain identifier, mirror name, mirror version, mirror ID, mirror creation time, mirror volume size, whether to keep, and mirror note; The interface server component directly interacts with the metadata database component, and is configured to receive and process change requests of project domain, node domain group and application affiliation data in the metadata database component from the mirror console component and the domain group controller component, and return processing results to the task source components for visualization or log output after completion; The metadata database component is configured to store project domain, node domain group and application affiliation data in the cluster, receive change requests of project domain, node domain group and application affiliation data submitted by the mirror console component to the interface server component, and feed back processing results for the mirror console component to display; The domain group controller component and the mirror console component only interact with the metadata database component through the interface server component; the domain group controller component is specifically configured to: Listen to change operations of project domain data in the metadata database component through the interface server component, trigger node domain group data update of the project domain identifier, and change node labels corresponding to the target project domain to the interface server component; Listen to change operations of node domain group data in the metadata database component through the interface server component, and combine change information to the interface server component for synchronization update of node project domain identifiers according to corresponding operations; Listen to change operations of application affiliation data in the metadata database component through the interface server component, traverse and obtain node domain group data with the project domain identifier and the mirror ID as the unique key for comparison, combine operation requests of application images on the node corresponding to the target project domain identifier to the node executor component for processing, and output feedback results to the log.
2. The system of claim 1, wherein, The node executor component is specifically configured to: Report heartbeat to the mirror console component according to the current state of the node, so that the mirror console component analyzes and displays the online state of the node; Receive data query requests about the node, call local container Runtime API interfaces for acquisition, and feed back to the mirror console component for analysis and display; Receiving a change request for an application image, calling a local container Runtime API interface to complete the corresponding processing, and feeding back the processing result to the image console component for analysis and display; Receiving an image building request and building information submitted by the image console component, calling a local container Runtime API interface to parse and load the building information, completing application image packaging operations according to the building information, and returning the building result; Monitoring newly added images on the node, and triggering a clearing mechanism to release resources when the image name is none.
3. The system of claim 1, wherein, The image manager component is specifically configured to: Receive and store image data pushed by the node executor component, and complete image file storage operations; Receive and process operation requests for a target image repository from the image console component, and feed back the results to the image console component for display; Receive an information list acquisition operation of existing images in the image repository from the image console component, and provide the information list to the image console component for visual display; Receive a target image deletion operation from the image console component, and return the processing result for display.
4. The system of claim 3, wherein, The interface server component is specifically configured to: Establish a long connection to listen to change events of project domain, node domain group, and application affiliation in the meta database component by using a List-watch mechanism, and push the change events to the domain group controller component; the domain group controller component is configured to analyze the change events to realize consistency between the actual state of the node and the state of the project domain in the meta database component.
5. The system of claim 1, wherein, The project domain data includes the identification, alias, description, and project domain note of the project domain; and the node domain group data includes the hostname, node IP, project domain identification, and node note.
6. A cloud application mirror-oriented construction and domain management method, characterized in that, The system according to any one of claims 1-5 realizes image targeted building and domain management of cloud applications; The image targeted building method of the cloud application includes: The image console component obtains project domain, node domain group data, and application affiliation data through the interface server component, maps state data information reported by the node executor at regular intervals, and visualizes the node project domain information; According to the selection operation of the user on the online node, the application image building data is forwarded to the node executor component of the user-selected node in the form of a Dockerfile file format; after the image building data is received by the localContainerRuntime.GetDockerfile interface of the node executor component, the image building data is parsed, the localContainerRuntime.BuildImage is called to start the building process and feed back the execution progress until the building is completed; The node executor component automatically pushes the completed application image to the image repository, and feeds back the pushing result to the image console component.
7. The method of claim 6, wherein, The project domain information change method includes: After the image console component obtains the change operation of the user 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 interface server component to obtain node domain group information for the project domain to be changed, application dependency information, corresponding node data, and application image data, and converts the corresponding node data into task information for changing the domain tag of the corresponding node for the project domain to be changed and changing the application image of the corresponding node for the project domain to be changed; The interface server component executes the task of changing the project domain tag of the node for the project domain to be changed, and the node executor of the node in the project domain to be changed executes the task of changing the application image of the node for the project domain to be changed.
8. The method of claim 6, wherein, The method for changing the node domain group information comprises: After the mirror console component obtains a user operation of changing the project domain tag of the node, the domain group controller component listens to the changing event through the interface server component and identifies the changing type; The domain group controller component completes the changing operation of the project domain tag of the specified node through the interface server component, generates operation information of the application image of the node, and forwards the operation information to the node executor component to complete the synchronization of the application dependency; The interface server component completes the synchronization operation of the project domain tag of the corresponding node according to the changing event of the project domain of the specified node, and the node executor component receives the operation request of the application image of the project domain tag and completes the synchronization operation of the application dependency of the specified node.
9. The method of claim 6, wherein, The method for changing the application dependency information comprises: After the mirror console component obtains a user operation of changing the application dependency, the domain group controller component listens to the changing event through the interface server component and identifies the changing type; The domain group controller component completes the changing operation of the application dependency data in the meta database component through the interface server component, analyzes the changing event, and converts the changing event into a changing processing task of the application image of the node for the corresponding project domain tag; The domain group controller component forwards a task request to the node executor component of the corresponding node to complete the changing operation of the application dependency data, and pulls or deletes the application image of the corresponding node according to whether the application image is retained.
Citation Information
Patent Citations
Mirror image pulling method and device for Kubernetes system
CN111459611A