Method and device for deploying task instances in disaster recovery environment and processor

By obtaining production environment configuration information, determining disaster recovery environment configuration information and deploying task instances, the problem of low deployment efficiency of task instances in disaster recovery environments is solved, and efficient deployment and business continuity guarantee is achieved.

CN119782040APending Publication Date: 2025-04-08TRAVELSKY TECHNOLOGY LIMITED
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411763924.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the prior art, the deployment efficiency of task instances in disaster recovery environments is low, resulting in a linear increase in workload with the system scale, and it is impossible to effectively ensure business continuity and data security.

Method used

By obtaining the configuration information of the application in the production environment, determining the configuration information in the disaster recovery environment, and determining the task instance based on this. In response to the deployment event of the task instance, automatically deploy task instances in the disaster recovery environment to avoid the increase in workload with the system scale.

Benefits of technology

Improve the deployment efficiency of task instances in disaster recovery environments, avoid linear growth in deployment workload, and ensure business continuity and data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782040A_ABST
    Figure CN119782040A_ABST
Patent Text Reader

Abstract

The invention discloses a task instance deployment method and device in a disaster recovery environment and a processor. The method comprises the steps that first configuration information of an application in a production environment is obtained, and the first configuration information is used for representing at least one parameter of operation of the application in the production environment; based on the first configuration information, second configuration information of the application in the disaster recovery environment is determined, and the second configuration information is used for representing at least one parameter of operation of the application in the disaster recovery environment; in response to a first task instance corresponding to the successfully deployed production environment for the application, determining a second task instance corresponding to the application in the disaster recovery environment based on the second configuration information; and in response to a target deployment event triggered by the second task instance, deploying the second task instance for the application, the target deployment event being used for representing a trigger event for deploying the second task instance for the application. The technical problem of low task instance deployment efficiency in the disaster recovery environment is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automated deployment, and in particular to a method, device and processor for deploying a task instance in a disaster recovery environment. Background Art

[0002] If a catastrophic event occurs to an application in a production environment, it will cause the production environment to not operate normally or data to be lost. Therefore, deploying corresponding task instances in a disaster recovery environment can ensure business continuity and data security.

[0003] However, in the prior art, automated scripts are often used to directly replace manual deployment operations, or the deployment operations of the corresponding task instances in the disaster recovery environment are integrated into the workflow management, thereby deploying the corresponding task instances in the disaster recovery environment. Regardless of which of the above methods is adopted, the workload of deployment will increase linearly with the scale of the system, thereby leading to the technical problem of low deployment efficiency of task instances in the disaster recovery environment.

[0004] Currently, no effective solution has been proposed to the technical problem of low deployment efficiency of task instances in the above-mentioned disaster recovery environment. Summary of the invention

[0005] The embodiments of the present invention provide a method, device and processor for deploying a task instance in a disaster recovery environment, so as to at least solve the technical problem of low deployment efficiency of the task instance in the disaster recovery environment.

[0006] According to one aspect of an embodiment of the present invention, a method for deploying a task instance in a disaster recovery environment is provided, the method comprising: obtaining first configuration information of an application in a production environment, wherein the first configuration information is used to represent at least one parameter of the application running in the production environment; determining second configuration information of the application in the disaster recovery environment based on the first configuration information, wherein the second configuration information is used to represent at least one parameter of the application running in the disaster recovery environment; in response to successfully deploying a first task instance corresponding to the application in the production environment, determining a second task instance corresponding to the application in the disaster recovery environment based on the second configuration information; in response to the second task instance having triggered a target deployment event, deploying a second task instance for the application, wherein the target deployment event is used to represent a triggering event for deploying the second task instance for the application.

[0007] Optionally, determining second configuration information for application in a disaster recovery environment based on the first configuration information includes: in response to an update of the first configuration information, determining the second configuration information based on the updated first configuration information.

[0008] Optionally, in response to an update of the first configuration information, determining the second configuration information based on the updated first configuration information includes: in response to an update of the first configuration information, detecting the updated first configuration information to obtain a detection result; and determining the second configuration information based on the detection result.

[0009] Optionally, based on the detection result, second configuration information is determined, including: in response to the detection result indicating that the updated first configuration information is independent of the production environment and the disaster recovery environment, the updated first configuration information is determined as the second configuration information; in response to the detection result indicating that the updated first configuration information is related to the production environment and the disaster recovery environment, based on a mapping relationship between different configuration information applied in the production environment and different configuration information applied in the disaster recovery environment, the updated first configuration information is mapped to the disaster recovery environment to obtain the second configuration information.

[0010] Optionally, in response to the successful deployment of the first task instance corresponding to the application in the production environment, based on the second configuration information, determining the second task instance corresponding to the application in the disaster recovery environment, including: in response to the successful deployment of the first task instance for the application, based on the first task template of the application in the production environment, determining the second task template of the application in the disaster recovery environment; loading the second configuration information into the second task template to obtain the second task instance.

[0011] Optionally, in response to the successful deployment of the first task instance for the application, a second task template for the application in the disaster recovery environment is determined based on the first task template for the application in the production environment, including: in response to the successful deployment of the first task instance for the application, and the database of the application includes the first task template, the first task template is determined as the second task template; in response to the successful deployment of the first task instance for the application, and the database of the application does not include the first task template, attribute information of the first task template is determined, and the attribute information is combined to obtain the second task template.

