Method for Deploying Software Infrastructure Resources Based on the Characteristics of a Directed Acyclic Graph
By applying directed acyclic graph characteristics in software deployment to build a deployment strategy diagram, the complex and inefficient deployment in the existing technology is solved, and efficient and flexible software infrastructure resource deployment is achieved.
Patent Information
- Application Number
- CN202210611154.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-05-31
AI Technical Summary
When deploying software or infrastructure resources, the existing technology has problems such as complex maintenance, excessive manual participation, and poor reusability. Especially in the compilation, packaging, and release of software source code, the basic resource parameters need to be frequently modified, resulting in inefficiency.
The method of deploying software infrastructure resources based on the directed acyclic graph (DAG) feature is adopted. By configuring container docker on the browser side, and building a deployment strategy diagram based on the directed acyclic graph characteristics, user software configuration information is collected, and parsing it into a directed acyclic graph, and the scheduling module performs deployment tasks according to the data structure of the graph.
It greatly improves the efficiency of software deployment, reduces manual participation, enhances deployment flexibility, supports on-premises cluster and cloud deployment, and simplifies the joint deployment of software infrastructure resources.
Smart Images

Figure CN114968339B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of software development, and particularly to a method, an electronic device, and a deployment system for deploying software infrastructure resources based on the characteristics of a directed acyclic graph. Background Art
[0002] In the prior art, when deploying software or initializing, it is necessary to reconfigure software and hardware basic resources. When reconfiguring software and hardware basic resources, generally, scripts or interactive commands are used to set or modify in the existing software and hardware environment according to certain rules.
[0003] The existing way of using scripts or interactive commands has problems such as complex maintenance, excessive manual participation, and poor reusability. For example, in the processes of software source code compilation, packaging, release, etc., once the software needs to be repackaged and deployed to the software and hardware basic environment as required, or the basic resource parameters need to be modified, such as the virtual host memory size, the number of CPUs, etc., operating system parameters, database parameters, configuration tool parameters, etc., all need to be interacted with the specific software and hardware resource management environment manually, resulting in low efficiency.
[0004] In addition, in the prior art, if the deployment rules or configurations of application software or basic software resources change, the modification is cumbersome and the joint deployment of software and hardware resources cannot be supported. Summary of the Invention
[0005] To solve the above problems, the present application proposes a method, an electronic device, and a deployment system for deploying software infrastructure resources based on the characteristics of a directed acyclic graph.
[0006] On the one hand, the present application proposes a method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph, including the following steps:
[0007] S100. Configure the container docker on the browser side and construct a deployment policy graph of the container docker according to the characteristics of the directed acyclic graph;
[0008] S200. Collect software configuration information of the user through the browser side and send it to the http-server module according to a preset data format;
[0009] S300. The http-server module receives the software configuration information and parses it to obtain a directed acyclic graph and sends it to the scheduling module;
[0010] S400. The scheduling module receives the directed acyclic graph and executes the deployment task according to the data structure of the directed acyclic graph.
[0011] As an optional implementation scheme of the present application, optionally, in step S100, a container docker is configured on the browser side, and a deployment strategy graph of the container docker is constructed according to the directed acyclic graph characteristics, including:
[0012] S101, scheduling software infrastructure resources on the browser side;
[0013] S102, presetting the software infrastructure resources in a container Docker, and publishing the pre-started container Docker to a warehouse;
[0014] S103, presetting a data source, and configuring a database according to the data source;
[0015] S104: presetting a service startup rule for the container docker, and configuring the container docker according to the service startup rule.
[0016] As an optional implementation scheme of the present application, optionally, in step S100, a container docker is configured on the browser side, and a deployment strategy graph of the container docker is constructed according to the directed acyclic graph characteristic, further comprising:
[0017] S110, creating a deployment branch, deploying the container Docker on the browser end according to the deployment branch, and obtaining a deployment strategy diagram of the container Docker;
[0018] S120, performing container Docker startup service verification on the deployed deployment strategy graph according to preset node verification rules;
[0019] S130: Verification passed, and the system is notified that deployment is complete.
[0020] As an optional implementation scheme of the present application, optionally, in step S200, the user's software configuration information is collected through the browser end and sent to the http-server module according to a preset data format, including:
[0021] S201. Collecting software configuration information of the configured container docker through the browser end;
[0022] S202, constructing the software configuration information into json data according to a preset json format and saving it to the browser end;
[0023] S203, sending the json data to the http-server module through the browser.
[0024] As an alternative implementation of the present application, optionally, in step S300, the http-server module receives the software configuration information and parses it to obtain a directed acyclic graph and sends it to the scheduling module, including:
[0025] S301. The http-server module receives the json data and sends the json data to the directed acyclic graph parsing engine;
[0026] S302. The directed acyclic graph parsing engine receives the json data and parses the json data through a configured directed acyclic graph parsing engine thread pool to obtain a directed acyclic graph;
[0027] S303. Queue-process the obtained directed acyclic graph and send it to the scheduling module in a queue manner.
[0028] As an alternative implementation of the present application, optionally, in step S400, the scheduling module receives the directed acyclic graph and executes the deployment task according to the data structure of the directed acyclic graph, including:
[0029] S401. The scheduling module receives the directed acyclic graph and obtains the data structure of the directed acyclic graph of the directed acyclic graph;
[0030] S402. According to the data structure of the directed acyclic graph, obtain the task execution order of the deployed nodes;
[0031] S403. The scheduling module schedules the software infrastructure resources corresponding to the deployment task according to the task execution order of the nodes and starts to execute the deployment task.
[0032] As an alternative implementation of the present application, optionally, in step S400, the scheduling module receives the directed acyclic graph and executes the deployment task according to the data structure of the directed acyclic graph, further including:
[0033] S410. Through the scheduling module, determine whether the software infrastructure resources for executing the deployment task are deployed in the cloud;
[0034] S420. If the software infrastructure resources deployed in the cloud are required, send the task information to a preset cloud plugin module through the scheduling module;
[0035] S430. The cloud plugin module receives the task information and sends the task information to the cloud platform.
[0036] As an alternative implementation of the present application, optionally, in step S400, the scheduling module receives the directed acyclic graph and executes the deployment task according to the data structure of the directed acyclic graph, further including:
[0037] S411. The cloud platform receives the task information;
[0038] S421. According to the task information, select a cloud host corresponding to and matching the task information from the cloud platform and make a call, and return the call result to the cloud plugin module;
[0039] S431. The cloud plugin module receives the call result and returns it to the scheduling module.
[0040] On the other hand, the present application proposes an electronic device for implementing the method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph as described above, including:
[0041] A browser side, configured for a user to configure a container docker on the browser side, construct a deployment policy graph of the container docker according to the characteristics of a directed acyclic graph; and collect the software configuration information of the user through the browser side and send it to the http-server module according to a preset data format;
[0042] An http-server module, configured to receive the software configuration information, parse it, obtain a directed acyclic graph, and send it to the scheduling module;
[0043] A scheduling module, configured to receive the directed acyclic graph and execute the deployment task according to the data structure of the directed acyclic graph.
[0044] On the other hand, the present application proposes a deployment system, including:
[0045] A processor;
[0046] A memory for storing instructions executable by the processor;
[0047] Wherein, when the processor is configured to execute the executable instructions, it implements the method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph as described above.
[0048] The technical effects of the present invention:
[0049] In this application, a container Docker is configured on the browser side, and a deployment strategy graph of the container Docker is constructed according to the characteristics of a directed acyclic graph. The browser side collects the software configuration information of the user and sends it to the http-server module according to a preset data format. The http-server module receives the software configuration information and parses it to obtain a directed acyclic graph and sends it to the scheduling module. The scheduling module receives the directed acyclic graph and executes the deployment task according to the data structure of the directed acyclic graph. By using this characteristic of the directed acyclic graph to generate and draw the software infrastructure resource strategy graph, the parsing engine and the scheduling engine deploy or generate software infrastructure resources one by one according to the generated strategy graph. It enables users to deploy software services by simply dragging some components and configuring some attributes on the browser page, which greatly improves the efficiency of software deployment. By using various components, the deployment is also more flexible, and it can be deployed in a local cluster or in the cloud.
[0050] Other features and aspects of the present disclosure will become apparent from the following detailed description of the exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings included in and constituting a part of this specification illustrate exemplary embodiments, features, and aspects of the present disclosure, and are used to explain the principles of the present disclosure.
[0052] Figure 1 FIG. shows a schematic flow chart of an embodiment of a method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph according to the present invention;
[0053] Figure 2 FIG. shows a deployment strategy graph of a container Docker constructed based on the characteristics of a directed acyclic graph according to the present invention;
[0054] Figure 3 FIG. shows a schematic diagram of the application composition of an electronic device according to the present invention;
[0055] Figure 4 FIG. shows the present invention
[0056] Figure 5 FIG. shows the present invention
[0057] Figure 6 FIG. shows the present invention DETAILED DESCRIPTION OF THE EMBODIMENTS
[0058] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the drawings denote elements having the same or similar functions. Although various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0059] As used herein, the term "exemplary" means "serving as an example, embodiment, or illustration". Any embodiment described as "exemplary" herein need not be construed as superior to or better than other embodiments.
[0060] In addition, for a better illustration of the present disclosure, numerous specific details are given in the following detailed description. Those skilled in the art should understand that the present disclosure can be implemented without some of these specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art are not described in detail so as to highlight the gist of the present disclosure.
[0061] Embodiment 1
[0062] A directed acyclic graph, abbreviated as DAG (Directed Acyclic Graph), is a finite directed graph without directed cycles. It consists of a finite number of vertices and directed edges. Each directed edge points from one vertex to another. In a directed acyclic graph, starting from any point in the graph, no matter how many fork intersections are passed through, it will not return to a previous node, that is, no closed loop is generated.
[0063] This application utilizes this characteristic of the directed acyclic graph to generate and draw a software infrastructure resource policy graph. The parsing engine and the scheduling engine deploy or generate software infrastructure resources one by one according to the generated policy graph. In this embodiment, the parsing engine and the scheduling engine adopted by the http-server module and the scheduling module are determined by the software infrastructure resources selected by the system configuration.
[0064] As Figure 1 shown, on the one hand, this application proposes a method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph, including the following steps:
[0065] S100. Configure the container docker on the browser side and construct a deployment policy graph for the container docker according to the characteristics of the directed acyclic graph;
[0066] S200. Collect the software configuration information of the user through the browser side and send it to the http-server module according to a preset data format;
[0067] S300. The http-server module receives the software configuration information and parses it to obtain a directed acyclic graph and sends it to the scheduling module;
[0068] S400. The scheduling module receives the directed acyclic graph and executes the deployment task according to the data structure of the directed acyclic graph.
[0069] This solution mainly uses HTTP (hypertext) services or APIs (application programming interfaces) to collect users' software configuration information into HTTP (hypertext) service modules, decomposes it into multiple dependent adjustment tasks through a directed acyclic graph parsing engine, and executes deployment tasks in the order of dependencies.
[0070] The implementation of steps S100 - S400 will be described in detail below.
[0071] like Figure 2 As shown, the directed acyclic graph deployment strategy diagram for this embodiment.
[0072] As an optional implementation scheme of the present application, optionally, in step S100, a container docker is configured on the browser side, and a deployment strategy graph of the container docker is constructed according to the directed acyclic graph characteristics, including:
[0073] S101, scheduling software infrastructure resources on the browser side;
[0074] S102, presetting the software infrastructure resources in a container Docker, and publishing the pre-started container Docker to a warehouse;
[0075] S103, presetting a data source, and configuring a database according to the data source;
[0076] S104: presetting a service startup rule for the container docker, and configuring the container docker according to the service startup rule.
[0077] Specific, combined Figure 2 As shown, each node means the configuration information and requirements at different nodes.
[0078] First, take the start node as the starting point. This "start" node is just a mark for the start of scheduling basic resource generation. In the browser side of the directed acyclic graph deployment strategy diagram, the json data obtained will contain the Figure 2 The data information of the "start" node, the "end" node and other deployment nodes shown in the figure will be described in detail below.
[0079] The next node is to publish the software image to the warehouse. The main task of this node is to download the docker image to be started to the cluster node. The image can contain software infrastructure resources such as web services, database services, and tcp services. The specific configuration is selected and configured by the user. After the selection is completed, the software infrastructure resources are preset in the container docker.
[0080] The next node is the configured data source, which will configure the database. The configuration data includes creating table information, stored procedures, importing default table data content, etc. required for the database server and web services. Mainly, the configuration attributes required by each component need to be collected and configured in the database for convenient operation.
[0081] The next node is the resource rule, which mainly configures the container service startup rules, including container startup parameters, container startup environment variables, mounted volume paths, etc. The container service startup rules are mainly the startup rules for the user to start the container dock on the browser side and can be freely defined by the user.
[0082] After configuring the above various rules and databases, etc., the deployment strategy of the software basic resources can be set. The above configured nodes will be connected through the dependency relationships between the nodes and distributed on the deployment branch nodes.
[0083] As an optional implementation of this application, optionally, in step S100, configuring the container docker on the browser side and constructing the deployment strategy graph of the container docker according to the characteristics of the directed acyclic graph further includes:
[0084] S110. Create a deployment branch, and deploy the container docker on the browser side according to the deployment branch to obtain the deployment strategy graph of the container docker;
[0085] S120. Through the preset node verification rules, perform container docker startup service verification on the deployed deployment strategy graph;
[0086] S130. If the verification is passed, notify the system that the deployment is completed.
[0087] Combined with Figure 2 As shown, the next node is the resource branch, which creates a deployment branch that records the deployment time, deployment logs, etc., for the user to view the deployment records conveniently. There are two nodes after this node, one is the linux node and the other is the k8s cluster node. The linux node represents that web services, database services, etc. can be deployed to the linux host, and the k8s cluster node represents that these services can also be deployed to the k8s cluster.
[0088] The next node is the application verification node, which verifies the deployed web service or database service to check whether the service starts normally;
[0089] Finally, there is the "end" node, which only notifies the system that the deployment is completed.
[0090] The connections between all the above nodes represent the dependencies of each node. Nodes with dependencies are executed in sequence, and nodes without dependencies can be executed concurrently. If any node fails during the entire deployment process, the subsequent deployment process will stop, and an error log will be recorded for the user to view and modify the configuration information.
[0091] According to the above deployment method, the user can construct and generate a deployment strategy graph of software infrastructure resources (inside the container docker) according to the characteristics of a directed acyclic graph, that is, a directed acyclic graph of software infrastructure resources.
[0092] In this embodiment, the software infrastructure resources that meet the above deployment structure diagram are configured for use on the browser side. This enables the user to call each plugin module or software on the browser side according to the directed acyclic graph of the above deployment structure diagram.
[0093] As an alternative implementation of this application, optionally, in step S200, the software configuration information of the user is collected through the browser side and sent to the http-server module according to a preset data format, including:
[0094] S201. Collect the software configuration information of the configured container docker through the browser side;
[0095] S202. Construct the software configuration information into json data according to the preset json format and save it to the browser side;
[0096] S203. Send the json data to the http-server module through the browser side.
[0097] During specific operations, the user edits and adds various components on the browser side, configures the attributes of each component, and connects the components with lines to represent a complete workflow.
[0098] The browser side constructs the various components edited by the user into a configuration data (json data) in json format (object format). This process generates a directed acyclic graph for resource scheduling and verifies the canonical logic of the directed acyclic graph. Since various components are constructed and deployed according to the characteristics of the above directed acyclic graph, after the user edits / configures various components on the browser side, json data that conforms to the directed acyclic graph can be obtained through the browser side.
[0099] In this embodiment, an example of json (object format) data is as follows:
[0100] [{
[0101] "name": "start",
[0102] "nextnode": ["alicoud"]
[0103] }, {
[0104] "name": "alicloud",
[0105] "cpu": 1,
[0106] "disk": 256,
[0107] "mem": 256,
[0108] "nextnode": ["docker"]
[0109] }, {
[0110] "name": "docker",
[0111] "image": "nginx:latest",
[0112] "port": 80,
[0113] "export": 8080,
[0114] "nextnode": ["end"]
[0115] }, {
[0116] "name": "end"
[0117] }].
[0118] This json data contains a start node and an end node, with the alicloud node and the docker node connected in the middle. The nextnode field represents the next node to be connected. This field is an array type, which means that the nodes to be connected below may be multiple nodes. For example, this json example represents applying for a cloud host and deploying a docker container with nginx as the image, with the exposed external port 8080. Therefore, the structure of the obtained json data is the same as Figure 2 The nodes in are matched.
[0119] As an optional implementation scheme of the present application, optionally, in step S300, the http-server module receives and parses the software configuration information, obtains a directed acyclic graph and sends it to the scheduling module, including:
[0120] S301, the http-server module receives the json data and sends the json data to the directed acyclic graph parsing engine;
[0121] S302, the directed acyclic graph parsing engine receives the json data, and parses the json data through the configured directed acyclic graph parsing engine thread pool to obtain a directed acyclic graph;
[0122] S303: Queue the directed acyclic graph obtained by parsing, and send it to the scheduling module in a queue manner.
[0123] In this embodiment, the browser sends the constructed JSON format (object format) configuration information, namely, JSON data, to the http-server (hypertext protocol service) module through the http protocol (hypertext protocol).
[0124] Of course, the communication process from the browser end to the http-server (hypertext protocol service) in the software deployment solution based on the directed acyclic graph can also be implemented through an api (application programming interface) calling process, which is not limited by the present invention.
[0125] The http-server (Hypertext Protocol Service) module passes the configuration information in JSON format (object format) to the directed acyclic graph parsing engine, decomposes it into multiple dependent adjustment tasks, and executes the deployment tasks in the order of dependencies.
[0126] Specifically, Figure 3 As shown, the http-server module is configured with a directed acyclic graph parsing engine, which can parse the json data through the directed acyclic graph parsing engine thread pool of the directed acyclic graph parsing engine.
[0127] First, get the information of each node in the json data, and then get the nodes connected behind each node through the nextnode field information, so as to build a directed acyclic graph.
[0128] Specifically, the JSON data queue sent from the browser enters the directed acyclic graph parsing engine thread pool in sequence to find an idle thread. If there is no idle thread, it will be blocked until an idle thread appears. After obtaining the idle thread, this thread is used to parse the JSON data. At this time, the thread is in a working state, and other JSON data parsing cannot use this thread. After the thread finishes parsing the JSON data, it will parse the directed acyclic graph and send it to the scheduling module through a queue. At this point, a JSON data is parsed, and the thread is converted from a working state to an idle state. Other blocked JSON data can use this idle state thread.
[0129] As an alternative implementation of the present application, optionally, in step S400, the scheduling module receives the directed acyclic graph and executes the deployment task according to the data structure of the directed acyclic graph, including:
[0130] S401. The scheduling module receives the directed acyclic graph and obtains the data structure of the directed acyclic graph of the directed acyclic graph;
[0131] S402. According to the data structure of the directed acyclic graph, obtain the task execution order of the deployed nodes;
[0132] S403. The scheduling module schedules the software infrastructure resources corresponding to the deployment task according to the task execution order of the nodes and starts to execute the deployment task.
[0133] Each node in the data structure of the directed acyclic graph in the memory of the scheduling module corresponds to a workflow, and each connection line corresponds to the sequence of each workflow. The workflows are executed in the order of dependence of the directed acyclic graph. Nodes with dependencies need to wait for execution, and nodes without dependencies can be executed concurrently.
[0134] The scheduling module first finds the start node, marks it as the start of scheduling in the memory, then finds the subsequent nodes of the start node, and starts new threads to execute the scheduling tasks of the subsequent nodes. If there are multiple subsequent nodes, multiple threads will be started to execute simultaneously to improve the execution efficiency. After waiting for the subsequent node tasks to be completed, it will continue to find the subsequent nodes of the subsequent nodes and continue to start threads to execute tasks until it is found that the subsequent node is the end node, which means that all scheduling tasks are completed, and the task of the scheduling module is marked as ended in the memory.
[0135] The above is the software deployment service process executed by a node in the local cluster.
[0136] However, during the execution of the node, if the software to be deployed in the cloud is required when the node executes the deployment task, at this time, it is necessary to call the interface from the cloud through the scheduling module to execute the deployment task.
[0137] Therefore, if the node execution requires applying for a cloud host cluster in a certain cloud or a certain cloud, the cloud plugin module needs to execute the node task.
[0138] As an alternative implementation of the present application, optionally, in step S400, the scheduling module receives the directed acyclic graph and executes the deployment task according to the data structure of the directed acyclic graph, and further includes:
[0139] S410. Through the scheduling module, determine whether the software infrastructure resources for executing the deployment task are deployed in the cloud;
[0140] S420. If the software infrastructure resources deployed in the cloud are required, the task information is sent to a preset cloud plugin module through the scheduling module.
[0141] S430. The cloud plugin module receives the task information and sends the task information to the cloud platform.
[0142] As Figure 4 shown, in this embodiment, a cloud plugin module and a cloud platform are also added.
[0143] First, it is judged by the scheduling module whether the node execution needs to be performed through the cloud. If the node execution needs to apply for a cloud host cluster in the cloud, such as a certain cloud or a certain other cloud, the cloud plugin module needs to execute the node task, apply for a cloud host cluster with specified hardware information such as memory, CPU (Central Processing Unit), and hard disk in a certain cloud or a certain other cloud. After the application is successful, the software service configured by the user is deployed on the corresponding cloud host.
[0144] The cloud plugin module is mainly used to configure and manage cloud resources, such as network, computing, and data resources. The cloud plugin module can version and reuse the infrastructure construction of other clouds such as a certain cloud and a certain other cloud, and adopt a standardized development interface, so that each cloud vendor can customize its own cloud plugin module. For different cloud platforms, different cloud plugin modules are required, so that platforms can be added very flexibly.
[0145] In this embodiment, as Figure 4 shown, the cloud plugin module provides 4 interfaces that can be called by the scheduling module, namely a create resource interface, a read resource interface, an update resource interface, and a delete resource interface.
[0146] The create resource interface is used to create the cloud host required in the deployment task. The read resource interface is used to read the created cloud host resources. The update resource interface is used to update the configuration of the applied cloud host resources after the configuration information of the deployment task resources is updated. The delete resource interface is used to release the resources after the deployment task is deleted.
[0147] As an optional implementation solution of the present application, optionally, in step S400, when the scheduling module receives the directed acyclic graph and executes the deployment task according to the data structure of the directed acyclic graph, it further includes:
[0148] S411. The cloud platform receives the task information;
[0149] S421. According to the task information, the corresponding cloud host that matches the task information is selected from the cloud platform and called, and the call result is returned to the cloud plugin module;
[0150] S431. The cloud plugin module receives the call result and returns it to the scheduling module.
[0151] After the scheduling module calls these interfaces, the cloud plugin module communicates with the cloud platform through the http service, sends the task information to be operated to the cloud platform. The cloud platform then makes api calls to its own cloud platform according to these task information to create, delete, update, and read cloud host resources, and then returns success or failure information to the cloud plugin module according to the call result. The cloud plugin module then returns the information to the scheduling module. Thus, a complete working process of the cloud plugin module ends here.
[0152] If the node execution only needs to perform software service deployment in the local cluster, the software deployment service will be directly executed in the local cluster without using the cloud plugin module.
[0153] Therefore, the present application enables users to deploy software services by simply dragging some components and configuring some properties on the browser page, which greatly improves the efficiency of software deployment. By using various components, the deployment is also more flexible, and it can be deployed either in the local cluster or in the cloud.
[0154] It should be noted that although the cloud management entities such as a certain cloud and so-and-so cloud are introduced as examples above, those skilled in the art can understand that the present disclosure should not be limited thereto. In fact, users can flexibly set the cloud server, etc. according to the actual application scenario as long as the technical functions of the present application can be realized according to the above technical methods.
[0155] Embodiment 2
[0156] Based on the implementation principle of Embodiment 1, in this embodiment, as Figure 5 shown, on the other hand, the present application proposes an electronic device for implementing the method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph as described above, including:
[0157] A browser side, which is used for the user to configure the container docker on the browser side and construct a deployment policy graph of the container docker according to the characteristics of the directed acyclic graph; and, collect the software configuration information of the user through the browser side and send it to the http-server module according to a preset data format;
[0158] An http-server module, which is used for receiving the software configuration information, parsing it, obtaining a directed acyclic graph, and sending it to the scheduling module;
[0159] A scheduling module, which is used for receiving the directed acyclic graph and executing the deployment task according to the data structure of the directed acyclic graph.
[0160] For the functions and application principles of the above browser terminal, http-server module, and scheduling module, please refer to the description in Embodiment 1, and details are not described herein again.
[0161] In addition, if cloud management is adopted, in this embodiment, the composition of the electronic device is referred to Figure 6 , in addition to the above browser terminal, http-server module, and scheduling module, the electronic device further includes a cloud plugin module and a cloud platform, and their functions and application principles are also specifically referred to the description in Embodiment 1.
[0162] Obviously, those skilled in the art should understand that all or part of the processes in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above control methods. Each module or each step of the above invention of the present invention can be implemented by a general computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device. Thus, they can be stored in the storage device and executed by the computing device, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present invention is not limited to any specific combination of hardware and software.
[0163] Those skilled in the art can understand that all or part of the processes in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above control methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memories.
[0164] Embodiment 3
[0165] Furthermore, on the other hand, the present application proposes a deployment system, including:
[0166] A processor;
[0167] A memory for storing instructions executable by the processor;
[0168] Wherein, when the processor is configured to execute the executable instructions, it implements the method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph as described above.
[0169] The deployment system according to an embodiment of the present disclosure includes a processor and a memory for storing executable instructions of the processor. Wherein, when the processor is configured to execute the executable instructions, it implements the method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph as described in any one of the foregoing.
[0170] Here, it should be noted that the number of processors can be one or more. At the same time, in the deployment system according to an embodiment of the present disclosure, an input device and an output device may also be included. Wherein, the processor, the memory, the input device, and the output device can be connected through a bus or in other ways, which is not specifically limited herein.
[0171] The memory, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and various modules, such as: the programs or modules corresponding to the method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph according to an embodiment of the present disclosure. The processor executes various functional applications and data processing of the control system by running the software programs or modules stored in the memory.
[0172] The input device can be used to receive input numbers or signals. Wherein, the signal can be a key signal related to the user settings and function control of the device / terminal / server. The output device may include a display device such as a display screen.
[0173] The embodiments of the present disclosure have been described above. The above description is exemplary and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art in the technical field without departing from the scope and spirit of the described embodiments. The selection of the terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technologies in the market, or to enable other ordinary skill in the art in the technical field to understand the embodiments disclosed herein.
Claims
1. A method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph, characterized in that The steps include: S100, configuring a docker container on the browser side, and constructing a deployment strategy graph of the docker container according to the directed acyclic graph characteristics; In step S100, a docker container is configured on the browser side, and a deployment strategy graph of the docker container is constructed according to the directed acyclic graph characteristic, including: S101, scheduling software infrastructure resources on the browser side; S102, presetting the software infrastructure resources in a container Docker, and publishing the pre-started container Docker to a warehouse; S103, presetting a data source, and configuring a database according to the data source; S104, presetting a service startup rule for the container Docker, and configuring the container Docker according to the service startup rule; S110, creating a deployment branch, deploying the container Docker on the browser end according to the deployment branch, and obtaining a deployment strategy diagram of the container Docker; S120, performing container Docker startup service verification on the deployed deployment strategy graph according to preset node verification rules; S130, verification is passed, and the system is notified that deployment is complete; S200, collecting the user's software configuration information through the browser end, and sending it to the http-server module according to a preset data format; S300, the http-server module receives and parses the software configuration information, obtains a directed acyclic graph and sends it to the scheduling module; S400, the scheduling module receives the directed acyclic graph, and executes the deployment task according to the data structure of the directed acyclic graph; During the node execution process, if the node needs to be used to deploy software on the cloud when executing a deployment task, it is necessary to call the interface from the cloud through the scheduling module to execute the deployment task.
2. The method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph according to claim 1, wherein In step S200, the user's software configuration information is collected through the browser end and sent to the http-server module according to a preset data format, including: S201. Collecting software configuration information of the configured container docker through the browser end; S202, constructing the software configuration information into json data according to a preset json format and saving it to the browser end; S203, sending the json data to the http-server module through the browser.
3. The method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph according to claim 2, wherein In step S300, the http-server module receives and parses the software configuration information, obtains a directed acyclic graph and sends it to the scheduling module, including: S301, the http-server module receives the json data and sends the json data to the directed acyclic graph parsing engine; S302, the directed acyclic graph parsing engine receives the json data, and parses the json data through the configured directed acyclic graph parsing engine thread pool to obtain a directed acyclic graph; S303. Queue-process the obtained directed acyclic graph and send it to the scheduling module in a queue manner.
4. The method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph according to claim 3, wherein In step S400, the scheduling module receives the directed acyclic graph and executes the deployment task according to the data structure of the directed acyclic graph, including: S401. The scheduling module receives the directed acyclic graph and obtains the data structure of the directed acyclic graph. S402. According to the data structure of the directed acyclic graph, obtain the task execution order of the deployed nodes. S403. The scheduling module schedules the software infrastructure resources corresponding to the deployment task according to the task execution order of the nodes and starts to execute the deployment task.
5. The method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph according to claim 4, wherein In step S400, the scheduling module receives the directed acyclic graph and executes the deployment task according to the data structure of the directed acyclic graph, further including: S410. Through the scheduling module, determine whether the software infrastructure resources for executing the deployment task are deployed in the cloud. S420. If the software infrastructure resources deployed in the cloud are required, send the task information to a preset cloud plugin module through the scheduling module. S430. The cloud plugin module receives the task information and sends the task information to the cloud platform.
6. The method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph according to claim 5, wherein In step S400, the scheduling module receives the directed acyclic graph and executes the deployment task according to the data structure of the directed acyclic graph, further including: S411. The cloud platform receives the task information. S421. According to the task information, select and call a cloud host corresponding to and matching the task information from the cloud platform, and return the call result to the cloud plugin module. S431. The cloud plugin module receives the call result and returns it to the scheduling module.
7. An electronic device for implementing the method for deploying software infrastructure resources based on the characteristics of a directed acyclic graph according to any one of claims 1-6, characterized in that, Including: A browser side, which is used for a user to configure a container docker on the browser side and construct a deployment policy graph of the container docker according to the characteristics of the directed acyclic graph. And collect the software configuration information of the user through the browser side and send it to the http-server module according to a preset data format. The http-server module is used to receive the software configuration information, parse it, obtain a directed acyclic graph and send it to the scheduling module. The scheduling module is used to receive the directed acyclic graph and execute the deployment task according to the data structure of the directed acyclic graph.
8. A deployment system, characterized in that, Including: A processor; A memory for storing processor-executable instructions; Wherein, when the processor is configured to execute the executable instructions, it implements the method for deploying software infrastructure resources based on the characteristics of the directed acyclic graph according to any one of claims 1-6.
Citation Information
Patent Citations
One-key deployment method and system suitable for offline environment and storage medium
CN114518886A