A multi-host automated operation and maintenance control method and system based on Ansible framework

By building an O&M script execution requirement list and optimizing communication efficiency, scientific planning and reasonable execution of multi-host automated O&M control are achieved, improving the stability of O&M tasks and the effectiveness of IT system management.

CN120416045BActive Publication Date: 2025-09-12GHOSTCLOUD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510898308.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-09-12
Estimated Expiration
2045-07-01

AI Technical Summary

Technical Problem

In multi-host automated operation and maintenance control, existing technologies have problems such as different hosts executing the same operation and maintenance tasks at different times, differences in communication efficiency, difficulty in planning the distribution of operation and maintenance scripts, and untimely script version updates, resulting in low stability and success rate.

Method used

By obtaining the task running progress information of the host node, building an operation and maintenance script execution requirement list, optimizing communication efficiency and storage space constraints, realizing automatic script distribution of control nodes and intelligent management of host nodes, and ensuring that scripts are distributed and stored at a reasonable time.

Benefits of technology

It improves the task stability of multi-host automated operation and maintenance and the effectiveness of IT system management, and solves the scientific planning problem of operation and maintenance script distribution and update.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120416045B_ABST
    Figure CN120416045B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of multi-host automated operation and maintenance, and discloses a multi-host automated operation and maintenance control method and system based on the Ansible framework. By constructing the execution requirements of operation and maintenance scripts corresponding to each operation and maintenance task type and generating an operation and maintenance script execution requirement list for a target operation and maintenance control period, based on the communication efficiency parameters and the number of communication access restrictions between the control node and the host node in each minimum operation and maintenance communication cycle, and considering the script storage reserved space of several host nodes, the method drives the control node to execute the automatic distribution of operation and maintenance scripts and drives the host node to realize intelligent management and automatic execution of script storage in the storage space, thereby realizing scientific planning and reasonable execution of operation and maintenance script distribution, management, update and operation control in the scenario of multi-host automated operation and maintenance control requirements, improving the operation and maintenance task stability of enterprise multi-host automated operation and maintenance, and improving the effectiveness of enterprise management and operation of IT systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of multi-host automated operation and maintenance, and in particular to a multi-host automated operation and maintenance control method and system based on the Ansible framework. Background Art

[0002] Automated operations and maintenance can help enterprises effectively manage and run IT systems. In the early stages of development, enterprises used scripts and simple programs to automate IT operations and maintenance tasks. With the development of technology, automated operations and maintenance tools have become more complex and can achieve more functions, such as automated deployment, automated monitoring, automated orchestration, etc. Now, automated operations and maintenance have become an important part of enterprise IT management, which can help enterprises manage and run IT systems more effectively. Ansible is an automated operations and maintenance tool developed in Python. It can perform tasks such as batch system configuration, batch program deployment, batch command execution, etc. It can also deploy software and orchestrate more advanced IT tasks. The main goal of Ansible is simplicity and ease of use. Ansible itself is an execution framework, and it is its many modules that actually perform operations and maintenance tasks. Ansible can be used to manage large-scale operations and maintenance environments in batches.

[0003] When faced with the need for multi-host automated operation and maintenance control, the existing operation and maintenance task execution based on the Ansible framework has the following limitations: (1) In the case of multi-host automated operation and maintenance control, different hosts may execute the same operation and maintenance task at different times (the main reason is that different hosts have different progress in executing tasks, resulting in different time points for executing the same operation and maintenance task at different times). In this case, the control node cannot distribute the operation and maintenance scripts according to a unified time; (2) Usually, the communication efficiency between different hosts and the control node will be affected by factors such as communication bandwidth and communication link occupancy, resulting in differences in communication efficiency. When distributing operation and maintenance task scripts, it is necessary not only to ensure that each operation and maintenance The task script is distributed to the host before the operation and maintenance task is executed. It is also necessary to ensure that the communication efficiency during distribution meets the requirements and that the host's script storage space can receive but not execute the operation and maintenance script data. This brings planning difficulties to the operation and maintenance script distribution control in the scenario of multi-host automated operation and maintenance control requirements; (3) Since the operation and maintenance script will be updated from time to time, it will be distributed to the host by the control node after the update. If the operation and maintenance script is saved on the host for a long time without updating, the stability, effectiveness and success rate of the host's execution of the operation and maintenance task will not be guaranteed. When planning the operation and maintenance script distribution under the requirements of multi-host automated operation and maintenance control, it is also necessary to consider the update optimization problem of the operation and maintenance script, which further increases the difficulty of operation and maintenance management.

[0004] Therefore, how to achieve scientific planning and reasonable execution of operation and maintenance script distribution, management, update and operation control in the scenario of multi-host automated operation and maintenance control, improve the stability of operation and maintenance tasks of enterprise multi-host automated operation and maintenance, and improve the effectiveness of enterprise management and operation of IT systems is a technical problem that needs to be solved urgently. Summary of the Invention

[0005] The main purpose of the present invention is to provide a multi-host automated operation and maintenance control method and system based on the Ansible framework, aiming to solve at least one of the above technical problems.