[0012] According to one aspect of an embodiment of the present invention, a deployment device for a task instance in a disaster recovery environment is provided, and the device may include: an acquisition unit, used to acquire first configuration information of an application in a production environment, wherein the first configuration information is used to represent at least one parameter of the application running in the production environment; a first determination unit, used to determine second configuration information of the application in the disaster recovery environment based on the first configuration information, wherein the second configuration information is used to represent at least one parameter of the application running in the disaster recovery environment; a second determination unit, used to determine a second task instance corresponding to the application in the disaster recovery environment based on the second configuration information in response to the first task instance corresponding to the application in the production environment being successfully deployed; a deployment unit, used to deploy a second task instance for the application in response to the second task instance having triggered a target deployment event, wherein the target deployment event is used to represent a triggering event for deploying the second task instance for the application.

[0013] According to another aspect of an embodiment of the present invention, a processor is further provided, wherein the processor is used to run a program, wherein when the program is run by the processor, the method for deploying a task instance in a disaster recovery environment in an embodiment of the present invention is executed.

[0014] According to another aspect of an embodiment of the present invention, an electronic device is also provided, including: a memory storing an executable program; and a processor for running the program, wherein when the program is running, the method for deploying task instances in a disaster recovery environment in each embodiment of the present invention is executed.

[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, which includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for deploying task instances in a disaster recovery environment in the present invention.

[0016] According to another aspect of an embodiment of the present invention, a computer program product is also provided. The computer program product includes a computer program, wherein when the computer program is executed by a processor, the method for deploying a task instance in a disaster recovery environment in an embodiment of the present invention is implemented.

[0017] According to another aspect of an embodiment of the present invention, a computer program product is also provided, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method for deploying a task instance in a disaster recovery environment in an embodiment of the present invention is implemented.

[0018] According to another aspect of an embodiment of the present invention, an embodiment of the present application further provides a computer program, which, when executed by a processor, implements the method for deploying a task instance in a disaster recovery environment in the above-mentioned embodiment of the present invention.

[0019] In an embodiment of the present invention, when deploying a task instance in a disaster recovery environment, the first configuration information of the application in the production environment can be obtained. Based on the obtained first configuration information, the second configuration information of the application in the disaster recovery environment can be determined. In response to the first task instance corresponding to the application in the production environment being successfully deployed, the second task instance corresponding to the application in the disaster recovery environment can be determined based on the determined second configuration information, and in response to the determination that the second task instance has triggered the target deployment event, the second task instance is deployed for the application that has successfully deployed the first task instance, thereby achieving the purpose of avoiding the linear growth of the deployment workload with the scale of the system, thereby solving the technical problem of low deployment efficiency of task instances in the disaster recovery environment, and further achieving the technical effect of improving the deployment efficiency of task instances in the disaster recovery environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0021] Figure 1 is a flow chart of a method for deploying a task instance in a disaster recovery environment according to an embodiment of the present invention;

[0022] FIG2( a ) is a schematic diagram of an automatic application deployment system in a disaster recovery environment according to an embodiment of the present invention;

[0023] FIG2( b ) is a flow chart of a method for automatic application deployment in a disaster recovery environment according to an embodiment of the present invention;

[0024] Figure 3 It is a schematic diagram of a deployment device for a task instance in a disaster recovery environment according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only embodiments of a part of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] According to an embodiment of the present invention, a method for deploying task instances in a disaster recovery environment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0028] Figure 1 1 is a flowchart of a method for deploying a task instance in a disaster recovery environment according to an embodiment of the present invention. The method may include the following steps:

[0029] Step S101, obtaining first configuration information of an application in a production environment.

[0030] In the technical solution provided in step S101 of the present invention, the first configuration information may be used to represent at least one parameter of the application running in the production environment. The first configuration information may include configuration files in the production environment, server information in the production environment, and resource attributes in the production environment, etc. The production environment may include at least one of the following environments: a network environment, a database environment, and a log and monitoring environment, etc., which are only given as examples and are not specifically limited.

[0031] In this embodiment, the first configuration information of the application in the production environment is obtained. Optionally, this embodiment can download the first configuration information of the application in the production environment from the cloud, or search for the first configuration information of the application in the production environment according to the keyword information, wherein the keyword information can be used to represent the identification information of the application and the type of the production environment, the identification information of the application can be the name of the application, and the type of the production environment can include at least one of the following types: network environment type, database environment type, and log and monitoring environment type, etc., which are only given as examples and are not specifically limited.

[0032] Step S102: Determine second configuration information to be applied in a disaster recovery environment based on the first configuration information.

[0033] In the technical solution provided in step S102 of the present invention, the second configuration information may be used to represent at least one parameter of the application running in the disaster recovery environment. The second configuration information may include configuration files in the disaster recovery environment, server information in the disaster recovery environment, and resource attributes in the disaster recovery environment, etc. The disaster recovery environment may include at least one of the following environments: a hot backup environment and a multi-active backup environment, etc., which are only used as examples and are not specifically limited.

[0034] In this embodiment, after obtaining the first configuration information of the application in the production environment, the second configuration information of the application in the disaster recovery environment is determined based on the first configuration information. Optionally, this embodiment monitors the status of the first configuration information obtained on the basis of obtaining the first configuration information, and if it is monitored that the first configuration information has not been updated, the second configuration information of the application in the disaster recovery environment can be determined based on the first configuration information obtained.

[0035] Optionally, if the acquired first configuration information is irrelevant to the production environment and the disaster recovery environment, the acquired first configuration information is determined as the second configuration information applied in the disaster recovery environment.

[0036] Optionally, if the first configuration information obtained is related to the production environment and the disaster recovery environment, the first configuration information obtained is mapped to the disaster recovery environment based on the mapping relationship between different configuration information applied in the production environment and different configuration information applied in the disaster recovery environment, and the second configuration information applied in the disaster recovery environment can be obtained.

[0037] Step S103, in response to the first task instance corresponding to the application in the production environment being successfully deployed, based on the second configuration information, determining a second task instance corresponding to the application in the disaster recovery environment.

