Mirror image warehouse management method, server, system and storage medium
By receiving startup requests for the mirror warehouse management server in public cloud scenarios and starting cloud hosts and mirror service components, the problems of low data isolation, poor scalability and low availability in the existing solutions are solved, and higher isolation and availability are achieved.
Patent Information
- Application Number
- CN202411824316.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-01
AI Technical Summary
When existing solutions implement mirror warehouse management in public cloud scenarios, data isolation is low, expansion capability is poor, and availability is low.
Receive startup requests sent by the client through the warehouse management server, start the cloud host and mirror service components, and manage them through the load balancer and storage system to realize calls and extension of the cloud host.
Improves isolation between user data, avoids data leakage, and improves the expansion capability and availability of mirror warehouses.
Smart Images

Figure CN119739460A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a management method, server, system and storage medium for an image repository. Background Art
[0002] An image repository is a platform for storing and managing container images. Image repositories can be divided into public repositories and private repositories. Public repositories allow anyone to access and use them, while private repositories require specific permissions to access.
[0003] Public warehouses are open and convenient, so they are generally used in public cloud scenarios. In public cloud scenarios, existing solutions usually implement image warehouse management based on Kubernetes clusters, but image warehouse management solutions based on Kubernetes clusters do not meet the requirements of public cloud scenarios for data isolation. In addition, existing solutions have high requirements for the operation and maintenance of image warehouses, occupy cloud host resources, and make image warehouses less scalable and less available. Summary of the invention
[0004] The present application provides a management method, server, system and storage medium for an image warehouse, which are used to solve the technical problems of low data isolation, poor expansion capability and low availability of the image warehouse when the existing solution is used to manage the image warehouse.
[0005] In a first aspect, an embodiment of the present application provides a method for managing an image warehouse, which is applied to an image warehouse management system. The image warehouse management system includes: a warehouse management client and a warehouse management server. The image warehouse includes: at least one cloud host, a load balancer, and a storage system. The storage system is used to store image files, metadata of image files, and execution tasks of image files. The load balancer is used to distribute management requests for the image files to the cloud host. The method includes: (characteristic part).
[0006] In a possible implementation, the warehouse management server receives the image service component information fed back by the cloud host through the image client;
[0007] The warehouse management server determines whether the mirror service component of the cloud host is operating abnormally according to the mirror service component information and the cloud host information;
[0008] When the warehouse management server determines that the image service component on the first target cloud host among the at least one cloud host is operating abnormally, the warehouse management server deletes the cloud host information of the first target cloud host from the available cloud host information recorded in the load balancer.
[0009] In a possible implementation, the warehouse management server generates abnormal prompt information according to the image service component information of the first target cloud host;
[0010] The warehouse management server determines a tenant corresponding to the first target cloud host;
[0011] The warehouse management server sends the abnormal prompt information of the first target cloud host to the tenant's terminal for display, and the tenant's terminal includes at least one of the following: a warehouse management client and a user mobile terminal.
[0012] In a possible implementation, the warehouse management server manages the cloud host according to the management instruction sent by the warehouse management client, and the management includes at least one of the following: stopping the operation of the deleted cloud host, starting the newly added cloud host, adjusting the host configuration information and restarting the cloud host, and restarting the existing cloud host;
[0013] After managing the cloud host, the warehouse management server feeds back management result information to the warehouse management client, so that the management client displays the management result information.
[0014] In one possible implementation, after the warehouse management server manages the cloud host according to the management instruction, the warehouse management server synchronizes the managed cloud host information to the load balancer in real time, so that the load balancer deletes the stopped cloud host information from the available cloud host information recorded in the load balancer according to the managed cloud host information, and / or adds the started cloud host information.
[0015] In a possible implementation, host configuration information is extracted from the first startup request, and host startup information and a startup sequence of at least one mirroring service component are extracted from the host configuration information;
[0016] The cloud host is started according to the host startup information, and the at least one mirror service component is started according to the startup sequence, wherein the host startup information includes at least one of the following: processor information of the cloud host, memory information of the cloud host, and the number of cloud hosts.
[0017] In a possible implementation, when receiving the management request for the image file, the load balancer determines the second target cloud host from the available cloud hosts corresponding to the available cloud host information recorded in the load balancer;
[0018] The load balancer sends the management request to the second target cloud host, so that the second target cloud host calls the image service component to manage the image file in the storage system.
[0019] In a second aspect, an embodiment of the present application provides a warehouse management server for managing an image warehouse, wherein the image warehouse includes: at least one cloud host, a load balancer, and a storage system, wherein the storage system is used to store image files, metadata of the image files, and execution tasks of the image files, and the load balancer is used to distribute management requests for the image files to the cloud host, and the warehouse management server includes:
[0020] The acquisition module is used for the warehouse management server to receive a first startup request sent by the warehouse management client, wherein the first startup request carries host configuration information, and different cloud hosts correspond to the same host configuration information.
[0021] A processing module is used for the warehouse management server to start the cloud host according to the first start request, and to start at least one image service component on the cloud host, wherein the image service component is used to manage the image file.
[0022] A control module is used for the warehouse management server to start the load balancer and the storage system according to a second start request sent by the warehouse management client, wherein the second start request is generated by the warehouse management client according to the cloud host information fed back by the cloud host.
[0023] In a third aspect, an embodiment of the present application provides a mirror warehouse management system, including a warehouse management client and the above-mentioned warehouse management server.
[0024] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0025] The embodiment of the present application provides a management method, server, system and storage medium for an image warehouse, wherein the warehouse management server receives a first startup request sent by a warehouse management client, so that the warehouse management server starts the cloud host according to the first startup request, and starts at least one image service component for managing image files on the cloud host, and then the warehouse management client generates a second startup request according to the cloud host information fed back by the cloud host, and the warehouse management server starts the load balancer and storage system according to the second startup request sent by the warehouse management client, so as to realize the call and expansion of the cloud host in the public cloud scenario. Therefore, compared with the existing management solution of implementing an image warehouse, the present application improves the isolation between each user's data, avoids the leakage of user data, and improves the expansion capability and availability of the image warehouse. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0027] Figure 1 A schematic diagram of the component relationships of the image warehouse management system provided for this application;
[0028] Figure 2 Schematic diagram of the management method of the image repository provided for this application Figure 1 ;
[0029] Figure 3 Schematic diagram of the management method of the image repository provided for this application Figure 2 ;
[0030] Figure 4 The management sequence diagram of the image repository provided for this application;
[0031] Figure 5 A schematic diagram of the structure of the warehouse management server provided for this application.
[0032] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0033] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0034] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and corresponding operation entrances shall be provided for users to choose to authorize or refuse.
[0035] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0036] First, the terms involved in this application are explained:
[0037] Elastic Container Registry (ECR) is a service system for storing and distributing container images. It has the ability to manage container images, such as image upload, pull, security check, version management, etc. Although the image repository service does not run service images, it provides image sources for important cluster services such as k8s (Kubernetes), so its availability is an important guarantee for the normal startup of application services.
[0038] Among them, a container image is a lightweight, portable software package that contains all the dependencies and configuration information required to run an application. It is a read-only package used to start one or more containers, usually composed of multiple layers and represented as an object. The distribution and acquisition of container images requires an image repository to store and manage various container images.
[0039] With the development of technology, there are already a variety of technical solutions that can realize the management capabilities of the image warehouse, that is, to realize the elastic and scalable capabilities of the image warehouse, such as the ability to pull, store, and manage image files. For example, deployment based on the Kubernetes cluster allows the database and image files to be stored in distributed storage systems such as Ceph.
[0040] However, existing solutions for implementing image warehouse management, such as implementing image warehouse management through Kubernetes clusters or implementing image warehouse management through shared large MySQL cluster platforms and cluster operating systems, are generally applicable to private cloud scenarios, and therefore do not focus on data isolation between different users. In public cloud scenarios, more attention needs to be paid to data isolation between different users to avoid user data leakage.
[0041] Based on the requirements for data isolation of image repositories in public cloud scenarios, there is generally no direct relationship between multiple cloud hosts, so the isolation of the cloud host itself meets the requirements for data isolation of image repositories in public cloud scenarios. If the Kubernetes cluster is introduced to manage cloud hosts, since the user's cloud host only runs the image repository service, the management cost is high, and the operation and maintenance will become complicated, occupying cloud host resources. Therefore, by introducing the Kubernetes cluster and implementing the image repository management solution based on the cloud host, the image repository has poor elastic scalability and low availability, and the existing image repository management solution still has defects in data isolation.
[0042] In view of this, the present application provides a management method for an image warehouse, wherein the warehouse management server receives a first startup request sent by a warehouse management client, so that the warehouse management server starts the cloud host according to the first startup request, and starts at least one image service component for managing image files on the cloud host, and then the warehouse management client generates a second startup request according to the cloud host information fed back by the cloud host, and the warehouse management server starts the load balancer and storage system according to the second startup request sent by the warehouse management client, so as to realize the call and expansion of the cloud host in the public cloud scenario. Therefore, compared with the existing management solution of implementing the image warehouse, the present application improves the isolation between each user's data, avoids the leakage of user data, and improves the expansion capability and availability of the image warehouse.
[0043] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0044] Figure 1 A schematic diagram of the component relationship of the image warehouse management system provided in the embodiment of the present application, such as Figure 1 As shown, the image warehouse management system includes: a warehouse management client and a warehouse management server, and the image warehouse includes: at least one cloud host, a load balancer and a storage system.
[0045] The storage system is used to store image files, image file metadata, and image file execution tasks, and the load balancer is used to distribute image file management requests to the cloud host.
[0046] Specifically, when the warehouse management server receives the startup request sent by the warehouse management client, the warehouse management server obtains the corresponding host configuration information and cloud host information according to the startup request, and determines to enable or expand at least one cloud host under its jurisdiction based on the host configuration information and cloud host information. When receiving the management request, the management request is distributed to the cloud host through the load balancer, so that the cloud host calls the image service component to realize the management of the image file in the storage system.
[0047] Figure 2 Schematic diagram of the management method of the image repository provided for this application Figure 1 ,based on Figure 1 Examples, such as Figure 2 As shown, the method includes:
[0048] S201. The warehouse management server receives a first startup request sent by the warehouse management client. The first startup request carries host configuration information. Different cloud hosts correspond to the same host configuration information.
[0049] Specifically, the user initiates a request to create a cloud host cluster through the control plane service in the warehouse management client, that is, sends a first startup request to the warehouse management server such as the cloud pool resource management server through the warehouse management server, wherein the host configuration information includes the specifications of each host, storage information and service component information in each host, and the configuration information of each host in the first startup request is the same, so that cloud hosts with the same configuration can be started, wherein the service component information is used to indicate the startup order of the service components.
[0050] S202: The warehouse management server starts the cloud host according to the first start request, and starts at least one image service component on the cloud host, where the image service component is used to manage the image file.
[0051] Specifically, after the warehouse management server sends the first startup request to the warehouse management server, the warehouse management server determines the corresponding target cloud host among the multiple cloud hosts under its jurisdiction according to the host configuration information in the received first startup request, and controls the startup of the determined cloud host instance, and runs the startup image service component according to the initial script on the started cloud host. For the started cloud host, it is necessary to feed back its own host status information and the startup status information of the image service component to the warehouse management server in real time.
[0052] S203. The warehouse management server starts the load balancer and the storage system according to the second start request sent by the warehouse management client, where the second start request is generated by the warehouse management client according to the cloud host information fed back by the cloud host.
[0053] Specifically, after completing the startup of each cloud host and the image service component on each cloud host, the cloud host feeds back its own cloud host information to the warehouse management client, wherein the cloud host information includes identification information and status information, and the status information is used to indicate the working status information of the corresponding host. The warehouse management client generates a corresponding second startup request according to the information of each cloud host, and sends the second startup request to the warehouse management server, so that the warehouse management server starts the load balancer according to the second startup request, so that the load balancer can ensure the load balance between each cloud host.
[0054] The embodiment of the present application provides a method for managing an image warehouse, in which a warehouse management server receives a first startup request sent by a warehouse management client, so that the warehouse management server starts a cloud host according to the first startup request, and starts at least one image service component for managing image files on the cloud host. Then, the warehouse management client generates a second startup request according to the cloud host information fed back by the cloud host, and the warehouse management server starts a load balancer and a storage system according to the second startup request sent by the warehouse management client, so as to realize the call and expansion of the cloud host in a public cloud scenario. Therefore, compared with the existing management solution of implementing an image warehouse, the present application improves the isolation between each user's data, avoids the leakage of user data, and improves the expansion capability and availability of the image warehouse.
[0055] Figure 3 Schematic diagram of the process of the image repository management method provided in the embodiment of the present application Figure 2 , Figure 4 The management sequence diagram of the image repository provided for this application, combined with Figure 3 and Figure 4 As shown, in this embodiment Figure 2 Based on the embodiment, a management method for an image repository is described in detail, and the method includes:
[0056] S301. The warehouse management server receives a first startup request sent by the warehouse management client. The first startup request carries host configuration information. Different cloud hosts correspond to the same host configuration information.
[0057] Specifically, the content of this step is the same as that of step S201 and will not be repeated here.
[0058] S302: Extract host configuration information from the first startup request, and extract host startup information and a startup sequence of at least one mirroring service component from the host configuration information.
[0059] Specifically, after receiving the first startup request sent by the warehouse management server, the warehouse management server parses the first startup request to extract the host configuration information set by the user.
[0060] Further, based on the host specifications and storage information in the host configuration information, the warehouse management server determines a host with the same host specifications and storage information as the target cloud host to be started among the multiple cloud hosts under its jurisdiction, obtains the address information of the target cloud host, and generates host startup information according to the address information of the target cloud host. The startup order of the image service components is determined based on the service component information in each host in the host configuration information.
[0061] S303: Start the cloud host according to the host startup information, and start the at least one mirroring service component according to the startup sequence.
[0062] Specifically, after the warehouse management server obtains the host startup information, it sends startup control instructions and service component information to the target cloud host according to the address information of each target cloud host in the host startup information, so that each target cloud host starts after receiving the startup control instructions sent by the warehouse management server, and after each target cloud host is started, it starts the component services required for the image warehouse in sequence through the initial script according to the startup order indicated by the service component information.
[0063] S304: The warehouse management server starts the load balancer and the storage system according to the second start request sent by the warehouse management client.
[0064] Specifically, after the warehouse management server controls each cloud host and the corresponding service component to start, the warehouse management client receives the cloud host information fed back by each started cloud host, and applies for a load balancer based on the fed back cloud host information to ensure load balancing between the cloud hosts. Therefore, the warehouse management client generates a second start request based on the acquired cloud host information, and sends it to the warehouse management server, so that the warehouse management server starts the load balancer based on the second start request, and starts the storage system at the same time.
[0065] The storage system includes a server database, an OSS (Object Storage Service) storage database, a PostgreSQL cluster, and a Redis cluster. The server database is used to store host configuration information including host specifications and service configurations. The OSS storage database is used to store image data. The PostgreSQL cluster and the Redis cluster are used to store image metadata and asynchronous tasks.
[0066] Furthermore, when the load balancer receives a management request for an image file, it determines a second target cloud host from the available cloud hosts corresponding to the available cloud host information recorded in the load balancer, and the load balancer sends the management request to the second target cloud host so that the second target cloud host calls the image service component to manage the image file in the storage system.
[0067] S305: The warehouse management server receives the image service component information fed back by the cloud host through the image client.
[0068] Specifically, after the load balancer and storage system are started, based on the support of the load balancer and storage system, the mirror service component in each cloud host calls the data in the storage system for self-inspection, and generates service component information based on the self-inspection results.
[0069] The service component information indicates whether the corresponding image service component is working normally, and the service component information is dynamically reported to the warehouse management server through the cloud host where the image service component is located to check whether the image service component managed by each cloud host is normal.
[0070] S306: When the warehouse management server determines that the image service component on the first target cloud host among the at least one cloud host is operating abnormally, the warehouse management server deletes the cloud host information of the first target cloud host from the available cloud host information recorded in the load balancer.
[0071] Specifically, after receiving the service component information reported by each cloud host, the warehouse management server detects whether there is service component information indicating an abnormality in multiple service component information. If so, the service component information indicating the abnormality is marked as abnormal service component information, and the cloud host corresponding to the reported abnormal service component information is marked as the first target cloud host.
[0072] Furthermore, the warehouse management server generates a deletion instruction based on the identification information of the first target cloud host, and sends the deletion instruction to the load balancer, so that the load balancer deletes the identification information of the first target cloud host in the available cloud host information, so that the load balancer no longer allocates network and traffic to the first target cloud host.
[0073] S307: The warehouse management server generates abnormal prompt information according to the image service component information of the first target cloud host.
[0074] Specifically, after marking the cloud host corresponding to the reported abnormal service component information as the first target cloud host, the warehouse management server generates abnormal prompt information based on the abnormal service component information of the first target cloud host, wherein the abnormal prompt information includes the identification information of the first target cloud host and the abnormal status information of the service component.
[0075] Furthermore, the service component abnormal status information includes an abnormal component name and an abnormal event. The abnormal component name is used to indicate the name of the image service component that has an abnormality under the first target cloud host, and the abnormal event is used to indicate an abnormal working event that occurs in the image service component.
[0076] S308. The warehouse management server determines the tenant corresponding to the first target cloud host, and sends the abnormal prompt information of the first target cloud host to the terminal of the tenant for display.
[0077] Specifically, after the warehouse management server generates abnormal prompt information based on the abnormal service component information, it queries the tenant information of the first target cloud host in the contact database based on the identification information of the first target cloud host. The contact database pre-associates and stores the identification information of the cloud host and the corresponding tenant information. The tenant information is used to indicate the address information of the tenant terminal.
[0078] Furthermore, the warehouse management server forwards the abnormal prompt information to the determined tenant terminal for display, wherein the tenant terminal at least includes a warehouse management client and a user mobile terminal.
[0079] S309: The warehouse management server manages the cloud host according to the management instructions sent by the warehouse management client, and feeds back management result information to the warehouse management client.
[0080] Specifically, if it is detected that there is no service component information indicating an abnormality in multiple service component information, or if the identification information of the first target cloud host is deleted from the available cloud host information of the load balancer, and the user needs to manage each cloud host through the warehouse management client, the warehouse management client generates a management instruction based on the management operation information input by the user and sends it to the warehouse management server.
[0081] Furthermore, the warehouse management server manages the cloud hosts under its jurisdiction according to the management instructions, wherein the management instructions at least include stopping the operation of the deleted cloud hosts, starting the newly added cloud hosts, adjusting the host configuration information and restarting the cloud hosts, and restarting the existing cloud hosts. Each cloud host receives the management instructions sent by the warehouse management server, and each cloud host performs corresponding actions according to the received management instructions, and after the execution is completed, reports the execution results to the warehouse management server, so that the warehouse management server generates management result information according to the obtained execution results, so that the management client displays the management result information.
[0082] S310. The warehouse management server synchronizes the managed cloud host information to the load balancer in real time, so that the load balancer deletes the stopped cloud host information from the available cloud host information recorded in the load balancer according to the managed cloud host information, and / or adds the started cloud host information.
[0083] Specifically, after receiving the execution results reported by each cloud host, the warehouse management server continuously obtains the cloud host information reported by each cloud host within a preset time period, and determines whether each cloud host is in a running working state according to the status information in the cloud host information.
[0084] Furthermore, the cloud host information whose status information indicates that it is in a stopped working state is marked as cloud host information to be deleted, and the cloud host corresponding to the cloud host information to be deleted is marked as the cloud host to be deleted. The warehouse management server generates a deletion instruction based on the identification information of the cloud host to be deleted, and sends the deletion instruction to the load balancer, so that the load balancer deletes the identification information of the cloud host to be deleted from the available cloud host information, so that the load balancer no longer allocates network and traffic to the cloud host to be deleted.
[0085] Furthermore, the cloud host information indicating that the status information is in the initial startup working state is marked as newly added cloud host information, and the cloud host corresponding to the newly added cloud host information is marked as a newly added cloud host. The warehouse management server generates a new instruction based on the identification information of the newly added cloud host, and sends the new instruction to the load balancer, so that the load balancer adds the identification information of the newly added cloud host to the available cloud host information, so that the load balancer allocates network and traffic to the newly added cloud host.
[0086] The embodiment of the present application provides a method for managing an image warehouse, in which a warehouse management server receives a first startup request sent by a warehouse management client, so that the warehouse management server starts a cloud host according to the first startup request, and starts at least one image service component for managing image files on the cloud host. Then, the warehouse management client generates a second startup request according to the cloud host information fed back by the cloud host, and the warehouse management server starts a load balancer and a storage system according to the second startup request sent by the warehouse management client, so as to realize the call and expansion of the cloud host in a public cloud scenario. Therefore, compared with the existing management solution of implementing an image warehouse, the present application improves the isolation between each user's data, avoids the leakage of user data, and improves the expansion capability and availability of the image warehouse.
[0087] Figure 5 The structural diagram of the warehouse management server provided for this application is as follows: Figure 5 As shown, the warehouse management server 50 provided in this embodiment includes:
[0088] An acquisition module 501 is used for the warehouse management server to receive a first startup request sent by the warehouse management client, wherein the first startup request carries host configuration information, and different cloud hosts correspond to the same host configuration information;
[0089] Processing module 502, for the warehouse management server to start the cloud host according to the first start request, and start at least one image service component on the cloud host, the image service component is used to manage the image file;
[0090] The control module 503 is used for the warehouse management server to start the load balancer and the storage system according to the second start request sent by the warehouse management client, and the second start request is generated by the warehouse management client according to the cloud host information fed back by the cloud host.
[0091] In a possible implementation, the control module 503 is further configured to receive, at the warehouse management server, the image service component information fed back by the cloud host through the image client;
[0092] The warehouse management server determines whether the mirror service component of the cloud host is operating abnormally according to the mirror service component information and the cloud host information;
[0093] When the warehouse management server determines that the image service component on the first target cloud host among the at least one cloud host is operating abnormally, the warehouse management server deletes the cloud host information of the first target cloud host from the available cloud host information recorded in the load balancer.
[0094] In a possible implementation, the control module 503 is further configured for the warehouse management server to generate abnormal prompt information according to the image service component information of the first target cloud host;
[0095] The warehouse management server determines a tenant corresponding to the first target cloud host;
[0096] The warehouse management server sends the abnormal prompt information of the first target cloud host to the tenant's terminal for display, and the tenant's terminal includes at least one of the following: a warehouse management client and a user mobile terminal.
[0097] In a possible implementation, the control module 503 is further configured for the warehouse management server to manage the cloud host according to the management instruction sent by the warehouse management client, wherein the management includes at least one of the following: stopping the operation of the deleted cloud host, starting the newly added cloud host, adjusting the host configuration information and restarting the cloud host, and restarting the existing cloud host;
[0098] After managing the cloud host, the warehouse management server feeds back management result information to the warehouse management client, so that the management client displays the management result information.
[0099] In one possible implementation, the control module 503 is used by the warehouse management server to synchronize the managed cloud host information to the load balancer in real time after the warehouse management server manages the cloud host according to the management instruction, so that the load balancer can delete the stopped cloud host information from the available cloud host information recorded in the load balancer according to the managed cloud host information, and / or add the started cloud host information.
[0100] In a possible implementation, the processing module 502 is specifically configured to extract host configuration information from the first startup request, and extract host startup information and a startup sequence of at least one mirroring service component from the host configuration information;
[0101] The cloud host is started according to the host startup information, and the at least one mirror service component is started according to the startup sequence, wherein the host startup information includes at least one of the following: processor information of the cloud host, memory information of the cloud host, and the number of cloud hosts.
[0102] In a possible implementation, the processing module 502 is further configured to, when the load balancer receives the management request for the image file, determine the second target cloud host from the available cloud hosts corresponding to the available cloud host information recorded in the load balancer;
[0103] The load balancer sends the management request to the second target cloud host, so that the second target cloud host calls the image service component to manage the image file in the storage system.
[0104] The warehouse management server provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be described in detail here.
[0105] The present application also provides a mirror warehouse management system, including a warehouse management client and the above-mentioned warehouse management server.
[0106] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0107] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0108] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0109] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0111] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0112] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0113] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0114] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A method for managing an image repository, characterized in that: The method is applied to an image warehouse management system, the image warehouse management system includes: a warehouse management client and a warehouse management server, the image warehouse includes: at least one cloud host, a load balancer, and a storage system, the storage system is used to store image files, metadata of the image files and execution tasks of the image files, the load balancer is used to distribute management requests of the image files to the cloud host, and the method includes: The warehouse management server receives a first startup request sent by the warehouse management client, wherein the first startup request carries host configuration information, and different cloud hosts correspond to the same host configuration information; The warehouse management server starts the cloud host according to the first start request, and starts at least one image service component on the cloud host, wherein the image service component is used to manage the image file; The warehouse management server starts the load balancer and the storage system according to a second start request sent by the warehouse management client, where the second start request is generated by the warehouse management client according to the cloud host information fed back by the cloud host.
2. The method according to claim 1, characterized in that The method further comprises: The warehouse management server receives the image service component information fed back by the cloud host through the image client; The warehouse management server determines whether the mirror service component of the cloud host is operating abnormally according to the mirror service component information and the cloud host information; When the warehouse management server determines that the image service component on the first target cloud host among the at least one cloud host is operating abnormally, the warehouse management server deletes the cloud host information of the first target cloud host from the available cloud host information recorded in the load balancer.
3. The method according to claim 2, characterized in that Also includes: The warehouse management server generates abnormal prompt information according to the image service component information of the first target cloud host; The warehouse management server determines a tenant corresponding to the first target cloud host; The warehouse management server sends the abnormal prompt information of the first target cloud host to the tenant's terminal for display, and the tenant's terminal includes at least one of the following: a warehouse management client and a user mobile terminal.
4. The method according to any one of claims 1 to 3, characterized in that Also includes: The warehouse management server manages the cloud host according to the management instructions sent by the warehouse management client, and the management includes at least one of the following: stopping the operation of the deleted cloud host, starting the newly added cloud host, adjusting the host configuration information and restarting the cloud host, and restarting the existing cloud host; After managing the cloud host, the warehouse management server feeds back management result information to the warehouse management client, so that the management client displays the management result information.
5. The method according to claim 4, characterized in that After the warehouse management server manages the cloud host according to the management instruction, the method further includes: The warehouse management server synchronizes the managed cloud host information to the load balancer in real time, so that the load balancer deletes the stopped cloud host information from the available cloud host information recorded in the load balancer according to the managed cloud host information, and / or adds the started cloud host information.
6. The method according to any one of claims 1 to 3, characterized in that The step of starting the cloud host according to the first start request and starting at least one image service component on the cloud host includes: Extracting host configuration information from the first startup request, and extracting host startup information and a startup sequence of at least one image service component from the host configuration information; The cloud host is started according to the host startup information, and the at least one mirror service component is started according to the startup sequence, wherein the host startup information includes at least one of the following: processor information of the cloud host, memory information of the cloud host, and the number of cloud hosts.
7. The method according to any one of claims 1 to 3, characterized in that The method further comprises: When receiving the management request for the image file, the load balancer determines a second target cloud host from the available cloud hosts corresponding to the available cloud host information recorded in the load balancer; The load balancer sends the management request to the second target cloud host, so that the second target cloud host calls the image service component to manage the image file in the storage system.
8. A warehouse management server, characterized in that: Used to manage an image warehouse, the image warehouse includes: at least one cloud host, a load balancer, and a storage system, the storage system is used to store image files, metadata of the image files, and execution tasks of the image files, the load balancer is used to distribute management requests for the image files to the cloud host, and the warehouse management server includes: An acquisition module is used for the warehouse management server to receive a first startup request sent by the warehouse management client, wherein the first startup request carries host configuration information, and different cloud hosts correspond to the same host configuration information; A processing module, configured for the warehouse management server to start the cloud host according to the first start request, and to start at least one image service component on the cloud host, wherein the image service component is used to manage the image file; A control module is used for the warehouse management server to start the load balancer and the storage system according to a second start request sent by the warehouse management client, wherein the second start request is generated by the warehouse management client according to the cloud host information fed back by the cloud host.
9. A mirror warehouse management system, characterized in that: include: A warehouse management client and the warehouse management server as described in claim 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.