[0006] To achieve the above objectives, the present invention provides a multi-host automated operation and maintenance control method based on the Ansible framework, the method comprising the following steps:

[0007] Obtaining task execution progress information of a plurality of host nodes within a target operation and maintenance range during a target operation and maintenance control period; wherein the task execution progress information includes a time period for each host node to execute each operation and maintenance task during the target operation and maintenance control period;

[0008] Analyze the task running progress information, extract the operation and maintenance task types and operation and maintenance task execution time of each host node in the target operation and maintenance control period, construct the execution requirements of the operation and maintenance script corresponding to each operation and maintenance task type, and generate the operation and maintenance script execution requirements list for the target operation and maintenance control period;

[0009] Query the communication efficiency parameters and communication access quantity limits for each minimum operation and maintenance communication cycle between several host nodes and the control node deployed with Ansible within the target operation and maintenance control period. Consider the script storage reserved space of several host nodes, use communication efficiency, communication access quantity limits, and communication storage space as the constraint condition set, and use the script quality determined by the script update time as the optimization goal to optimize the automated operation and maintenance strategy between the control node and several host nodes during the target operation and maintenance control period.

[0010] Based on the script distribution strategy in the automated operation and maintenance strategy, drive the control node to distribute the script to the corresponding host node at the corresponding time point, and based on the script retention strategy in the automated operation and maintenance strategy, drive the host node to perform script management of the storage space;

[0011] Each host node calls the operation and maintenance script stored in the storage space according to the script execution schedule to execute the operation and maintenance task corresponding to the operation and maintenance script.

[0012] Optionally, the step of obtaining task running progress information of several host nodes within the target operation and maintenance scope during the target operation and maintenance control period specifically includes:

[0013] Obtaining task operation plan information sent by several host nodes within the target operation and maintenance range in each task operation progress reporting cycle; wherein the task operation plan information includes the task operation plan of each host node between the current task operation progress reporting cycle and the next task operation progress reporting cycle;

[0014] According to the time period for executing each operation and maintenance task in the task operation plan, task operation progress information of a plurality of host nodes within the target operation and maintenance scope in the target operation and maintenance control period is determined.

[0015] Optionally, the time interval between two adjacent task running progress reporting cycles of each host node is configured to be the same and not less than the standard duration of each operation and maintenance control period.

[0016] Optionally, parsing the task running progress information to extract the type of operation and maintenance tasks and the operation and maintenance task execution time steps performed by each host node in the target operation and maintenance control period specifically includes:

[0017] Parsing the task running progress information, extracting the task description information and time period of each operation and maintenance task executed by each host node in the target operation and maintenance control period;

[0018] Based on the task description information, natural language processing tools are used to extract task keywords for each operation and maintenance task, and the operation and maintenance task type of each operation and maintenance task is matched using the mapping relationship between the task keywords, the operation and maintenance task type, and the task keyword set;

[0019] According to the time period in which each operation and maintenance task corresponds to each host node in the target operation and maintenance control period, the operation and maintenance task execution time executed by each host node in the target operation and maintenance control period is determined.

[0020] Optionally, construct the execution requirements of the operation and maintenance scripts corresponding to each operation and maintenance task type, and generate a list of operation and maintenance script execution requirements for the target operation and maintenance control period, specifically including:

[0021] Using the operation and maintenance task type of each operation and maintenance task, match the operation and maintenance script required for the operation and maintenance task execution in the operation and maintenance script matching library. Using the operation and maintenance task execution time and the required operation and maintenance script of each operation and maintenance task, build the execution requirements of the operation and maintenance script corresponding to each operation and maintenance task type.

[0022] The execution requirements of each host in the target operation and maintenance control period are separately summarized to generate an operation and maintenance script execution requirement list for the target operation and maintenance control period.

[0023] Optionally, query the communication efficiency parameters and communication access quantity limits for each minimum operation and maintenance communication cycle between several host nodes and the control node where Ansible is deployed during the target operation and maintenance control period, including:

[0024] Access the historical operation and maintenance control database to query the communication efficiency parameter changes and communication access quantity limit information of each host node and the control node deployed with Ansible during each historical operation and maintenance control period;

[0025] Based on the communication efficiency parameter change information and communication access quantity limit information of each historical operation and maintenance control period, the communication efficiency parameters and communication access quantity limit of each host node and the control node deployed with Ansible in each minimum operation and maintenance communication cycle within the target operation and maintenance control period are predicted.

[0026] Optionally, considering the script storage reserved space of several host nodes, with communication efficiency, communication access quantity limit and communication storage space as the constraint condition set, and script quality determined by script update time as the optimization target, the steps of optimizing and solving the automated operation and maintenance strategy of the control node and several host nodes in the target operation and maintenance control period are specifically including:

[0027] Query the script storage reserved space of each host node, considering the communication efficiency parameters and communication access quantity limit of each minimum operation and maintenance communication cycle between each host node and the control node where Ansible is deployed during the target operation and maintenance control period, as well as the operation and maintenance script execution requirement list;