[0038] In the technical solution provided in the above step S103 of the present invention, the above first task instance may be a production task instance, and the above second task instance may be a disaster recovery task instance, which is only used as an example here without specific limitation.

[0039] In this embodiment, after determining the second configuration information of the application in the disaster recovery environment based on the first configuration information, in response to the first task instance corresponding to the application being successfully deployed in the production environment, the second task instance corresponding to the application in the disaster recovery environment is determined based on the second configuration information. Optionally, this embodiment, on the basis of determining the second configuration information, determines whether the first task instance corresponding to the application has been successfully deployed in the production environment, and a first judgment result can be obtained. If the first judgment result obtained indicates that the application has successfully deployed the first task instance corresponding to the production environment, then the second task instance corresponding to the application in the disaster recovery environment can be determined based on the determined second configuration information. If the first judgment result obtained indicates that the application has not successfully deployed the first task instance corresponding to the production environment, then continue to deploy the first task instance corresponding to the production environment for the application until the first task instance is successfully deployed for the application, and then the second task instance corresponding to the application in the disaster recovery environment can be determined based on the determined second configuration information.

[0040] Optionally, based on the determined second configuration information, the corresponding second task instance applied in the disaster recovery environment can be determined. For example, the determined second configuration information is loaded into the second task template applied in the disaster recovery environment to obtain the corresponding second task instance applied in the disaster recovery environment, or the determined second configuration information is written into the second task template applied in the disaster recovery environment to obtain the corresponding second task instance applied in the disaster recovery environment. This is only an example and is not specifically limited.

[0041] Step S104 , in response to the second task instance triggering the target deployment event, deploying the second task instance for the application.

[0042] In the technical solution provided in the above step S104 of the present invention, the above target deployment event can be used to represent a triggering event for deploying the second task instance as an application.

[0043] In this embodiment, the target deployment event may be a time deployment event. If the target deployment event is a time deployment event, when the time interval between the deployment time of the previous task instance for deploying the second task instance for the application and the current time has reached a preset time interval, the second task instance has triggered the time deployment event. The preset time interval may be a time period length set by initialization, or may be a time period length adjusted according to the type of application, which is only used as an example and is not specifically limited.

[0044] In this embodiment, the target deployment event may also be an operation deployment event. If the target deployment event is an operation deployment event, when the initialization operation of the second task instance deployed for the application is completed, the second task instance has triggered the operation deployment event. The initialization operation may include at least one of the following operations: application startup operation, application verification operation, and database migration operation, etc., which are only used as examples and are not specifically limited.

[0045] In this embodiment, in response to the first task instance corresponding to the production environment being successfully deployed for the application, after determining the second task instance corresponding to the application in the disaster recovery environment based on the second configuration information, in response to the second task instance having triggered the target deployment event, the second task instance is deployed for the application. Optionally, based on the determination of the second task instance, the embodiment determines whether the second task instance has triggered the target deployment event, and a second judgment result can be obtained. If the obtained second judgment result indicates that the determined second task instance has triggered the target deployment event, the second task instance is deployed for the application.

[0046] Optionally, a second judgment result can be obtained by judging whether the second task instance has triggered the time deployment event. If the second judgment result obtained indicates that the determined second task instance has triggered the time deployment event, the second task instance is deployed for application, which is only used as an example and is not specifically limited.

[0047] In the above steps S101 to S104 of the present application, when deploying a task instance in a disaster recovery environment, the first configuration information of the application in the production environment can be obtained. Based on the obtained first configuration information, the second configuration information of the application in the disaster recovery environment can be determined. In response to the first task instance corresponding to the application in the production environment being successfully deployed, the second task instance corresponding to the application in the disaster recovery environment can be determined based on the above second configuration information determined, and in response to the above second task instance being determined to have triggered the target deployment event, the second task instance is deployed for the application that has successfully deployed the first task instance, thereby achieving the purpose of avoiding the linear growth of the deployment workload with the scale of the system, thereby solving the technical problem of low deployment efficiency of task instances in a disaster recovery environment, and further achieving the technical effect of improving the deployment efficiency of task instances in a disaster recovery environment.

[0048] The above method of this embodiment is further introduced below.

[0049] As an optional implementation manner, step S102, based on the first configuration information, determines the second configuration information applied in the disaster recovery environment, including: in response to the first configuration information being updated, determining the second configuration information based on the updated first configuration information.

[0050] In this embodiment, after obtaining the first configuration information applied in the production environment, in response to the first configuration information being updated, the second configuration information is determined based on the updated first configuration information. Optionally, this embodiment monitors the state of the first configuration information obtained on the basis of obtaining the first configuration information, and if it is monitored that the first configuration information is updated, the second configuration information applied in the disaster recovery environment can be determined based on the updated first configuration information.

[0051] As an optional implementation method, in response to an update of the first configuration information, the second configuration information is determined based on the updated first configuration information, including: in response to an update of the first configuration information, the updated first configuration information is detected to obtain a detection result; based on the detection result, the second configuration information is determined.

[0052] In this embodiment, after obtaining the first configuration information applied in the production environment, in response to the first configuration information being updated, the updated first configuration information is detected to obtain a detection result. Optionally, based on the acquisition of the first configuration information, if it is monitored that the first configuration information is updated, the embodiment detects whether the updated first configuration information is related to the target environment, and obtains a detection result. The target environment may include: a production environment and a disaster recovery environment, and the detection result may be used to indicate the relationship between the updated first configuration information and the target environment.

[0053] In this embodiment, in response to the update of the first configuration information, the updated first configuration information is detected, and after the detection result is obtained, the second configuration information is determined based on the detection result. Optionally, this embodiment performs a relationship analysis on the obtained detection result on the basis of the obtained detection result, and according to the analyzed relationship between the updated first configuration information and the target environment, the second configuration information applied in the disaster recovery environment can be determined.

