Resource scheduling method and device, electronic equipment, chip and storage medium
By obtaining directed acyclic graph and environment configuration information, automatic scheduling of Kubernetes resource objects is realized, which solves the problems of high learning cost, maintenance cost and migration difficulty in cluster operation and maintenance, and improves operation and maintenance efficiency and resource migration convenience.
Patent Information
- Application Number
- CN202311494250.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-09
- Publication Date
- 2024-10-18
AI Technical Summary
The automated operation and maintenance of Kubernetes clusters has problems such as high learning costs, high maintenance costs, high technical thresholds, and difficulty in migration. Especially in cross-cluster operation and maintenance, existing technologies are difficult to effectively manage and migrate resource objects.
Determine the dependencies between multiple resource objects by obtaining a directed acyclic graph, and implement resource object scheduling based on environment configuration information. Use a graphical interface to intuitively maintain the configuration information of Kubernetes resource objects, which reduces the entry-level for cluster resource maintenance personnel. Difficulty to achieve automated operation and maintenance across clusters and rapid migration of resource objects.
It lowers the technical threshold for Kubernetes cluster resource maintenance personnel, improves maintenance efficiency, realizes automated operation and maintenance across clusters and rapid migration of resource objects, and simplifies the resource operation and maintenance process.
Smart Images