[0028] The first constraint condition is that the time when each host node receives each operation and maintenance script distributed by the control node is earlier than the operation and maintenance task execution time of the operation and maintenance task corresponding to the operation and maintenance script; the second constraint condition is that the data volume of all operation and maintenance scripts received by each host node in each minimum operation and maintenance communication cycle is less than the communication efficiency parameter of each host node and the control node in each minimum operation and maintenance communication cycle and the maximum communication transmission data volume determined by the minimum operation and maintenance communication cycle; the third constraint condition is that the number of host nodes that receive the operation and maintenance script distributed by the control node in each minimum operation and maintenance communication cycle is less than the communication access number limit between each host node and the control node in each minimum operation and maintenance communication cycle; the fourth constraint condition is that the amount of operation and maintenance scripts deleted by each host node in each operation and maintenance communication cycle and the amount of data storage determined by the operation and maintenance scripts distributed by the control node are less than the script storage reserved space of the host node; the optimization objective is to minimize the sum of the interval time from the distribution of each operation and maintenance script to the execution of the operation and maintenance script, and optimize and solve the script distribution strategy of the control node and the script retention strategy of each host node;

[0029] According to the script distribution policy of the control node and the script retention policy of each host node, an automated operation and maintenance policy for the control node and several host nodes in the target operation and maintenance control period is generated.

[0030] Optionally, based on the script distribution strategy in the automated operation and maintenance strategy, driving the control node to distribute the script to the corresponding host node at a corresponding time point, and based on the script retention strategy in the automated operation and maintenance strategy, driving the host node to perform the script management steps of the storage space, specifically including:

[0031] Based on the script distribution strategy in the automated operation and maintenance strategy, driving the control node to execute distribution of the corresponding operation and maintenance script to the host node in each minimum operation and maintenance communication cycle in the target operation and maintenance control period;

[0032] Based on the script retention policy in the automated operation and maintenance policy, the host node is driven to perform script management of the storage space, and the corresponding operation and maintenance script is deleted from the script storage reserved space.

[0033] Optionally, each host node calls the operation and maintenance script stored in the storage space according to the script execution schedule to execute the operation and maintenance task steps corresponding to the operation and maintenance script, specifically including: each host node calls the operation and maintenance script stored in the storage space according to the script execution schedule determined by the task running progress information to execute the operation and maintenance task corresponding to the operation and maintenance script.

[0034] In addition, to achieve the above objectives, the present invention also provides a multi-host automated operation and maintenance control system based on the Ansible framework, comprising:

[0035] An acquisition module is used to obtain task running progress information of a plurality of host nodes within a target operation and maintenance range during a target operation and maintenance control period; wherein the task running progress information includes a time period for each host node to execute each operation and maintenance task during the target operation and maintenance control period;

[0036] A parsing module is used to parse the task running progress information, extract the operation and maintenance task types and operation and maintenance task execution time of each host node in the target operation and maintenance control period, construct the execution requirements of the operation and maintenance script corresponding to each operation and maintenance task type, and generate a list of operation and maintenance script execution requirements for the target operation and maintenance control period;

[0037] The query module is used to query the communication efficiency parameters and communication access quantity limit of each minimum operation and maintenance communication cycle between several host nodes and the control node deployed with Ansible within the target operation and maintenance control period. Taking into account the script storage reserved space of several host nodes, with communication efficiency, communication access quantity limit and communication storage space as the constraint condition set, and with the script quality determined by the script update time as the optimization goal, the module optimizes and solves the automated operation and maintenance strategy of the control node and several host nodes during the target operation and maintenance control period.

[0038] a driving module for driving the control node to distribute the script to the corresponding host node at a corresponding time point based on the script distribution policy in the automated operation and maintenance policy, and driving the host node to perform script management of the storage space based on the script retention policy in the automated operation and maintenance policy;

[0039] The execution module is used for each host node to call the operation and maintenance script stored in the storage space according to the script execution schedule to execute the operation and maintenance task corresponding to the operation and maintenance script.

[0040] The beneficial effects of the present invention are: proposing a multi-host automated operation and maintenance control method and system based on the Ansible framework, by constructing the execution requirements of the operation and maintenance script corresponding to each operation and maintenance task type and generating an operation and maintenance script execution requirement list for the target operation and maintenance control period, based on the communication efficiency parameters and the number of communication access restrictions between the control node and the host node in each minimum operation and maintenance communication cycle, considering the script storage reserved space of several host nodes, driving the control node to execute the automatic distribution of the operation and maintenance script and driving the host node to realize the intelligent management and automatic execution of the script storage in the storage space, realizing the scientific planning and reasonable execution of the operation and maintenance script distribution, management, update and operation control under the multi-host automated operation and maintenance control demand scenario, improving the operation and maintenance task stability of the enterprise's multi-host automated operation and maintenance, and improving the effectiveness of the enterprise's management and operation of IT systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 This is a flow chart of the multi-host automated operation and maintenance control method based on the Ansible framework of the present invention;

[0042] Figure 2 This is a structural diagram of the multi-host automated operation and maintenance control system based on the Ansible framework of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0044] The embodiment of the present invention provides a multi-host automated operation and maintenance control method based on the Ansible framework, referring to Figure 1 , Figure 1 This is a flow chart of an embodiment of the multi-host automated operation and maintenance control method based on the Ansible framework of the present invention.