[0054] As an optional implementation method, the second configuration information is determined based on the detection result, including: in response to the detection result indicating that the updated first configuration information is independent of the production environment and the disaster recovery environment, the updated first configuration information is determined as the second configuration information; in response to the detection result indicating that the updated first configuration information is related to the production environment and the disaster recovery environment, based on a mapping relationship between different configuration information applied in the production environment and different configuration information applied in the disaster recovery environment, the updated first configuration information is mapped to the disaster recovery environment to obtain the second configuration information.

[0055] In this embodiment, in response to the first configuration information being updated, the updated first configuration information is detected, and after the detection result is obtained, in response to the detection result indicating that the updated first configuration information is irrelevant to the production environment and the disaster recovery environment, the updated first configuration information is determined as the second configuration information. Optionally, based on the detection result obtained, this embodiment performs a relationship analysis on the obtained detection result, and if the analyzed detection result indicates that the updated first configuration information is irrelevant to the production environment and the disaster recovery environment in the target environment, the updated first configuration information can be determined as the second configuration information applied in the disaster recovery environment.

[0056] In this embodiment, in response to the update of the first configuration information, the updated first configuration information is detected, and after the detection result is obtained, in response to the detection result indicating that the updated first configuration information is related to the production environment and the disaster recovery environment, based on the mapping relationship between different configuration information applied in the production environment and different configuration information applied in the disaster recovery environment, the updated first configuration information is mapped to the disaster recovery environment to obtain the second configuration information. Optionally, on the basis of the detection result obtained, this embodiment performs a relationship analysis on the obtained detection result. If the analyzed detection result indicates that the updated first configuration information is related to the production environment and the disaster recovery environment in the target environment, then according to the mapping relationship between different configuration information applied in the production environment and different configuration information applied in the disaster recovery environment, a mapping operation is performed on the updated first configuration information, that is, the updated first configuration information is mapped to the disaster recovery environment, thereby obtaining the second configuration information applied in the disaster recovery environment.

[0057] As an optional implementation method, step S103, in response to the first task instance corresponding to the application in the production environment being successfully deployed, determines the second task instance corresponding to the application in the disaster recovery environment based on the second configuration information, including: in response to the first task instance being successfully deployed for the application, determining the second task template for the application in the disaster recovery environment based on the first task template for the application in the production environment; loading the second configuration information into the second task template to obtain the second task instance.

[0058] In this embodiment, after determining the second configuration information of the application in the disaster recovery environment based on the first configuration information, in response to the first task instance being successfully deployed for the application, based on the first task template of the application in the production environment, determine the second task template of the application in the disaster recovery environment. Optionally, this embodiment determines whether the corresponding first task instance in the production environment has been successfully deployed for the application on the basis of determining the second configuration information, and a first judgment result can be obtained. If the first judgment result obtained indicates that the application has successfully deployed the corresponding first task instance in the production environment, the first task template of the application in the production environment can be directly called from the local. Based on the called first task template, the second task template of the application in the disaster recovery environment can be determined.

[0059] In this embodiment, in response to the first task instance being successfully deployed for the application, after determining the second task template to be applied in the disaster recovery environment based on the first task template to be applied in the production environment, the second configuration information is loaded into the second task template to obtain the second task instance. Optionally, this embodiment loads the determined second configuration information into the second task template to be applied in the disaster recovery environment on the basis of determining the second task template, and the corresponding second task instance to be applied in the disaster recovery environment can be obtained.

[0060] Optionally, the determined second configuration information is written into a second task template applied in a disaster recovery environment, and a corresponding second task instance applied in the disaster recovery environment can be obtained. This is only used as an example and is not specifically limited.

[0061] As an optional implementation method, in response to the successful deployment of the first task instance for the application, based on the first task template of the application in the production environment, a second task template of the application in the disaster recovery environment is determined, including: in response to the successful deployment of the first task instance for the application, and the database of the application includes the first task template, the first task template is determined as the second task template; in response to the successful deployment of the first task instance for the application, and the database of the application does not include the first task template, attribute information of the first task template is determined, and the attribute information is combined to obtain the second task template.

[0062] In this embodiment, the database may be a product warehouse. The attribute information may be used to represent the component method in the first task template. The combination operation may be performed in the execution order of the component method required by the second task instance.

[0063] In this embodiment, after determining the second configuration information of the application in the disaster recovery environment based on the first configuration information, in response to the first task instance being successfully deployed for the application and the database of the application including the first task template, the first task template is determined as the second task template. Optionally, this embodiment judges whether the corresponding first task instance in the production environment has been successfully deployed for the application, and a first judgment result can be obtained, and judges whether the database of the application includes the first task template, and a fourth judgment result can be obtained. If the first judgment result obtained indicates that the corresponding first task instance in the production environment has been successfully deployed for the application, and the fourth judgment result obtained indicates that the database of the application includes the first task template, then the first task template can be determined as the second task template.

[0064] In this embodiment, after determining the second configuration information of the application in the disaster recovery environment based on the first configuration information, in response to the first task instance being successfully deployed for the application and the database of the application not including the first task template, the attribute information of the first task template is determined, and the attribute information is combined to obtain the second task template. Optionally, this embodiment judges whether the first task instance corresponding to the application has been successfully deployed in the production environment to obtain a first judgment result, and judges whether the database of the application includes the first task template to obtain a fourth judgment result. If the first judgment result obtained indicates that the application has been successfully deployed in the production environment corresponding to the first task instance, and the fourth judgment result obtained indicates that the database of the application does not include the first task template, the attribute information of the first task template can be determined, and the determined attribute information can be combined according to the execution order of the component method required by the second task instance to obtain the second task template.