Figure CN118796419A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of automated operation and maintenance, and in particular to a resource scheduling method and device, an electronic device, a chip, and a storage medium. Background Art
[0002] Kubernetes can be used for automated cluster operation and maintenance, and can effectively manage the life cycle of containers, including automated deployment, load balancing, self-healing, and expansion tasks, simplifying the management process of applications. There are two main ways to operate and maintain a Kubernetes cluster: one is to form a YAML file according to the Kubernetes specification, and use the kubectl command line tool to maintain the resource objects on the Kubernetes cluster; the other is to form a helm chart package according to the helm technical specification, and use the helm command line tool to maintain the resources on the Kubernetes cluster.
[0003] These two operation and maintenance methods involve many technical specifications, and practitioners need to spend a lot of time to learn them. In addition, when cross-cluster operation and maintenance is required, the two methods have the problem of difficult migration. Summary of the invention
[0004] The present disclosure provides a resource scheduling method and device, an electronic device, a chip and a storage medium to solve the problems in the related art.
[0005] The first aspect of the present disclosure proposes a resource scheduling method, which is executed by a network device, and includes: a process server obtains a directed acyclic graph from a system portal, wherein the directed acyclic graph is the dependency and deployment relationship between multiple resource objects; the process server obtains environmental configuration information of multiple resource objects from the system portal; and a scheduling server schedules multiple resource clusters for multiple resource objects according to the directed acyclic graph and the environmental configuration information.
[0006] In some embodiments of the present disclosure, the process server obtains environmental configuration information of multiple resources from the system portal, including at least one of the following: the process server obtains 0 to N first target environments configured for each resource from the system portal; the process server obtains 0 to N second target environments configured from public parameters from the system portal; the process server obtains a third target environment configured when starting the process corresponding to the directed acyclic graph from the system portal, where N is an integer greater than or equal to 1.
[0007] In some embodiments of the present disclosure, a scheduling server schedules multiple resource clusters for multiple resource objects according to a directed acyclic graph and environment configuration information, including: starting from the starting resource object of the directed acyclic graph, traversing all resource objects of the directed acyclic graph; determining whether at least one of the first target environment, the second target environment, and the third target environment exists, and if so, traversing all target environments; determining whether there is an operating environment adapted to the target environment, and if so, adapting the resource objects and the operating environment; for the adapted resource objects, scheduling resources in multiple resource clusters to run the process corresponding to the directed acyclic graph, the resources including at least one of storage resources, computing resources, and network resources.
[0008] In some embodiments of the present disclosure, adapting resource objects and operating environments includes: an adapter in a scheduling server adapts resource objects and operating environments according to resource parameters, environment versions, and resource versions of the resource objects to obtain adaptation results; based on the adaptation results, a maintenance action is initiated to the operating environment, and the maintenance action includes at least one of creation, update, and deletion.
[0009] In some embodiments of the present disclosure, the method further includes: if the resource object is not acquired, or the first target environment, the second target environment, and the third target environment do not exist, ending the scheduling.
[0010] The second aspect of the embodiment of the present disclosure proposes a resource scheduling method, which is executed by a resource scheduling system, and the method includes: a system portal generates a directed acyclic graph, which is the dependency and deployment relationship between multiple resources; the system portal obtains the environmental configuration information of multiple resources; the process server obtains the directed acyclic graph and the environmental configuration information from the system portal; the scheduling server schedules multiple resource clusters for multiple resource objects according to the directed acyclic graph and the environmental configuration information.
[0011] In some embodiments of the present disclosure, the system portal displays a resource orchestration page, which includes a tool area, a control area, a canvas area, and a configuration area, wherein the tool area includes multiple global function buttons, the control area includes multiple resource controls, the canvas area is used to generate a directed acyclic graph, and the configuration area is used to configure parameters for the resource controls and configure environment configuration information.
[0012] In some embodiments of the present disclosure, the system portal obtains environmental configuration information of multiple resources including: configuring 0 to N target environments for each resource; configuring 0 to N target environments in common parameters; configuring the target environment when starting the process corresponding to the directed acyclic graph, where N is an integer greater than or equal to 1.
[0013] In some embodiments of the present disclosure, a scheduling server schedules multiple resource clusters for multiple resource objects according to a directed acyclic graph and environment configuration information, including: starting from the starting resource object of the directed acyclic graph, traversing all resource objects of the directed acyclic graph; determining whether at least one of the first target environment, the second target environment, and the third target environment exists, and if so, traversing all target environments; determining whether there is an operating environment adapted to the target environment, and if so, adapting the resource objects and the operating environment; for the adapted resource objects, scheduling resources in multiple resource clusters to run the process corresponding to the directed acyclic graph, the resources including at least one of storage resources, computing resources, and network resources.
[0014] In some embodiments of the present disclosure, adapting resource objects and operating environments includes: an adapter in a scheduling server adapts resource objects and operating environments according to resource parameters, environment versions, and resource versions of the resource objects to obtain adaptation results; the scheduling server initiates a maintenance action to the operating environment based on the adaptation results, and the maintenance action includes at least one of creation, update, and deletion.
[0015] In some embodiments of the present disclosure, the method further includes: if the resource object is not acquired, or the first target environment, the second target environment, and the third target environment do not exist, the scheduling server ends the scheduling.
[0016] The third aspect of the present disclosure proposes a network device, which includes: a process server, a scheduling server and multiple resource clusters. The process server is used to obtain a directed acyclic graph from a system portal, and the directed acyclic graph is a dependency and deployment relationship between multiple resource objects; the process server is used to obtain environmental configuration information of multiple resource objects from the system portal; the scheduling server is used to schedule multiple resource clusters for multiple resource objects according to the directed acyclic graph and the environmental configuration information.
[0017] The fourth aspect of the present disclosure proposes a resource scheduling system, which includes: a system portal, a process server, a scheduling server, and multiple resource clusters. The system portal is used to generate a directed acyclic graph, which is a dependency and deployment relationship between multiple resources; the system portal is used to obtain environmental configuration information of multiple resources; the process server is used to obtain the directed acyclic graph and environmental configuration information from the system portal; the scheduling server is used to schedule multiple resource clusters for multiple resource objects according to the directed acyclic graph and environmental configuration information.
[0018] A fifth aspect of the present disclosure provides an electronic device, comprising one or more processors;
[0019] A storage device communicatively connected to the one or more processors, on which one or more programs are stored; when the one or more programs are executed by the one or more processors, the one or more processors implement the methods described in the embodiments of the first and second aspects of the present disclosure.
[0020] The sixth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the methods described in the first and second aspects embodiments of the present disclosure.
[0021] The seventh aspect embodiment of the present disclosure proposes a computer program product, including a computer program, and the computer program executes the method described in the first aspect and the second aspect embodiment of the present disclosure when a processor is used.
[0022] The eighth aspect embodiment of the present disclosure proposes a chip, characterized in that it includes one or more interface circuits and one or more processors; the interface circuit is used to receive signals from the memory of the electronic device and send signals to the processor, the signals include computer instructions stored in the memory, and when the processor executes the computer instructions, the electronic device executes the method described in the first and second aspects embodiments of the present disclosure.
[0023] In summary, the resource scheduling method for product data proposed in the present invention determines the dependencies and deployment relationships between multiple resource objects by obtaining a directed acyclic graph, obtains the environmental configuration information of multiple resources, and determines the resource cluster for resource object scheduling based on the dependency relationship between the environmental configuration information and the resource objects, thereby realizing automated operation and maintenance across multiple Kubernetes clusters. Through the directed acyclic graph, it is possible to maintain the configuration information of Kubernetes resource objects in a more intuitive way, flexibly control the resource operation and maintenance process, reduce the entry difficulty of Kubernetes cluster resource maintenance personnel, and improve the work efficiency of maintenance personnel.
[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0026] Figure 1 A schematic diagram of a resource scheduling method provided in an embodiment of the present disclosure;
[0027] Figure 2 A schematic diagram of a resource scheduling method provided in an embodiment of the present disclosure;
[0028] Figure 3 A schematic diagram of a resource scheduling method provided in an embodiment of the present disclosure;
[0029] Figure 4 A schematic diagram of a resource scheduling method provided in an embodiment of the present disclosure;
[0030] Figure 5 A schematic diagram of a resource scheduling method provided in an embodiment of the present disclosure;
[0031] Figure 6 A schematic diagram of a resource scheduling method provided in an embodiment of the present disclosure;
[0032] Figure 7 An architecture diagram of a cross-cluster automated operation and maintenance system provided by an embodiment of the present disclosure;
[0033] Figure 8 A schematic diagram of a process flow of a cross-cluster automated operation and maintenance method provided by an embodiment of the present disclosure;
[0034] Fig. 9 A schematic diagram of a graphical interface for maintaining resource configuration information provided by an embodiment of the present disclosure;
[0035] Fig.10 A schematic diagram of a process flow of automatic adaptation of a scheduling server provided in an embodiment of the present disclosure;
[0036] Fig.11 A schematic diagram of the structure of a network device provided in an embodiment of the present disclosure;
[0037] Fig.12 A schematic diagram of the structure of a resource scheduling system provided by an embodiment of the present disclosure;
[0038] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;
[0039] Fig.14 A schematic diagram of the chip structure provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0040] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0041] Kubernetes can realize automatic operation and maintenance of clusters. For example, you can directly maintain resource objects in the cluster through the kubectl command line tool. The process is mainly to form a YAML file according to the Kubernetes specification and then use the kubectl command line tool to maintain resource objects on the Kubernetes cluster. However, this method has the following defects:
[0042] The learning cost is high. Kubernetes officially provides more than 70 types of resources. With the evolution of technology, the types of resources are constantly increasing. It takes a lot of time and energy to learn these resource objects in order to form a YAML file that meets product requirements. The maintenance cost is high. Although you can use the Integrated Development Environment (IDE) to write YAML files to help users fix problems in the YAML format, Kubernetes has many types of resources, many fields in each resource, high complexity of dependencies between fields, and diverse field value ranges. These problems cannot be solved with the help of IDE. Technical personnel with professional knowledge need to spend a lot of effort to output product-level documents. The technical threshold is high. Newcomers need to learn YAML specifications, container specifications, Kubernetes concepts, Kubernetes resource objects, Kubernetes client instructions, etc. The functions and operations are quite complex, and only people with professional knowledge can be competent for cluster maintenance. Migration is difficult. In many business scenarios, there will be scenarios where different versions of Kubernetes clusters coexist. However, YAML files formed based on a specific Kubernetes version cannot be smoothly migrated to other specific Kubernetes clusters, and there are high barriers to cross-cluster maintenance.
[0043] Kubernetes can also maintain Kubernetes cluster resources through helm. The process is mainly to form a helm chart package according to the helm technical specifications, and then use the helm command line tool to maintain the resources on the Kubernetes cluster. This solution has the following defects:
[0044] The learning cost is high. In addition to learning Docker and Kubernetes technologies, you also need to learn the technical specifications and command line tools of helm. The maintenance cost is high. The files in the chart package are also in YAML format. In addition to Kubernetes technical issues, you also need to solve the technical knowledge in the helm specification. The technical threshold is high. Newcomers need to learn YAML specifications, container specifications, Kubernetes concepts, Kubernetes resource objects, Kubernetes client instructions, and Helm specifications. The technical threshold is raised again. Migration is difficult. Compared with kubectl, helm still does not solve the problem of cross-cluster maintenance.
[0045] In order to solve the problems existing in the related technology, the present disclosure proposes a resource scheduling method, which determines the dependency relationship between multiple resource objects by obtaining a directed acyclic graph, and obtains the environmental configuration information of multiple resource objects through a graphical configuration interface, thereby maintaining the configuration information of Kubernetes resource objects in a more intuitive way, reducing the entry difficulty for Kubernetes cluster resource maintenance personnel, and scheduling multiple resource clusters for multiple resource objects according to the directed acyclic graph and environmental configuration information, realizing automated maintenance across clusters, achieving the goal of rapid migration of resource objects, and greatly improving user work efficiency.
[0046] For example, the resource scheduling method disclosed in the present invention can use the following architecture to complete the dynamic combination of product data. The architecture can include a system portal, a process server, a scheduling server, multiple Kubernetes clusters, etc. The system portal provides an environment management module and a directed acyclic graph orchestration function; the process server undertakes the operation and maintenance process orchestrated by the directed acyclic graph; the scheduling server is responsible for consuming the deployment tasks issued by the operation and maintenance process, adapting the resources in the task to the specific target environment, and executing the issuing action; the Kubernetes cluster provides deployable resources for the resource objects to be deployed.
[0047] Figure 1 A schematic diagram of a resource scheduling method provided by an embodiment of the present disclosure. Figure 1 As shown, the method may be executed by an electronic device, and optionally, the method may be executed by a network device, and optionally, the network device may include a process server, a scheduling server, and a plurality of resource clusters. The method may include the following steps.
[0048] Step 101, the process server obtains a directed acyclic graph from the system portal.
[0049] In some embodiments, the directed acyclic graph is a dependency and deployment relationship between multiple resource objects.
[0050] In some embodiments, the process server may determine the dependencies between resources by obtaining a directed acyclic graph, and define the process based on the dependencies to determine which tasks need to be performed and the order in which they should be performed.
[0051] In some embodiments, the system portal can be a front-end page. Optionally, the system portal has an environment management module and a graphical interface, wherein the environment management module can be used to configure the target environment, the canvas area of the graphical interface has the function of arranging a directed acyclic graph, and the configuration area of the graphical interface can configure the target environment, parameter information, etc.
[0052] In some embodiments, a directed acyclic graph can determine the relationship between task nodes. For example, parallel mode one can refer to multiple task nodes that are not pointed to by any connected terminals, for example, two task nodes are both starting nodes, and the two nodes belong to two unrelated processes; parallel mode two can be multiple different nodes pointed to from the same node, in which case multiple nodes belong to the same process; serial can refer to a node that only sends one line to another node, and the relationship between the two nodes is serial; a convergence node can refer to two or more branch nodes starting from a node that all point to the node, then the node is a convergence node, and the convergence node will be executed only after all branch nodes that converge here are completed.
[0053] Step 102: The process server obtains environment configuration information of multiple resource objects from the system portal.
[0054] In some embodiments, the process server may determine the application environment of each resource object by obtaining the environment configuration information of the resource object.
[0055] In some embodiments, the environment configuration information may be a target environment, which may be used to determine the application environment of a resource object, such as a development environment, a test environment, etc. The test environment may also be divided into a stability test, a functional integration test environment, etc. Different environments may be applied to different scenarios, and a set of clusters may correspond to one environment.
[0056] In some embodiments, the process server can obtain 0 to N first target environments configured for each resource from the system portal. The configuration can be used to determine the application environment of a single resource object. Some resources run on different physical or virtual servers. The configuration can ensure that each resource can run correctly in its own environment.
[0057] In some embodiments, the process server can obtain public parameters from the system portal to configure 0 to N second target environments. The public parameters usually include global configurations that can be used for all resources to ensure that they are consistent in some aspects. The configuration of public parameters can be used to set global environment variables, network parameters, etc. to reduce redundant configurations and ensure overall consistency.
[0058] In some embodiments, the process server may obtain from the system portal a third target environment configured when starting the process corresponding to the directed acyclic graph, where N is an integer greater than or equal to 1, and configuring the target environment when running the program may allow the resource object to more dynamically select different target environments. The configuration may be adapted to different usage scenarios, such as switching between development, test, and production environments, or changing the configuration as needed during the operation of the application.
[0059] In some embodiments, for the above three different environment configuration methods, the priority of the target environment configured for each resource is higher than the priority of the environment configuration in the process. The priorities of the three configuration methods are: the first target environment configured for each resource is the first priority; the third target environment configured when starting the process corresponding to the directed acyclic graph is the second priority; the second target environment configured in the common parameters is the third priority.
[0060] In some embodiments, the target environment configured in the process is usually to cope with specific runtime requirements or scenarios, but usually does not affect the basic configuration of the resources, that is, the configuration for each resource. If the environment configuration in the process is different from the environment configured for each resource, the configuration for each resource is usually adopted. The main reason is that their settings are relatively static and not easy to change at will.
[0061] Step 103: The scheduling server schedules multiple resource clusters for multiple resource objects.
[0062] In some embodiments, the scheduling server may schedule multiple resource clusters for multiple resource objects based on the directed acyclic graph and the environment configuration information.
[0063] In some embodiments, the scheduling server may execute the deployment tasks issued by the task node according to the task process determined by the process server.
[0064] In some embodiments, the scheduling server may adapt to a target environment to be determined based on the resource configuration information, and if the adaptation is successful, multiple resource clusters may be scheduled for multiple resource objects.
[0065] In summary, in the above embodiments of the present application, the process server determines the task process based on a directed acyclic graph and monitors the process, so as to orchestrate the operation and maintenance process in a more intuitive way, flexibly control the resource operation and maintenance process, and parallel deployment actions can improve deployment efficiency; the scheduling server determines which cluster needs to be scheduled based on the process requirements and resource configuration information, and when adapting to the target environment, multiple resource objects schedule multiple resource clusters to realize automated operation and maintenance across clusters, and facilitate the migration of resource objects.
[0066] Figure 2 A schematic diagram of a resource scheduling method provided by an embodiment of the present disclosure. Figure 2 As shown, based on Figure 1 In the embodiment shown, this embodiment specifically describes the above step 103. The method may include the following steps.
[0067] Step 201, starting from the starting resource object of the directed acyclic graph, traverse all resource objects of the directed acyclic graph.
[0068] In some embodiments, after the task process determined by the process server is started, each time a task node is executed, the resource objects protected in the node can be sent to the resource center in the form of tasks, where the resource center can be a functional module coupled to the scheduling server for checking resources.
[0069] In some embodiments, the issued tasks may include a list of resources to be maintained. The scheduling server can obtain resource deployment tasks based on the issued task queue. When the task is not obtained, for example, when all tasks are completed or the task is not issued, the current round of scheduling is ended; when the task is obtained, the resource objects in the task can be traversed. When the resource object is empty, the current task is completed. When the resource object is not empty, the target environment list can be obtained based on the priority of the first, second, and third target environments.
[0070] Step 202, determine whether at least one of the first target environment, the second target environment, and the third target environment exists, and if so, traverse all target environments.
[0071] In some embodiments, the target environment list can be traversed to determine whether a target environment exists. The target environments can be traversed based on their priorities. When the first target environment exists, the first target environment can be traversed to obtain environment-related information from the environment management module. The traversal of the second target environment and / or the third target environment can be stopped or the second target environment and / or the third target environment can be traversed in the same manner.
[0072] In some embodiments, when the first target environment does not exist, the target environment list can be traversed to determine whether the third target environment exists. If the third target environment exists, the third target environment can be traversed to obtain environment-related information from the environment management module. The traversal of the second target environment can be stopped or the second target environment can be traversed in the same manner.
[0073] In some embodiments, when both the first target environment and the third target environment do not exist, it can be determined whether the second target environment exists. When the second target environment does not exist, the resources are not issued and the scheduling can be terminated at this time. When the second target environment exists, the target environment can be traversed normally, that is, when at least one of the three target environments exists, the scheduling can continue.
[0074] Step 203, determine whether there is an operating environment adapted to the target environment, and if so, adapt the resource object and the operating environment.
[0075] In some embodiments, the scheduling server has an adapter, which can adapt the resource object and the operating environment according to the resource parameters, environment version, and resource version of the resource object to obtain an adaptation result.
[0076] In some embodiments, the adapter can check the resource version of the resource object before issuing the task, and determine the resource parameter information required for the version based on the resource version, which can be used to adapt to different versions of the cluster. Before calling the interface, it is also necessary to check the version of the target environment, that is, the above-mentioned environment version, and adapt based on the environment version and the operating environment to determine whether the task can run in the operating environment and obtain the adaptation result.
[0077] In some embodiments, the adapter may initiate a maintenance action to the operating environment based on the adaptation result, wherein the maintenance action includes at least one of creation, update, and deletion.
[0078] Step 204 : For the adapted resource objects, resources in a plurality of resource clusters are scheduled to run the process corresponding to the directed acyclic graph.
[0079] In some embodiments, the resources may include at least one of storage resources, computing resources, and network resources.
[0080] In some embodiments, the scheduling server may determine the cluster that needs to be scheduled for each task based on the adaptation result of step 203, and the scheduling server may schedule the cluster by referring to the task flow arranged by the directed acyclic graph.
[0081] In summary, the above-mentioned embodiments of the present application traverse the resource objects, obtain the target environment list, traverse the target environment list to determine the target environment, and obtain the target environment related information for adaptation to the operating environment and resource cluster. It is possible to determine the cluster that needs to be scheduled, maintain the target environment, realize automated operation and maintenance across clusters, and facilitate rapid migration of resource objects.
[0082] Figure 3 A schematic diagram of a resource scheduling method provided by an embodiment of the present disclosure. Figure 3 As shown, based on Figure 1 or Figure 2 In the illustrated embodiment, the method may further include the following steps.
[0083] Step 301: If the resource object is not obtained, or the first target environment, the second target environment, and the third target environment do not exist, the scheduling is terminated.
[0084] In some embodiments, the resource object is not obtained, that is, the resource object is empty, and the process task cannot be continued, and the scheduling is terminated at this time.
[0085] In some embodiments, if the first target environment, the second target environment, and the third target environment do not exist, the task will not be issued and the scheduling can be terminated at this time.
[0086] In summary, the above embodiments of the present application terminate the scheduling of tasks when the resource object is not obtained or the three target environments do not exist, thereby reducing the waste of system resources.
[0087] Figure 4 A schematic diagram of a resource scheduling method provided by an embodiment of the present disclosure. Figure 4 As shown, the method can be executed by an electronic device, and optionally, the method can be executed by a resource scheduling system, and optionally, the resource scheduling system can include a system portal, a process server, a scheduling server, and multiple resource clusters. The method can include the following steps.
[0088] Step 401: the system portal generates a directed acyclic graph, which is the dependency and deployment relationship between multiple resources.
[0089] In some embodiments, the system portal displays a resource orchestration page, which may include a tool area, a control area, a canvas area, and a configuration area, wherein the tool area includes multiple global function buttons, the control area includes multiple resource controls, the canvas area is used to generate a directed acyclic graph, and the configuration area is used to configure parameters for the resource controls and configure environment configuration information.
[0090] In some embodiments, the resource space can be moved from the control area to the canvas area, the canvas area can perform movement and scaling operations on the resource controls, and the execution order of the resource components can be adjusted by establishing connections between the resource controls.
[0091] In some embodiments, the configuration area provides a switching method between forms and YAML files. YAML files can change the configuration of resources, but you need to be familiar enough with the resource object to change the configuration by directly changing the YAML file. The form can display the configuration information of the resource object intuitively and conveniently. For example, you can use a drop-down box form to select the environment configuration.
[0092] In some embodiments, the form can provide a correctness check to check the manually edited content, and can prompt an alarm message when it is incorrect, thereby avoiding task failure caused by content errors and improving the success rate of task deployment.
[0093] Step 402: the system portal obtains environment configuration information of multiple resources.
[0094] In some embodiments, the system portal can obtain 0 to N target environments configured for each resource; configure 0 to N target environments in public parameters; configure the target environment when starting the process corresponding to the directed acyclic graph, where N is an integer greater than or equal to 1.
[0095] Step 403: The process server obtains the directed acyclic graph and environment configuration information from the system portal.
[0096] The process server obtains the related content of the directed acyclic graph and the environment configuration information, which has been explained in detail in step 101 and step 102 and will not be repeated here.
[0097] Step 404: The scheduling server schedules multiple resource clusters for multiple resource objects according to the directed acyclic graph and the environment configuration information.
[0098] The process of scheduling the scheduling server based on the directed acyclic graph and configuration information has been described in detail in step 103 and will not be repeated here.
[0099] In summary, in the above embodiments of the present application, the system portal can use a graphical interface to intuitively display the execution process and configuration information of the task by obtaining the directed acyclic graph and environmental configuration information, which is convenient for operation and maintenance personnel to arrange the process, reduce the difficulty of entry, and improve work efficiency; the form-based configuration page provides correctness check, which can improve the success rate of deployment; the process server can perform task control based on the process information, and send the task to the scheduling server; the scheduling server determines the cluster that needs to be scheduled based on the resource object, and performs scheduling to realize automated operation and maintenance across clusters, and realizes rapid migration of resource objects.
[0100] Figure 5 A schematic diagram of a resource scheduling method provided by an embodiment of the present disclosure. Figure 5 As shown, based on Figure 4 This embodiment specifically describes the above step 404. The method may further include the following steps.
[0101] Step 501, starting from the starting resource object of the directed acyclic graph, traverse all resource objects of the directed acyclic graph.
[0102] Step 502, determine whether at least one of the first target environment, the second target environment, and the third target environment exists, and if so, traverse all target environments.
[0103] Step 503, determine whether there is an operating environment adapted to the target environment, and if so, adapt the resource object and the operating environment.
[0104] In some embodiments, the adapter in the scheduling server may adapt the resource object and the operating environment according to the resource parameters, environment version, and resource version of the resource object to obtain an adaptation result;
[0105] In some embodiments, the scheduling server may initiate a maintenance action to the operating environment based on the adaptation result, and the maintenance action includes at least one of creation, update, and deletion.
[0106] Step 504, for the adapted resource objects, resources in the plurality of resource clusters are scheduled to run the process corresponding to the directed acyclic graph, wherein the resources include at least one of storage resources, computing resources, and network resources.
[0107] In some embodiments, Figure 5 The above steps in can be executed by the scheduling server. Figure 2 The embodiments have been described in detail and will not be repeated here.
[0108] In summary, the above-mentioned embodiments of the present application obtain a target environment list by traversing the resource objects, and traverse the target environment list to determine the target environment, and obtain information related to the target environment. This information can be used to adapt to the operating environment and resource cluster. Based on the adaptation results, the cluster that needs to be scheduled can be determined, and the target environment can be maintained to achieve automated operation and maintenance across clusters, thereby reducing the difficulty of migrating resource objects.
[0109] Figure 6 A schematic diagram of a resource scheduling method provided by an embodiment of the present disclosure. Figure 6 As shown, based on Figure 5 In the illustrated embodiment, the method may further include the following steps.
[0110] Step 601: If the resource object is not obtained, or the first target environment, the second target environment, and the third target environment do not exist, the scheduling server ends the scheduling.
[0111] Figure 6 Details are in Figure 3 The embodiments have been described in detail and will not be repeated here.
[0112] In summary, in the above-mentioned embodiments of the present application, when the resource object is not obtained or the three target environments do not exist, the scheduling of the task is terminated, which can save system resources.
[0113] The embodiments of the present disclosure are further explained below by using examples.
[0114] Figure 7 This is an architecture diagram of a cross-cluster automated operation and maintenance system. The architecture includes a system portal, a process server, a scheduling server, and multiple Kubernetes clusters. Based on this architecture, the following can be achieved: Figure 8 The cross-cluster automated operation and maintenance method shown in the figure mainly includes the following steps.
[0115] Step S1, the system portal module centrally maintains the Kubernetes cluster information through the environment management module; controls the resource deployment process on the orchestration page of the directed acyclic graph, configures the Kubernetes resource object and the target environment list public parameter area in the task node of the process, and configures the public target environment list; after the process configuration is completed, the operation and maintenance process can be started in the portal, and the target environment list can be set when starting the process. The environment list set at the start has a higher priority than the public parameters, but lower than the target environment list set in the resource object. The process server will be responsible for controlling the execution process of the started process.
[0116] Among them, the target environment may not be configured in the task node of the process, and the target environment list of the public parameter or the target environment list set in the resource object may be directly used.
[0117] The environment management module can centrally maintain Kubernetes cluster information, including but not limited to the following information: cluster grouping, cluster name, API interface, authentication information, etc. There can be multiple clusters in a cluster group, and different cluster groups can have different application environments. For example, one cluster grouping can be applied to the development environment, while another cluster grouping can be applied to the test environment. The API interface corresponds to the cluster. After completing the orchestration of the directed acyclic graph, the API interface can maintain the cluster, such as application deployment, update, and offline. Authentication information can be used to access the environment. Each environment has its own authentication information. When the API interface wants to interact with the environment, it needs to bring the authentication information to access the environment.
[0118] When configuring resources, you can use a graphical interface to intuitively maintain resource configuration information. The graphical interface is as follows: Fig. 9 The entire editing area is divided into four modules: tool area (top of the page), control area (left side of the page), canvas area (middle of the page), and configuration area (right side of the page). The functions of each module are as follows:
[0119] Tool area: This is the area where global function buttons are located, such as save, import, export, undo, restore, automatic layout, form and YAML, etc. Form and YAML are two display forms of the configuration area. Form displays text boxes, and YAML displays configuration files. Each resource object has a corresponding YAML for configuring the resource object. When users are familiar with resource objects, they can directly modify the YAML file to directly modify the resource object configuration.
[0120] Control area: The area where resource components are located. Multiple resources can be configured in each control. Resource types include but are not limited to Deployment, StatefulSet, DaemonSet, CronJob, ConfigMap, Secret, etc. You can drag the resource control into the canvas area by dragging the component in this area, and the configuration parameters of the control will be displayed in the configuration area. Deployment can be used to deploy an application; StatefulSet is related to storage; DaemonSet can set a daemon on each node. For example, when five machines form a Kubernetes cluster, each of these five machines is a Kubernetes node, and DaemonSet can set a daemon on each of these five machines; CronJob can be used for customized tasks, such as regular database checks; ConfigMap is a configuration function, such as configuring ports, access addresses, etc. When creating resources, you can create the configuration first and then create the resources, and then hang the configuration file on the application; Secret is an encryption function.
[0121] Canvas area: After a resource component is dragged to the canvas area, you can move and scale the resource component, and adjust the execution order of the resource components by establishing connections between them.
[0122] Configuration area: The configuration area is used to display the configuration parameters corresponding to the resource control selected in the canvas area, and to display the prompt information of the required configuration items, or to display the YAML form and prompt information. For example, when checking the correctness of resource configuration, an alarm message will be prompted if there is an error. The configuration of environment information can be completed in the configuration area.
[0123] Can be Fig. 9The graphical interface shown is for configuring the target environment for the Kuberneres resource object. The purpose of configuring the target environment is to determine which resource object the environment is to be configured for. When different resource objects are used, the purpose of the environment is different. YAML files can configure resource objects, but the YAML files record some necessary parameters of the resource object itself, such as the description of the resource space and the location information where the resource space is deployed, etc., and do not include environmental information. Therefore, additional configuration can be performed on the environment of the resource control. The configuration of the target environment mainly includes the following three types:
[0124] Configure 0 to N target environments in the resource control;
[0125] Configure 0 to N target environments in the common parameters;
[0126] When starting an automatic process, the target environment configuration is adjusted in the runtime parameters.
[0127] Step S2: All started processes are controlled by the process server. The process server controls the operation of the nodes through the state manager, and controls the start-up order, serial / parallel relationship, convergence relationship, etc. of the nodes through the connection relationship between the nodes. After the node is started, the resource operation and maintenance type node will send a resource deployment task to the scheduling server and wait for the execution result of the resource deployment task. The process will be decided to continue to execute or end the current process based on the node execution result.
[0128] The method in this example can control the Kubernetes resource deployment process in a more intuitive way, that is, a directed acyclic graph, such as Fig. 9 As shown in the directed acyclic graph in the middle canvas area, it mainly includes the following process mode information:
[0129] Parallel mode 1: The ConfigMap and DaemonSet pointed to by any unconnected terminal are the starting points for the resource deployment process. The ConfigMap and DaemonSet nodes are in parallel.
[0130] Parallel mode 2: Similar to two or more lines starting from ConfigMap, the terminals point to the CronJob and StatefulSet controls respectively. The relationship between the two controls is parallel.
[0131] Serial: Similar to the case where only one line is sent out from the CronJob control and the terminal of the line is the Deployment, the relationship between the CronJob control and the Deployment control is serial.
[0132] Convergence node: Similar to the Deployment control, if two or more branches starting from one control converge to the same control, then this control is the convergence point. This control will be executed only after all branches converging to this endpoint have finished executing.
[0133] In step S3, the scheduling server consumes the deployment tasks issued by the task nodes in the operation and maintenance process, adapts the resource configuration in the tasks to the specific target environment, and sends the adapted resource objects and actions to the target Kubernetes cluster.
[0134] like Fig.10 As shown, the scheduling server can automatically adapt to the target environment according to the resource configuration parameters. After the task process configured through the directed acyclic graph orchestration page is started, each time a node is executed, the resource objects protected in the node will be sent to the resource center in the form of tasks. The tasks contain a list of resources to be maintained. The scheduling scheduler is responsible for executing specific tasks. The execution process is as follows:
[0135] 1. The scheduling server obtains the resource deployment task from the task queue. If no task is obtained, the current round of scheduling work ends. If the task is obtained, it proceeds to the next step.
[0136] 2. Traverse the resource objects in the task. If the resource object is empty, the current task execution ends. After obtaining the resource object, obtain the target environment to be maintained according to the following priority:
[0137] First priority: the target environment list configured in the resource object;
[0138] Second priority: the target environment list configured when the process starts;
[0139] Third priority: the target environment list configured in the common parameters.
[0140] 3. Traverse the target environment list. If the target environment is not obtained, end the resource maintenance operation and return to the second step to continue traversing the resource objects. After obtaining the target environment, obtain environment-related information from the environment configuration module, and complete the automatic adaptation and dynamic parameter replacement of resources and Kubernetes environment through the adapter (based on resource parameters, Kubernetes environment version, resource version, etc.).
[0141] Based on the results output by the adapter, maintenance actions can be initiated to the target environment: create, update, delete, etc.
[0142] In step S4, the Kubernetes cluster information is uniformly maintained by the system portal module, which can be referenced in the directed acyclic graph orchestration page and provides a deployment environment for the resource objects issued by the scheduling server.
[0143] In summary, in the above embodiments, the Kubernetes cluster is centrally maintained and the target environment is configured through the environment management module. The system portal arranges the directed acyclic graph to determine the resource dependencies. The process server manages the process information based on the directed acyclic graph. The scheduling server automatically adapts the target environment based on the resource configuration parameters, and sends the adapted resource objects and actions to the target Kubernetes cluster, thereby realizing automated operation and maintenance across Kubernetes clusters. The process is determined and the configuration information is determined based on a graphical interface, and the Kubernetes resource deployment process can be controlled more intuitively, which can reduce the technical barriers of operation and maintenance personnel, reduce maintenance costs, and improve the work efficiency of operation and maintenance personnel.
[0144] Fig.11 FIG. 1 is a schematic diagram of a network device 1100 provided in an embodiment of the present disclosure. Fig.11 As shown, the network device includes: a process server 1110, a scheduling server 1120 and multiple resource clusters.
[0145] The process server 1110 can be used to obtain a directed acyclic graph from the system portal, which is the dependency and deployment relationship between multiple resource objects; the process server obtains the environmental configuration information of multiple resource objects from the system portal; the scheduling server 1120 schedules multiple resource clusters for multiple resource objects based on the directed acyclic graph and the environmental configuration information.
[0146] In some embodiments, the process server 1110 can also be used to: obtain 0 to N first target environments configured for each resource from the system portal; obtain 0 to N second target environments configured from public parameters from the system portal; obtain a third target environment configured when starting the process corresponding to the directed acyclic graph from the system portal, where N is an integer greater than or equal to 1.
[0147] In some embodiments, the scheduling server 1120 also includes a processing module, which can be used to: start from the starting resource object of the directed acyclic graph, traverse all resource objects of the directed acyclic graph; determine whether there is at least one of the first target environment, the second target environment, and the third target environment, and if so, traverse all target environments; determine whether there is an operating environment adapted to the target environment, and if so, adapt the resource objects and the operating environment.
[0148] In some embodiments, the scheduling server 1120 can also be used to: schedule resources in multiple resource clusters for adapted resource objects to run the process corresponding to the directed acyclic graph, and the resources include at least one of storage resources, computing resources, and network resources.
[0149] In some embodiments, the scheduling server 1120 also includes an adapter, which can be used to adapt the resource object and the operating environment according to the resource parameters, environment version, and resource version of the resource object to obtain an adaptation result.
[0150] In some embodiments, the scheduling server 1120 further includes a processing module, which can be used to initiate a maintenance action to the operating environment based on the adaptation result, where the maintenance action includes at least one of creation, update, and deletion.
[0151] In some embodiments, the scheduling server 1120 also includes a processing module, which can be used to end the scheduling if the resource object is not obtained, or the first target environment, the second target environment, and the third target environment do not exist.
[0152] Since the device provided in the embodiment of the present disclosure corresponds to the methods provided in the above-mentioned embodiments, the implementation of the method is also applicable to the device provided in the embodiment and will not be described in detail in this embodiment.
[0153] In summary, the process server in the network device proposed in the present invention obtains the environmental configuration information of the directed acyclic graph and resource objects, determines the task process, controls and manages the process, and the scheduling server processes the process tasks, determines the cluster that needs to be scheduled, and performs scheduling, which can realize cross-cluster automated operation and maintenance and reduce the difficulty of resource object migration.
[0154] Fig.12 FIG. 1 is a schematic diagram of a resource scheduling system 1200 provided in an embodiment of the present disclosure. Fig.12 As shown, the network device includes: a system portal 1210, a process server 1220, a scheduling server 1230 and multiple resource clusters.
[0155] The system portal 1210 can be used to: generate a directed acyclic graph, which is the dependency and deployment relationship between multiple resources, and obtain environmental configuration information of multiple resources; the process server 1220 can be used to obtain the directed acyclic graph and environmental configuration information from the system portal; the scheduling server 1230 can be used to schedule multiple resource clusters for multiple resource objects based on the directed acyclic graph and environmental configuration information.
[0156] In some embodiments, the system portal 1210 can display a resource orchestration page, which includes a tool area, a control area, a canvas area, and a configuration area, wherein the tool area includes multiple global function buttons, the control area includes multiple resource controls, the canvas area is used to generate a directed acyclic graph, and the configuration area is used to configure parameters for the resource controls and configure environment configuration information.
[0157] In some embodiments, the system portal 1210 obtains environmental configuration information of multiple resources including: configuring 0 to N target environments for each resource; configuring 0 to N target environments in common parameters; configuring the target environment when starting the process corresponding to the directed acyclic graph, where N is an integer greater than or equal to 1.
[0158] In some embodiments, the scheduling server 1230 may also include a processing module, which is used to: start from the starting resource object of the directed acyclic graph, traverse all resource objects of the directed acyclic graph; determine whether there is at least one of the first target environment, the second target environment, and the third target environment, and if so, traverse all target environments; determine whether there is an operating environment adapted to the target environment, and if so, adapt the resource objects and the operating environment.
[0159] In some embodiments, the scheduling server 1230 can also be used to: schedule resources in multiple resource clusters for adapted resource objects to run the process corresponding to the directed acyclic graph, and the resources include at least one of storage resources, computing resources, and network resources.
[0160] In some embodiments, the scheduling server 1230 may further include an adapter, which is used to adapt the resource object and the operating environment according to the resource parameters, environment version, and resource version of the resource object to obtain an adaptation result.
[0161] In some embodiments, the scheduling server 1230 may further include a processing module, where the processing module is used to initiate a maintenance action to the operating environment based on the adaptation result, where the maintenance action includes at least one of creation, update, and deletion.
[0162] In some embodiments, the scheduling server 1230 may further include a processing module, where the processing module is used to: if the resource object is not obtained, or the first target environment, the second target environment, and the third target environment do not exist, the scheduling server ends the scheduling.
[0163] Since the device provided in the embodiment of the present disclosure corresponds to the methods provided in the above-mentioned embodiments, the implementation of the method is also applicable to the device provided in the embodiment and will not be described in detail in this embodiment.
[0164] In summary, the resource scheduling system proposed in the embodiment of the present disclosure includes a system portal, which can provide a resource orchestration page, determine the dependency relationship between resources with a graphical interface, and can intuitively display the task process and configure resources, reducing the entry difficulty for operation and maintenance personnel; the process server manages the tasks; the scheduling server determines the resource cluster that needs to be scheduled based on the issued tasks, realizes automatic operation and maintenance across clusters, and reduces the difficulty of resource object migration.
[0165] In the embodiments provided in the present application, the methods and devices provided in the embodiments of the present application are introduced. In order to implement the functions in the methods provided in the embodiments of the present application, the electronic device may include a hardware structure and a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. A function of the functions may be executed in the form of a hardware structure, a software module, or a hardware structure plus a software module.
[0166] Fig.13 1 is a block diagram of an electronic device 1300 for implementing the resource scheduling method according to an exemplary embodiment. For example, the electronic device 1300 may be a mobile phone, a computer, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0167] Reference Fig.13 , the electronic device 1300 may include one or more of the following components: a processing component 1302 , a memory 1304 , a power component 1306 , a multimedia component 1308 , an audio component 1310 , an input / output (I / O) interface 1312 , a sensor component 1314 , and a communication component 1316 .
[0168] The processing component 1302 generally controls the overall operation of the electronic device 1300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1302 may include one or more processors 1320 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1302 may include one or more modules to facilitate the interaction between the processing component 1302 and other components. For example, the processing component 1302 may include a multimedia module to facilitate the interaction between the multimedia component 1308 and the processing component 1302.
[0169] The memory 1304 is configured to store various types of data to support the operation of the electronic device 1300. Examples of such data include instructions for any application or method operating on the electronic device 1300, contact data, phone book data, messages, pictures, videos, etc. The memory 1304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0170] The power supply component 1306 provides power to the various components of the electronic device 1300. The power supply component 1306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1300.
[0171] The multimedia component 1308 includes a screen that provides an output interface between the electronic device 1300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1308 includes a front camera and / or a rear camera. When the electronic device 1300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0172] The audio component 1310 is configured to output and / or input audio signals. For example, the audio component 1310 includes a microphone (MIC), and when the electronic device 1300 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1304 or sent via the communication component 1316. In some embodiments, the audio component 1310 also includes a speaker for outputting audio signals.
[0173] I / O interface 1312 provides an interface between processing component 1302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0174] The sensor assembly 1314 includes one or more sensors for providing various aspects of status assessment for the electronic device 1300. For example, the sensor assembly 1314 can detect the open / closed state of the electronic device 1300, the relative positioning of components, such as the display and keypad of the electronic device 1300, and the sensor assembly 1314 can also detect the position change of the electronic device 1300 or a component of the electronic device 1300, the presence or absence of user contact with the electronic device 1300, the orientation or acceleration / deceleration of the electronic device 1300, and the temperature change of the electronic device 1300. The sensor assembly 1314 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1314 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1314 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0175] The communication component 1316 is configured to facilitate wired or wireless communication between the electronic device 1300 and other devices. The electronic device 1300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (NewRadio) or a combination thereof. In an exemplary embodiment, the communication component 1316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0176] In an exemplary embodiment, the electronic device 1300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.
[0177] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1304 including instructions, and the instructions can be executed by a processor 1320 of the electronic device 1300 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0178] The embodiments of the present disclosure further provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the dynamic combination method of product data described in the above embodiments of the present disclosure.
[0179] The embodiments of the present disclosure further provide a computer program product, including a computer program, which executes the method for dynamically combining product data described in the above embodiments of the present disclosure when a processor executes the computer program.
[0180] Fig.14 FIG. 1 is a schematic diagram of a structure of a chip 1400 for implementing the above-mentioned dynamic combination method of product data according to an exemplary embodiment. Fig.14 The chip 1400 includes a communication interface 1401 and at least one processor 1402. The communication interface 1401 is used to receive signals input into the chip 1400 or signals output from the above chip 1400. The processor 1402 communicates with the communication interface 1401 and implements the dynamic combination method of product data described in the above embodiments of the present disclosure through logic circuits or execution code instructions.
[0181] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0182] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0183] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0184] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processing module, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (control method), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.
[0185] It should be understood that the various parts of the embodiments of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0186] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0187] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0188] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A resource scheduling method, characterized in that: The method is performed by a network device, the network device includes a process server, a scheduling server and a plurality of resource clusters, and the method includes: The process server obtains a directed acyclic graph from the system portal, wherein the directed acyclic graph is a dependency and deployment relationship between multiple resource objects; The process server obtains the environment configuration information of the plurality of resource objects from the system portal; The scheduling server schedules the multiple resource clusters for the multiple resource objects according to the directed acyclic graph and the environment configuration information.
2. The method according to claim 1, characterized in that The process server obtains the environment configuration information of the multiple resources from the system portal, including at least one of the following: The process server obtains 0 to N first target environments configured for each resource from the system portal; The process server obtains public parameters from the system portal to configure 0 to N second target environments; The process server obtains from the system portal a third target environment configured when starting the process corresponding to the directed acyclic graph, where N is an integer greater than or equal to 1.
3. The method according to claim 2, characterized in that The scheduling server scheduling the multiple resource clusters for the multiple resource objects according to the directed acyclic graph and the environment configuration information includes: Starting from the starting resource object of the directed acyclic graph, traversing all resource objects of the directed acyclic graph; Determine whether at least one of the first target environment, the second target environment, and the third target environment exists, and if so, traverse all target environments; Determine whether there is an operating environment adapted to the target environment, and if so, adapt the resource object and the operating environment; For the adapted resource objects, resources in the multiple resource clusters are scheduled to run the process corresponding to the directed acyclic graph, and the resources include at least one of storage resources, computing resources, and network resources.
4. The method according to claim 3, characterized in that The adapting the resource object and the operating environment comprises: The adapter in the scheduling server adapts the resource object and the operating environment according to the resource parameters, environment version and resource version of the resource object to obtain an adaptation result; According to the adaptation result, a maintenance action is initiated to the operating environment, where the maintenance action includes at least one of creation, update, and deletion.
5. The method according to claim 4 or 5, characterized in that: The method further comprises: If the resource object is not obtained, or the first target environment, the second target environment, and the third target environment do not exist, the scheduling is terminated.
6. A resource scheduling method, characterized in that: The method is performed by a resource scheduling system, which includes a system portal, a process server, a scheduling server, and multiple resource clusters. The method includes: The system portal generates a directed acyclic graph, which is a dependency and deployment relationship between multiple resources; The system portal obtains environment configuration information of the multiple resources; The process server obtains the directed acyclic graph and the environment configuration information from the system portal; The scheduling server schedules the multiple resource clusters for the multiple resource objects according to the directed acyclic graph and the environment configuration information.
7. The method according to claim 6, characterized in that The method further comprises: The system portal displays a resource orchestration page, which includes a tool area, a control area, a canvas area, and a configuration area, wherein the tool area includes multiple global function buttons, the control area includes multiple resource controls, the canvas area is used to generate the directed acyclic graph, and the configuration area is used to configure parameters for the resource controls and configure the environment configuration information.
8. The method according to claim 6, characterized in that The system portal obtains the environment configuration information of the multiple resources including: Configure 0 to N target environments for each resource; Configure 0 to N target environments in the common parameters; When starting the process corresponding to the directed acyclic graph, a target environment is configured, where N is an integer greater than or equal to 1.
9. The method according to claim 6, characterized in that The scheduling server scheduling the multiple resource clusters for the multiple resource objects according to the directed acyclic graph and the environment configuration information includes: Starting from the starting resource object of the directed acyclic graph, traversing all resource objects of the directed acyclic graph; Determine whether at least one of the first target environment, the second target environment, and the third target environment exists, and if so, traverse all target environments; Determine whether there is an operating environment adapted to the target environment, and if so, adapt the resource object and the operating environment; For the adapted resource objects, resources in the multiple resource clusters are scheduled to run the process corresponding to the directed acyclic graph, and the resources include at least one of storage resources, computing resources, and network resources.
10. The method according to claim 9, characterized in that The adapting the resource object and the operating environment comprises: The adapter in the scheduling server adapts the resource object and the operating environment according to the resource parameters, environment version and resource version of the resource object to obtain an adaptation result; The scheduling server initiates a maintenance action to the operating environment according to the adaptation result, and the maintenance action includes at least one of creation, update, and deletion.
11. The method according to claim 9 or 10, characterized in that: The method further comprises: If the resource object is not obtained, or the first target environment, the second target environment, and the third target environment do not exist, the scheduling server ends the scheduling.
12. A network device, characterized in that: The device includes: a process server, a scheduling server and multiple resource clusters. The process server is used to obtain a directed acyclic graph from the system portal, wherein the directed acyclic graph is a dependency and deployment relationship between multiple resource objects; The process server is used to obtain the environment configuration information of the multiple resource objects from the system portal; The scheduling server is used to schedule the multiple resource clusters for the multiple resource objects according to the directed acyclic graph and the environment configuration information.
13. A resource scheduling system, characterized in that: The system includes: a system portal, a process server, a scheduling server and multiple resource clusters. The system portal is used to generate a directed acyclic graph, which is a dependency and deployment relationship between multiple resources; The system portal is used to obtain the environment configuration information of the multiple resources; The process server is used to obtain the directed acyclic graph and the environment configuration information from the system portal; The scheduling server is used to schedule the multiple resource clusters for the multiple resource objects according to the directed acyclic graph and the environment configuration information.
14. An electronic device, characterized in that: include: one or more processors; A storage device communicatively connected to the one or more processors, on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method according to any one of claims 1 to 11.
15. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-11.
16. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 11.
17. A chip, characterized in that: It comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, the signal includes a computer instruction stored in the memory, and when the processor executes the computer instruction, the electronic device executes the method described in any one of claims 1-11.