[0045] In this embodiment, a multi-host automated operation and maintenance control method based on the Ansible framework includes the following steps:

[0046] S100: Obtaining task execution progress information of a plurality of host nodes within a target operation and maintenance range during a target operation and maintenance control period; wherein the task execution progress information includes a time period for each host node to execute each operation and maintenance task during the target operation and maintenance control period;

[0047] S200: parsing the task execution progress information, extracting the operation and maintenance task types and operation and maintenance task execution times for each host node in the target operation and maintenance control period, constructing the execution requirements of the operation and maintenance scripts corresponding to each operation and maintenance task type, and generating a list of operation and maintenance script execution requirements for the target operation and maintenance control period;

[0048] S300: Querying communication efficiency parameters and communication access quantity limits for each minimum operation and maintenance communication cycle between a plurality of host nodes and a control node deployed with Ansible within a target operation and maintenance control period, taking into account script storage reserved space of the plurality of host nodes, using communication efficiency, communication access quantity limits, and communication storage space as constraint conditions, and using script quality determined by script update time as an optimization objective, to optimize and solve the automated operation and maintenance strategy between the control node and the plurality of host nodes within the target operation and maintenance control period;

[0049] S400: Based on the script distribution policy in the automated operation and maintenance policy, driving the control node to distribute the script to the corresponding host node at a corresponding time point, and based on the script retention policy in the automated operation and maintenance policy, driving the host node to perform script management of the storage space;

[0050] S500: Each host node calls the operation and maintenance script stored in the storage space according to the script execution schedule to execute the operation and maintenance task corresponding to the operation and maintenance script.

[0051] It should be noted that in the scenario of multi-host automated operation and maintenance control, the existing operation and maintenance task execution based on the Ansible framework has the following limitations: (1) In the case of multi-host automated operation and maintenance control, different hosts may execute the same operation and maintenance task at different times (the main reason is that different hosts have different progress in executing tasks, resulting in different time points for executing the same operation and maintenance task at different times). In this case, the control node cannot distribute the operation and maintenance scripts according to the unified time; (2) Usually, the communication efficiency between different hosts and the control node will be affected by factors such as communication bandwidth and communication link occupancy, resulting in differences in communication efficiency. When distributing operation and maintenance task scripts, it is necessary not only to ensure Each operation and maintenance task script is distributed to the host before the operation and maintenance task is executed. It is also necessary to ensure that the communication efficiency during distribution meets the requirements and that the host's script storage space can receive but not execute the operation and maintenance script data. This brings planning difficulties to the operation and maintenance script distribution control in the scenario of multi-host automated operation and maintenance control requirements; (3) Since the operation and maintenance script will be updated from time to time, it will be distributed to the host by the control node after the update. If the operation and maintenance script is saved on the host for a long time without updating, the stability, effectiveness and success rate of the host's execution of the operation and maintenance task will not be guaranteed. When planning the operation and maintenance script distribution under the requirements of multi-host automated operation and maintenance control, it is also necessary to consider the update optimization problem of the operation and maintenance script, which further increases the difficulty of operation and maintenance management.

[0052] In order to solve the above problems, this embodiment constructs the execution requirements of the operation and maintenance scripts corresponding to each operation and maintenance task type and generates an operation and maintenance script execution requirement list for the target operation and maintenance control period. Based on the communication efficiency parameters and communication access quantity restrictions between the control node and the host node in each minimum operation and maintenance communication cycle, the script storage reserved space of several host nodes is considered, and the control node is driven to execute the automatic distribution of the operation and maintenance scripts and the host node is driven to realize the intelligent management and automatic execution of the script storage in the storage space. The scientific planning and reasonable execution of the operation and maintenance script distribution, management, update and operation control under the multi-host automated operation and maintenance control demand scenario are realized, the stability of the operation and maintenance tasks of the enterprise's multi-host automated operation and maintenance is improved, and the effectiveness of the enterprise's management and operation of IT systems is improved.

[0053] In a preferred embodiment, the step of obtaining task execution progress information of several host nodes within the target operation and maintenance scope during the target operation and maintenance control period specifically includes:

[0054] S110: Obtaining task operation plan information sent by several host nodes within the target operation and maintenance range in each task operation progress reporting cycle; wherein the task operation plan information includes the task operation plan of each host node between the current task operation progress reporting cycle and the next task operation progress reporting cycle;

[0055] S120: Determine task running progress information of a plurality of host nodes within a target operation and maintenance scope in a target operation and maintenance control period according to a time period for executing each operation and maintenance task in the task running plan.

[0056] In this embodiment, the task execution progress information of each host node is obtained from the task execution plan information sent by each host node during each task execution progress reporting cycle. In actual application, the time interval between two adjacent task execution progress reporting cycles of each host node is configured to be the same and no less than the standard duration of each operation and maintenance control period.

[0057] In a preferred embodiment, the task execution progress information is parsed to extract the type of operation and maintenance tasks and the execution time steps of the operation and maintenance tasks executed by each host node in the target operation and maintenance control period, specifically including:

[0058] S210: parsing the task execution progress information, extracting the task description information and time period of each operation and maintenance task executed by each host node in the target operation and maintenance control period;

[0059] S220: Based on the task description information, extract task keywords for each operation and maintenance task using a natural language processing tool, and match the operation and maintenance task type of each operation and maintenance task using a mapping relationship between the task keywords, the operation and maintenance task type, and the task keyword set;

[0060] S230: Determine the execution time of the operation and maintenance task executed by each host node in the target operation and maintenance control period according to the time period during which each operation and maintenance task corresponds to each host node in the target operation and maintenance control period.

[0061] On this basis, the execution requirements of the operation and maintenance scripts corresponding to each operation and maintenance task type are constructed, and the operation and maintenance script execution requirements list for the target operation and maintenance control period is generated. Specifically, the steps include:

[0062] S240: Using the operation and maintenance task type of each operation and maintenance task, match the operation and maintenance script required for executing the operation and maintenance task in the operation and maintenance script matching library; using the operation and maintenance task execution time and the required operation and maintenance script of each operation and maintenance task, construct an execution requirement for the operation and maintenance script corresponding to each operation and maintenance task type;

[0063] S250: Summarize the execution requirements of each host in the target operation and maintenance control period separately to generate an operation and maintenance script execution requirement list for the target operation and maintenance control period.

[0064] In this embodiment, after obtaining the task execution progress information, the task execution progress information is parsed, the task description information is processed using natural language processing tools, and the operation and maintenance scripts are matched through the operation and maintenance script pairing library. Finally, the execution requirements of each host in the target operation and maintenance control period are separately summarized to generate a list of operation and maintenance script execution requirements for the target operation and maintenance control period.

[0065] In a preferred embodiment, querying the communication efficiency parameters and communication access quantity limit of each minimum operation and maintenance communication cycle of several host nodes and the control node deployed with Ansible within the target operation and maintenance control period specifically includes:

[0066] S310: Access the historical operation and maintenance control database to query the communication efficiency parameter change information and communication access quantity limit information when each host node and the control node deployed with Ansible perform operation and maintenance communication during each historical operation and maintenance control period;

[0067] S320: Based on the communication efficiency parameter change information and communication access quantity limit information of each historical operation and maintenance control period, predict the communication efficiency parameters and communication access quantity limit of each minimum operation and maintenance communication cycle between each host node and the control node deployed with Ansible within the target operation and maintenance control period.

[0068] On this basis, considering the script storage reserved space of several host nodes, with communication efficiency, communication access quantity limit and communication storage space as the constraint condition set, and script quality determined by script update time as the optimization target, the automated operation and maintenance strategy steps of the control node and several host nodes in the target operation and maintenance control period are optimized, including:

[0069] S330: Query the script storage reserved space of each host node, considering the communication efficiency parameters and communication access quantity limit of each minimum operation and maintenance communication cycle between each host node and the control node where Ansible is deployed within the target operation and maintenance control period, as well as the operation and maintenance script execution requirement list;

[0070] S340: The first constraint condition is that the time when each host node receives each operation and maintenance script distributed by the control node is earlier than the operation and maintenance task execution time of the operation and maintenance task corresponding to the operation and maintenance script; the second constraint condition is that the data volume of all operation and maintenance scripts received by each host node in each minimum operation and maintenance communication cycle is less than the communication efficiency parameter between each host node and the control node in each minimum operation and maintenance communication cycle and the maximum communication transmission data volume determined by the minimum operation and maintenance communication cycle; the third constraint condition is that the number of host nodes that receive the operation and maintenance script distributed by the control node in each minimum operation and maintenance communication cycle is less than the communication access number limit between each host node and the control node in each minimum operation and maintenance communication cycle; the fourth constraint condition is that the amount of operation and maintenance scripts deleted by each host node in each operation and maintenance communication cycle and the amount of data storage determined by the operation and maintenance scripts distributed by the control node are less than the script storage reserved space of the host node; the optimization objective is to minimize the sum of the interval time from the distribution of each operation and maintenance script to the execution of the operation and maintenance script, and optimize and solve the script distribution strategy of the control node and the script retention strategy of each host node;

[0071] S350: Generate an automated operation and maintenance strategy for the control node and several host nodes in a target operation and maintenance control period according to the script distribution strategy of the control node and the script retention strategy of each host node.

[0072] In this embodiment, by obtaining the task running progress information of several host nodes within the target operation and maintenance scope in the target operation and maintenance control period, the execution requirements of the operation and maintenance script corresponding to each operation and maintenance task type are constructed and a list of operation and maintenance script execution requirements for the target operation and maintenance control period is generated. Based on the communication efficiency parameters and the communication access number limit between the control node and the host node in each minimum operation and maintenance communication cycle, the script storage reserved space of several host nodes is considered, and the communication efficiency, communication access number limit and communication storage space are used as the constraint condition set. The script quality determined by the script update time is used as the optimization target. The automated operation and maintenance strategy of the control node and several host nodes in the target operation and maintenance control period is optimized and solved, so as to realize the scientific planning and reasonable execution of the operation and maintenance script distribution, management, update and operation control in the scenario of multi-host automated operation and maintenance control requirements, improve the stability of the operation and maintenance tasks of the enterprise's multi-host automated operation and maintenance, and improve the effectiveness of the enterprise's management and operation of IT systems.