[0065] In an embodiment of the present invention, when deploying a task instance in a disaster recovery environment, the first configuration information of the application in the production environment can be obtained. Based on the obtained first configuration information, the second configuration information of the application in the disaster recovery environment can be determined. In response to the first task instance corresponding to the application in the production environment being successfully deployed, the second task instance corresponding to the application in the disaster recovery environment can be determined based on the determined second configuration information, and in response to the determination that the second task instance has triggered the target deployment event, the second task instance is deployed for the application that has successfully deployed the first task instance, thereby achieving the purpose of avoiding the linear growth of the deployment workload with the scale of the system, thereby solving the technical problem of low deployment efficiency of task instances in the disaster recovery environment, and further achieving the technical effect of improving the deployment efficiency of task instances in the disaster recovery environment.

[0066] The technical solution of the embodiment of the present invention is illustrated below in conjunction with preferred implementation modes.

[0067] If a catastrophic event occurs to an application in a production environment, it will cause the production environment to not operate normally or data to be lost. Therefore, deploying corresponding task instances in a disaster recovery environment can ensure business continuity and data security.

[0068] However, in the prior art, automated scripts are often used to directly replace manual deployment operations, or the deployment operations of the corresponding task instances in the disaster recovery environment are integrated into the workflow management, thereby deploying the corresponding task instances in the disaster recovery environment. Regardless of which of the above methods is adopted, the workload of deployment will increase linearly with the scale of the system, thereby leading to the technical problem of low deployment efficiency of task instances in the disaster recovery environment.

[0069] In order to solve the above technical problems, an embodiment of the present invention proposes a method for deploying a task instance in a disaster recovery environment. When deploying a task instance in a disaster recovery environment, the first configuration information of the application in the production environment can be obtained. According to the obtained first configuration information, the second configuration information of the application in the disaster recovery environment can be determined. In response to the first task instance corresponding to the application in the production environment being successfully deployed, according to the determined second configuration information, the second task instance corresponding to the application in the disaster recovery environment can be determined, and in response to the determination that the second task instance has triggered the target deployment event, the second task instance is deployed for the application that has successfully deployed the first task instance, thereby achieving the purpose of avoiding the linear growth of the deployment workload with the scale of the system, thereby solving the technical problem of low deployment efficiency of task instances in the disaster recovery environment, and then achieving the technical effect of improving the deployment efficiency of task instances in the disaster recovery environment.

[0070] In this embodiment, through the application automation deployment system in the disaster recovery environment, in response to the second task instance corresponding to the application in the disaster recovery environment having triggered the target deployment event, the second task instance can be deployed for the application of the first task instance that has been successfully deployed in the production environment. For example, Figure 2(a) is a schematic diagram of an application automation deployment system in a disaster recovery environment according to an embodiment of the present invention. As shown in Figure 2(a), the system 200 may include: a basic data storage module 201, a configuration management center 202, a product warehouse 203, a differential synchronization module 204 and a deployment engine module 205.

[0071] In this embodiment, the basic data storage module 201 can be used to obtain server information in a disaster recovery environment and its corresponding server information in a production environment from a configuration management database (CMDB), and store the obtained server information in a disaster recovery environment and its corresponding server information in a production environment in the database. The basic data storage module 201 can also be used to load server information in a production environment into a production task instance. The production task instance can include a component method and a task template.

[0072] In this embodiment, the configuration management center 202 may include a production environment configuration library and a disaster recovery environment configuration library, wherein the production environment configuration library may be used to store configuration files in the production environment, and the disaster recovery environment configuration library may be used to store configuration files in the disaster recovery environment.

[0073] In this embodiment, the artifact warehouse 203 may be used to uniformly manage and store binary artifacts, and load the stored binary artifacts into a disaster recovery task instance.

[0074] In this embodiment, the differential synchronization module 204 can be used to receive the server information in the disaster recovery environment stored in the basic data storage module 201, the disaster recovery environment configuration library stored in the configuration management center 202, and the production task instance after the production task instance is successfully deployed, and generate a disaster recovery task instance after data mapping and differential synchronization of the received data. The production task instance can be generated by user arrangement.

[0075] In this embodiment, the deployment engine module can be used to receive production task instances and execute the received production task instances, thereby completing the automated deployment of the production environment. The deployment engine module can also be used to receive disaster recovery task instances and execute the received disaster recovery task instances, thereby completing the automated deployment of the disaster recovery environment.

[0076] In this embodiment, the above-mentioned automatic application deployment system in a disaster recovery environment is used to execute the automatic application deployment method in the disaster recovery environment, and in response to the second task instance corresponding to the application in the disaster recovery environment triggering the target deployment event, the second task instance can be deployed for the application that has been successfully deployed in the production environment corresponding to the first task instance. For example, Figure 2 (b) is a flowchart of an automatic application deployment method in a disaster recovery environment according to an embodiment of the present invention. As shown in Figure 2 (b), the method may include the following steps:

[0077] Step S2111, periodically read data from CMDB.

[0078] In the technical solution provided in the above step S2111 of the present invention, basic data such as server resources are read from the CMDB.

[0079] After reading data from the CMDB at regular intervals, the process proceeds to step S2112 to integrate, improve and process the read data.

[0080] After the read data is integrated, perfected and processed, the process proceeds to step S2113 to store the processed data in the basic data storage module.

[0081] In the technical solution provided in the above step S2113 of the present invention, the above basic data storage module provides relevant basic data such as servers and their resource attributes for automatic deployment of disaster recovery applications.

[0082] After the processed data is stored in the basic data storage module, the process proceeds to step S2121 to transfer the program packages that have passed the test to the product warehouse.

