Cluster management method, system, computer equipment and storage medium
By dividing the cluster into edge clusters and central clusters, and using the generated cluster identity and URL for management, the security challenges of third-party platforms when managing clusters are solved, and rapid registration and cancellation of edge clusters are achieved, improving management security.
Patent Information
- Application Number
- CN202210189778.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2042-02-28
AI Technical Summary
There are security challenges when managing clusters through third-party platforms.
The cluster is divided into edge clusters and central clusters. The central cluster is responsible for managing the registration and cancellation of edge clusters. By generating cluster identity and URLs, the edge cluster changes its own identity and generates agent applications to achieve a secure connection between the central cluster and the edge cluster.
Improve the security of edge cluster management, realize rapid registration and cancellation of edge clusters, and enhance the management control of center clusters over edge clusters.
Smart Images

Figure CN114595031B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of cluster management, and in particular to a cluster management method, system, computer equipment and storage medium. Background Art
[0002] Now, with the increasing maturity of DevOps technology and infrastructure strategy technology, container cluster technology is developing rapidly. Container cluster technology can create twice the number of virtual machine instances on the same server than before, which will undoubtedly reduce the total system investment.
[0003] Currently, the commonly used cluster registration method in the market is implemented through a third-party platform. The device is registered on the third-party platform and the cluster is managed in this way. Although this method can also manage the cluster very conveniently, it uses an open source third-party platform, which poses challenges to the security of cluster management. Summary of the invention
[0004] In view of this, in order to solve the problem that cluster registration is achieved through a third-party platform and devices are registered on the third-party platform, and that managing the cluster by this method poses challenges to the security of cluster management, an embodiment of the present invention provides a cluster management method, system, computer device and storage medium.
[0005] In a first aspect, an embodiment of the present invention provides a cluster management method, which divides a cluster into an edge cluster and a central cluster. The method is applied to the central cluster, including:
[0006] Acquire a cluster registration request for the edge cluster to be registered triggered by the user at the central cluster client, and generate a cluster identifier and a URL required for registration of the edge cluster to be registered in response to the cluster registration request;
[0007] Sending the cluster identifier and the URL to the edge cluster to be registered, so that the edge cluster to be registered changes its own identifier based on the cluster identifier, and generates an agent application based on the URL;
[0008] Receive and display the information of the edge cluster to be registered returned by the agent application on the edge cluster to be registered, wherein the agent application collects the information of the edge cluster to be registered and returns it to the central cluster.
[0009] In an optional implementation, sending the cluster identifier and the URL to the edge cluster to be registered so that the edge cluster to be registered changes its own identifier based on the cluster identifier and generates an agent application based on the URL includes:
[0010] The cluster identifier and the URL are sent to the edge cluster to be registered, so that the edge cluster to be registered switches the mode, and after switching the mode, changes its own identifier based on the cluster identifier, and generates an agent application based on the URL.
[0011] In an optional implementation, generating an agent application based on the URL includes:
[0012] Filling the URL into the client page of the edge cluster to be registered, and storing the URL in response to a storage operation;
[0013] An executable file generated by storing the URL is obtained, and an agent application is generated by executing the executable file through a containerized application on the edge cluster to be registered.
[0014] In an optional implementation, generating a cluster identifier and a URL required for registering the edge cluster to be registered in response to the cluster registration request includes:
[0015] Obtain a cluster identifier list, wherein the cluster identifier list records the target cluster identifiers of the registered edge clusters;
[0016] In response to the cluster registration request, randomly generating a cluster identifier that is inconsistent with the target cluster identifier;
[0017] A URL required for registering the edge cluster to be registered is generated in response to the cluster registration request.
[0018] In an optional implementation, the sending the cluster identifier and the URL to the edge cluster to be registered includes:
[0019] Determine whether the information of the edge cluster to be registered exists locally in the central cluster;
[0020] If the information of the edge cluster to be registered does not exist, sending the cluster identifier and the URL to the edge cluster to be registered;
[0021] If there is information about the edge cluster to be registered, it is prompted that the edge cluster to be registered has been registered;
[0022] or,
[0023] Obtain a URL list, wherein the URL list records historical URLs required for registration of a registered edge cluster;
[0024] Determine whether the URL matches the historical URL;
[0025] If the URL does not match the historical URL, sending the cluster identifier and the URL to the edge cluster to be registered;
[0026] If the URL matches the historical URL, it is prompted that the edge cluster to be registered has been registered.
[0027] In an optional implementation, the sending the cluster identifier and the URL to the edge cluster to be registered includes:
[0028] Acquire a key agreed upon by the central cluster and the edge cluster to be registered, where the key is generated based on information of the edge cluster registered in the central cluster;
[0029] The cluster identifier and the URL are encrypted using the key, and the encrypted cluster identifier and the URL are sent to the edge cluster to be registered, so that the edge cluster to be registered decrypts the encrypted cluster identifier and the URL using the key to obtain the cluster identifier and the URL.
[0030] In an optional embodiment, the method further comprises:
[0031] A cluster deregistration request for the edge cluster to be deregistered is obtained, which is triggered by a user at the central cluster client, and the cluster deregistration request is sent to the edge cluster to be deregistered, so that the edge cluster to be deregistered deletes the agent application in response to the cluster deregistration request, and deletes information of the edge cluster to be deregistered at the central cluster.
[0032] In a second aspect, an embodiment of the present invention provides a cluster management system, the system comprising a central cluster and at least one edge cluster:
[0033] The central cluster is used to obtain a cluster registration request for the edge cluster to be registered triggered by a user at the central cluster client, and generate a cluster identifier and a URL required for registration of the edge cluster to be registered in response to the cluster registration request;
[0034] The central cluster is further used to send the cluster identifier and the URL to the edge cluster to be registered;
[0035] The edge cluster is used to enable the edge cluster to change its own identity based on the cluster identity, and to generate an agent application based on the URL;
[0036] The central cluster is further configured to receive and display information of the edge cluster to be registered returned by the agent application on the edge cluster to be registered, wherein the agent application collects the information of the edge cluster to be registered and returns it to the central cluster.
[0037] In a third aspect, an embodiment of the present invention provides a computer device, comprising: a processor and a memory, wherein the processor is configured to execute a cluster registration program stored in the memory to implement the cluster management method described in any one of the first aspects above.
[0038] In a fourth aspect, an embodiment of the present invention provides a storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the cluster management method described in any one of the first aspects above.
[0039] The cluster management scheme provided by the embodiment of the present invention obtains a cluster registration request triggered for the edge cluster to be registered, generates a cluster identifier and a URL required for registration of the edge cluster to be registered in response to the cluster registration request; sends the cluster identifier and the URL to the edge cluster to be registered, so that the edge cluster to be registered changes its own identifier based on the cluster identifier, and generates an agent application based on the URL; receives and displays the information of the edge cluster to be registered returned by the agent application on the edge cluster to be registered.
[0040] This solution can achieve rapid registration of edge clusters to the central cluster through registration management of edge clusters. The central cluster can directly add and delete edge clusters, thus achieving the technical effect of improving the security of edge cluster management. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of a cluster registration method provided by an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of a flow chart of another cluster registration method provided by an embodiment of the present invention;
[0043] Figure 3 A schematic diagram of a cluster deregistration method provided in an embodiment of the present invention;
[0044] Figure 4 A schematic diagram of the structure of a cluster management system provided by an embodiment of the present invention;
[0045] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.
[0048] Figure 1 A schematic diagram of a cluster registration method provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method specifically includes:
[0049] S11. Obtain a cluster registration request for the edge cluster to be registered that is triggered by a user at the central cluster client, and generate a cluster identifier and a URL required for registration of the edge cluster to be registered in response to the cluster registration request.
[0050] The cluster registration method provided by an embodiment of the present invention is applied to the field of cluster management, wherein the cluster is divided into a central cluster and an edge cluster. The central cluster is used to manage the edge cluster, manage the registration and deregistration of the edge cluster, and the deployment management of edge applications in the edge cluster. An edge cluster can deploy multiple edge applications, and the central cluster can also manage multiple edge clusters.
[0051] There can be multiple edge applications in an edge cluster. At the same time, the edge cluster can automatically purchase algorithms from the algorithm store platform, and can automatically deploy and upgrade algorithms. The edge cluster can also connect to a certain number of edge devices, such as cameras.
[0052] The cluster registration request of the edge cluster to be registered is initiated in the central cluster. The central cluster administrator initiates node registration in the central cluster UI interface, obtains the cluster registration request triggered for the registered cluster, and generates a cluster identifier and the URL required for the registration of the edge cluster to be registered in response to the cluster registration request. The cluster identifier is the node ID. Each node ID corresponds to a unique edge cluster. The corresponding unique edge cluster can be queried through the node ID, and then the data corresponding to the edge cluster can be queried. The URL can be used to generate an agent application.
[0053] S12: Send the cluster identifier and the URL to the edge cluster to be registered, so that the edge cluster to be registered changes its own identifier based on the cluster identifier, and generates an agent application based on the URL.
[0054] In an embodiment of the present invention, the cluster identifier and URL obtained by the central cluster are sent to the UI interface of the edge cluster to be registered. After receiving the cluster identifier, the edge cluster to be registered replaces its own cluster identifier with the received cluster identifier. Its own identifier is the cluster identifier. Through the cluster identifier, data information of the edge cluster corresponding to the cluster identifier can be queried on the central cluster.
[0055] After the edge cluster to be registered receives the URL, it generates an agent application through the application in the UI of the edge cluster to be registered. The agent application is used to realize the connection between the central cluster and the edge cluster. The encapsulated agent application has a specific response mechanism for the central cluster and the edge cluster to realize the simulation of the cluster management system, allowing the agent application to run under the set rules, so as to observe the operation status of the entire system.
[0056] Before sending the cluster identifier and URL obtained by the central cluster to the edge cluster to be registered, a URL list is obtained, wherein the URL list records the historical URLs required for registration of the registered edge cluster;
[0057] Determine whether the URL matches the historical URL;
[0058] If the URL does not match the historical URL, sending the cluster identifier and the URL to the edge cluster to be registered;
[0059] If the URL matches the historical URL, it is prompted that the edge cluster to be registered has been registered.
[0060] S13: Receive and display the information of the edge cluster to be registered returned by the agent application on the edge cluster to be registered.
[0061] In an embodiment of the present invention, after the edge cluster to be registered generates an agent application, the agent application queries the information of the edge cluster to be registered and sends it to the central cluster. The central cluster receives and obtains the information of the edge applications in the edge cluster to be registered, the edge devices connected to the edge cluster to be registered, the installed algorithms and memory information, the CPU, etc., and displays the information of the edge cluster to be registered through the central cluster UI.
[0062] The cluster registration solution provided by the embodiment of the present invention quickly registers the edge cluster to the central cluster through registration management of the edge cluster. The central cluster can directly add and delete the edge cluster, thereby achieving the technical effect of improving the security of edge cluster management.
[0063] Figure 2 A flow chart of another cluster registration method provided by an embodiment of the present invention is as follows: Figure 2 As shown, the method includes:
[0064] S21. Obtain a cluster registration request for the edge cluster to be registered, triggered by a user at the central cluster client.
[0065] In the embodiment of the present invention, a cluster registration request of the edge cluster to be registered is initiated in the central cluster. The user initiates the registration request, and the central cluster administrator initiates node registration in the central cluster UI interface to obtain a cluster registration request triggered for the registered cluster.
[0066] S22. Obtain a cluster identifier list.
[0067] In the embodiment of the present invention, there is a cluster identification list in the central cluster, wherein the cluster identification list records the target cluster identifications of the registered edge clusters, and the cluster representation list in the central cluster is obtained.
[0068] S23: In response to the cluster registration request, randomly generate a cluster identifier that is inconsistent with the target cluster identifier.
[0069] In an embodiment of the present invention, the cluster identifier is a node ID. Each node ID corresponds to a unique edge cluster. The corresponding unique edge cluster can be queried through the node ID, and then the data corresponding to the edge cluster can be queried. Based on the cluster registration request, a cluster identifier that is inconsistent with the target cluster identifier in the cluster identifier list is randomly generated.
[0070] S24: Generate a URL required for registering the edge cluster to be registered in response to the cluster registration request.
[0071] In the embodiment of the present invention, after the cluster identifier is generated, a URL required by the edge cluster to be registered is generated based on the cluster registration request, and the URL is used to generate an executable file, and then generate an agent application.
[0072] S25. Determine whether the central cluster has information about the edge cluster to be registered.
[0073] In the embodiment of the present invention, before sending the cluster identifier and URL to the edge cluster to be registered, it is necessary to determine whether the edge cluster to be registered is registered, so it is determined whether the central cluster has information about the edge cluster to be registered.
[0074] S26: If the information of the edge cluster to be registered does not exist, obtain a key agreed upon by the central cluster and the edge cluster to be registered, and use the key to encrypt the cluster identifier and the URL.
[0075] In an embodiment of the present invention, there is a specified key between the central cluster and the edge cluster to be registered, which is used to encrypt the transmission information between the central cluster and the edge cluster to be registered. After determining that the information of the edge cluster to be registered does not exist locally in the central cluster, the key is obtained, and the generated cluster identifier and URL are encrypted using the key. The encrypted cluster identifier and URL are sent to the edge cluster to be registered to generate an agent application.
[0076] S27: Send the encrypted cluster identifier and the encrypted URL to the edge cluster to be registered.
[0077] In the embodiment of the present invention, after the cluster identifier and the URL are encrypted, the encrypted cluster identifier and the URL are sent to the edge cluster to be registered for generating an agent application.
[0078] S28. Switch the mode.
[0079] In an embodiment of the present invention, there are multiple modes for the edge cluster to be registered, including edge keeper mode, local UI management mode, etc. After the encrypted cluster identifier and URL are sent to the edge cluster to be registered, the edge cluster to be registered switches the mode to edge keeper mode, which is only used when the edge cluster to be registered is registered.
[0080] S29: Decrypt the encrypted cluster identifier and the URL using the key to obtain the cluster identifier and the URL.
[0081] In the embodiment of the present invention, after the edge cluster to be registered switches the mode, the key in the edge cluster to be registered is used to continue to decrypt the received cluster identifier and URL, and the cluster identifier and URL are obtained after decryption, which are used to generate the agent application.
[0082] S210: Change the self-identity based on the cluster identity.
[0083] In the embodiment of the present invention, after the edge cluster to be registered decrypts the cluster identifier, it replaces its own identifier with the cluster identifier. At this time, the cluster identifier can correspond to a unique edge cluster to be registered, and data information of the edge cluster to be registered can be queried through the cluster identifier.
[0084] S211: Fill the URL into the client page of the edge cluster to be registered, and store the URL in response to a storage operation.
[0085] In an embodiment of the present invention, after the edge cluster to be registered decrypts the URL and changes its own identification, the URL is filled into the client page of the edge cluster to be registered, and the URL is stored in response to the storage operation. The stored URL is used to generate an executable file, and then generate an agent application.
[0086] S212: Obtain an executable file generated by storing the URL, and execute the executable file to generate an agent application through the containerized application on the edge cluster to be registered.
[0087] In an embodiment of the present invention, a URL stored in the edge cluster to be registered is obtained, and an executable file is generated based on the URL, wherein the executable file may be a yaml file. The executable file is executed to generate an agent application through a containerized application on the edge cluster to be registered, and the containerized application on the edge cluster to be registered is kuberetes. kuberetes makes the deployment of containerized applications simple and efficient, and provides a mechanism for application deployment, planning, updating, and maintenance.
[0088] The agent application is used to realize the connection between the central cluster and the edge cluster. The encapsulated agent application has a specific response mechanism for the central cluster and the edge cluster to simulate the cluster management system, allowing the agent application to run under the set rules, thereby observing the operation status of the entire system.
[0089] S213: Receive and display information of the edge cluster to be registered returned by the agent application on the edge cluster to be registered.
[0090] In an embodiment of the present invention, after the edge cluster to be registered generates an agent application, the agent application queries the information of the edge cluster to be registered and sends it to the central cluster. The central cluster receives and obtains the information of the edge applications in the edge cluster to be registered, the edge devices connected to the edge cluster to be registered, the installed algorithms and memory information, the CPU, etc., and displays the information of the edge cluster to be registered through the central cluster UI.
[0091] S214: If there is information about the edge cluster to be registered, it is prompted that the edge cluster to be registered has been registered.
[0092] In the embodiment of the present invention, after determining that the information of the edge cluster to be registered exists locally in the central cluster, the encrypted cluster identifier and URL are no longer sent to the edge cluster to be registered, and a prompt is given that the edge cluster to be registered has been provided.
[0093] The cluster registration solution provided by the embodiment of the present invention quickly registers the edge cluster to the central cluster through registration management of the edge cluster. The central cluster can directly add and delete the edge cluster, thereby achieving the technical effect of improving the security of edge cluster management.
[0094] Figure 3 A schematic diagram of a cluster deregistration method provided by an embodiment of the present invention, such as Figure 3 As shown, the method includes:
[0095] S31. Obtain a cluster deregistration request for the edge cluster to be deregistered, triggered by the user at the central cluster client.
[0096] In an embodiment of the present invention, a cluster deregistration request for the edge cluster to be deregistered is initiated in the central cluster, a user initiates a deregistration request, and the central cluster administrator initiates deregistration in the central cluster UI interface, and obtains a cluster deregistration request for the edge cluster to be registered triggered by the user in the central cluster client.
[0097] S32: Send the cluster deregistration request to the edge cluster to be deregistered.
[0098] In the embodiment of the present invention, after the cluster deregistration request of the edge cluster to be deregistered is obtained, the cluster deregistration request is sent to the cluster to be deregistered.
[0099] S33. Deleting the agent application in response to the cluster deregistration request.
[0100] In the embodiment of the present invention, the generation of the agent represents that the cluster registration is successful. The cluster deregistration also requires the deletion of the agent application. After the cluster to be deregistered receives the cluster deregistration request, the edge cluster to be deregistered deletes the agent application in response to the cluster deregistration request.
[0101] S34. Delete the information of the edge cluster to be deregistered.
[0102] In the embodiment of the present invention, after the cluster to be deregistered deletes the agent application, the data information of the cluster to be deregistered is still saved in the central cluster, and the information of the edge cluster to be deregistered is deleted in the central cluster. After the information is deleted, the cluster to be deregistered is deregistered successfully.
[0103] The cluster deregistration solution provided in the embodiment of the present invention can quickly deregister the edge cluster through the deregistration management of the edge cluster, and delete the information in the central cluster at the same time. The central cluster can directly add and delete the edge cluster, thereby achieving the technical effect of improving the security of edge cluster management.
[0104] Figure 4 A schematic diagram of a cluster management system provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, the system specifically includes:
[0105] The central cluster 41 is used to obtain a cluster registration request for the edge cluster to be registered triggered by the user at the central cluster client, and generate a cluster identifier and a URL required for registration of the edge cluster to be registered in response to the cluster registration request;
[0106] The central cluster 41 is further used to send the cluster identifier and the URL to the edge cluster to be registered;
[0107] The edge cluster 42 is used to enable the edge cluster to change its own identity based on the cluster identity, and to generate an agent application based on the URL;
[0108] The central cluster 41 is further configured to receive and display the information of the edge cluster to be registered returned by the agent application on the edge cluster to be registered, wherein the agent application collects the information of the edge cluster to be registered and returns it to the central cluster.
[0109] In an optional implementation, the central cluster 41 is used to send the cluster identifier and the URL to the edge cluster to be registered, so that the edge cluster to be registered changes its own identifier based on the cluster identifier and generates an agent application based on the URL;
[0110] The central cluster 41 is further configured to send the cluster identifier and the URL to the edge cluster to be registered, so that the edge cluster to be registered switches modes, and after switching modes, changes its own identifier based on the cluster identifier, and generates an agent application based on the URL.
[0111] In an optional implementation, the edge cluster 42 is used to generate an agent application based on the URL;
[0112] The edge cluster 42 is further configured to fill the URL into a client page of the edge cluster to be registered, store the URL in response to a storage operation, obtain an executable file generated by storing the URL, and execute the executable file to generate an agent application through a containerized application on the edge cluster to be registered.
[0113] In an optional implementation, the central cluster 41 is used to generate a cluster identifier and a URL required for registration of the edge cluster to be registered in response to the cluster registration request;
[0114] The central cluster 41 is further used to obtain a cluster identifier list, wherein the cluster identifier list records the target cluster identifier of the registered edge cluster, randomly generates a cluster identifier that is inconsistent with the target cluster identifier in response to the cluster registration request, and generates a URL required for registering the edge cluster to be registered in response to the cluster registration request.
[0115] In an optional implementation, the central cluster 41 is used to send the cluster identifier and the URL to the edge cluster to be registered;
[0116] The central cluster 41 is further used to determine whether the information of the edge cluster to be registered exists locally in the central cluster. If the information of the edge cluster to be registered does not exist, the cluster identifier and the URL are sent to the edge cluster to be registered. If the information of the edge cluster to be registered exists, it is prompted that the edge cluster to be registered has been registered, or a URL list is obtained, wherein the URL list records the historical URLs required for the registration of the registered edge cluster, and it is determined whether the URL matches the historical URL. If the URL does not match the historical URL, the cluster identifier and the URL are sent to the edge cluster to be registered. If the URL matches the historical URL, it is prompted that the edge cluster to be registered has been registered.
[0117] In an optional implementation, the central cluster 41 is used to send the cluster identifier and the URL to the edge cluster to be registered;
[0118] The central cluster 41 is further used to obtain a key agreed upon by the central cluster and the edge cluster to be registered, where the key is generated based on information of the registered edge clusters in the central cluster, and the cluster identifier and the URL are encrypting by using the key, and the encrypted cluster identifier and the URL are sent to the edge cluster to be registered, so that the edge cluster to be registered decrypts the encrypted cluster identifier and the URL by using the key to obtain the cluster identifier and the URL.
[0119] In an optional implementation, the central cluster 41 is used to obtain a cluster deregistration request triggered for the edge cluster to be deregistered, and send the cluster deregistration request to the edge cluster to be deregistered, so that the edge cluster to be deregistered deletes the agent application in response to the cluster deregistration request, and deletes the information of the edge cluster to be deregistered in the central cluster.
[0120] The cluster management system provided in this embodiment may be as follows: Figure 4 The management system of the cluster shown in can execute Figure 1-3All steps of the cluster management method in order to achieve Figure 1-3 For details, please refer to the technical effect of the cluster management method shown in Figure 1-3 The relevant description is a brief description and will not be repeated again.
[0121] Figure 5 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention, Figure 5 The computer device 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the computer device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 505 is not described in detail. Figure 5 Various buses are labeled as bus system 505 .
[0122] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0123] It can be understood that the memory 502 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0124] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and an application program 5022 .
[0125] The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 5022 includes various application programs, such as a media player (MediaPlayer), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application 5022.
[0126] In the embodiment of the present invention, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the application 5022, the processor 501 is used to execute the method steps provided by each method embodiment, for example, including:
[0127] Obtain a cluster registration request for the edge cluster to be registered triggered by the user on the central cluster client, generate a cluster identifier and a URL required for registration of the edge cluster to be registered in response to the cluster registration request; send the cluster identifier and the URL to the edge cluster to be registered, so that the edge cluster to be registered changes its own identifier based on the cluster identifier, and generate an agent application based on the URL; receive and display the information of the edge cluster to be registered returned by the agent application on the edge cluster to be registered, wherein the agent application collects the information of the edge cluster to be registered and returns it to the central cluster.
[0128] In an optional implementation, the cluster identifier and the URL are sent to the edge cluster to be registered, so that the edge cluster to be registered switches modes, and after switching modes, changes its own identifier based on the cluster identifier, and generates an agent application based on the URL.
[0129] In an optional implementation, the URL is filled into the client page of the edge cluster to be registered, and the URL is stored in response to a storage operation; an executable file generated by storing the URL is obtained, and the executable file is executed by a containerized application on the edge cluster to be registered to generate an agent application.
[0130] In an optional implementation, a cluster identifier list is obtained, wherein the cluster identifier list records the target cluster identifier of the registered edge cluster; a cluster identifier that is inconsistent with the target cluster identifier is randomly generated in response to the cluster registration request; and a URL required for registration of the edge cluster to be registered is generated in response to the cluster registration request.
[0131] In an optional implementation, determine whether the information of the edge cluster to be registered exists locally in the central cluster; if the information of the edge cluster to be registered does not exist, send the cluster identifier and the URL to the edge cluster to be registered; if the information of the edge cluster to be registered exists, indicate that the edge cluster to be registered has been registered; or, obtain a URL list, wherein the URL list records historical URLs required for registration of registered edge clusters; determine whether the URL matches the historical URL; if the URL does not match the historical URL, send the cluster identifier and the URL to the edge cluster to be registered; if the URL matches the historical URL, indicate that the edge cluster to be registered has been registered.
[0132] In an optional implementation, a key agreed upon by the central cluster and the edge cluster to be registered is obtained, where the key is generated based on information of registered edge clusters in the central cluster; the cluster identifier and the URL are encrypted using the key, and the encrypted cluster identifier and the URL are sent to the edge cluster to be registered, so that the edge cluster to be registered decrypts the encrypted cluster identifier and the URL using the key to obtain the cluster identifier and the URL.
[0133] In an optional implementation, a cluster deregistration request for the edge cluster to be deregistered, triggered by a user at the central cluster client, is obtained, and the cluster deregistration request is sent to the edge cluster to be deregistered, so that the edge cluster to be deregistered deletes the agent application in response to the cluster deregistration request, and deletes the information of the edge cluster to be deregistered in the central cluster.
[0134] The method disclosed in the above embodiment of the present invention can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 501 or the instruction in the form of software. The above processor 501 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.
[0135] It is understood that the embodiments described herein can be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application or a combination thereof.
[0136] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0137] The computer device provided in this embodiment may be Figure 5 The computer device shown in , can execute Figure 1-3 All steps of the cluster management method in order to achieve Figure 1-3 For details, please refer to the technical effect of the cluster management method shown in Figure 1-3 For the sake of brevity, the relevant description is not repeated here.
[0138] The embodiment of the present invention also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0139] When one or more programs in the storage medium can be executed by one or more processors, the cluster management method executed on the management system side of the cluster can be implemented.
[0140] The processor is used to execute the cluster management program stored in the memory to implement the following steps of the cluster management method executed on the system side:
[0141] Obtain a cluster registration request for the edge cluster to be registered triggered by the user on the central cluster client, generate a cluster identifier and a URL required for registration of the edge cluster to be registered in response to the cluster registration request; send the cluster identifier and the URL to the edge cluster to be registered, so that the edge cluster to be registered changes its own identifier based on the cluster identifier, and generate an agent application based on the URL; receive and display the information of the edge cluster to be registered returned by the agent application on the edge cluster to be registered, wherein the agent application collects the information of the edge cluster to be registered and returns it to the central cluster.
[0142] In an optional implementation, the cluster identifier and the URL are sent to the edge cluster to be registered, so that the edge cluster to be registered switches modes, and after switching modes, changes its own identifier based on the cluster identifier, and generates an agent application based on the URL.
[0143] In an optional implementation, the URL is filled into the client page of the edge cluster to be registered, and the URL is stored in response to a storage operation; an executable file generated by storing the URL is obtained, and the executable file is executed by a containerized application on the edge cluster to be registered to generate an agent application.
[0144] In an optional implementation, a cluster identifier list is obtained, wherein the cluster identifier list records the target cluster identifier of the registered edge cluster; a cluster identifier that is inconsistent with the target cluster identifier is randomly generated in response to the cluster registration request; and a URL required for registration of the edge cluster to be registered is generated in response to the cluster registration request.
[0145] In an optional implementation, determine whether the information of the edge cluster to be registered exists locally in the central cluster; if the information of the edge cluster to be registered does not exist, send the cluster identifier and the URL to the edge cluster to be registered; if the information of the edge cluster to be registered exists, indicate that the edge cluster to be registered has been registered; or, obtain a URL list, wherein the URL list records historical URLs required for registration of registered edge clusters; determine whether the URL matches the historical URL; if the URL does not match the historical URL, send the cluster identifier and the URL to the edge cluster to be registered; if the URL matches the historical URL, indicate that the edge cluster to be registered has been registered.
[0146] In an optional implementation, a key agreed upon by the central cluster and the edge cluster to be registered is obtained, where the key is generated based on information of registered edge clusters in the central cluster; the cluster identifier and the URL are encrypted using the key, and the encrypted cluster identifier and the URL are sent to the edge cluster to be registered, so that the edge cluster to be registered decrypts the encrypted cluster identifier and the URL using the key to obtain the cluster identifier and the URL.
[0147] In an optional implementation, a cluster deregistration request for the edge cluster to be deregistered, triggered by a user at the central cluster client, is obtained, and the cluster deregistration request is sent to the edge cluster to be deregistered, so that the edge cluster to be deregistered deletes the agent application in response to the cluster deregistration request, and deletes the information of the edge cluster to be deregistered in the central cluster.
[0148] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0149] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0150] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A cluster management method, It is characterized in that The cluster is divided into an edge cluster and a central cluster, and the method is applied to the central cluster, comprising: Acquire a cluster registration request for the edge cluster to be registered triggered by the user at the central cluster client, and generate a cluster identifier and a URL required for registration of the edge cluster to be registered in response to the cluster registration request; Sending the cluster identifier and the URL to the edge cluster to be registered, so that the edge cluster to be registered changes its own identifier based on the cluster identifier, and generates an agent application based on the URL; The sending the cluster identifier and the URL to the edge cluster to be registered includes: Acquire a key agreed upon by the central cluster and the edge cluster to be registered, where the key is generated based on information of the edge cluster registered in the central cluster; Encrypting the cluster identifier and the URL by using the key, and sending the encrypted cluster identifier and the URL to the edge cluster to be registered, so that the edge cluster to be registered decrypts the encrypted cluster identifier and the URL by using the key to obtain the cluster identifier and the URL; Receive and display the information of the edge cluster to be registered returned by the agent application on the edge cluster to be registered, wherein the agent application collects the information of the edge cluster to be registered and returns it to the central cluster.
2. The method according to claim 1, It is characterized in that The step of sending the cluster identifier and the URL to the edge cluster to be registered, so that the edge cluster to be registered changes its own identifier based on the cluster identifier, and generates an agent application based on the URL, includes: The cluster identifier and the URL are sent to the edge cluster to be registered, so that the edge cluster to be registered switches the mode, and after switching the mode, changes its own identifier based on the cluster identifier, and generates an agent application based on the URL.
3. The method according to claim 1 or 2, It is characterized in that The generating the agent application based on the URL includes: Filling the URL into the client page of the edge cluster to be registered, and storing the URL in response to a storage operation; An executable file generated by storing the URL is obtained, and an agent application is generated by executing the executable file through a containerized application on the edge cluster to be registered.
4. The method according to claim 1, It is characterized in that The generating a cluster identifier and a URL required for registering the edge cluster to be registered in response to the cluster registration request includes: Obtain a cluster identifier list, wherein the cluster identifier list records the target cluster identifiers of the registered edge clusters; In response to the cluster registration request, randomly generating a cluster identifier that is inconsistent with the target cluster identifier; A URL required for registering the edge cluster to be registered is generated in response to the cluster registration request.
5. The method according to claim 1, It is characterized in that The sending the cluster identifier and the URL to the edge cluster to be registered includes: Determine whether the information of the edge cluster to be registered exists locally in the central cluster; If the information of the edge cluster to be registered does not exist, sending the cluster identifier and the URL to the edge cluster to be registered; If there is information about the edge cluster to be registered, it is prompted that the edge cluster to be registered has been registered; or, Obtain a URL list, wherein the URL list records historical URLs required for registration of a registered edge cluster; Determine whether the URL matches the historical URL; If the URL does not match the historical URL, sending the cluster identifier and the URL to the edge cluster to be registered; If the URL matches the historical URL, it is prompted that the edge cluster to be registered has been registered.
6. The method according to claim 1, It is characterized in that The method further comprises: A cluster deregistration request for the edge cluster to be deregistered is obtained, which is triggered by a user at the central cluster client, and the cluster deregistration request is sent to the edge cluster to be deregistered, so that the edge cluster to be deregistered deletes the agent application in response to the cluster deregistration request, and deletes information of the edge cluster to be deregistered at the central cluster.
7. A cluster management system, It is characterized in that The system includes a central cluster and at least one edge cluster: The central cluster is used to obtain a cluster registration request for the edge cluster to be registered triggered by a user at the central cluster client, and generate a cluster identifier and a URL required for registration of the edge cluster to be registered in response to the cluster registration request; The central cluster is further used to send the cluster identifier and the URL to the edge cluster to be registered; The edge cluster is used to enable the edge cluster to change its own identity based on the cluster identity, and to generate an agent application based on the URL; The central cluster is further used to obtain a key agreed upon by the central cluster and the edge cluster to be registered, where the key is generated based on information of the edge cluster registered in the central cluster; Encrypting the cluster identifier and the URL by using the key, and sending the encrypted cluster identifier and the URL to the edge cluster to be registered; The edge cluster is further configured to enable the edge cluster to be registered to decrypt the encrypted cluster identifier and the URL using the key to obtain the cluster identifier and the URL; The central cluster is further configured to receive and display information of the edge cluster to be registered returned by the agent application on the edge cluster to be registered, wherein the agent application collects the information of the edge cluster to be registered and returns it to the central cluster.
8. A computer device, It is characterized in that include: A processor and a memory, wherein the processor is used to execute a cluster registration program stored in the memory to implement the cluster management method according to any one of claims 1 to 6.
9. A storage medium, It is characterized in that The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the cluster management method according to any one of claims 1 to 6.