[0073] In a preferred embodiment, based on the script distribution strategy in the automated operation and maintenance strategy, the control node is driven to distribute the script to the corresponding host node at a corresponding time point, and based on the script retention strategy in the automated operation and maintenance strategy, the host node is driven to perform the script management steps of the storage space, specifically including:

[0074] S410: Based on the script distribution strategy in the automated operation and maintenance strategy, driving the control node to execute distribution of the corresponding operation and maintenance script to the host node in each minimum operation and maintenance communication cycle in the target operation and maintenance control period;

[0075] S420: Based on the script retention policy in the automated operation and maintenance policy, drive the host node to perform script management of the storage space, and delete the corresponding operation and maintenance script in the script storage reserved space.

[0076] Furthermore, each host node calls the operation and maintenance script stored in the storage space according to the script execution schedule to execute the operation and maintenance task steps corresponding to the operation and maintenance script, specifically including: each host node calls the operation and maintenance script stored in the storage space according to the script execution schedule determined by the task running progress information to execute the operation and maintenance task corresponding to the operation and maintenance script.

[0077] In this embodiment, by driving the control node to execute the automatic distribution of operation and maintenance scripts and driving the host node to realize the intelligent management and automatic execution of script storage in the storage space, the scientific planning and reasonable execution of operation and maintenance script distribution, management, update and operation control in the multi-host automated operation and maintenance control demand scenario are realized, the stability of the operation and maintenance tasks of the enterprise's multi-host automated operation and maintenance is improved, and the effectiveness of the enterprise's management and operation of IT systems is improved.

[0078] Reference Figure 2 , Figure 2 This is a structural block diagram of an embodiment of the multi-host automated operation and maintenance control system based on the Ansible framework of the present invention.

[0079] like Figure 2 As shown, the multi-host automated operation and maintenance control system based on the Ansible framework proposed in an embodiment of the present invention includes:

[0080] An acquisition module 10 is configured to acquire task execution progress information of a plurality of host nodes within a target operation and maintenance range during a target operation and maintenance control period; wherein the task execution progress information includes a time period during which each host node executes each operation and maintenance task during the target operation and maintenance control period;

[0081] The parsing module 20 is used to parse the task execution progress information, extract the operation and maintenance task types and operation and maintenance task execution times of each host node in the target operation and maintenance control period, construct the execution requirements of the operation and maintenance scripts corresponding to each operation and maintenance task type, and generate a list of operation and maintenance script execution requirements for the target operation and maintenance control period;

[0082] Query module 30 is configured to query the communication efficiency parameters and communication access quantity limit of each minimum operation and maintenance communication cycle between a plurality of host nodes and a control node deployed with Ansible within a target operation and maintenance control period, consider the script storage reserved space of the plurality of host nodes, use the communication efficiency, communication access quantity limit, and communication storage space as the constraint condition set, and use the script quality determined by the script update time as the optimization target to optimize and solve the automated operation and maintenance strategy of the control node and the plurality of host nodes within the target operation and maintenance control period;

[0083] a driving module 40 for driving the control node to distribute the script to the corresponding host node at a corresponding time point based on the script distribution policy in the automated operation and maintenance policy, and driving the host node to perform script management of the storage space based on the script retention policy in the automated operation and maintenance policy;

[0084] The execution module 50 is configured for each host node to call the operation and maintenance script stored in the storage space according to the script execution schedule to execute the operation and maintenance task corresponding to the operation and maintenance script.

[0085] Other embodiments or specific implementations of the multi-host automated operation and maintenance control system based on the Ansible framework of the present invention can refer to the above-mentioned method embodiments and will not be repeated here.

[0086] It should be understood that, in the description of this specification, reference to terms such as "one embodiment," "another embodiment," "other embodiments," or "first to Nth embodiments" means that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example 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 appropriate manner in any one or more embodiments or examples.