[0083] After the tested program package is transferred to the product warehouse, the process proceeds to step S2131 to upload or modify the production configuration file to the production environment configuration library.

[0084] After uploading or modifying the production configuration file to the production environment configuration library, proceed to step S2132 to determine whether the production configuration file is related to the target environment.

[0085] If it is determined that the production configuration file is related to the target environment, the process proceeds to step S2133 to store the mapped production configuration file in the disaster recovery environment configuration library.

[0086] In the technical solution provided by the above step S2133 of the present invention, the above storage process may occur when the configuration file in the production environment configuration library is updated. The above mapping process is performed based on the production disaster recovery mapping data stored in the basic data module, wherein the production disaster recovery mapping data may be used to represent the mapping relationship between different configuration information of the application in the production environment and different configuration information of the application in the disaster recovery environment.

[0087] If it is determined that the production configuration file is irrelevant to the target environment, the process proceeds to step S2134 to configure the production configuration file in the production environment configuration library into the disaster recovery environment configuration library.

[0088] In the technical solution provided by the above step S2134 of the present invention, the above configuration process may occur when the configuration file in the production environment configuration library is updated.

[0089] After storing the mapped production configuration file in the disaster recovery environment configuration library, or after configuring the production configuration file in the production environment configuration library into the disaster recovery environment configuration library, proceed to step S2141, step S2142 and step S2143, select component methods, generate task templates, and orchestrate production task instances.

[0090] In the technical solution provided by the above step S2142 of the present invention, the component methods are combined into a task template in a certain order.

[0091] In the technical solution provided in the above step S2143 of the present invention, a production task instance can be generated according to the deployed production resources, program packages and configuration files in the production environment.

[0092] After the production task instance is arranged, the process proceeds to step S2151 to deploy the production task instance in the production environment.

[0093] In the technical solution provided by the above step S2151 of the present invention, within the specified change time period, the deployment engine module is manually or automatically triggered to deploy the production task instance in the production environment.

[0094] After the production task instance is deployed in the production environment, step S2152 is entered to determine whether the production task instance is deployed successfully. If the deployment fails, the process ends. If the deployment is successful, steps S2161, S2162 and S2163 are entered to map data, synchronize data differentiation, and generate a disaster recovery task instance.

[0095] In this embodiment, after the production task instance is successfully deployed, the differential synchronization module is controlled to receive the server information in the disaster recovery environment stored in the basic data storage module 201, the disaster recovery environment configuration library stored in the configuration management center 202, and the production task instance. After the above-mentioned received data is subjected to data mapping and differential synchronization, a disaster recovery task instance can be generated. It should be noted that due to the particularity of the disaster recovery environment, some applications need to be in a cold standby state. Therefore, it can be configured to only install without starting or install and start, which not only meets the synchronization of the disaster recovery environment and the production environment application, but also meets the backup requirements of the disaster recovery environment.

[0096] In this embodiment, if the production task instance fails to be deployed, the cause is found out, and after the production environment is successfully deployed, the disaster recovery is synchronized, which ensures the availability of the disaster recovery environment and improves the effectiveness of the deployment.

[0097] After the disaster recovery task instance is generated, the process proceeds to step S2171 to deploy the disaster recovery task instance in the disaster recovery environment.

[0098] In the technical solution provided by the above step S2171 of the present invention, within the specified change time period, the deployment engine module is manually or automatically triggered to deploy the disaster recovery task instance in the disaster recovery environment.

[0099] Furthermore, the deployment method of task instances in a disaster recovery environment can be illustrated by the following example:

[0100] Example 1, only the program package is changed, and no configuration file is modified to illustrate; the basic data storage module is used to obtain server information and other data from the CMDB at regular intervals. Among them, the server information can include server information in the disaster recovery environment and its corresponding server information in the production environment. Then, the tested program package is transferred to the product warehouse, and then a change plan is formulated according to the change requirements, and the production task instance is arranged according to the change plan, wherein the task instance may include: basic data in the basic data storage module, software packages in the product warehouse, component methods and task templates. Next, the production environment application is deployed, that is, according to the change risk and change impact, whether to use the automatic trigger deployment operation is evaluated. If the automatic trigger deployment is used, the deployment engine automatically completes the deployment of the production environment according to the configured deployment time. If the automatic trigger deployment is not used, it is necessary to manually trigger the deployment engine in the specified change time period, and the deployment engine automatically completes the deployment of the production environment. Furthermore, after the production environment is successfully deployed, the differential synchronization module is controlled. Based on the mapping relationship between production resources and disaster recovery resources in the basic data storage module, as well as the production task instance, after data mapping and differential synchronization, a disaster recovery task instance can be generated, and the disaster recovery task instance can be deployed in the disaster recovery environment.

[0101] For example, the disaster recovery environment is usually in a backup state with no business traffic, so the risk of change is low and the change operation has no impact. The disaster recovery automated deployment system is set by default to automatically trigger the deployment engine to deploy the disaster recovery environment when the specified time is reached. If the deployment engine needs to be manually triggered, it can also be configured to be manually triggered. In this way, the deployment engine module can be used to complete the automated deployment of the disaster recovery environment application. This is only an example and is not specifically limited.

[0102] Example 2 is explained with program packages and configuration changes that are not related to the environment; using the basic data storage module, the server information and other data are obtained from the CMDB at regular intervals. Among them, the server information can include the server information in the disaster recovery environment and the server information in the corresponding production environment. Then, the tested program package is transferred to the product warehouse. If the newly added configuration does not have this configuration information in the production environment configuration library, this configuration information needs to be uploaded to the environment-independent configuration class of the production configuration environment library before the first change. The configuration management center automatically synchronizes this configuration information to the disaster recovery configuration library. If there is a modification of the configuration, the configuration is modified and saved in the environment-independent configuration class of the production configuration environment library. The configuration management center automatically synchronizes this configuration information to the disaster recovery configuration library. According to the change requirements, a change plan is formulated, and the production task instance is arranged according to the change plan. Among them, the task instance can include: basic data in the basic data storage module, software packages in the product warehouse, component methods and task templates. Then, the deployment of the production environment application and subsequent steps are the same as Example 1.

