Automatic deployment process execution progress determination method and device, equipment and medium
By obtaining and analyzing the task list and status in the automated deployment process, calculating and feedback on execution progress and remaining time in real time, the problem of not being able to provide real-time progress feedback and multi-process monitoring in the existing technology is solved, and efficient real-time monitoring of the automated deployment process is achieved.
Patent Information
- Application Number
- CN202412000296.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art cannot provide real-time feedback on the execution progress of automated deployment process, it is difficult to monitor intermediate states, and it is difficult to distinguish and monitor the execution progress of each process when multiple processes are run in parallel.
By obtaining a task list in an automated deployment process, querying the reference execution time based on the task name and status, calculate the execution progress and remaining execution time, and return this information to the monitor in real time.
Real-time monitoring of the automated deployment process is realized, reducing dependence on additional resources, able to clearly present detailed phased progress, and effectively distinguish and monitor multiple automated deployment processes running in parallel.
Smart Images

Figure CN119718838A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for determining the execution progress of an automated deployment process. Background Art
[0002] In the field of modern IT (Information Technology), computer network management and automated deployment are crucial. Ansible (open source automation tool) is widely used in configuration management and application deployment. Playbook is a configuration file that defines the steps and logic of automated tasks. As the complexity of automated deployment increases, effective monitoring and management of Playbook execution progress becomes particularly important.
[0003] Existing technologies attempt to estimate the execution progress of Playbooks through log analysis, but this method has obvious shortcomings: First, it cannot provide real-time execution progress feedback, and managers find it difficult to instantly grasp the task status; second, it relies on log file analysis, which requires additional parsing tools and manpower, and is inefficient; third, for long-running Playbooks, it is difficult to present detailed stage-by-stage progress, and intermediate status monitoring is extremely critical; fourth, when multiple Playbooks are running in parallel, it is difficult to distinguish and monitor the execution progress of each Playbook. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for determining the execution progress of an automated deployment process, which enables the monitoring party to grasp the task status in real time, reduce the dependence on additional resources, meet the key requirements for intermediate status monitoring, and realize differentiated monitoring of multiple automated deployment processes running simultaneously. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a method for determining the execution progress of an automated deployment process, comprising:
[0006] In the process of executing the automated deployment process, the corresponding task list is obtained according to the process identifier of the automated deployment process, and the task name, task status and task duration of each task are obtained; wherein the automated deployment process is an application deployment process pre-set in a target configuration file created based on a preset data serialization format;
[0007] Query the reference execution time of the task based on the task name and task status, and calculate the execution progress of the automated deployment process based on the reference execution time of completed tasks and the reference execution time of unfinished tasks;
[0008] Calculate the remaining execution time of the automated deployment process based on the task duration of the completed tasks, the reference execution time of the completed tasks, and the reference execution time of the uncompleted tasks;
[0009] The execution progress and the remaining execution time are returned to the preset monitoring party so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress and the remaining execution time.
[0010] Optionally, the automated deployment process also includes:
[0011] When the task starts to be executed, the first function is called to record the corresponding task name, the task execution start time and the task process identifier through the first function;
[0012] When the task is finished executing, the second function is called to record the corresponding task name, the task execution end time and the task process identifier through the second function;
[0013] When the task execution fails, the third function is called to record the corresponding task name, the task execution failure time and the task process identifier through the third function;
[0014] The fourth function is called when the task is skipped, so as to record the corresponding task name, the reason why the task is skipped, and the process identifier to which the task belongs through the fourth function.
[0015] Optionally, query the reference execution time of the task based on the task name and task status, including:
[0016] Get the reference execution time list of the task by task name;
[0017] According to the task status, query the reference execution time of all completed tasks from the reference execution time list to obtain the cumulative total reference execution time of all completed tasks;
[0018] According to the task status, query the reference execution time of all unfinished tasks from the reference execution time list to obtain the cumulative reference execution time sum of all unfinished tasks;
[0019] The reference execution time in the reference execution time list is an estimated value based on task characteristics, system resources and historical experience or an updated value based on the actual task execution situation;
[0020] Accordingly, the execution progress of the automated deployment process is calculated based on the reference execution time of the completed tasks and the reference execution time of the unfinished tasks, including:
[0021] Determine the sum of the cumulative reference execution time of all completed tasks and the sum of the cumulative reference execution time of all uncompleted tasks;
[0022] The execution progress of the automated deployment process is obtained according to the ratio of the total cumulative reference execution time of all completed tasks to the addition operation result.
[0023] Optionally, the remaining execution time of the automated deployment process is calculated based on the task duration of the completed task, the reference execution time of the completed task, and the reference execution time of the uncompleted task, including:
[0024] Determine the task duration of all completed tasks according to the task status, and obtain the total task duration of all completed tasks;
[0025] The target coefficient is determined according to the ratio of the sum of the task consuming time of all completed tasks to the sum of the accumulated reference execution time of all completed tasks;
[0026] The remaining execution time of the automated deployment process is determined according to the product of the target coefficient and the sum of the accumulated reference execution times of all unfinished tasks.
[0027] Optionally, the method for determining the execution progress of the automated deployment process in the present application further includes:
[0028] Determine the target node for installing the automated deployment process component, and execute the target command on the target node to start the execution of the automated deployment process; the target command is used to specify the decrypted file path, specify the additional variable file, specify the host inventory file, and specify the process execution file path.
[0029] Optionally, the execution progress and the remaining execution time are returned to a preset monitoring party so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress and the remaining execution time, including:
[0030] The execution progress, remaining execution time, execution results of executed tasks, execution time of executed tasks, and information of unexecuted tasks are returned to the preset monitoring party so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress, remaining execution time, execution results of executed tasks, execution time of executed tasks, and information of unexecuted tasks.
[0031] Optionally, during the execution of the automated deployment process, a corresponding task list is obtained according to the process identifier of the automated deployment process, including:
[0032] During the execution of the automated deployment process, when an execution progress query request is received from a preset monitoring party through a target application programming interface or a target command line interface, a corresponding task list is obtained according to the process identifier of the automated deployment process;
[0033] Accordingly, the execution progress and remaining execution time are returned to the preset monitoring party, including:
[0034] The execution progress and remaining execution time are returned to the preset monitoring party through the target application programming interface or the target command line interface.
[0035] In a second aspect, the present application discloses a device for determining the execution progress of an automated deployment process, comprising:
[0036] The task list acquisition module is used to acquire the corresponding task list according to the process identifier of the automated deployment process during the execution of the automated deployment process, and obtain the task name, task status and task duration of each task; wherein the automated deployment process is an application deployment process pre-set in a target configuration file created based on a preset data serialization format;
[0037] An execution progress determination module is used to query the reference execution time of the task based on the task name and task status, and calculate the execution progress of the automated deployment process based on the reference execution time of the completed tasks and the reference execution time of the uncompleted tasks;
[0038] A remaining execution time determination module is used to calculate the remaining execution time of the automated deployment process according to the task consumption of the completed tasks, the reference execution time of the completed tasks and the reference execution time of the uncompleted tasks;
[0039] The information feedback module is used to return the execution progress and the remaining execution time to the preset monitoring party so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress and the remaining execution time.
[0040] In a third aspect, the present application discloses an electronic device, comprising:
[0041] Memory, used to store computer programs;
[0042] The processor is used to execute a computer program to implement the aforementioned method for determining the execution progress of the automated deployment process disclosed above.
[0043] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned method for determining the execution progress of an automated deployment process disclosed above is implemented.
[0044] It can be seen that the present application proposes a method for determining the execution progress of an automated deployment process, including: in the process of executing the automated deployment process, obtaining a task list according to the process identifier of the automated deployment process, and obtaining the task name, task status and task time of each task; the automated deployment process is an application deployment process pre-set in a target configuration file created based on a preset data serialization format; querying the reference execution time of the task based on the task name and task status, and calculating the execution progress of the automated deployment process according to the reference execution time of the completed task and the reference execution time of the uncompleted task; calculating the remaining execution time of the automated deployment process according to the task time of the completed task, the reference execution time of the completed task and the reference execution time of the uncompleted task; returning the execution progress and the remaining execution time to the preset monitoring party, so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress and the remaining execution time. It can be seen that the present application can obtain the corresponding task information in real time during the execution of the automated deployment process, and calculate the execution progress and the remaining execution time accordingly, which solves the problem that the prior art cannot provide real-time execution progress feedback, so that managers can grasp the task status in real time. Furthermore, the present application no longer relies on complex log file analysis methods that require additional parsing tools and manpower to estimate the execution progress, but instead performs calculations based on the task-related information of the automated deployment process itself, reducing reliance on additional resources. In addition, the present application can accurately calculate the execution progress and remaining execution time based on the relevant information of each task, and can clearly present detailed phased progress, meeting the key needs for intermediate status monitoring. Finally, when multiple automated deployment processes are running in parallel, the present application can effectively distinguish the task status of each automated deployment process through process identification, overcoming the difficulty of the prior art in distinguishing and monitoring multiple simultaneously running automated deployment processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0046] Figure 1 A flow chart of a method for determining the execution progress of an automated deployment process disclosed in this application;
[0047] Figure 2 A flowchart of a method for determining execution progress of a specific automated deployment process disclosed in this application;
[0048] Figure 3 This is a schematic diagram of the structure of an automated deployment process execution progress determination device disclosed in this application;
[0049] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] Existing technologies attempt to estimate the execution progress of Playbooks through log analysis, but this method has obvious shortcomings: First, it cannot provide real-time execution progress feedback, and managers find it difficult to instantly grasp the task status; second, it relies on log file analysis, which requires additional parsing tools and manpower, and is inefficient; third, for long-running Playbooks, it is difficult to present detailed stage-by-stage progress, and intermediate status monitoring is extremely critical; fourth, when multiple Playbooks are running in parallel, it is difficult to distinguish and monitor the execution progress of each Playbook.
[0052] To this end, an embodiment of the present application proposes a solution for determining the execution progress of an automated deployment process, which enables the monitoring party to grasp the task status in real time, reduce dependence on additional resources, meet the key requirements for intermediate status monitoring, and realize differentiated monitoring of multiple simultaneously running automated deployment processes.
[0053] The present application embodiment discloses a method for determining the execution progress of an automated deployment process, including:
[0054] Step S11: During the execution of the automated deployment process, the corresponding task list is obtained according to the process identifier of the automated deployment process to obtain the task name, task status and task duration of each task; wherein the automated deployment process is an application deployment process pre-set in a target configuration file created based on a preset data serialization format.
[0055] In this embodiment, the target node for installing the automated deployment process component is determined, and the target command is executed on the target node to start the execution of the automated deployment process. The target command is used to specify the decryption file path, specify the additional variable file, specify the host list file, and specify the process execution file path. Specifically, the decryption file path is specified to ensure that the database connection password, key, etc. involved in the deployment process can be safely obtained and used, thereby ensuring the security of sensitive information in the entire deployment process. Specifying additional variable files provides flexibility and customizability for the automated deployment process. By specifying additional variable files, the deployment process can be dynamically adjusted according to the values of these variables. The host list file records in detail the information of all target hosts involved in the automated deployment process. By specifying this file, the deployment program can clearly understand which specific deployment tasks need to be performed on which hosts. Specifying the process execution file path clarifies the specific execution logic and steps of the automated deployment process. By specifying its path, the deployment program on the target node can accurately find and execute the file, thereby completing the entire automated deployment process according to the predetermined process, greatly improving the efficiency of the automated deployment process.
[0056] When executing the automated deployment process, the corresponding task list is obtained according to the process identifier to obtain the name, status and duration of the task. Specifically, during the execution of the automated deployment process, when an execution progress query request is received from the preset monitoring party through the target application programming interface (API) or the target command line interface (CLI), the corresponding task list is obtained according to the process identifier of the automated deployment process, wherein the automated deployment process is an application deployment process pre-set in the target configuration file, such as Ansible Playbook. The process identifier can be the identity serial number of the currently executed automated deployment process. The task status shows the stage it is in, such as not started, executing, completed, and not completed. The task duration records the time spent on task execution. The above information is used to calculate the execution progress of the automated deployment process.
[0057] When the task starts to execute, the first function is called to record the task name, the task start execution time and the process identifier of the task through the first function; when the task ends execution, the second function is called to record the task name, the task end execution time and the process identifier of the task through the second function; when the task fails to execute, the third function is called to record the task name, the task execution failure time and the process identifier of the task through the third function; when the task is skipped, the fourth function is called to record the corresponding task name, the reason why the task was skipped and the process identifier of the task through the fourth function.
[0058] In an automated process of software update, when the task of checking the integrity of the update package begins to execute, the system calls the first function, which records the name of the task as Checking the integrity of the update package, the task start time as 10:00:00 on December 29, 2024, and the process ID as Software Update Process 01. When the task of installing the update package ends, the second function records the task name as Installing the Update Package, the task end time as 10:15:00 on December 29, 2024, and the process ID as Software Update Process 01. In this way, the execution time of the task and other information can be clearly known. Assuming that the task of updating the database structure fails to execute, the third function is started at this time, recording the task name as Update Database Structure, the task execution failure time as 10:30:00 on December 29, 2024, and the process ID as Software Update Process 01. If the compatibility test task is skipped, the fourth function will record the task name as compatibility test execution, the reason why the task was skipped, and the process identifier as software update process 01. Based on the above process, this application can ensure the integrity and traceability of the entire process information.
[0059] Step S12: query the reference execution time of the task based on the task name and the task status, and calculate the execution progress of the automated deployment process according to the reference execution time of the completed tasks and the reference execution time of the uncompleted tasks.
[0060] In this embodiment, the reference execution time list of the task is obtained by the task name, and the reference execution time of all completed tasks is queried from the reference execution time list according to the task status to obtain the cumulative reference execution time sum of all completed tasks. Further, the reference execution time of all unfinished tasks is queried from the reference execution time list according to the task status to obtain the cumulative reference execution time sum of all unfinished tasks; wherein, the reference execution time in the reference execution time list is an estimated value based on task characteristics, system resources and historical experience or an updated value based on the actual situation of task execution. Further, the sum of the cumulative reference execution time of all completed tasks and the sum of the cumulative reference execution time of all unfinished tasks is determined; the execution progress of the automated deployment process is obtained according to the ratio of the cumulative reference execution time sum of all completed tasks to the sum of the sum.
[0061] Exemplarily, query the reference execution time list according to the task name to obtain the reference execution time of the task, recorded as ETi (Expected Time), where i is the unique label of the current task. For tasks that have been executed, obtain the task duration of the task, recorded as ATi (Actual Time), where i is the unique label of the current task. Traverse all tasks that have been executed, accumulate the reference execution time and task duration of all tasks, recorded as DET (Done Task Expected Time) and DAT (Done Task Actual Time), respectively, DET=Σ(ETi), DAT=Σ(ATi). Traverse all unexecuted tasks, accumulate the reference execution time of all tasks, recorded as UET (Unexecuted Task Expected Time). Furthermore, the sum of the cumulative reference execution time of all completed tasks and the sum of the cumulative reference execution time of all unfinished tasks is determined to be DET+UET. According to the ratio of the sum of the cumulative reference execution time of all completed tasks to the sum of the addition operation result, the execution progress of the automated deployment process is obtained as EP=DET / (DET+UET).
[0062] Step S13: Calculate the remaining execution time of the automated deployment process according to the task duration of the completed task, the reference execution time of the completed task, and the reference execution time of the unfinished task.
[0063] Determine the task time of all completed tasks according to the task status, obtain the total task time of all completed tasks, and determine the target coefficient according to the ratio of the total task time of all completed tasks to the total cumulative reference execution time of all completed tasks, and then determine the remaining execution time of the automated deployment process according to the product of the target coefficient and the total cumulative reference execution time of all unfinished tasks. The target coefficient is recorded as TAF (Time Acceleration Factor), TAF = DAT / DET, and the remaining execution time is recorded as ETL (Estimate Time Left), ETL = TAF × UET.
[0064] Step S14: Return the execution progress and the remaining execution time to the preset monitoring party, so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress and the remaining execution time.
[0065] Specifically, this embodiment can return the execution progress, remaining execution time, execution results of executed tasks, execution time of executed tasks, and information of unexecuted tasks to the preset monitoring party through the target application programming interface or the target command line interface, so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress, remaining execution time, execution results of executed tasks, execution time of executed tasks, and information of unexecuted tasks. In this way, the monitoring party can timely detect abnormal situations in the process with these data, and quickly take targeted and effective measures to adjust and optimize, such as reallocating resources, modifying task execution strategies, or troubleshooting system failures.
[0066] Figure 2 The present invention is a flow chart of a method for determining the execution progress of an automated deployment process. The method is implemented by an information collection module, a data communication module, a task list module, a reference execution list, a progress calculation module and a query module. When the automated deployment process starts to execute, the information collection module sends a notification to the progress calculation module with the help of the data communication module, and records the identification information of the currently executing automated deployment process. Subsequently, the progress calculation module calls the task list module to obtain the task list details of the currently executing automated deployment process. The task list module extracts key task information including task dependencies and execution order by reading the automated deployment process information. During the execution of the automated deployment process, the information collection module closely monitors the execution status of each task and records the execution time of the task in detail. When the task is executed, the module transmits the task-related information, such as the automated deployment process identification, task name, task execution status and time consumption, to the progress calculation module through the data communication module. After receiving the new task progress update data, the progress calculation module queries the corresponding task list according to the automated deployment process identification, and then updates the execution status, time consumption and other information of the task to ensure the timeliness and accuracy of the task progress data.
[0067] Taking the deployment of the cloud management platform as an example, 1. Execute the command on the node where the automated deployment process component is installed: ansible-playbook--vault-id / deploy / decryptfile-e / deploy / cloud.yml-ideploy / inventory.ini / deploy / cluster.yml. 2. Implement the main logic of the task information collection module through a custom Ansible plug-in, and re-set the task start, task execution success, task execution failure, task skip and other functions in the plug-in to complete the collection and recording of task information. When the automated deployment process starts to execute, notify the progress calculation module to perform preparations such as task list acquisition and current automated deployment process identification. During the task execution process, when the task status changes, the task information is passed to the progress calculation module through the data communication module. The task information includes: automated deployment process identification, task name, execution status, execution start time, and execution end time. 3. After receiving the task list request from the progress calculation module, the task list module obtains the task list of the current automated deployment process by executing system commands or parsing the automated deployment process file, and converts the information into a task name list and returns it to the progress calculation module. 4. The reference execution time list can be the estimated execution time of the task manually defined according to the task execution status, or it can be the historical execution time of the task recorded after the execution of the automated deployment process is completed. The format is task name: estimated execution time. 5. When the user queries the execution progress information of the automated deployment process through API or command line calls, the progress calculation module summarizes the status and time-consuming information of the currently executed task, and refers to the task list and estimated execution time to calculate the overall execution progress and estimated remaining execution time of the automated deployment process, and returns it to the user for viewing after the calculation is completed. The information that the user views here is not limited to the execution progress and remaining execution time, but can also include the execution results and execution time of executed tasks, and list information of unexecuted tasks.
[0068] This solution can provide accurate execution progress information by real-time monitoring and processing of the task execution status of the automated deployment process, and estimate the remaining execution time of the automated deployment process as a whole based on the task reference execution time and task execution history, meeting the operation and maintenance personnel's real-time monitoring needs for automated task progress and significantly enhancing the visual management capabilities of automated deployment process execution.
[0069] Furthermore, the present application can analyze the dependencies and resource requirements between tasks in real time based on the acquired task list and the execution status of each task. Specifically, for tasks that are not interdependent and have sufficient system resources, increase their parallelism, make full use of computing resources, and speed up the overall automation deployment process. When resources are tight, reasonably reduce the number of parallel tasks to ensure the smooth execution of key tasks and improve the adaptability and performance of automation deployment under different resource conditions. In addition, when the system detects that the execution progress of a task deviates from the normal range or the task takes too long, it can automatically trigger a self-repair program, which can reallocate resources according to preset rules and historical experience data, and then re-execute the task to optimize the deployment process in order to increase the probability of successful execution of the task.
[0070] It can be seen that the present application proposes a method for determining the execution progress of an automated deployment process, including: in the process of executing the automated deployment process, obtaining a task list according to the process identifier of the automated deployment process, and obtaining the task name, task status and task time of each task; the automated deployment process is an application deployment process pre-set in a target configuration file created based on a preset data serialization format; querying the reference execution time of the task based on the task name and task status, and calculating the execution progress of the automated deployment process according to the reference execution time of the completed task and the reference execution time of the uncompleted task; calculating the remaining execution time of the automated deployment process according to the task time of the completed task, the reference execution time of the completed task and the reference execution time of the uncompleted task; returning the execution progress and the remaining execution time to the preset monitoring party, so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress and the remaining execution time. It can be seen that the present application can obtain the corresponding task information in real time during the execution of the automated deployment process, and calculate the execution progress and the remaining execution time accordingly, which solves the problem that the prior art cannot provide real-time execution progress feedback, so that managers can grasp the task status in real time. Furthermore, the present application no longer relies on complex log file analysis methods that require additional parsing tools and manpower to estimate the execution progress, but instead performs calculations based on the task-related information of the automated deployment process itself, reducing reliance on additional resources. In addition, the present application can accurately calculate the execution progress and remaining execution time based on the relevant information of each task, and can clearly present detailed phased progress, meeting the key needs for intermediate status monitoring. Finally, when multiple automated deployment processes are running in parallel, the present application can effectively distinguish the task status of each automated deployment process through process identification, overcoming the difficulty of the prior art in distinguishing and monitoring multiple simultaneously running automated deployment processes.
[0071] Correspondingly, the embodiment of the present application also discloses a device for determining the execution progress of an automated deployment process, see Figure 3 As shown, the device comprises:
[0072] The task list acquisition module 11 is used to acquire the corresponding task list according to the process identifier of the automated deployment process during the execution of the automated deployment process, and obtain the task name, task status and task duration of each task; wherein the automated deployment process is an application deployment process pre-set in a target configuration file created based on a preset data serialization format;
[0073] An execution progress determination module 12 is used to query the reference execution time of the task based on the task name and task status, and calculate the execution progress of the automated deployment process according to the reference execution time of the completed task and the reference execution time of the uncompleted task;
[0074] The remaining execution time determination module 13 is used to calculate the remaining execution time of the automated deployment process according to the task consumption of the completed tasks, the reference execution time of the completed tasks and the reference execution time of the uncompleted tasks;
[0075] The information feedback module 14 is used to return the execution progress and the remaining execution time to the preset monitoring party, so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress and the remaining execution time.
[0076] Among them, for more specific working processes of the above-mentioned modules, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0077] It can be seen that the present application proposes a method for determining the execution progress of an automated deployment process, including: in the process of executing the automated deployment process, obtaining a task list according to the process identifier of the automated deployment process, and obtaining the task name, task status and task time of each task; the automated deployment process is an application deployment process pre-set in a target configuration file created based on a preset data serialization format; querying the reference execution time of the task based on the task name and task status, and calculating the execution progress of the automated deployment process according to the reference execution time of the completed task and the reference execution time of the uncompleted task; calculating the remaining execution time of the automated deployment process according to the task time of the completed task, the reference execution time of the completed task and the reference execution time of the uncompleted task; returning the execution progress and the remaining execution time to the preset monitoring party, so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress and the remaining execution time. It can be seen that the present application can obtain the corresponding task information in real time during the execution of the automated deployment process, and calculate the execution progress and the remaining execution time accordingly, which solves the problem that the prior art cannot provide real-time execution progress feedback, so that managers can grasp the task status in real time. Furthermore, the present application no longer relies on complex log file analysis methods that require additional parsing tools and manpower to estimate the execution progress, but instead performs calculations based on the task-related information of the automated deployment process itself, reducing reliance on additional resources. In addition, the present application can accurately calculate the execution progress and remaining execution time based on the relevant information of each task, and can clearly present detailed phased progress, meeting the key needs for intermediate status monitoring. Finally, when multiple automated deployment processes are running in parallel, the present application can effectively distinguish the task status of each automated deployment process through process identification, overcoming the difficulty of the prior art in distinguishing and monitoring multiple simultaneously running automated deployment processes.
[0078] Furthermore, an embodiment of the present application also provides an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0079] Figure 4 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the method for determining the execution progress of the automated deployment process disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0080] In this embodiment, the power supply 26 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 24 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0081] In addition, the memory 22, as a carrier for storing resources, may be a read-only memory, a random access memory, a disk or an optical disk, etc., and the resources stored thereon may include a computer program 221, and the storage method may be temporary storage or permanent storage. Among them, the computer program 221 may further include a computer program that can be used to complete the method for determining the execution progress of the automated deployment process performed by the electronic device 20 disclosed in any of the aforementioned embodiments, in addition to a computer program that can be used to complete other specific tasks.
[0082] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned method for determining the execution progress of an automated deployment process disclosed above is implemented.
[0083] For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be described in detail here.
[0084] The various embodiments in this application are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0085] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0086] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0087] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0088] The above is a detailed introduction to the method, device, equipment, and storage medium for determining the execution progress of an automated deployment process provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for determining the execution progress of an automated deployment process, characterized in that: include: In the process of executing the automated deployment process, a corresponding task list is obtained according to the process identifier of the automated deployment process, and the task name, task status and task duration of each task are obtained; wherein the automated deployment process is an application deployment process pre-set in a target configuration file created based on a preset data serialization format; Based on the task name and the reference execution time of the task status query task, the execution progress of the automated deployment process is calculated according to the reference execution time of the completed tasks and the reference execution time of the uncompleted tasks; Calculating the remaining execution time of the automated deployment process according to the task duration of the completed task, the reference execution time of the completed task, and the reference execution time of the unfinished task; The execution progress and the remaining execution time are returned to a preset monitoring party so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress and the remaining execution time.
2. The method for determining the execution progress of the automated deployment process according to claim 1, characterized in that: The process of executing the automated deployment process also includes: When the task starts to be executed, the first function is called to record the corresponding task name, the task execution start time and the task process identifier through the first function; When the task is finished executing, the second function is called to record the corresponding task name, the task execution end time and the task process identifier through the second function; When the task execution fails, the third function is called to record the corresponding task name, the task execution failure time and the task flow identifier through the third function; The fourth function is called when the task is skipped, so as to record the corresponding task name, the reason why the task is skipped, and the process identifier to which the task belongs through the fourth function.
3. The method for determining the execution progress of the automated deployment process according to claim 1, characterized in that: The querying of the reference execution time of the task based on the task name and the task status includes: Obtain a reference execution time list of the task through the task name; According to the task status, query the reference execution time of all the completed tasks from the reference execution time list to obtain the cumulative total reference execution time of all the completed tasks; According to the task status, query the reference execution time of all the unfinished tasks from the reference execution time list to obtain the cumulative sum of the reference execution time of all the unfinished tasks; The reference execution time in the reference execution time list is an estimated value based on task characteristics, system resources and historical experience or an updated value based on the actual task execution situation; Accordingly, calculating the execution progress of the automated deployment process according to the reference execution time of the completed tasks and the reference execution time of the unfinished tasks includes: Determine the sum of the accumulated reference execution time of all the completed tasks and the accumulated reference execution time of all the uncompleted tasks; The execution progress of the automated deployment process is obtained according to the ratio of the total accumulated reference execution time of all the completed tasks to the addition operation result.
4. The method for determining the execution progress of the automated deployment process according to claim 3, characterized in that: The calculating the remaining execution time of the automated deployment process according to the task duration of the completed task, the reference execution time of the completed task and the reference execution time of the unfinished task includes: Determine the task duration of all the completed tasks according to the task status, and obtain the total task duration of all the completed tasks; Determine the target coefficient according to the ratio of the total task time of all the completed tasks to the total cumulative reference execution time of all the completed tasks; The remaining execution time of the automated deployment process is determined according to the product of the target coefficient and the sum of the accumulated reference execution times of all the unfinished tasks.
5. The method for determining the execution progress of the automated deployment process according to claim 1, characterized in that: Also includes: Determine a target node for installing an automated deployment process component, and execute a target command on the target node to start execution of the automated deployment process; The target command is used to specify a decryption file path, an additional variable file, a host list file, and a process execution file path.
6. The method for determining the execution progress of the automated deployment process according to claim 1, characterized in that: The returning the execution progress and the remaining execution time to a preset monitoring party so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress and the remaining execution time includes: The execution progress, the remaining execution time, the execution results of the executed tasks, the execution time of the executed tasks, and the information of the unexecuted tasks are returned to the preset monitoring party, so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress, the remaining execution time, the execution results of the executed tasks, the execution time of the executed tasks, and the information of the unexecuted tasks.
7. The method for determining the execution progress of an automated deployment process according to any one of claims 1 to 6, characterized in that: In the process of executing the automated deployment process, obtaining a corresponding task list according to the process identifier of the automated deployment process includes: During the execution of the automated deployment process, when an execution progress query request is received from a preset monitoring party through a target application programming interface or a target command line interface, a corresponding task list is obtained according to the process identifier of the automated deployment process; Accordingly, returning the execution progress and the remaining execution time to a preset monitoring party includes: The execution progress and the remaining execution time are returned to the preset monitoring party through the target application programming interface or the target command line interface.
8. A device for determining the execution progress of an automated deployment process, characterized in that: include: A task list acquisition module is used to acquire a corresponding task list according to a process identifier of the automated deployment process during the execution of the automated deployment process, and obtain the task name, task status and task duration of each task; wherein the automated deployment process is an application deployment process pre-set in a target configuration file created based on a preset data serialization format; An execution progress determination module, used to query the reference execution time of the task based on the task name and the task status, and calculate the execution progress of the automated deployment process according to the reference execution time of the completed tasks and the reference execution time of the uncompleted tasks; A remaining execution time determination module, used to calculate the remaining execution time of the automated deployment process according to the task duration of the completed task, the reference execution time of the completed task and the reference execution time of the unfinished task; The information feedback module is used to return the execution progress and the remaining execution time to a preset monitoring party, so that the preset monitoring party can monitor the automated deployment process in real time based on the execution progress and the remaining execution time.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the method for determining the execution progress of the automated deployment process as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the method for determining the execution progress of an automated deployment process as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and device for determining task progress and task processing time
CN102110015A
Method and system for measuring progress of time-consuming calculation task, electronic equipment and medium
CN117971602A
Scientific research project management system, control method and related equipment
CN118297475A