[0087] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0088] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A multi-host automated operation and maintenance control method based on the Ansible framework, characterized in that: The method comprises the following steps: Obtaining task execution progress information of a plurality of host nodes within a target operation and maintenance range during a target operation and maintenance control period; wherein the task execution progress information includes a time period for each host node to execute each operation and maintenance task during the target operation and maintenance control period; Analyze the task running progress information, extract the operation and maintenance task types and operation and maintenance task execution time of each host node in the target operation and maintenance control period, construct the execution requirements of the operation and maintenance script corresponding to each operation and maintenance task type, and generate the operation and maintenance script execution requirements list for the target operation and maintenance control period; Query the communication efficiency parameters and communication access quantity limits for each minimum operation and maintenance communication cycle between several host nodes and the control node deployed with Ansible within the target operation and maintenance control period. Consider the script storage reserved space of several host nodes, use communication efficiency, communication access quantity limits, and communication storage space as the constraint condition set, and use the script quality determined by the script update time as the optimization goal to optimize the automated operation and maintenance strategy between the control node and several host nodes during the target operation and maintenance control period. Among them, considering the script storage reserved space of several host nodes, with communication efficiency, communication access quantity limit and communication storage space as the constraint condition set, and script quality determined by script update time as the optimization goal, the automatic operation and maintenance strategy of the control node and several host nodes in the target operation and maintenance control period is optimized, including: Query the script storage reserved space of each host node, considering the communication efficiency parameters and communication access quantity limit of each minimum operation and maintenance communication cycle between each host node and the control node where Ansible is deployed during the target operation and maintenance control period, as well as the operation and maintenance script execution requirement list; The first constraint condition is that the time when each host node receives each operation and maintenance script distributed by the control node is earlier than the operation and maintenance task execution time of the operation and maintenance task corresponding to the operation and maintenance script; the second constraint condition is that the data volume of all operation and maintenance scripts received by each host node in each minimum operation and maintenance communication cycle is less than the communication efficiency parameter of each host node and the control node in each minimum operation and maintenance communication cycle and the maximum communication transmission data volume determined by the minimum operation and maintenance communication cycle; the third constraint condition is that the number of host nodes that receive the operation and maintenance script distributed by the control node in each minimum operation and maintenance communication cycle is less than the communication access number limit between each host node and the control node in each minimum operation and maintenance communication cycle; the fourth constraint condition is that the amount of operation and maintenance scripts deleted by each host node in each operation and maintenance communication cycle and the amount of data storage determined by the operation and maintenance scripts distributed by the control node are less than the script storage reserved space of the host node; the optimization objective is to minimize the sum of the interval time from the distribution of each operation and maintenance script to the execution of the operation and maintenance script, and optimize and solve the script distribution strategy of the control node and the script retention strategy of each host node; Generate an automated operation and maintenance strategy for the control node and several host nodes during the target operation and maintenance control period based on the script distribution strategy of the control node and the script retention strategy of each host node; Based on the script distribution strategy in the automated operation and maintenance strategy, drive the control node to distribute the script to the corresponding host node at the corresponding time point, and based on the script retention strategy in the automated operation and maintenance strategy, drive the host node to perform script management of the storage space; Each host node calls the operation and maintenance script stored in the storage space according to the script execution schedule to execute the operation and maintenance task corresponding to the operation and maintenance script.

2. The multi-host automated operation and maintenance control method based on the Ansible framework according to claim 1, characterized in that: The steps for obtaining task running progress information of several host nodes within the target operation and maintenance scope during the target operation and maintenance control period include: Obtaining task operation plan information sent by several host nodes within the target operation and maintenance range in each task operation progress reporting cycle; wherein the task operation plan information includes the task operation plan of each host node between the current task operation progress reporting cycle and the next task operation progress reporting cycle; According to the time period for executing each operation and maintenance task in the task operation plan, task operation progress information of a plurality of host nodes within the target operation and maintenance scope in the target operation and maintenance control period is determined.

3. The multi-host automated operation and maintenance control method based on the Ansible framework according to claim 2, characterized in that: The time interval between two adjacent task running progress reporting cycles of each host node is configured to be the same and not less than the standard duration of each operation and maintenance control period.

4. The multi-host automated operation and maintenance control method based on the Ansible framework according to claim 1, characterized in that: Parse the task running progress information to extract the type of operation and maintenance tasks and the operation and maintenance task execution time steps performed by each host node during the target operation and maintenance control period, specifically including: Parsing the task running progress information, extracting the task description information and time period of each operation and maintenance task executed by each host node in the target operation and maintenance control period; Based on the task description information, natural language processing tools are used to extract task keywords for each operation and maintenance task, and the operation and maintenance task type of each operation and maintenance task is matched using the mapping relationship between the task keywords, the operation and maintenance task type, and the task keyword set; According to the time period in which each operation and maintenance task corresponds to each host node in the target operation and maintenance control period, the operation and maintenance task execution time executed by each host node in the target operation and maintenance control period is determined.

5. The multi-host automated operation and maintenance control method based on the Ansible framework according to claim 1, characterized in that: Construct the execution requirements of the operation and maintenance scripts corresponding to each operation and maintenance task type, and generate a list of operation and maintenance script execution requirements for the target operation and maintenance control period. The specific steps include: Using the operation and maintenance task type of each operation and maintenance task, match the operation and maintenance script required for the operation and maintenance task execution in the operation and maintenance script matching library. Using the operation and maintenance task execution time and the required operation and maintenance script of each operation and maintenance task, build the execution requirements of the operation and maintenance script corresponding to each operation and maintenance task type. The execution requirements of each host in the target operation and maintenance control period are separately summarized to generate an operation and maintenance script execution requirement list for the target operation and maintenance control period.