[0103] Example 3 is explained with program packages and configuration changes related to the environment; using the basic data storage module, the server information and other data are obtained from the CMDB at regular intervals. Among them, the server information can include the server information in the disaster recovery environment and the server information in the corresponding production environment. Then, the tested program package is transferred to the product warehouse. If the newly added configuration does not have this configuration information in the production environment configuration library, it is necessary to upload this configuration information to the environment-related configuration class of the production configuration environment library before the first change. According to the mapping relationship in the basic data storage module, this configuration information is mapped to the disaster recovery environment configuration, and the mapped configuration information is synchronized to the disaster recovery configuration environment library. If there is a modification of the configuration, in the environment-related configuration class of the production configuration environment library that has been modified and saved, according to the mapping relationship in the basic data storage module, this configuration information is mapped to the disaster recovery environment configuration, and the mapped configuration information is synchronized to the disaster recovery configuration environment library. According to the change requirements, a change plan is formulated, and according to the change plan, the production task instance is arranged, wherein the task instance can include: basic data in the basic data storage module, software packages in the product warehouse, component methods and task templates. Then, the deployment of the production environment application and subsequent steps are the same as Example 1.

[0104] It should be noted that since most changes are regular scenario changes, task templates and task instances can be reused. If the production environment already has the required task template, you only need to modify the version, configuration information and target server information of the online package; if the production environment does not have the required task template, you need to select the component method, combine the component methods into a task template in a certain order, and on this basis select the production target server, package and configuration information to be deployed to generate a production task instance. This is only an example and is not specifically limited.

[0105] In this embodiment, when deploying a task instance in a disaster recovery environment, the first configuration information of the application in the production environment can be obtained. Based on the obtained first configuration information, the second configuration information of the application in the disaster recovery environment can be determined. In response to the first task instance corresponding to the application in the production environment being successfully deployed, the second task instance corresponding to the application in the disaster recovery environment can be determined based on the determined second configuration information, and in response to the determination that the second task instance has triggered the target deployment event, the second task instance is deployed for the application that has successfully deployed the first task instance, thereby achieving the purpose of avoiding the linear growth of the deployment workload with the scale of the system, thereby solving the technical problem of low deployment efficiency of task instances in the disaster recovery environment, and further achieving the technical effect of improving the deployment efficiency of task instances in the disaster recovery environment.

[0106] According to an embodiment of the present invention, a device for deploying task instances in a disaster recovery environment is also provided. It should be noted that the device for deploying task instances in a disaster recovery environment can be used to execute a method for deploying task instances in a disaster recovery environment in an embodiment.

[0107] Figure 3 FIG. 1 is a schematic diagram of a deployment device for a task instance in a disaster recovery environment according to an embodiment of the present invention. Figure 3 As shown, the deployment device 300 of the task instance in the disaster recovery environment may include: an acquisition unit 301 , a first determination unit 302 , a second determination unit 303 and a deployment unit 304 .

[0108] The acquisition unit 301 is used to acquire first configuration information of an application in a production environment, wherein the first configuration information is used to represent at least one parameter of the application running in the production environment.

[0109] The first determining unit 302 is used to determine second configuration information of the application in the disaster recovery environment based on the first configuration information, wherein the second configuration information is used to represent at least one parameter of the application running in the disaster recovery environment.

[0110] The second determining unit 303 is configured to determine, in response to the first task instance corresponding to the application in the production environment being successfully deployed, a second task instance corresponding to the application in the disaster recovery environment based on the second configuration information.

[0111] The deployment unit 304 is configured to deploy the second task instance for the application in response to the second task instance triggering a target deployment event, wherein the target deployment event is used to represent a triggering event for deploying the second task instance for the application.

[0112] Optionally, the first determining unit 302 may include: a first determining module, configured to determine, in response to an update of the first configuration information, the second configuration information based on the updated first configuration information.

[0113] Optionally, the first determination module may include: a detection submodule, configured to detect the updated first configuration information in response to the first configuration information being updated to obtain a detection result; and a first determination submodule, configured to determine the second configuration information based on the detection result.

[0114] Optionally, the first determination submodule can determine the second configuration information based on the detection result by executing the following steps: in response to the detection result indicating that the updated first configuration information is independent of the production environment and the disaster recovery environment, the updated first configuration information is determined as the second configuration information; in response to the detection result indicating that the updated first configuration information is related to the production environment and the disaster recovery environment, based on the mapping relationship between different configuration information applied in the production environment and different configuration information applied in the disaster recovery environment, the updated first configuration information is mapped to the disaster recovery environment to obtain the second configuration information.

[0115] Optionally, the second determination unit 303 may include: a second determination module, used to determine, in response to the successful deployment of the first task instance for the application, a second task template for the application in the disaster recovery environment based on the first task template for the application in the production environment; and a loading module, used to load the second configuration information into the second task template to obtain a second task instance.

[0116] Optionally, the second determination module may include: a second determination sub-module, used to determine the first task template as the second task template in response to the first task instance being successfully deployed for the application and the database of the application including the first task template; a combination sub-module, used to determine the attribute information of the first task template in response to the first task instance being successfully deployed for the application and the database of the application not including the first task template, and combine the attribute information to obtain the second task template.

