Cloud platform service control method, system, server and storage medium
By deploying clients on the control end of the cloud platform, receiving service deployment information and sending control instructions, the problem of human intervention when restarting the cloud platform service is solved, and the automated control and operation and maintenance costs of cloud platform services are achieved.
Patent Information
- Application Number
- CN202111484512.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-12-07
AI Technical Summary
In the prior art, cloud platform services require human intervention to control the startup sequence of services when restarting, resulting in high operation and maintenance costs and poor applicability.
By deploying clients on the control end of the cloud platform, receiving service deployment information sent by each client, and sending control instructions to the clients of the corresponding nodes according to the priority order of the service, the automated control of cloud platform services is realized.
Automatic control of designated order of cloud platform services can be achieved without human intervention, reducing operation and maintenance complexity and improving applicability.
Smart Images

Figure CN114385328B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of cloud platforms, and in particular to a cloud platform service control method, system, server, and storage medium. Background Art
[0002] With the development of cloud computing, the functions of cloud platforms are becoming more and more numerous, and the dependency relationships between underlying services are becoming closer and closer. Only a stable underlying service can ensure the stability of upper-layer services. During the startup process of a cloud platform, it is necessary to ensure that the services of the cloud platform are started in a certain order. For example, the underlying services of a cloud platform generally consist of three types of services: 1) Computing service: a service that provides computing power and memory virtualization; 2) Network service: a service that provides platform network virtualization and network communication functions; 3) Storage service: a service that provides block storage and file storage services. On this basis, functions such as virtual machines and load balancing are provided. In the cloud platform startup scenario, in order to ensure the normal operation of services, it is necessary to start the storage and network services first before starting the computing service.
[0003] However, currently when a cloud platform is restarted, in order to ensure the sequential startup of various services on the cloud platform, the technical means adopted is to control the startup of cloud platform services through manual intervention. However, the method of manual intervention has poor operability and high requirements for operators; resulting in high operation and maintenance costs and poor applicability for controlling the startup of cloud platform services. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a cloud platform service control method, system, server, and storage medium, so that the cloud platform services can be automatically controlled in a specified order without manual intervention, reducing the operation and maintenance complexity of cloud platform services.
[0005] To solve the above technical problems, an embodiment of the present application provides a cloud platform service control method, which is applied to the control end of a cloud platform, and clients are deployed on each node of the cloud platform. The method includes the following steps:
[0006] Receiving service deployment information sent by each of the clients, where the service deployment information includes information about the services already deployed on the node where the client is located;
[0007] According to the priority order of control of each of the services and the service deployment information, sending control instructions corresponding to each of the services to the clients on the nodes where each of the services is deployed.
[0008] An embodiment of the present application also provides a cloud platform service control system, which is applied to the control end of a cloud platform, and clients are deployed on each node of the cloud platform. The system includes:
[0009] A receiving module, configured to receive service deployment information sent by each of the clients, where the service deployment information includes information about services already deployed on the nodes where the clients are located;
[0010] A control module, configured to send control instructions corresponding to each of the services to the clients on the nodes where each of the services is deployed according to the priority order of control of each of the services and the service deployment information.
[0011] An embodiment of the present application further provides a server, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the above-mentioned cloud platform service control method.
[0012] An embodiment of the present application further provides a computer-readable storage medium, storing a computer program, and when the computer program is executed by a processor, the above-mentioned cloud platform service control method is implemented.
[0013] In an embodiment of the present application, on the control end of a cloud platform where clients are deployed on each node, service deployment information sent by each client is received, where the service deployment information includes information about services already deployed on the nodes where the clients are located; according to the priority order of control of each service and the service deployment information, control instructions corresponding to each service are sent to the clients on the nodes where each service is deployed. This enables the present application to send control instructions to the clients on the nodes where each service is deployed according to the priority of each service, and can automatically control the cloud platform services in a specified order without manual intervention, reducing the operation and maintenance complexity of the cloud platform services; solving the technical problems of high operation and maintenance costs and poor applicability caused by the method of manually intervening to control cloud platform services in the prior art. Description of the Drawings
[0014] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings, and these exemplary illustrations do not limit the embodiments.
[0015] Figure 1 is a flowchart of the cloud platform service control method provided by an embodiment of the present application;
[0016] Figure 2 is a flowchart of the cloud platform service control method provided by an embodiment of the present application;
[0017] Figure 3 is a flowchart of the cloud platform service control method provided by an embodiment of the present application;
[0018] Figure 4It is a schematic structural diagram of the cloud platform service control system provided by an embodiment of the present application;
[0019] Figure 5 It is a schematic structural diagram of the server provided by an embodiment of the present application. Detailed implementation manners
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will elaborate on each embodiment of the present application with reference to the accompanying drawings. However, those of ordinary skill in the art can understand that in each embodiment of the present application, many technical details are provided to help readers better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present application can still be implemented. The following division of each embodiment is for convenience of description and should not constitute any limitation to the specific implementation manner of the present application. Each embodiment can be combined and cross-referenced with each other on the premise of no contradiction.
[0021] An embodiment of the present application relates to a cloud platform service control method, which is applied to the control end of the cloud platform. Clients are deployed on each node of the cloud platform. The control end and the clients are implemented based on a computer program and are deployed on the devices of the cloud platform, such as Figure 1 As shown, it specifically includes the following steps:
[0022] Step 101: Receive the service deployment information sent by each client. The service deployment information includes information about the services already deployed on the node where the client is located.
[0023] In one implementation, when the control end deployed on the cloud platform and the clients deployed on each node of the cloud platform are powered on, the programs are started through the boot self-start script. After each client completes booting, it actively reports the service deployment information to the control end. The service deployment information includes information about the services already deployed on the node where the client is located. In one implementation, the services deployed on the node where the client is located are written into the configuration file of the client by the deployment service during environment deployment. The client can obtain the service information already deployed on the node where it is located by reading the configuration file. The control end obtains the service deployment situation of each client on the node where it is located through the service deployment information sent by each client.
[0024] Step 102: According to the priority order of each service to be controlled and the service deployment information, send control instructions corresponding to each service to the clients on the nodes where each service is deployed.
[0025] In one implementation, the service deployment information may further include the client identifier of the client. For example, the service deployment information sent by client A on node A is client identifier A and the identifier of service A; the service deployment information sent by client B on node B is client identifier B, the identifier of service A, and the identifier of service B; the service deployment information sent by client C on node C is client identifier C and the identifier of service C. According to the service deployment information sent by client A, client B, and client C, the service deployment status of each client on its corresponding node obtained by the control end is shown in Table 1 as follows:
[0026] Table 1 Service Deployment Status of Each Client Obtained by the Control End
[0027] Node Client Service A Service B Service C Node A Client Identifier A Deployed Not Deployed Not Deployed Node B Client Identifier B Deployed Deployed Not Deployed Node C Client Identifier C Not Deployed Not Deployed Deployed
[0028] In one implementation, the control end presets the priority order of control for each service and the control instructions corresponding to each service. The priority order is used to indicate the startup order of services with different priorities. The control instructions corresponding to each service include the startup instructions and service status detection instructions corresponding to each service. As shown in the example of Table 1, service A has a priority of 1, service B has a priority of 2, and service C has a priority of 3. When sending the control instructions corresponding to each service to the clients on the nodes where each service is deployed, first determine the current service to be controlled according to the priority order of the services. Assume that the startup order corresponds to the level of priority, and the service with a higher priority starts first. In this example, the smaller the value, the higher the priority. Based on this, it can be determined that the current service to be controlled is service A. Then, obtain the deployment status of the current service on the nodes where each client is located according to the service deployment information of each client. For example, service A is deployed on node A where client A is located and on node B where client B is located. After that, obtain the control instructions corresponding to the current service and send the control instructions to the clients on the nodes where the current service is deployed. For example, send the control instructions corresponding to service A to client A on node A and client B on node B respectively. If the current service is deployed on the nodes where the clients of multiple nodes are located, when sending control instructions to the clients of multiple nodes, the control instructions can be sent according to the order in which the control end receives the service deployment information, or the control instructions can be sent to the clients of multiple nodes simultaneously. Alternatively, corresponding client priorities can be set for the clients on each node, and the control instructions are sent to the clients on each node in sequence according to the client priorities. This application does not impose any restrictions on the control order of the clients deploying services with the same priority.
[0029] In one implementation, the control instruction of the service is actually a service lifecycle management command, which is used to control functions such as the start, stop, and status query of the service; after sending the control instruction to the client on the node where the current service is deployed, the client will first start the corresponding service within the client according to the control instruction, and after the service starts successfully, it will return to the control end that the service has started. Further, after the service starts, it will continue to monitor the status of the service according to the control instruction. If the service is running normally, it will return to the control end that the service is running normally, otherwise it will return that the service is running abnormally; only after the control end receives that the clients on all nodes where the current service is deployed have returned that the service has started and the service is running normally, will the control end control the service of the next priority level. When all services have started and are running normally, it is determined that the service start control is completed, ensuring that the cloud platform services can be controlled in sequence and realizing the smooth power-on of the cloud platform; if the control end receives that the service has not started or the service is running abnormally returned by the client or does not receive the relevant information returned by the client within the preset time, it will send an alarm message to the user, and the alarm message can carry the identifier of the abnormal client and / or the identifier of the current service.
[0030] In one implementation, the control end presets service control information for controlling cloud platform services. After the control end starts up, it will parse the pre-stored service control information to obtain the priority order of each service and the control instruction of each service.
[0031] In the embodiment of the present application, on the control end of the cloud platform where clients are deployed on each node, service deployment information sent by each client is received, where the service deployment information includes information about the services already deployed on the node where the client is located; according to the priority order of each service being controlled and the service deployment information, control instructions corresponding to each service are sent to the clients on the nodes where each service is deployed. This enables the present application to send control instructions to the clients on the nodes where each service is deployed according to the priority of each service, and can automatically control the cloud platform services in a specified order without human intervention, reducing the operation and maintenance complexity of the cloud platform services; solving the technical problems of high operation and maintenance costs and poor applicability caused by the method of controlling cloud platform services through human intervention in the prior art.
[0032] The embodiment of the present application relates to a method for controlling cloud platform services, which is applied to the control end of the cloud platform. Multiple clients are deployed on each node of the cloud platform, as Figure 2 shown, and specifically includes the following steps:
[0033] Step 201, receive service deployment information sent by each client, where the service deployment information includes information about the services already deployed on the node where the client is located.
[0034] In one implementation, this step is substantially the same as step 101 in the embodiments of the present application, and will not be elaborated here one by one.
[0035] Step 202: According to the priority order of each service to be controlled and the service deployment information, send control instructions corresponding to each service to the clients on the nodes where each service is deployed.
[0036] In one implementation, this step is substantially the same as step 102 in the embodiments of the present application, and will not be elaborated here one by one.
[0037] Step 203: When the control instructions corresponding to each service are all sent, send service status monitoring instructions to each client, where the service status monitoring instructions are used to monitor the service status of each service deployed on the node where the client is located.
[0038] In one implementation, when the control end completes the start control of all services according to the priority order of each service, it can further monitor the status of each service. Specifically, since the startup process takes a certain amount of time, after each service starts and runs normally according to the control instructions, the service status may change due to the influence of network environment, the status of the cloud platform node itself, and external environmental factors. Preferably, in order to ensure that each service can maintain a normal service status after normal startup, after all services are started, service status monitoring instructions can be further sent to the clients on each node to detect whether the service status changes within a certain period of time after startup.
[0039] Step 204: Receive the service status of each service returned by each client, where the service status is service normal or service abnormal.
[0040] In one implementation, after each client receives the service status monitoring instructions, it will detect the status of each service deployed on its own node. After the client receives the service status instructions returned by each service deployed on its own node, it will summarize the service status instructions returned by each service and then send them to the control end in the form of an array. The service status instructions of each service returned by the client are shown in Table 2 (taking client B as an example).
[0041] Table 2 Service status instructions of each service returned by the client
[0042] Client Identifier Service Status Instruction Service Status Instruction Client B Service A Normal Service B Normal
[0043] Step 205: When the status instructions of each service are all service normal, send a control completion instruction to each client.
[0044] In one implementation, when the service status of each service returned by each client is normal service, it indicates that each service can run normally after starting on each node where the client is located. In this way, it means that the service startup is completed, and a control completion instruction needs to be sent to each client to instruct the client to exit and disconnect the connection between the control end and the client.
[0045] Step 206, when the service status of any service is abnormal service or the service status of any service is not received within a preset time, the control of each service is aborted.
[0046] In one implementation, when it is detected that the service status of any service returned by each client is abnormal service, it means that the service fails to run normally after startup. At this time, it is necessary to abort the startup control of each service. After aborting, the service status monitoring instruction can continue to be sent to the client at intervals of the preset time. When the number of times of sending the service status monitoring instruction reaches the preset threshold, if there are still services with abnormal service, exit the startup of each service this time, send an instruction to close each service to the clients on each node, and prompt the user with the information that the service startup fails this time; alternatively, an alarm message can be sent to the user, and the client identifier and the identifier of the abnormal service are carried in the alarm message. If the status instruction of each service returned by the client is not received within the preset time, it means that the client has a fault or the communication with the control end is abnormal. At this time, it is also necessary to abort the startup control of each service. After aborting, the monitoring instruction can also continue to be sent to the client to monitor the status of each service again, or an alarm message can be sent to the user, but only the client identifier is carried in the alarm message. After the user receives the alarm message, the corresponding fault handling operation can be performed.
[0047] The implementation manner of the present application can, on the basis of other embodiments, also detect the status of the services deployed on the nodes where each client is located after the startup of each service with different priorities is completed, to detect whether there are service faults or client faults, so as to remind the user to perform fault handling and ensure the stability of the cloud platform service.
[0048] The embodiment of the present application relates to a cloud platform service control method, which is applied to the control end of the cloud platform. Clients are deployed on each node of the cloud platform, as Figure 3 shown, and specifically includes the following steps:
[0049] Step 301, obtain the distribution information of each node.
[0050] In one implementation, after the cloud platform service control program of the control end is started, it will obtain the node distribution information generated during the deployment of the cloud platform. The distribution information of the nodes characterizes the number of nodes deployed inside the cloud platform and the node locations.
[0051] Step 302: Send service query requests to the clients on each node according to the distribution information.
[0052] In one implementation, the control end can directly send service query requests to the clients on each node according to the number and positions of the nodes deployed within the cloud platform presented by the distribution information. After receiving the service query requests, the clients on each node will obtain the corresponding service deployment information from their own configuration files and return it to the control end.
[0053] In one implementation, after receiving the distribution information of the nodes, the control end can also directly send status query requests to each node according to the number and positions of the nodes deployed within the cloud platform presented by the distribution information. The status query requests are used to detect the status of each node. After receiving the status query requests, each node will return its node status to the control end. When the control end receives the normal node instruction sent by a node, it sends a service query request to the client on the node. When the control end receives the normal node instructions returned by each node, it indicates that each node is in a normal working state and the control of the client services can be performed. At this time, the control end sends service query requests to the clients on each node. When the control end receives an abnormal node instruction sent by any node or does not receive the normal node instruction returned by any node within the preset time or a node is abnormal, it indicates that the node is in an abnormal working state affected by other factors (such as network environment, human factors, etc.) and the control of the client services cannot be performed. At this time, an alarm message needs to be sent to the user to remind the user to perform fault handling on the abnormal node. The node identifier of the abnormal node is carried in the alarm message.
[0054] Step 303: Receive the service deployment information sent by the clients on the nodes, where the service deployment information includes the information of the services deployed on the nodes where the clients are located.
[0055] In one implementation, this step is substantially the same as step 101 in the embodiments of the present application, and will not be elaborated here one by one.
[0056] Step 304: Send control instructions corresponding to each service to the clients on the nodes where each service is deployed according to the priority order of each service being controlled and the service deployment information.
[0057] In one implementation, this step is substantially the same as step 102 in the embodiments of the present application, and will not be elaborated here one by one.
[0058] In the implementation manner of the present application, on the basis of other embodiments, the status of each node within the cloud platform can also be detected, service query requests are only sent to the nodes in a normal working state, and an alarm message will be sent to the user for the nodes in an abnormal working state to remind the user to perform fault handling, ensuring the stability of the cloud platform services.
[0059] The step division of the above various methods is only for clear description. When implemented, they can be combined into one step or some steps can be split into multiple steps. As long as the same logical relationship is included, they are all within the protection scope of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs, but without changing the core design of the algorithm and process, are all within the protection scope of this patent.
[0060] An embodiment of this application relates to a cloud platform service control system, which is characterized in that it is applied to the control end of the cloud platform, and clients are deployed on each node of the cloud platform. The details of the cloud platform service control system of this embodiment will be specifically described below. The following content is only implementation details provided for convenient understanding and is not necessary for implementing this example. Figure 4 It is a schematic diagram of the cloud platform service control system of this embodiment, including: a receiving module 401 and a control module 402.
[0061] Among them, the receiving module 401 is used to receive service deployment information sent by each client. Among them, the service deployment information includes information about the services deployed on the node where the client is located.
[0062] The control module 402 is used to send control instructions corresponding to each service to the clients on the nodes where each service is deployed according to the priority order of each service to be controlled and the service deployment information.
[0063] It is not difficult to find that this embodiment is a system embodiment corresponding to the above method embodiment, and this embodiment can be implemented in cooperation with the above method embodiment. The relevant technical details and technical effects mentioned in the above embodiment are still valid in this embodiment. To avoid repetition, they will not be elaborated here. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the above embodiment.
[0064] An embodiment of this application relates to a server, as Figure 5 shown, including: at least one processor 501; and a memory 502 communicatively connected to the at least one processor 501; wherein, the memory 502 stores instructions executable by the at least one processor 501, and the instructions are executed by the at least one processor 501 so that the at least one processor 501 can execute the cloud platform service control method in each of the above embodiments.
[0065] Among them, the memory and the processor are connected in a bus manner. The bus can include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and the memory together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art, and thus will not be further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single component or multiple components, such as multiple receivers and transmitters, and provides a unit for communicating with various other devices over a transmission medium. The data processed by the processor is transmitted over a wireless medium via an antenna. Further, the antenna also receives data and transmits the data to the processor.
[0066] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. The memory can be used to store data used by the processor when executing operations.
[0067] Embodiments of the present application relate to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method embodiments described above are implemented.
[0068] That is, those skilled in the art can understand that all or part of the steps in implementing the above method embodiments can be completed by a program instructing relevant hardware. The program is stored in a storage medium, including several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM for short), random access memories (RAM for short), magnetic disks, or optical discs, etc., which are various media that can store program codes.
[0069] Those of ordinary skill in the art can understand that the above various embodiments are specific embodiments for implementing the present application, and in practical applications, various changes can be made in form and details without departing from the spirit and scope of the present application.
Claims
1. A cloud platform service control method, characterized in that, it is applied to the control end of the cloud platform, and clients are deployed on each node of the cloud platform. The method includes: Receiving service deployment information sent by each of the clients, where the service deployment information includes information about the services already deployed on the node where the client is located and information about the node where the client is located; According to the priority order of control of each service and the service deployment information, sending control instructions corresponding to each service to the clients on the nodes where each service is deployed, specifically including: Determining all the to-be-started services already deployed on each node according to each service deployment information; Determining the start order of all the to-be-started services according to the priority order corresponding to each to-be-started service, and successively determining the current service to be controlled therefrom according to the start order; Determining the node where the current service is deployed according to the service information and node information in each service deployment information; Sending control instructions corresponding to the current service to the clients on each node.
2. The cloud platform service control method according to claim 1, characterized in that, after sending the control instructions corresponding to the current service to the clients on each node, it further includes: When receiving information that the service has been started and the service is running normally returned by the clients on all the nodes where the current service is deployed, re-determining the current service to be controlled according to the start order.
3. The cloud platform service control method according to claim 1, characterized in that, after sending the control instructions corresponding to each service to the clients on the nodes where each service is deployed according to the priority order of control of each service and the service deployment information, it further includes: When all the control instructions corresponding to each service have been sent, sending a service status monitoring instruction to each client, where the service status monitoring instruction is used to monitor the service status of each service deployed on the node where the client is located; Receiving the service status of each service returned by each client, where the service status is service normal or service abnormal; When the service status of each service is service normal, sending a control completion instruction to each client; When the service status of any one service is service abnormal or the service status of any one service is not received within a preset time, aborting the control of each service.
4. The cloud platform service control method according to claim 1, characterized in that, before receiving the service deployment information sent by each client, it further includes: Obtaining the distribution information of each node; Sending a service query request to the clients on each node according to the distribution information, and receiving the service deployment information returned by the clients on each node.
5. The cloud platform service control method according to claim 4, characterized in that, sending the service query request to the clients on each node according to the distribution information specifically includes: Sending a status query request to each node according to the distribution information; When receiving the node normal instructions sent by each of the nodes, send the service query request to the clients on each of the nodes.
6. The cloud platform service control method according to claim 1, wherein, before sending the control instructions corresponding to each of the services to the clients on the nodes where each of the services is deployed according to the priority order in which each of the services is controlled and the service deployment information, further includes: Analyze the preset service control information to obtain the priority order and the control instructions.
7. A cloud platform service control system, wherein, applied to the control end of the cloud platform, clients are deployed on each node of the cloud platform, and the system includes: A receiving module, configured to receive the service deployment information sent by each of the clients, wherein the service deployment information includes information about the services already deployed on the node where the client is located and information about the node where the client is located; A control module, configured to send the control instructions corresponding to each of the services to the clients on the nodes where each of the services is deployed according to the priority order in which each of the services is controlled and the service deployment information, specifically including: Determine all the to-be-started services already deployed on each of the nodes according to each of the service deployment information; Determine the start order of all the to-be-started services according to the priority order corresponding to each of the to-be-started services, and sequentially determine the current service to be controlled therefrom according to the start order; Determine the node on which the current service is deployed according to the service information and node information in each of the service deployment information; Send the control instructions corresponding to the current service to the clients on each of the nodes.
8. A server, wherein, includes: At least one processor; And, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the cloud platform service control method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, wherein, when the computer program is executed by a processor, it implements the cloud platform service control method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Node control method, node control equipment and storage medium
CN110602236A
Micro-service cluster self-starting device and method
CN112769922A