A task deployment method and device, electronic device and storage medium
Through containerized deployment technology, nodes with idle resources are selected to deploy computing tasks, which solves the problem of low cluster resource usage and achieves efficient resource utilization and cost reduction.
Patent Information
- Application Number
- CN202111165100.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-09-30
AI Technical Summary
In the existing technology, cluster host resource utilization for offline business expansion is low, resulting in high usage costs and a lack of effective solutions.
By obtaining the computing tasks to be deployed, determine the target computing tasks that meet the requirements of containerized deployment, and select nodes with idle computing resources in the target container cluster for deployment to achieve containerized deployment, avoid occupying physical computing resources, and make full use of container cluster resources. , to achieve adaptive expansion according to computing tasks.
It improves resource utilization, reduces usage costs, realizes flexible and efficient allocation of computing resources, and replenishes computing power in a timely manner.
Smart Images

Figure CN113835865B
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a task deployment method and device, an electronic device, and a storage medium. Background Art
[0002] Big data clusters primarily consist of two parts: data and computing. This involves using the computing power of big data components to compute data stored in the cluster. This computing power is provided by the big data components deployed within the cluster, specifically through resource scheduling (YARN is the mainstream scheduling component). Traditional Hadoop ecosystems use YARN to manage and schedule computing resources, which typically has a distinct resource usage cycle. Real-time computing cluster resources are primarily consumed during the day, while data reporting services are deployed in offline computing clusters. The primary issue with deploying these services separately from online services is low resource utilization and high costs.
[0003] The main way to solve this problem in related technologies is to increase the cloud host in the cluster, that is, to expand the capacity, so as to increase the cloud host deployment components to provide computing services for offline businesses.
[0004] However, the related technology uses expansion to provide computing services for offline businesses, which brings the following problems: because the resources of the cluster host expanded for offline business are only used for part of the time by offline business and are idle most of the time, the resource utilization rate of the expansion nodes corresponding to these expanded hosts is low, resulting in high usage costs.
[0005] Currently, no effective solution has been provided for the technical problem of low resource utilization of expansion nodes existing in related technologies. Summary of the Invention
[0006] In order to solve the technical problem of low resource utilization of the above-mentioned expansion nodes, the present application provides a task deployment method and device, an electronic device and a storage medium.
[0007] In a first aspect, an embodiment of the present application provides a task deployment method, comprising:
[0008] Get all computing tasks to be deployed;
[0009] Determine, among all the computing tasks to be deployed, a target computing task that meets the containerized deployment requirements;
[0010] Determining a target node for deploying the target computing task in the target container cluster, wherein the target node has idle remaining computing resources;
[0011] Deploy the target computing task to the target container instance of the target node.
[0012] Optionally, as in the aforementioned method, determining a target computing task that meets the containerized deployment requirements among all the computing tasks to be deployed includes:
[0013] Determining the priority of each of the computing tasks to be deployed;
[0014] Determining, according to the priorities, low-priority computing tasks from among all the computing tasks to be deployed and high-priority computing tasks other than the low-priority computing tasks from among all the computing tasks to be deployed, wherein the priorities of the low-priority computing tasks are lower than the priorities of the high-priority computing tasks, and the priorities are used to indicate an order in which the computing tasks to be deployed are deployed through physical computing resources;
[0015] The target computing task is determined among all the low-priority computing tasks.
[0016] Optionally, as in the aforementioned method, after determining the target computing task and high-priority computing tasks other than the target computing task among all computing tasks to be deployed according to the priority, the method further includes:
[0017] The high-priority computing task is deployed to a target device that provides physical computing resources, wherein the target device includes: a cloud host and a cloud physical machine.
[0018] Optionally, as in the aforementioned method, determining a target node for deploying the target computing task in the target container cluster includes:
[0019] Obtain all candidate nodes in the target container cluster;
[0020] Determining the remaining resource amount of the remaining computing resources in each of the candidate nodes;
[0021] According to the remaining resource amount of the remaining computing resources, the target node with the largest remaining computing resource is selected from all the candidate nodes.
[0022] Optionally, as in the aforementioned method, before determining the target computing task for containerized deployment among all the computing tasks to be deployed, the method further includes:
[0023] Obtain target information of a target type in the current situation, wherein the target type includes at least one of the following: the load of all computing tasks to be deployed, at the current time point;
[0024] When the target information satisfies a preset condition, a jump operation is performed to jump to the step of determining a target computing task for containerized deployment among all the computing tasks to be deployed.
[0025] Optionally, as in the aforementioned method, before deploying the target computing task to the target container instance of the target node, the method further includes:
[0026] According to the target computing resource amount of the target computing task, creating target resources of the target computing resource amount in the target node;
[0027] Integrating a target service into a target image, wherein the target service is used to obtain the target computing task;
[0028] The target container instance is created in the target resource through the target image.
[0029] Optionally, as in the aforementioned method, deploying the target computing task to the target container instance of the target node includes:
[0030] Requesting a target scheduling component to obtain the target computing task through the target service, wherein the target scheduling component is used to create a target resource corresponding to the target computing task in the target node;
[0031] Deploy the target computing task to the target container instance of the target node.
[0032] In a second aspect, an embodiment of the present application provides a task deployment device, including:
[0033] The acquisition module is used to obtain all computing tasks to be deployed;
[0034] A first determination module is configured to determine a target computing task that meets the containerized deployment requirements among all the computing tasks to be deployed;
[0035] A second determining module is configured to determine a target node for deploying the target computing task in the target container cluster, wherein the target node has idle remaining computing resources;
[0036] A deployment module is used to deploy the target computing task to the target container instance of the target node.
[0037] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0038] The memory is used to store computer programs;
[0039] The processor is configured to implement any of the aforementioned methods when executing the computer program.
[0040] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the storage medium includes a stored program, wherein the program executes the method as described in any of the preceding items when running.
[0041] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0042] The method provided in the embodiment of the present application performs containerized deployment on the target computing task in the computing task to be deployed, thereby eliminating the need for the target computing task to occupy physical computing resources. By implementing capacity expansion for the target computing task, idle resources for deploying the target computing task are obtained, thereby making full use of the computing resources of the target container cluster, achieving the purpose of adaptive capacity expansion according to the computing task, and replenishing computing power in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0045] Figure 1 A flowchart of a task deployment method provided in an embodiment of the present application;
[0046] Figure 2 A flowchart of a task deployment method provided in another embodiment of the present application;
[0047] Figure 3 A flowchart of a task deployment method provided in another embodiment of the present application;
[0048] Figure 4 A schematic diagram of a system architecture that can implement a task deployment method provided in an embodiment of the present application;
[0049] Figure 5 A schematic diagram of a deployment result in an embodiment of the present application;
[0050] Figure 6 A block diagram of a task deployment device provided in an embodiment of the present application;
[0051] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0053] With the development of big data and AI technologies, various industries are increasingly aware of the value of big data technologies for their products and services. Big data applications and platforms have become core technologies for IT and internet companies. Many cloud companies have launched big data platforms built on the IaaS layer of cloud services to provide functions for collecting, storing, processing, and displaying massive amounts of data. This allows companies to focus on their business, improve work efficiency, and reduce the cost and cycle of enterprise development.
[0054] According to one aspect of an embodiment of the present application, a task deployment method is provided. Optionally, in this embodiment, the task deployment method can be applied to a hardware environment consisting of a terminal and a server. The server is connected to the terminal via a network and can be used to provide services (such as cloud computing services, etc.) to the terminal or a client installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for the server.
[0055] The aforementioned network may include, but is not limited to, at least one of the following: a wired network and a wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, or a local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: WiFi (Wireless Fidelity) and Bluetooth. The terminal may be, but is not limited to, a PC, a mobile phone, a tablet computer, or the like.
[0056] The task deployment method of the embodiment of the present application can be executed by a server, a terminal, or both. The task deployment method of the embodiment of the present application can be executed by a terminal or a client installed thereon.
[0057] Taking the task deployment method in this embodiment executed by the server as an example, Figure 1 A task deployment method provided in an embodiment of the present application includes the following steps:
[0058] Step S101: Obtain all computing tasks to be deployed.
[0059] The task deployment method in this embodiment can be applied to scenarios where computing tasks need to be deployed, such as deploying offline computing tasks to cloud servers, deploying computing tasks to big data clusters, etc., or deploying other computing tasks to other servers. In this embodiment of the application, the above-mentioned task deployment method is illustrated using the deployment of offline computing tasks to cloud servers as an example. For other types of media resources, the above-mentioned task deployment detection method is also applicable when there is no conflict.
[0060] Taking the deployment of offline computing tasks to cloud servers as an example, by containerizing the target computing tasks in the offline computing tasks to be deployed, all computing tasks to be deployed can be processed without adding cloud hosts.
[0061] The computing tasks to be deployed can be computing tasks to be deployed uploaded to the cloud server by the demand direction, for example, offline computing tasks such as data report-type businesses that do not require real-time computing.
[0062] Step S102: Determine a target computing task that meets the containerized deployment requirements among all computing tasks to be deployed.
[0063] After all the computing tasks to be deployed are determined, the deployment method for each of the computing tasks to be deployed can be determined.
[0064] Each computing task to be deployed can be deployed using physical resources or container resources. Therefore, among all the computing tasks to be deployed, the target computing tasks that meet the containerized deployment requirements can be determined.
[0065] The target computing task that meets the containerized deployment requirements may be a to-be-deployed computing task that is selected for deployment through container resources.
[0066] For example, under normal circumstances, offline tasks (i.e., computing tasks to be deployed) are generally executed at night, and the container cluster business is idle at night. Therefore, the target computing tasks that can be deployed through containerization in the offline tasks are determined, so that the target computing tasks can be processed through the container cluster business, thereby reducing the number of computing devices in the cluster used only to process offline tasks.
[0067] Step S103: determining a target node for deploying the target computing task in the target container cluster, wherein the target node has idle remaining computing resources.
[0068] After the target computing task is determined, the target node to which the target computing task is specifically deployed can be determined in the target container cluster used to deploy the target computing task.
[0069] The target container cluster can include multiple nodes that can be deployed in a containerized manner. Multiple container instances can be created in the Meige node to start the target computing task through one of the container instances.
[0070] Step S104: deploy the target computing task to the target container instance of the target node.
[0071] After determining the target node to which the target computing task needs to be deployed, the target computing task can be deployed to the target container instance of the target node.
[0072] The target container instance may be a Pod created in the target node, and the Pod may be created by Docker.
[0073] By deploying the target computing task to the target container instance of the target node, the target computing task is deployed through the container resources in the target container instance, thereby achieving the purpose of containerized deployment of the target computing task.
[0074] Through the method in this embodiment, the target computing task in the computing task to be deployed is containerized, so that the target computing task does not need to occupy physical computing resources. By expanding the capacity of the target computing task, idle resources for deploying the target computing task are obtained, and the computing resources of the target container cluster can be fully utilized to achieve the purpose of adaptive expansion according to the computing task and timely replenishment of computing power.
[0075] like Figure 2 As shown, as an optional implementation, as in the aforementioned method, step S102 of determining the target computing task that meets the containerized deployment requirements among all computing tasks to be deployed includes the following steps:
[0076] Step S201: Determine the priority of each computing task to be deployed.
[0077] In order to achieve flexible use of computing resources, physical resources are used first to deploy computing tasks to be deployed when there are sufficient physical resources. When physical resources are insufficient to deploy all computing tasks to be deployed, it is necessary to determine whether each computing task to be deployed should be deployed using physical resources or container resources.
[0078] Whether to use physical resources or container resources to deploy each computing task to be deployed can be determined by determining the priority of each computing task to be deployed.
[0079] For each computing task to be deployed, the priority of each computing task to be deployed may be determined based on factors such as the time when the computing task to be deployed is acquired or the level of the business corresponding to the computing task to be deployed.
[0080] Step S202: According to the priority, determine the low-priority computing tasks among all the computing tasks to be deployed and the high-priority computing tasks other than the low-priority computing tasks among all the computing tasks to be deployed, wherein the priority of the low-priority computing tasks is lower than the priority of the high-priority computing tasks, and the priority is used to indicate the order in which the computing tasks to be deployed are deployed through physical computing resources.
[0081] After determining the priority of each computing task to be deployed, the order relationship between the computing tasks to be deployed can be determined according to the priority (for example, sorting from high to low priority, or sorting from low to high priority).
[0082] After obtaining the order relationship, low-priority computing tasks and high-priority computing tasks can be determined from all computing tasks to be deployed. In addition, the priority of the low-priority computing tasks is lower than that of the high-priority computing tasks.
[0083] For example, the number of each computing task to be deployed and the number of physical computing resources (for example, cloud host resources) can be determined to further determine the first number of computing tasks to be deployed that can be deployed through physical computing resources, so that each computing task to be deployed with a priority level before the first number can be treated as a high-priority computing task, and the remaining computing tasks to be deployed except the high-priority computing tasks can be treated as low-priority computing tasks, where the low-priority computing tasks can be deployed only through container resources, or can be deployed through a mixture of physical computing resources and container resources.
[0084] Step S203: determine a target computing task from all low-priority computing tasks.
[0085] After determining the low-priority computing tasks, since low-priority computing tasks can be deployed only through container resources or through a mixture of physical computing resources and container resources, it is also necessary to determine the target computing tasks for containerized deployment from the low-priority computing tasks.
[0086] For example, for a cloud computing platform, a resource management module can be set up on the cloud computing platform. The resource management module can be split on the yarn queue (including multiple computing tasks to be deployed), and can be split according to the business to obtain several high-priority queues. The high-priority computing tasks in the high-priority queue only use physical resources and do not use container resources. The low-priority computing tasks in the low-priority queue can be deployed using a mixture of cloud host resources and container resources. Furthermore, container resources can be used to supplement the computing power of non-important tasks.
[0087] As an optional implementation, as in the aforementioned method, after determining the target computing task and the high-priority computing tasks other than the target computing task among all computing tasks to be deployed according to priority in step S202, the method further includes the following steps:
[0088] Step S301: deploying high-priority computing tasks to target devices that provide physical computing resources, wherein the target devices include: cloud hosts and cloud physical machines.
[0089] After determining the high-priority computing tasks, they can be deployed in a different manner from low-priority computing tasks, that is, using target devices with physical computing resources (e.g., cloud hosts, cloud physical machines) to deploy the high-priority computing tasks.
[0090] Furthermore, by adopting the method in this embodiment, when the target computing task is deployed through container resources, there are still physical computing resources allocated to some computing tasks to be deployed. Therefore, by using physical computing resources to process high-priority computing tasks, the processing efficiency of high-priority computing tasks can be effectively improved.
[0091] like Figure 3 As shown, as an optional implementation, as in the aforementioned method, step S103 of determining the target node for deploying the target computing task in the target container cluster includes the following steps:
[0092] Step S401: Acquire all candidate nodes in the target container cluster.
[0093] The target container cluster can be a pre-configured cluster consisting of multiple nodes for containerized deployment and providing container resources. Therefore, all candidate nodes in the target container cluster can be determined.
[0094] The candidate node can be a node in the target container cluster that can be deployed in a container.
[0095] Step S402: Determine the remaining resource amount of the remaining computing resources in each candidate node.
[0096] After all candidate nodes are determined, the remaining computing resources in each candidate node can be determined.
[0097] The remaining computing resources may be the remaining computing resources in the candidate nodes that are not used to create containers.
[0098] After obtaining the remaining computing resources, the remaining resource amount corresponding to each candidate node can be statistically obtained. The remaining resource amount is used to indicate the amount of remaining computing resources in the candidate node.
[0099] Step S403 : selecting a target node with the most remaining computing resources from among all candidate nodes according to the remaining amount of the remaining computing resources.
[0100] After determining the remaining resources of each candidate node, the candidate node with the largest remaining resources can be determined, and then the candidate node with the largest remaining resources, that is, the candidate node with the largest remaining computing resources, is used as the target node.
[0101] For example, the target node can be selected through Yarn-resourcemanager, where Yarn-resourcemanager is the core component of Yarn's scheduler. After determining that container resources need to be used to deploy the target computing task, Yarn-resourcemanager obtains the specifications and quantity of idle computing power available in the current target container cluster, and calls the Kubernetes API to create a number of container resources corresponding to the resources required for the target computing task (for example, CPU resources, memory resources, etc.). The ex-scheduler extended scheduler ensures that the Pod is created on a node with more remaining resources. The Pod is responsible for starting the Yarn service.
[0102] As an optional implementation, as in the aforementioned method, before determining the target computing task for containerized deployment among all computing tasks to be deployed in step S102, the method further includes the following steps:
[0103] Step S501: Obtain target information of a target type in the current situation, wherein the target type includes at least one of the following: the load of all computing tasks to be deployed, and the current time point.
[0104] When the computing tasks to be deployed are offline tasks, a trigger condition is required to determine whether at least one of the computing tasks to be deployed needs to be containerized.
[0105] The trigger condition may be triggered according to the load of all computing tasks to be deployed or according to time, that is, by obtaining target information of the target type in the current situation.
[0106] In the current case, it can be the current time or all the computing tasks to be deployed.
[0107] The target type can be the load of all computing tasks to be deployed at the current time point.
[0108] For example, when the target type is the load of all computing tasks to be deployed, it is determined whether the computing tasks to be deployed need to be containerized based on the load of all computing tasks to be deployed; when the target type is the current time point, it is determined whether the computing tasks to be deployed need to be containerized based on the current time.
[0109] Step S502 : When the target information satisfies a preset condition, a jump operation is performed to jump to a step of determining a target computing task for containerized deployment among all computing tasks to be deployed.
[0110] After the target information is determined, it can be determined whether a target computing task for containerized deployment needs to be determined based on the target information.
[0111] Before determining whether a target computing task for containerized deployment needs to be determined, it is necessary to determine whether the target information meets the preset conditions.
[0112] The preset condition can be information consistent with the target type of the target information. For example, when the target type is the load of all computing tasks to be deployed, the target condition can be a preset value used to indicate the load threshold, such as: a preset value used to indicate the required amount of memory, number of CPUs, and number of GPUs; when the target type is the current time point, the target condition can be a preset value used to indicate the time point, for example, 19:00.
[0113] For example, Figure 4The task deployment architecture shown in the figure is provided for applying the method in the aforementioned embodiment, including an elastic scaling module (yarn-autoscaler, which includes: a cluster management unit, a resource management unit, a task management unit, a cluster load monitoring unit (when the target type is the load of all computing tasks to be deployed, it is used to determine whether the target information meets the target conditions) and a Pod lifecycle management unit (when the target type is to indicate a time point, it is used to determine whether the target information meets the target conditions)). The elastic scaling module can be set to provide two scaling methods: load-based and time-based elastic scaling. For load-based scaling, users can set thresholds (i.e., preset conditions) for different indicators to trigger scaling, such as setting availablevcore, pendingvcore, availablemem, pendingmem in the Yarn queue. Time scaling rules can also be used to specify triggering by rules such as day, week, and month. A big data cluster is a cluster that uses physical computing resources, and a container cluster is a cluster that uses container resources.
[0114] As an optional implementation, as in the aforementioned method, before deploying the target computing task to the target container instance of the target node in step S104, the method further includes the following steps:
[0115] Step S601 : creating target resources of the target computing resource amount in the target node according to the target computing resource amount of the target computing task.
[0116] After determining the target computing task, the target computing resource amount required for the target computing task can be determined based on the business type and data volume of the target computing task. Then, based on the target computing resource amount, target resources of the target computing resource amount are created in the target node.
[0117] Furthermore, when there are N target computing tasks, N target resources may be created on the target node, where each target resource corresponds to one of the target computing tasks.
[0118] Step S602: Integrate the target service into the target image, wherein the target service is used to obtain the target computing task.
[0119] In order to survive the container instance, a corresponding target image is required. By integrating the target service into the target image, it is convenient to deploy the target settlement task to the target container instance later.
[0120] Step S603: Create a target container instance in the target resource through the target image.
[0121] After obtaining the target image, you can run it to create a target container instance using the target resources. This allows subsequent target computing tasks to use the target resources for computing.
[0122] Through the method in this embodiment, by integrating the target service into the target image, it is possible to automatically deploy the target computing task to the target container instance at a later time, thereby improving the efficiency of deployment.
[0123] As an optional implementation, as in the aforementioned method, the step S104 of deploying the target computing task to the target container instance of the target node includes the following steps:
[0124] Step S701: Requesting a target computing task from a target scheduling component through a target service, wherein the target scheduling component is used to create a target resource corresponding to the target computing task in a target node.
[0125] As known from the above embodiments, the target service is integrated into the target image. Therefore, when the target image is run, the target service is also run. Therefore, the target service can request the target computing task from the target scheduling component, where the target scheduling component is used to create the target resources corresponding to the target computing task in the target node.
[0126] Step S702: deploy the target computing task to the target container instance of the target node.
[0127] After obtaining the target computing task, the target computing task can be deployed to the target container instance in a containerized deployment manner, thereby completing the purpose of containerized deployment of the target computing task and achieving the effect of elastic expansion according to the task.
[0128] For example, Figure 5 As shown in the figure, the Yarn-nodemanager service is integrated into the container Pod and created in the image through Docker. In this way, the Yarn-nodemanager will be started when the container Pod is created. The Yarn-nodemanager will automatically register with the Yarn-resoucemanager and obtain the tasks to be executed, so that rapid elastic expansion can be achieved.
[0129] like Figure 6 As shown, according to an embodiment of another aspect of the present application, a task deployment device is further provided, including:
[0130] Acquisition module 1, used to obtain all computing tasks to be deployed;
[0131] A first determination module 2 is used to determine a target computing task that meets the containerized deployment requirements among all computing tasks to be deployed;
[0132] A second determining module 3 is configured to determine a target node for deploying the target computing task in the target container cluster, wherein the target node has idle remaining computing resources;
[0133] The deployment module 4 is used to deploy the target computing task to the target container instance of the target node.
[0134] Specifically, the specific process of each module in the device of the embodiment of the present invention realizing its function can be referred to the relevant description in the method embodiment, which will not be repeated here.
[0135] According to another embodiment of the present application, there is also provided an electronic device, including: Figure 7 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .
[0136] Memory 1503, used for storing computer programs;
[0137] The processor 1501 is configured to implement the steps of the above method embodiment when executing the program stored in the memory 1503 .
[0138] The bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This bus can be divided into address buses, data buses, control buses, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0139] The communication interface is used for communication between the above electronic device and other devices.
[0140] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0141] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0142] An embodiment of the present application further provides a computer-readable storage medium, the storage medium including a stored program, wherein the method steps of the above method embodiment are executed when the program is run.
[0143] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0144] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is intended to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A task deployment method, characterized in that: include: Get all computing tasks to be deployed; Determining a target computing task that meets the containerized deployment requirements among all the computing tasks to be deployed, including: determining the priority of each of the computing tasks to be deployed; according to the priority, determining a low-priority computing task and a high-priority computing task other than the low-priority computing task among all the computing tasks to be deployed, wherein the priority of the low-priority computing task is lower than the priority of the high-priority computing task, and the priority is used to indicate the order in which the computing tasks to be deployed are deployed through physical computing resources; determining the target computing task among all the low-priority computing tasks; Determine a target node for deploying the target computing task in the target container cluster, wherein idle remaining computing resources exist in the target node; The target computing task is deployed to the target container instance of the target node.
2. The method according to claim 1, characterized in that After determining the target computing task and high-priority computing tasks other than the target computing task among all the computing tasks to be deployed according to the priority, the method further includes: The high-priority computing task is deployed to a target device that provides physical computing resources, wherein the target device includes: a cloud host and a cloud physical machine.
3. The method according to claim 1, characterized in that The step of determining a target node in the target container cluster for deploying the target computing task includes: Obtain all candidate nodes in the target container cluster; Determine the remaining resource amount of the remaining computing resources in each of the candidate nodes; According to the remaining resource amount of the remaining computing resources, the target node with the largest remaining computing resources is selected from all the candidate nodes.
4. The method according to claim 1, characterized in that: Before determining a target computing task for containerized deployment among all the computing tasks to be deployed, the method further includes: Obtain target information of the target type in the current situation, wherein the target type includes at least one of the following: the load of all computing tasks to be deployed, at the current time point; In the case where the target information meets a preset condition, a jump operation is performed to jump to the step of determining a target computing task for containerized deployment among all the computing tasks to be deployed.
5. The method according to claim 1, characterized in that Before deploying the target computing task to the target container instance of the target node, the method further includes: According to the target computing resource amount of the target computing task, creating target resources of the target computing resource amount in the target node; Integrating a target service into a target image, wherein the target service is used to obtain the target computing task; The target container instance is created in the target resource through the target image.
6. The method according to claim 5, characterized in that The step of deploying the target computing task to the target container instance of the target node includes: Requesting the target computing task from the target scheduling component through the target service, wherein the target scheduling component is used to create a target resource corresponding to the target computing task in the target node; The target computing task is deployed to the target container instance of the target node.
7. A task deployment device, characterized in that: include: The acquisition module is used to obtain all computing tasks to be deployed; A first determination module is used to determine a target computing task that meets the containerized deployment requirements among all the computing tasks to be deployed, including: determining the priority of each of the computing tasks to be deployed; according to the priority, determining a low-priority computing task and a high-priority computing task other than the low-priority computing task among all the computing tasks to be deployed, wherein the priority of the low-priority computing task is lower than the priority of the high-priority computing task, and the priority is used to indicate the order in which the computing tasks to be deployed are deployed through physical computing resources; determining the target computing task among all the low-priority computing tasks; A second determination module is used to determine a target node for deploying the target computing task in the target container cluster, wherein there are idle remaining computing resources in the target node; A deployment module is used to deploy the target computing task to the target container instance of the target node.
8. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 6 when executed.