[0117] In this embodiment, an acquisition unit is used to acquire first configuration information of an application in a production environment, wherein the first configuration information is used to represent at least one parameter of the application running in the production environment; a first determination unit is used to determine second configuration information of the application in a disaster recovery environment based on the first configuration information, wherein the second configuration information is used to represent at least one parameter of the application running in the disaster recovery environment; a second determination unit is used to determine a second task instance corresponding to the application in the disaster recovery environment based on the second configuration information in response to the first task instance corresponding to the application being successfully deployed in the production environment; a deployment unit is used to deploy a second task instance for the application in response to the second task instance having triggered a target deployment event, wherein the target deployment event is used to represent a triggering event for deploying the second task instance for the application, thereby achieving the purpose of avoiding the linear growth of the deployment workload with the scale of the system, thereby solving the technical problem of low deployment efficiency of task instances in a disaster recovery environment, and further achieving the technical effect of improving the deployment efficiency of task instances in a disaster recovery environment.

[0118] According to an embodiment of the present invention, a processor is further provided, the processor being used to run a program, wherein when the program is run by the processor, the method for deploying a task instance in a disaster recovery environment in the embodiment is executed.

[0119] According to an embodiment of the present invention, there is also provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the method for deploying a task instance in a disaster recovery environment in the embodiment is executed when the program is running.

[0120] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for deploying task instances in a disaster recovery environment in the embodiment.

[0121] According to an embodiment of the present invention, a computer program product is also provided. The computer program product includes a computer program. When the computer program is executed by a processor, the method for deploying a task instance in a disaster recovery environment in the embodiment is implemented.

[0122] According to an embodiment of the present invention, a computer program product is also provided, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method for deploying a task instance in a disaster recovery environment in the embodiment is implemented.

[0123] According to an embodiment of the present invention, a computer program is also provided. When the computer program is executed by a processor, the method for deploying a task instance in a disaster recovery environment in the embodiment is implemented.

[0124] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0125] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0126] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0127] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0128] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0129] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the relevant technology or the whole or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, referred to as Read-Only Memory), random access memory (RAM, referred to as Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0130] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for deploying a task instance in a disaster recovery environment, characterized in that: include: Acquire first configuration information of the application in the production environment, wherein the first configuration information is used to represent at least one parameter of the application running in the production environment; Determining second configuration information of the application in a disaster recovery environment based on the first configuration information, wherein the second configuration information is used to represent at least one parameter of the application running in the disaster recovery environment; In response to successfully deploying the first task instance corresponding to the application in the production environment, determining, based on the second configuration information, a second task instance corresponding to the application in the disaster recovery environment; In response to the second task instance having triggered a target deployment event, the second task instance is deployed for the application, wherein the target deployment event is used to represent a triggering event for deploying the second task instance for the application.

2. The method according to claim 1, characterized in that Determining second configuration information of the application in a disaster recovery environment based on the first configuration information includes: In response to the first configuration information being updated, the second configuration information is determined based on the updated first configuration information.

3. The method according to claim 2, characterized in that In response to the first configuration information being updated, determining the second configuration information based on the updated first configuration information includes: In response to the first configuration information being updated, detecting the updated first configuration information to obtain a detection result; Based on the detection result, the second configuration information is determined.

4. The method according to claim 3, characterized in that Determining the second configuration information based on the detection result includes: In response to the detection result indicating that the updated first configuration information is irrelevant to the production environment and the disaster recovery environment, determining the updated first configuration information as the second configuration information; In response to the detection result indicating that the updated first configuration information is related to the production environment and the disaster recovery environment, based on the mapping relationship between different configuration information of the application in the production environment and different configuration information of the application in the disaster recovery environment, the updated first configuration information is mapped to the disaster recovery environment to obtain the second configuration information.

5. The method according to claim 1, characterized in that In response to successfully deploying the first task instance corresponding to the production environment for the application, determining, based on the second configuration information, a second task instance corresponding to the application in the disaster recovery environment, includes: In response to the first task instance being successfully deployed for the application, determining a second task template for the application in the disaster recovery environment based on the first task template for the application in the production environment; The second configuration information is loaded into the second task template to obtain the second task instance.

6. The method according to claim 5, characterized in that In response to the first task instance being successfully deployed for the application, determining a second task template for the application in the disaster recovery environment based on the first task template for the application in the production environment includes: In response to the first task instance being successfully deployed for the application, and the database of the application including the first task template, determining the first task template as the second task template; In response to the first task instance being successfully deployed for the application and the database of the application not including the first task template, attribute information of the first task template is determined, and the attribute information is combined to obtain the second task template.

7. A device for deploying task instances in a disaster recovery environment, characterized in that: include: An acquiring unit, configured to acquire first configuration information of an application in a production environment, wherein the first configuration information is used to represent at least one parameter of the application running in the production environment; A first determining unit, configured to determine second configuration information of the application in a disaster recovery environment based on the first configuration information, wherein the second configuration information is used to represent at least one parameter of the application running in the disaster recovery environment; A second determining unit is configured to determine, in response to successfully deploying the first task instance corresponding to the application in the production environment, a second task instance corresponding to the application in the disaster recovery environment based on the second configuration information; A deployment unit is used to deploy the second task instance for the application in response to the second task instance having triggered a target deployment event, wherein the target deployment event is used to represent a triggering event for deploying the second task instance for the application.

8. A processor, characterized in that: The processor is used to run a program, wherein the program, when run by the processor, executes the method for deploying a task instance in a disaster recovery environment as described in any one of claims 1 to 6.

9. An electronic device, characterized in that: include: A memory storing an executable program; A processor is used to run the program, wherein when the program is run, the method for deploying a task instance in a disaster recovery environment as described in any one of claims 1 to 6 is executed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the storage medium is located is controlled to execute the method for deploying a task instance in a disaster recovery environment as described in any one of claims 1 to 6.