6. The multi-host automated operation and maintenance control method based on the Ansible framework according to claim 1, characterized in that: Query the communication efficiency parameters and communication access quantity limits for each minimum operation and maintenance communication cycle between several host nodes and the control node where Ansible is deployed during the target operation and maintenance control period, including: Access the historical operation and maintenance control database to query the communication efficiency parameter changes and communication access quantity limit information of each host node and the control node deployed with Ansible during each historical operation and maintenance control period; Based on the communication efficiency parameter change information and communication access quantity limit information of each historical operation and maintenance control period, the communication efficiency parameters and communication access quantity limit of each host node and the control node deployed with Ansible in each minimum operation and maintenance communication cycle within the target operation and maintenance control period are predicted.

7. The multi-host automated operation and maintenance control method based on the Ansible framework according to claim 1, characterized in that: Based on the script distribution strategy in the automated operation and maintenance strategy, the control node is driven to distribute the script to the corresponding host node at the corresponding time point, and based on the script retention strategy in the automated operation and maintenance strategy, the host node is driven to perform the script management steps of the storage space, specifically including: Based on the script distribution strategy in the automated operation and maintenance strategy, driving the control node to execute distribution of the corresponding operation and maintenance script to the host node in each minimum operation and maintenance communication cycle in the target operation and maintenance control period; Based on the script retention policy in the automated operation and maintenance policy, the host node is driven to perform script management of the storage space, and the corresponding operation and maintenance script is deleted from the script storage reserved space.

8. The multi-host automated operation and maintenance control method based on the Ansible framework according to claim 1, characterized in that: Each host node calls the operation and maintenance script stored in the storage space according to the script execution schedule to execute the operation and maintenance task steps corresponding to the operation and maintenance script. Specifically, each host node calls the operation and maintenance script stored in the storage space according to the script execution schedule determined by the task running progress information to execute the operation and maintenance task corresponding to the operation and maintenance script.

9. A multi-host automated operation and maintenance control system based on the Ansible framework, characterized in that: include: An acquisition module is used to obtain task running progress information of a plurality of host nodes within a target operation and maintenance range during a target operation and maintenance control period; wherein the task running progress information includes a time period for each host node to execute each operation and maintenance task during the target operation and maintenance control period; A parsing module is used to parse the task running progress information, extract the operation and maintenance task types and operation and maintenance task execution time of each host node in the target operation and maintenance control period, construct the execution requirements of the operation and maintenance script corresponding to each operation and maintenance task type, and generate a list of operation and maintenance script execution requirements for the target operation and maintenance control period; The query module is used to query the communication efficiency parameters and communication access quantity limit of each minimum operation and maintenance communication cycle between several host nodes and the control node deployed with Ansible within the target operation and maintenance control period. Taking into account the script storage reserved space of several host nodes, with communication efficiency, communication access quantity limit and communication storage space as the constraint condition set, and with the script quality determined by the script update time as the optimization goal, the module optimizes and solves the automated operation and maintenance strategy of the control node and several host nodes during the target operation and maintenance control period. Among them, considering the script storage reserved space of several host nodes, with communication efficiency, communication access quantity limit and communication storage space as the constraint condition set, and script quality determined by script update time as the optimization goal, the automatic operation and maintenance strategy of the control node and several host nodes in the target operation and maintenance control period is optimized, including: Query the script storage reserved space of each host node, considering the communication efficiency parameters and communication access quantity limit of each minimum operation and maintenance communication cycle between each host node and the control node where Ansible is deployed during the target operation and maintenance control period, as well as the operation and maintenance script execution requirement list; The first constraint condition is that the time when each host node receives each operation and maintenance script distributed by the control node is earlier than the operation and maintenance task execution time of the operation and maintenance task corresponding to the operation and maintenance script; the second constraint condition is that the data volume of all operation and maintenance scripts received by each host node in each minimum operation and maintenance communication cycle is less than the communication efficiency parameter of each host node and the control node in each minimum operation and maintenance communication cycle and the maximum communication transmission data volume determined by the minimum operation and maintenance communication cycle; the third constraint condition is that the number of host nodes that receive the operation and maintenance script distributed by the control node in each minimum operation and maintenance communication cycle is less than the communication access number limit between each host node and the control node in each minimum operation and maintenance communication cycle; the fourth constraint condition is that the amount of operation and maintenance scripts deleted by each host node in each operation and maintenance communication cycle and the amount of data storage determined by the operation and maintenance scripts distributed by the control node are less than the script storage reserved space of the host node; the optimization objective is to minimize the sum of the interval time from the distribution of each operation and maintenance script to the execution of the operation and maintenance script, and optimize and solve the script distribution strategy of the control node and the script retention strategy of each host node; Generate an automated operation and maintenance strategy for the control node and several host nodes during the target operation and maintenance control period based on the script distribution strategy of the control node and the script retention strategy of each host node; a driving module for driving the control node to distribute the script to the corresponding host node at a corresponding time point based on the script distribution policy in the automated operation and maintenance policy, and driving the host node to perform script management of the storage space based on the script retention policy in the automated operation and maintenance policy; The execution module is used for each host node to call the operation and maintenance script stored in the storage space according to the script execution schedule to execute the operation and maintenance task corresponding to the operation and maintenance script.

Citation Information

Patent Citations

  • Automatic script execution method, system and equipment based on cloud platform and medium

    CN113238851A

  • Ansible-based operation and maintenance method and system, electronic equipment and medium

    CN117453266A