Cluster deployment method, cluster deployment device, equipment and storage medium
By deploying some components in the cluster of fintech enterprises in a bare metal environment, some components are deployed on the container orchestration platform, and using timed task objects for state management, the problems of low resource utilization and resource demand differences in the bare metal environment are solved, and the problem of low resource utilization and difference in resource demand in a bare metal environment is improved The system's resource utilization and management efficiency enhance the scalability of the cluster and task scheduling capabilities.
Patent Information
- Application Number
- CN202411194362.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-13
AI Technical Summary
When financial technology companies deploy clusters in bare metal environments, resource utilization decreases due to inconsistent hardware configuration and fixed resource allocation restrictions, and different resource requirements affect system performance and task completion.
By obtaining cluster information, some components are deployed in a bare-metal environment, some components are deployed in a container orchestration platform, and the timed task objects of the container orchestration platform are used for state management, optimizing resource allocation and task scheduling.
It improves resource utilization and management efficiency, enhances the scalability, reliability and task scheduling capabilities of the cluster, avoids resource waste, and ensures that the system operates in the best state.
Smart Images

Figure CN119127223A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud technology, is applicable to the financial field, and in particular to a cluster deployment method, a cluster deployment device, a computer device, and a computer-readable storage medium. Background Art
[0002] At present, the cluster deployment solution adopted by financial technology companies is usually to deploy the cluster in a bare metal environment. Due to the port limitation in the bare metal environment, usually only one cluster component can be deployed on each physical machine. However, since the hardware configuration on each physical machine is not completely consistent, and the resource allocation of each physical machine is fixed. Therefore, in order to ensure that all physical machines can operate normally, the minimum resource configuration needs to be followed when unifying the configuration file, which leads to a decrease in the resource utilization of the cluster.
[0003] In addition, the differences in resource requirements of the cluster at different time periods make cluster resource management more complicated. During business peak periods, resource requirements are high, while resource utilization is low during off-peak periods. This situation means that even if you try to deploy other online business components during off-peak periods, there may be resource contention between offline applications and online applications due to insufficient resource isolation, which in turn affects system performance and task completion. Summary of the invention
[0004] The present application provides a cluster deployment method, a cluster deployment device, a computer device and a computer-readable storage medium, which are intended to deploy target components in a cluster in a mixed manner in a bare metal environment and a container orchestration platform, and to manage the status of the deployed target components to improve the resource utilization of the cluster.
[0005] To achieve the above objectives, the present application also provides a cluster deployment method, including:
[0006] Acquire cluster information, wherein the cluster information includes at least a number of target components, and the target components are used to manage nodes on the cluster;
[0007] Deploy a preset number of target components in a bare metal environment, and deploy the remaining target components in a container orchestration platform to obtain deployed target components;
[0008] The scheduled task object in the container orchestration platform is used to manage the state of the deployed target component to obtain the state-managed target component, and the state-managed target component is controlled to execute the corresponding task.
[0009] To achieve the above object, the present application also provides a cluster deployment device, the cluster deployment device comprising:
[0010] An acquisition module, the acquisition module is used to acquire cluster information, wherein the cluster information includes at least a number of target components, and the target components are used to manage nodes on the cluster;
[0011] A deployment module, the deployment module is used to deploy a preset number of target components in a bare metal environment, and deploy the remaining target components in a container orchestration platform to obtain deployed target components;
[0012] A state management module is used to use the scheduled task object in the container orchestration platform to perform state management on the deployed target component, obtain the state-managed target component, and control the state-managed target component to execute corresponding tasks.
[0013] In addition, to achieve the above-mentioned purpose, the present application also provides a computer device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the steps of the cluster deployment method provided in any one of the embodiments of the present application when executing the computer program.
[0014] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the steps of the cluster deployment method described in any one of the embodiments of the present application.
[0015] The cluster deployment method, cluster deployment device, computer equipment and computer-readable storage medium disclosed in the embodiment of the present application. First, cluster information is obtained, wherein the cluster information includes at least a number of target components, and the target components are used to manage the nodes on the cluster. Further, a preset number of target components can be deployed in a bare metal environment, and the remaining target components can be deployed in a container orchestration platform to obtain the deployed target components. Thus, the scheduled task object in the container orchestration platform can be used to manage the state of the deployed target components, obtain the state-managed target components, and control the state-managed target components to perform corresponding tasks. By deploying some target components in a bare metal environment, the present application ensures that these key components can directly use physical hardware resources and reduce the performance overhead caused by virtualization. At the same time, the remaining target components are deployed in the container orchestration platform, which can flexibly allocate and adjust resources, thereby optimizing resource utilization, especially when dealing with dynamic loads and scalability requirements. More efficient. Further, by performing state management on the deployed target components, the task execution of the components can be more accurately controlled. For example, tasks are scheduled according to actual resource utilization or a specific time period to ensure that the system runs in the best state. This avoids resource waste and improves the efficiency and overall performance of task execution. Therefore, the above method not only improves the resource utilization and management efficiency of the system, but also enhances the scalability, reliability and task scheduling capabilities of the cluster. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 It is a scenario diagram of a cluster deployment method provided in an embodiment of the present application;
[0018] Figure 2 It is a scenario diagram of another cluster deployment method provided in an embodiment of the present application;
[0019] Figure 3 It is a flow chart of a cluster deployment method provided in an embodiment of the present application;
[0020] Figure 4 is a schematic block diagram of a cluster deployment device provided in an embodiment of the present application;
[0021] Figure 5 It is a schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0023] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor do they have to be executed in the order described. For example, some operations / steps can also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions. In addition, although the functional modules are divided in the device schematic, in some cases, the module division can be different from that in the device schematic.
[0024] The term "and / or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0025] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0026] like Figure 1 As shown, the cluster deployment method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. The application environment includes a terminal device 110 and a server 120, wherein the terminal device 110 can communicate with the server 120 through a network. Specifically, the server 120 can obtain cluster information, wherein the cluster information at least includes several target components, and the target components are used to manage the nodes on the cluster. And a preset number of target components are deployed in a bare metal environment, and the remaining target components are deployed in a container orchestration platform to obtain the deployed target components. Thus, the timed task objects in the container orchestration platform can be used to manage the state of the deployed target components, obtain the state-managed target components, and control the state-managed target components to perform corresponding tasks, thereby sending the execution results to the terminal device 110. Among them, the server 120 can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The terminal device 110 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, and this application does not limit this.
[0027] Please continue reading Figure 2 as well as Figure 3 , Figure 2 It is a scenario diagram of another cluster deployment method provided in an embodiment of the present application; Figure 3 Schematic diagram of a cluster deployment method provided in an embodiment of the present application. Figure 3 As shown, the cluster deployment method can be implemented through steps S11 to S13.
[0028] Step S11: Obtain cluster information.
[0029] The cluster information includes at least several target components, and the target components are used to manage the nodes on the cluster.
[0030] For example, cluster information is used to represent various types of data and status information related to the entire cluster. A cluster is usually composed of multiple nodes (servers or computers) that work together to process computing tasks. In addition, cluster information includes at least multiple target components. For example, in YARN cluster information, target components may include NodeManager, ResourceManager, etc., which are responsible for managing and coordinating resource allocation and task scheduling in the cluster.
[0031] For example, the cluster information may include but is not limited to YARN (Yet Another Resource Negotiator) cluster information; the target component may include but is not limited to the NodeManager component.
[0032] It should be noted that NodeManager (NM) is a key component in the YARN architecture, responsible for managing resources and task execution on each node in the cluster. YARN is part of the Hadoop ecosystem and is used for distributed resource management and scheduling.
[0033] The above implementation methods can fully grasp the current status of the cluster by acquiring cluster information, and make decisions on resource scheduling and task allocation based on the information, thereby ensuring efficient use of cluster resources and smooth execution of jobs.
[0034] Step S12: deploy a preset number of target components in a bare metal environment, and deploy the remaining target components in a container orchestration platform to obtain deployed target components.
[0035] The bare metal environment refers to applications and services that run directly on physical servers, rather than through virtualization or containerization. Because the deployment of a bare metal environment can maximize the use of hardware resources and reduce the overhead of the middle layer, it is usually used for target components that have strict resource requirements, such as tasks that require high-performance computing or applications that are extremely sensitive to latency. In addition, a container orchestration platform is a system that can automatically deploy, manage, and scale containerized applications.
[0036] For example, the container orchestration platform may include a K8S cluster, which enables users to efficiently manage the life cycle of containers, expand the number of container instances, handle load balancing, and manage the availability and elasticity of applications.
[0037] For example, if the number of target components is 1000, the preset number may include 700, 800, 900, etc., which is not limited in this application.
[0038] Optionally, deploying the remaining target components in the container orchestration platform includes: deploying the remaining target components in the container orchestration platform in the form of the smallest deployable unit in the container orchestration platform.
[0039] For example, the minimum deployable unit may include a K8S Pod, for example. A K8S Pod is the smallest deployable unit in a K8S cluster and may contain one or more containers that share the same network namespace and storage volume. The containers in a K8S Pod are usually tightly coupled and work together to complete the same task.
[0040] As the smallest deployable unit, K8S Pod is flexible and scalable. Multiple K8S Pods can be distributed on different nodes, and their lifecycles are automatically managed by the K8S cluster, making application deployment and management simpler and more efficient.
[0041] The above method combines the advantages of bare metal environment and container orchestration platform according to the hybrid deployment strategy, and achieves optimal resource utilization and high availability of applications by reasonably allocating target components to different environments. Deploying some components directly in the bare metal environment can fully utilize the performance of physical hardware; while deploying the remaining components in the container orchestration platform in the form of the smallest deployable unit (such as K8S Pod) provides system flexibility and scalability, enabling the cluster to better cope with dynamic loads and changing needs.
[0042] Step S13: Use the scheduled task object in the container orchestration platform to manage the state of the deployed target component, obtain the state-managed target component, and control the state-managed target component to execute the corresponding task.
[0043] Among them, the scheduled task object refers to the mechanism used to execute certain tasks on a scheduled basis in the container orchestration platform; state management refers to monitoring and controlling the operating status of the target component to ensure that it runs or executes tasks as expected within the specified time, with the aim of maintaining the stability and reliability of the system and adjusting the behavior of the component as needed.
[0044] For example, the scheduled task object may include a CronJob. A CronJob is a resource type that can run a specified job at a specified time or time interval. For example, a CronJob can be set to execute a task once every hour, every day, or every week.
[0045] Optionally, the scheduled task object in the container orchestration platform is used to perform state management on the deployed target component to obtain the state-managed target component, including: obtaining a preset time point for state management of the target component; enabling the scheduled task object within the preset time point, and calling a management tool to perform state management on the deployed target component.
[0046] The preset time point refers to a specific time set by the system, which is used to trigger the scheduled task object to execute state management. For example, the preset time point can be set to 2 a.m. to start the scheduled task object to perform system maintenance or resource adjustment operations at 2 a.m. every day.
[0047] For example, at a preset time point, the system automatically starts a scheduled task object, such as a CronJob, and manages the target component according to the set task plan. For example, the system can regularly check the health status of the component, resource usage, or perform automatic task switching.
[0048] On the basis of the above embodiment, the management tool is called to perform status management on the target component after deployment, including: pre-encapsulating the operation information of the management tool, and calling the encapsulated management work interface to manage the status of the target component after deployment; wherein the operation information at least includes disabling offline task scheduling of the target component after deployment, stopping all tasks of the target component after deployment, starting online tasks of the target component after deployment, reducing the online tasks of the target component after deployment, stopping online tasks of the target component after deployment, and starting offline tasks of the target component after deployment.
[0049] The operation information refers to the instructions or parameters required by the management tool when performing the state management task.
[0050] For example, in order to simplify the calling process of management tools, operation information is usually encapsulated in advance to form a standardized interface. In this way, when calling the management tool, the scheduled task object only needs to call this encapsulated interface without paying attention to the complex underlying operations.
[0051] For example, stopping all tasks of the target component after deployment is used to represent the complete stop of all tasks running in the target component, ensuring that the component can enter an idle or standby state. It can be used during system maintenance, resource reallocation or emergency situations (such as fault handling); starting the online tasks of the target component after deployment is used to represent the start of online tasks when the target component is idle or ready, which is usually processed in real time and may involve operations such as user requests and data stream processing that require immediate response; the online tasks of the target component after scaling down are used to represent the reduction of the number of online tasks of the target component, which can reduce unnecessary resource occupation and improve overall resource utilization; stopping the online tasks of the target component after deployment corresponds to starting the online tasks. This operation is used to stop online tasks within a specific time period, which can be performed after load reduction, resource reallocation or task completion; starting the offline tasks of the target component after deployment is used to start offline tasks when online tasks are completed or the load is low. Usually, no immediate response is required, which may include data backup, log processing, batch computing, etc.
[0052] The above implementation method can automatically and flexibly manage the status of the target component by utilizing the scheduled task object and the interface of the management tool in the container orchestration platform, thereby ensuring the efficient operation of the system and the reasonable allocation of resources.
[0053] The cluster deployment method disclosed in the embodiment of the present application first obtains cluster information, wherein the cluster information includes at least several target components, and the target components are used to manage the nodes on the cluster. Further, a preset number of target components can be deployed in a bare metal environment, and the remaining target components can be deployed in a container orchestration platform to obtain the deployed target components. Thus, the scheduled task object in the container orchestration platform can be used to manage the state of the deployed target components, obtain the state-managed target components, and control the state-managed target components to perform corresponding tasks. By deploying some target components in a bare metal environment, the present application ensures that these key components can directly use physical hardware resources and reduce the performance overhead caused by virtualization. At the same time, the remaining target components are deployed in the container orchestration platform, which can flexibly allocate and adjust resources, thereby optimizing resource utilization, especially when dealing with dynamic loads and scalability requirements. More efficient. Further, by performing state management on the deployed target components, the task execution of the components can be more accurately controlled. For example, tasks are scheduled according to actual resource utilization or a specific time period to ensure that the system runs in the best state. Resource waste is avoided and the efficiency and overall performance of task execution are improved. Therefore, the above method not only improves the resource utilization and management efficiency of the system, but also enhances the scalability, reliability and task scheduling capabilities of the cluster.
[0054] Optionally, the preset time points include the first time point to the sixth time point, the scheduled task object is enabled within the preset time points, and the management tool is called to perform status management on the deployed target component, including: at the first time point, calling the management tool and disabling the offline task scheduling of the deployed target component; at the second time point, calling the management tool and stopping all tasks of the deployed target component; at the third time point, calling the management tool and starting the online tasks of the deployed target component; at the fourth time point, calling the management tool and scaling down the online tasks of the deployed target component; at the fifth time point, calling the management tool and stopping the online tasks of the deployed target component; at the sixth time point, calling the management tool and starting the offline tasks of the deployed target component.
[0055] For example, the first time point is 07:00; the second time point is 07:50; the third time point is 08:00; the fourth time point is 23:00; the fifth time point is 23:50; and the sixth time point is 24:00. That is, at 07:00, the management tool can be called to disable the offline task scheduling of the deployed target component; at 07:50, the management tool can be called to stop all tasks of the deployed target component; at 08:00, the management tool can be called to start the online task of the deployed target component; at 23:00, the management tool can be called to reduce the online task of the deployed target component; at 23:50, the management tool can be called to stop the online task of the deployed target component; at 24:00, the management tool can be called to start the offline task of the deployed target component.
[0056] The above implementation method increases the node utilization rate during the day by scheduling offline tasks to the K8S cluster at night and scheduling online applications to the K8S cluster during the day, thereby reducing the machine cost overall. Moreover, the method based on staggered scheduling during the day and night is simple and controllable.
[0057] Optionally, calling the management tool and reducing the online tasks of the deployed target component includes: calling an interface of the management tool, and setting the resources of the deployed target component to be lower than the current resources to reduce the online tasks of the deployed target component.
[0058] For example, the management tool provides interfaces for controlling and managing target components, which can perform specific operations, such as adjusting the resource allocation of components, starting or stopping tasks, etc. Through the management tool interface, the resource configuration of the target component after deployment can be adjusted to be lower than the current actual resources used. For example, if the current component is allocated 4 CPU cores and 8GB of memory, its resource configuration can be adjusted to 2 CPU cores and 4GB of memory.
[0059] The above methods can reduce the number of online task instances, making some tasks unable to continue running. Therefore, key tasks can be retained first, and low-priority tasks can be stopped or migrated. By scaling down in a planned manner, the system can maintain optimal performance and reasonably allocate resources to other required tasks or components without requiring high resource configuration.
[0060] Optionally, the offline task of the deployed target component is implemented by updating the resource request and resource limit of the deployed target component.
[0061] The resource request is the minimum amount of resources requested by the target component when it runs on the container orchestration platform. It is used to indicate how much resources the target component needs to start and ensure that the task can be executed normally if the resource request is met. The resource limit is the maximum amount of resources that the target component can use. The resource limit parameter stipulates that the component cannot exceed this limit to prevent a single task from occupying too many resources and affecting the overall performance of the system.
[0062] For example, you can adjust the resource request value of the target component after deployment through the management tool interface. For example, before the offline task is started, you can increase the resource request to ensure that the offline task has enough resources to execute. Similarly, you can also update the resource limit value to ensure that even if the resource demand increases, it will not exceed the preset maximum value, preventing the offline task from excessively occupying resources and affecting the execution of other tasks.
[0063] In the above embodiment, by properly configuring resource requests and word restrictions, offline tasks can be successfully completed without affecting other important tasks. This management method can ensure that the system can still effectively schedule and run offline tasks under high load conditions.
[0064] See also Figure 4 , Figure 4 1 is a schematic block diagram of a cluster deployment device provided in an embodiment of the present application. The cluster deployment device can be configured in a server to execute the aforementioned cluster deployment method.
[0065] like Figure 4 As shown, the cluster deployment device 200 includes: an acquisition module 201 , a deployment module 202 and a state management module 203 .
[0066] An acquisition module 201 is used to acquire cluster information, wherein the cluster information includes at least a number of target components, and the target components are used to manage nodes on the cluster;
[0067] A deployment module 202 is used to deploy a preset number of target components in a bare metal environment and to deploy the remaining target components in a container orchestration platform to obtain deployed target components;
[0068] The state management module 203 is used to use the scheduled task object in the container orchestration platform to perform state management on the deployed target component, obtain the state-managed target component, and control the state-managed target component to execute corresponding tasks.
[0069] The deployment module 202 is further configured to deploy the remaining target components in the container orchestration platform in the form of the smallest deployable unit in the container orchestration platform.
[0070] The state management module 203 is also used to obtain a preset time point for state management of the target component; enable the scheduled task object within the preset time point, and call a management tool to perform state management on the deployed target component.
[0071] The status management module 203 is also used to pre-encapsulate the operation information of the management tool, and call the encapsulated management work interface to perform status management on the deployed target component; wherein the operation information at least includes disabling offline task scheduling of the deployed target component, stopping all tasks of the deployed target component, starting online tasks of the deployed target component, shrinking the online tasks of the deployed target component, stopping the online tasks of the deployed target component, and starting offline tasks of the deployed target component.
[0072] The status management module 203 is also used to call the management tool and disable the offline task scheduling of the deployed target component at the first time point; call the management tool and stop all tasks of the deployed target component at the second time point; call the management tool and start the online task of the deployed target component at the third time point; call the management tool and shrink the online task of the deployed target component at the fourth time point; call the management tool and stop the online task of the deployed target component at the fifth time point; and call the management tool and start the offline task of the deployed target component at the sixth time point.
[0073] The state management module 203 is further used to call the interface of the management tool and set the resources of the target component after deployment to be lower than the current resources so as to reduce the online tasks of the target component after deployment.
[0074] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0075] The method and apparatus of the present application can be used in many general or special computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer terminal devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices.
[0076] Exemplarily, the above method and apparatus may be implemented in the form of a computer program. The computer program may be implemented in Figure 5Runs on the computer device shown.
[0077] See also Figure 5 , Figure 5 1 is a schematic diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.
[0078] like Figure 5 As shown, the computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a volatile storage medium, a non-volatile storage medium and an internal memory.
[0079] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any cluster deployment method.
[0080] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0081] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any cluster deployment method.
[0082] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that the structure of the computer device is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0083] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0084] Among them, in some embodiments, the processor is used to obtain cluster information, wherein the cluster information includes at least several target components, and the target components are used to manage the nodes on the cluster; a preset number of target components are deployed in a bare metal environment, and the remaining target components are deployed in a container orchestration platform to obtain deployed target components; the scheduled task objects in the container orchestration platform are used to perform state management on the deployed target components to obtain the state-managed target components, and the state-managed target components are controlled to perform corresponding tasks.
[0085] In some implementations, the processor is further configured to deploy the remaining target components in the container orchestration platform in the form of minimum deployable units in the container orchestration platform.
[0086] In some implementations, the processor is further configured to obtain a preset time point for status management of the target component; enable the scheduled task object within the preset time point, and call a management tool to perform status management on the deployed target component.
[0087] In some embodiments, the processor is also used to pre-encapsulate the operation information of the management tool, and call the encapsulated management work interface to perform status management on the deployed target component; wherein the operation information at least includes disabling offline task scheduling of the deployed target component, stopping all tasks of the deployed target component, starting online tasks of the deployed target component, shrinking the online tasks of the deployed target component, stopping the online tasks of the deployed target component, and starting offline tasks of the deployed target component.
[0088] In some embodiments, the processor is also used to call the management tool and disable offline task scheduling of the deployed target component at the first time point; call the management tool and stop all tasks of the deployed target component at the second time point; call the management tool and start online tasks of the deployed target component at the third time point; call the management tool and scale down the online tasks of the deployed target component at the fourth time point; call the management tool and stop the online tasks of the deployed target component at the fifth time point; and call the management tool and start offline tasks of the deployed target component at the sixth time point.
[0089] In some implementations, the processor is further configured to call an interface of the management tool and set the resources of the target component after deployment to be lower than the current resources so as to reduce the online tasks of the target component after deployment.
[0090] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions, and when the program instructions are executed, any cluster deployment method provided in the embodiment of the present application is implemented.
[0091] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0092] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like.
[0093] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A cluster deployment method, characterized in that: The method comprises: Acquire cluster information, wherein the cluster information includes at least a number of target components, and the target components are used to manage nodes on the cluster; Deploy a preset number of target components in a bare metal environment, and deploy the remaining target components in a container orchestration platform to obtain deployed target components; The scheduled task object in the container orchestration platform is used to manage the state of the deployed target component to obtain the state-managed target component, and the state-managed target component is controlled to execute the corresponding task.
2. The method according to claim 1, characterized in that The remaining target components are deployed in the container orchestration platform, including: The remaining target components are deployed in the container orchestration platform in the form of the smallest deployable unit in the container orchestration platform.
3. The method according to claim 1, characterized in that The using the scheduled task object in the container orchestration platform to perform state management on the deployed target component to obtain the state-managed target component includes: Obtaining a preset time point for state management of the target component; The scheduled task object is enabled within a preset time point, and a management tool is called to perform status management on the deployed target component.
4. The method according to claim 3, characterized in that The calling management tool performs state management on the deployed target component, including: The operation information of the management tool is encapsulated in advance, and the interface of the encapsulated management work is called to perform status management on the deployed target component; wherein the operation information at least includes disabling offline task scheduling of the deployed target component, stopping all tasks of the deployed target component, starting online tasks of the deployed target component, shrinking the online tasks of the deployed target component, stopping the online tasks of the deployed target component, and starting offline tasks of the deployed target component.
5. The method according to claim 3, characterized in that: The preset time points include the first time point to the sixth time point, and enabling the scheduled task object within the preset time points and calling the management tool to perform status management on the deployed target component includes: At the first time point, calling the management tool and disabling offline task scheduling of the deployed target component; At the second time point, calling the management tool and stopping all tasks of the deployed target component; At the third time point, calling the management tool and starting an online task of the deployed target component; At the fourth time point, calling the management tool and scaling down the online task of the deployed target component; At the fifth time point, calling the management tool and stopping the online task of the deployed target component; At the sixth time point, the management tool is called and the offline task of the deployed target component is started.
6. The method according to claim 5, characterized in that The online task of calling the management tool and scaling down the deployed target component includes: The interface of the management tool is called, and the resources of the target component after deployment are set to be lower than the current resources, so as to reduce the online tasks of the target component after deployment.
7. The method according to claim 5, characterized in that: The offline task of the deployed target component is implemented by updating the resource request and the resource limit of the deployed target component.
8. A cluster deployment device, characterized in that: The cluster deployment device comprises: An acquisition module, the acquisition module is used to acquire cluster information, wherein the cluster information includes at least a number of target components, and the target components are used to manage nodes on the cluster; A deployment module, the deployment module is used to deploy a preset number of target components in a bare metal environment, and deploy the remaining target components in a container orchestration platform to obtain deployed target components; A state management module is used to use the scheduled task object in the container orchestration platform to perform state management on the deployed target component, obtain the state-managed target component, and control the state-managed target component to execute corresponding tasks.
9. A computer device, characterized in that: include: A memory and a processor; wherein the memory is connected to the processor and is used to store a program; the processor is used to implement the steps of the cluster deployment method as described in any one of claims 1 to 7 by running the program stored in the memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the steps of the cluster deployment method according to any one of claims 1 to 7.
