CN111984366A - Method and system for deploying disaster recovery mechanism in containerization manner - Google Patents

Method and system for deploying disaster recovery mechanism in containerization manner Download PDF

Info

Publication number
CN111984366A
CN111984366A CN202010727286.9A CN202010727286A CN111984366A CN 111984366 A CN111984366 A CN 111984366A CN 202010727286 A CN202010727286 A CN 202010727286A CN 111984366 A CN111984366 A CN 111984366A
Authority
CN
China
Prior art keywords
deployment
docker
deployment tool
file
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010727286.9A
Other languages
Chinese (zh)
Other versions
CN111984366B (en
Inventor
张波业
马豹
亓开元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010727286.9A priority Critical patent/CN111984366B/en
Publication of CN111984366A publication Critical patent/CN111984366A/en
Application granted granted Critical
Publication of CN111984366B publication Critical patent/CN111984366B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a containerization disaster recovery mechanism deployment method and a system, wherein the method comprises the following steps: ensuring that a deployment tool process exists; all service containers and API interfaces corresponding to the containers run normally under the process; compressing the deployment tool compressed file, the containerized installation package and the image file submitted by the service container, temporarily storing the compressed files in a first temporary directory of a deployment node, and uploading the compressed files to a storage system; copying all files in the storage system to a second temporary directory of the deployment node, and restoring the deployment node on the premise that the docker main process is available, the deployment tool is available and the image file is complete. Based on the method, a system for deploying the disaster recovery mechanism in a containerization manner is also provided. The invention utilizes the storage service back-end resource platform to carry out remote disaster recovery protection on the deployment tool, the containerized installation package and the container data of the deployment node so as to prevent the deployment node from quickly recovering in time and effectively when the containerized main process is crashed.

Description

Method and system for deploying disaster recovery mechanism in containerization manner
Technical Field
The invention belongs to the technical field of OpenStack, and particularly relates to a method and a system for deploying a disaster recovery mechanism in a containerization manner.
Background
Openstack is an open source cloud platform software technology, provides a deployed operating platform and a tool set, is a cloud platform for comprehensively providing virtualized computing service, storage service and network service for users, has a reliable cloud deployment scheme and good expansibility, and is an operating system in the cloud computing era. Deployment is used as an extremely important ring in the current OpenStack system, each service of OpenStack is atomized, each service runs in a container, and the OpenStack system is convenient, rapid and efficient. Although the OpenStack service is containerized, although the OpenStack service is convenient, each service is used as a subprocess of a docker main process, a strong dependence relationship exists on the docker (open source application container engine) main process, and once the docker main process is crashed or cannot be repaired, each service of a cloud platform cannot be normally provided, so that cloud service paralysis and other catastrophic results are caused. In view of the fact that the deployment node serves as a starting point for executing containerization deployment at the back end of the cloud platform, the importance of the deployment node is mainly reflected in the operation aspects of upgrading, redeploying, modifying container service configuration and the like of the cloud platform, and the deployment node is generally only one, although confusion is not easy to cause, risks exist, namely once a docker main process fault occurs to the deployment node, operations of upgrading, modifying configuration, redeploying and the like are seriously affected, even a serious problem that the cloud platform cannot be upgraded can be caused, and therefore new functions cannot be added and used.
At present, a plurality of backup schemes are available for a cloud platform data plane, such as virtual machine backup, cloud hard disk data backup and the like, but disaster recovery protection for cloud platform deployment nodes is scarce.
Disclosure of Invention
In order to solve the technical problems, the invention provides a method and a system for deploying a disaster recovery mechanism in a containerization manner.
In order to achieve the purpose, the invention adopts the following technical scheme:
a containerized disaster recovery mechanism deployment method comprises the following steps:
s1: ensuring that a deployment tool process exists; all service containers and API interfaces corresponding to the service containers run normally under the process;
s2: compressing a deployment tool compressed file, a docker installation package and an image file submitted by the service container, temporarily storing the compressed files in a first temporary directory of a deployment node, and uploading the compressed files to a storage system;
s3: copying a deployment tool compressed file, a docker installation package and an image file submitted by the service container in the storage system to a second temporary directory of the deployment node, and restoring the deployment node on the premise that a docker main process is available, a deployment tool is available and the image file is complete.
Further, the step S1 includes:
s11: checking whether a deployment tool process exists;
s12: circularly detecting all service containers on the premise that the deployment tool process exists, and exiting if the service containers are detected to be abnormal; the cycle detection is finished until all the service containers are normal;
s13: and circularly detecting the API functional interfaces corresponding to all the service containers on the premise that all the service containers are normal, if the API functional interfaces are detected to be abnormal, exiting, ending the circular detection until all the API functional interfaces are normal, and packaging the API functional interfaces.
Further, the step S2 includes:
s21: saving the compressed file of the deployment tool and the docker installation package to a first temporary directory of a deployment node;
s22: submitting all the operation containers of the deployment node as a local mirror image with a backup label, circularly storing the local mirror image with the backup label as a local file, compressing the local file into a backup file, and storing the backup file into a first temporary directory of the deployment node;
s23: uploading a deployment tool compressed file, a docker installation package and a backup file which are located in a first temporary directory of a deployment node to a storage system, and cleaning the first temporary directory of the deployment node.
Further, before executing step S3, the method further includes:
a docker main process monitoring function is adopted to monitor the status of the docker main process at regular time, and if an exception occurs, all service containers of the docker main process are caused, an exception prompt is given;
and monitoring the availability of the deployment tool at regular time by adopting a monitoring function of the deployment tool, and giving an exception prompt if the deployment tool is unavailable due to exception.
Further, the step S3 includes:
s31: copying a deployment tool compressed file, a docker installation package and a backup file which are positioned in the storage system to a second temporary directory of a deployment node;
s32: decompressing the docker installation package to a deployment node local directory, firstly, adopting a docker service cleaning function to clean original docker file residues, then installing the docker and detecting the service state of a docker main process until the docker main process is available;
s33: on the premise that the docker main process is available, if the deployment tool is available, executing a deployment tool compressed file deleting function; if the deployment tool is not available, calling a deployment tool cleaning function, cleaning a residual installation directory of the original deployment tool, then calling a deployment tool installation function, decompressing and installing the deployment tool installation package, and testing the availability of the deployment tool;
s34: decompressing the image file and checking the integrity of the image file on the premise that both the docker main process and the deployment tool are available;
s35: and restoring the deployment node on the premise that the docker main process, the deployment tool and the image file are complete.
Further, after the execution of step S35 is completed,
circularly detecting all service containers, if detecting that the service containers are abnormal, exiting, and giving an abnormal prompt until all the service containers are normal, and finishing the circular detection;
and circularly detecting the API functional interfaces corresponding to all the service containers on the premise that all the service containers are normal, if the API functional interfaces are detected to be abnormal, exiting, and giving an abnormal prompt until all the API functional interfaces are normal, and finishing the circular detection.
The invention also provides a system for deploying the disaster recovery mechanism in a containerization manner, which comprises a checking and detecting module, a compression uploading module and a copy recovery module;
the viewing detection module is used for ensuring that a deployment tool process exists; all service containers and API interfaces corresponding to the service containers run normally under the process;
the compression uploading module is used for compressing a deployment tool compressed file, a docker installation package and a mirror image file submitted by the service container, temporarily storing the compressed file, the docker installation package and the mirror image file in a first temporary directory of a deployment node, and then uploading the compressed file, the docker installation package and the mirror image file to a storage system;
the copying recovery module is used for copying the deployment tool compressed file, the docker installation package and the image file submitted by the service container in the storage system to a second temporary directory of the deployment node, and recovering and restoring the deployment node on the premise that the docker main process is available, the deployment tool is available and the image file is complete.
Further, the checking detection module comprises a checking module, a first detection module and a second detection module;
the checking module is used for checking whether a deployment tool process exists;
the first detection module is used for circularly detecting all service containers on the premise that the deployment tool process exists, and quitting if the service containers are detected to be abnormal; the cycle detection is finished until all the service containers are normal;
the second detection module is used for circularly detecting the API functional interfaces corresponding to all the service containers on the premise that all the service containers are normal, exiting if the API functional interfaces are detected to be abnormal, ending the circular detection until all the API functional interfaces are normal, and packaging the API functional interfaces.
Further, the compression uploading module comprises a first compression module, a second compression module and an uploading module;
the first compression module is used for storing the deployment tool compressed file and the docker installation package to a first temporary directory of a deployment node;
the second compression module is used for submitting all the operation containers of the deployment node as a local mirror image with a backup label, circularly storing the local mirror image with the backup label as a local file, compressing the local file into a backup file and storing the backup file into a first temporary directory of the deployment node;
the uploading module is used for uploading the deployment tool compressed file, the docker installation package and the backup file which are located in the first temporary directory of the deployment node to the storage system, and cleaning the first temporary directory of the deployment node.
Further, the copy recovery module comprises a copy module, a first ensuring module, a second ensuring module, a third ensuring module and a recovery module;
the copying module is used for copying the deployment tool compressed file, the docker installation package and the backup file which are positioned in the storage system to a second temporary directory of the deployment node;
the first ensuring module is used for decompressing the docker installation package to a deployment node local directory, firstly, a docker service cleaning function is used for cleaning the original docker file residues, then, the docker is installed, and the service state of a docker main process is detected until the docker main process is available;
the second ensuring module executes a compressed file deleting function of the deployment tool if the deployment tool is available on the premise that the docker main process is available; if the deployment tool is not available, calling a deployment tool cleaning function, cleaning a residual installation directory of the original deployment tool, then calling a deployment tool installation function, decompressing and installing the deployment tool installation package, and testing the availability of the deployment tool;
the third ensuring module is used for decompressing the image file and checking the integrity of the image file on the premise that both the docker main process and the deployment tool are available;
and the recovery module is used for recovering and restoring the deployment node on the premise that the docker main process, the deployment tool and the image file are complete.
The effect provided in the summary of the invention is only the effect of the embodiment, not all the effects of the invention, and one of the above technical solutions has the following advantages or beneficial effects:
the invention provides a containerization disaster recovery mechanism deployment method and a system, wherein the method comprises the following steps: ensuring that a deployment tool process exists; all service containers and API interfaces corresponding to the service containers operate normally under the process; compressing the deployment tool compressed file, the docker installation package and the image file submitted by the service container, temporarily storing the compressed files in a first temporary directory of a deployment node, and uploading the compressed files to a storage system; copying a deployment tool compressed file, a docker installation package and an image file submitted by a service container in the storage system to a second temporary directory of the deployment node, and restoring the deployment node on the premise that a docker main process is available, a deployment tool is available and the image file is complete. Based on the method for deploying the disaster recovery backup mechanism containerizedly provided by the invention, a system for deploying the disaster recovery backup mechanism containerizedly is also provided. In the invention, on the premise that the deployment tool process exists, all service containers and interfaces corresponding to all the service containers under the process are ensured to be available, and then the following copying and recovery are executed, so that a plurality of layers of protection mechanisms are provided, and the robustness of the deployment node is improved. The invention is suitable for various cloud platform infrastructures, such as X86, ARM and MIPS platform infrastructures. The invention directly utilizes the storage service back-end resource platform to carry out remote direct disaster recovery protection on deployment tools, docker installation packages and container data of deployment nodes so as to prevent deployment node docker main processes from being crashed and obtain timely, effective and rapid recovery.
Drawings
Fig. 1 is a flowchart of a method for containerized deployment of a disaster recovery mechanism according to embodiment 1 of the present invention;
fig. 2 is a schematic diagram of a system for containerized deployment of disaster recovery mechanisms according to embodiment 2 of the present invention.
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
Example 1
Embodiment 1 of the present invention provides a method for containerized deployment of a disaster recovery backup mechanism, which comprehensively considers actual requirements of users in a production environment and performs a disaster recovery backup protection design for deployment nodes, thereby improving controllability of a cloud platform.
Fig. 1 shows a flowchart of a method for containerized deployment of a disaster recovery mechanism according to embodiment 1 of the present invention.
In step S101, the process is started.
In step S102, a deployment tool process, such as a kolla-allowed process, is viewed, and the scope of the present invention is not limited to the processes listed in embodiment 1.
In step S103, it is determined whether the deployment tool process exists, and if both the deployment tool processes exist, step S105 is executed, otherwise, step S104 is executed, and then step S105 is executed.
In step S104, a period of time is waited for.
In step S105, a loop detection mechanism is implemented to respectively check whether each service container of the cloud platform is in a normal operation state.
In step S106, it is determined whether each service container is normal, and if all the service containers are normal, step S107 is performed, and if an abnormality occurs, step S109 is performed.
In step S107, on the premise that all service containers are normal, API function interfaces corresponding to all service containers are cyclically detected.
In step S108, it is determined whether the API functional interface is normal, and if both are normal, step S110 is executed, and if an abnormality occurs, step S109 is executed.
In step S109, the loop flow exits.
In step S110, the deployment tool compressed file and the docker installation package are saved to the first temporary directory of the deployment node. In embodiment 1 of the present invention, the deployment tool compressed file, deployment _ tool _ bak.tar, and the docker installation package, docker _ tool.tar, are saved to the deployment node directory tmp _ bak.
In step S111, all the operating containers of the deployment node are submitted as local images with backup tags, the local images with the backup tags are cyclically saved as local files, the local files are compressed into backup files image _ bak.
In step S112, a remote upload combination tool (related function call interfaces adapted to different storage service backend need to be implemented) is executed to upload the deployment node directory tmp _ bak _ tool, the socket _ tool. Such as: for ceph cluster multi-nodes, backup compressed files can be copied from a local to a directory tmp of any node of a cluster through an scp remote copy command, then an rbd import xx command is executed to upload the deploy _ tool _ bak.tar and image _ bak.tar backup files in the tmp directory to a storage pool (such as an rbd pool) for storage, after uploading is completed, deployment node directories tmp _ bak and ceph cluster node directories tmp are directly deleted, and cleaning and resource releasing actions are performed.
In step S113, a docker host process monitoring function is written, a status of the docker host process is monitored at regular time, and if an exception occurs, which results in that all container services related to the docker cannot be used, an exception prompt is given, so that an administrator makes a decision to determine whether to start a cloud platform deployment node container mirror disaster recovery mechanism. And writing a simple test function for the availability of the deployment tool, and monitoring the availability of the tool regularly.
In step S114, it is determined that the deployment node operating system is normal, and if normal, step S115 is performed, otherwise, step S116 is performed.
In step S115, the deployment tool compressed file, the docker installation package, and the image file submitted by the service container in the storage system are copied to the second temporary directory of the deployment node, and the deployment node is restored and restored on the premise that the docker host process is available, the deployment tool is available, and the image file is complete.
The detailed process is as follows: and copying the compressed file, the docker installation package and the backup file of the deployment tool in the storage system to a second temporary directory of the deployment node.
And decompressing the docker installation package to the deployment node local directory, firstly, cleaning the original docker file residues by using a docker service cleaning function, then installing the docker and detecting the service state of the docker main process until the docker main process is available.
On the premise that the docker main process is available, if the deployment tool is available, executing a deployment tool compressed file deleting function; and if the deployment tool is not available, calling a deployment tool cleaning function, cleaning a residual installation directory of the original deployment tool, then calling a deployment tool installation function, decompressing and installing a deployment tool installation package, and testing the availability of the deployment tool.
And decompressing the image file and checking the integrity of the image file on the premise that both the docker main process and the deployment tool are available.
And restoring the deployment node on the premise that the docker main process, the deployment tool and the image file are complete. Because the backed-up mirror image files are container mirror image backup files submitted by executing docker commit before failure, related configurations exist, the mirror image files can be directly used, and after deploy is redeployed and restored, all service containers of the cloud platform are kept in the original state.
Finally, performing cycle detection on all service containers, if the service containers are detected to be abnormal, exiting, and giving an abnormal prompt until all the service containers are normal, and finishing the cycle detection; and circularly detecting the API functional interfaces corresponding to all the service containers on the premise that all the service containers are normal, if the API functional interfaces are detected to be abnormal, exiting, and giving an abnormal prompt until all the API functional interfaces are normal, and finishing the circular detection.
In step S116, the flow ends.
Based on the method for deploying the disaster recovery backup mechanism containerizedly provided by the invention, a system for deploying the disaster recovery backup mechanism containerizedly is also provided. Fig. 2 is a schematic diagram of a system for containerization deployment of a disaster recovery mechanism according to real-time embodiment 2 of the present invention, where the system includes a viewing detection module, a compression uploading module, and a copy recovery module.
The checking detection module is used for ensuring that a deployment tool process exists; and all the service containers and the API interfaces corresponding to the service containers run normally under the process.
The compression uploading module is used for compressing the deployment tool compressed file, the docker installation package and the image file submitted by the service container, temporarily storing the compressed file, the docker installation package and the image file in the first temporary directory of the deployment node, and then uploading the compressed file, the docker installation package and the image file to the storage system.
The copying recovery module is used for copying the deployment tool compressed file, the docker installation package and the image file submitted by the service container in the storage system to the second temporary directory of the deployment node, and recovering and restoring the deployment node on the premise that the docker main process is available, the deployment tool is available and the image file is complete.
The checking detection module comprises a checking module, a first detection module and a second detection module; the viewing module is used for viewing whether the deployment tool process exists. The first detection module is used for circularly detecting all the service containers on the premise that the tool deployment process exists, and quitting if the service containers are detected to be abnormal; and ending the cycle detection until all the service containers are normal. The second detection module is used for circularly detecting the API functional interfaces corresponding to all the service containers on the premise that all the service containers are normal, exiting if the API functional interfaces are detected to be abnormal, ending the circular detection until all the API functional interfaces are normal, and packaging the API functional interfaces.
The compression uploading module comprises a first compression module, a second compression module and an uploading module; the first compression module is used for storing the deployment tool compressed file and the docker installation package to a first temporary directory of the deployment node; the second compression module is used for submitting all the operation containers of the deployment node as a local mirror image with a backup label, circularly storing the local mirror image with the backup label as a local file, compressing the local file into a backup file and storing the backup file into the first temporary directory of the deployment node; the uploading module is used for uploading the deployment tool compressed file, the docker installation package and the backup file which are located in the first temporary directory of the deployment node to the storage system, and cleaning the first temporary directory of the deployment node.
The copy recovery module comprises a copy module, a first ensuring module, a second ensuring module, a third ensuring module and a recovery module; and the copying module is used for copying the deployment tool compressed file, the docker installation package and the backup file which are positioned in the storage system to a second temporary directory of the deployment node. The first ensuring module is used for decompressing a docker installation package to a deployment node local directory, firstly, a docker service cleaning function is used for cleaning original docker file residues, and then, the docker is installed and the service state of a docker main process is detected until the docker main process is available. Secondly, on the premise that the docker main process is available, if a deployment tool is available, executing a deployment tool compressed file deleting function; and if the deployment tool is not available, calling a deployment tool cleaning function, cleaning a residual installation directory of the original deployment tool, then calling a deployment tool installation function, decompressing and installing a deployment tool installation package, and testing the availability of the deployment tool. The third ensuring module is used for decompressing the mirror image file and checking the integrity of the mirror image file on the premise that both the docker main process and the deployment tool are available; and the recovery module is used for recovering and restoring the deployment node on the premise that the docker main process, the deployment tool and the image file are complete.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, the scope of the present invention is not limited thereto. Various modifications and alterations will occur to those skilled in the art based on the foregoing description. And are neither required nor exhaustive of all embodiments. On the basis of the technical scheme of the invention, various modifications or changes which can be made by a person skilled in the art without creative efforts are still within the protection scope of the invention.

Claims (10)

1. A containerized disaster recovery mechanism deployment method is characterized by comprising the following steps:
s1: ensuring that a deployment tool process exists; all service containers and API interfaces corresponding to the service containers run normally under the process;
s2: compressing a deployment tool compressed file, a docker installation package and an image file submitted by the service container, temporarily storing the compressed files in a first temporary directory of a deployment node, and uploading the compressed files to a storage system;
s3: copying a deployment tool compressed file, a docker installation package and an image file submitted by the service container in the storage system to a second temporary directory of the deployment node, and restoring the deployment node on the premise that a docker main process is available, a deployment tool is available and the image file is complete.
2. The method according to claim 1, wherein the step S1 includes:
s11: checking whether a deployment tool process exists;
s12: circularly detecting all service containers on the premise that the deployment tool process exists, and exiting if the service containers are detected to be abnormal; the cycle detection is finished until all the service containers are normal;
s13: and circularly detecting the API functional interfaces corresponding to all the service containers on the premise that all the service containers are normal, if the API functional interfaces are detected to be abnormal, exiting, ending the circular detection until all the API functional interfaces are normal, and packaging the API functional interfaces.
3. The method according to claim 1, wherein the step S2 includes:
s21: saving the compressed file of the deployment tool and the docker installation package to a first temporary directory of a deployment node;
s22: submitting all the operation containers of the deployment node as a local mirror image with a backup label, circularly storing the local mirror image with the backup label as a local file, compressing the local file into a backup file, and storing the backup file into a first temporary directory of the deployment node;
s23: uploading a deployment tool compressed file, a docker installation package and a backup file which are located in a first temporary directory of a deployment node to a storage system, and cleaning the first temporary directory of the deployment node.
4. The method according to claim 1, further comprising, before performing step S3:
a docker main process monitoring function is adopted to monitor the status of the docker main process at regular time, and if an exception occurs, all service containers of the docker main process are caused, an exception prompt is given;
and monitoring the availability of the deployment tool at regular time by adopting a monitoring function of the deployment tool, and giving an exception prompt if the deployment tool is unavailable due to exception.
5. The method according to claim 3, wherein the step S3 includes:
s31: copying a deployment tool compressed file, a docker installation package and a backup file which are positioned in the storage system to a second temporary directory of a deployment node;
s32: decompressing the docker installation package to a deployment node local directory, firstly, adopting a docker service cleaning function to clean original docker file residues, then installing the docker and detecting the service state of a docker main process until the docker main process is available;
s33: on the premise that the docker main process is available, if the deployment tool is available, executing a deployment tool compressed file deleting function; if the deployment tool is not available, calling a deployment tool cleaning function, cleaning a residual installation directory of the original deployment tool, then calling a deployment tool installation function, decompressing and installing the deployment tool installation package, and testing the availability of the deployment tool;
s34: decompressing the image file and checking the integrity of the image file on the premise that both the docker main process and the deployment tool are available;
s35: and restoring the deployment node on the premise that the docker main process, the deployment tool and the image file are complete.
6. The method for containerized deployment of disaster recovery mechanisms according to claim 5, wherein after the step S35 is completed,
circularly detecting all service containers, if detecting that the service containers are abnormal, exiting, and giving an abnormal prompt until all the service containers are normal, and finishing the circular detection;
and circularly detecting the API functional interfaces corresponding to all the service containers on the premise that all the service containers are normal, if the API functional interfaces are detected to be abnormal, exiting, and giving an abnormal prompt until all the API functional interfaces are normal, and finishing the circular detection.
7. A containerization disaster recovery mechanism deployment system is characterized by comprising a checking detection module, a compression uploading module and a copy recovery module;
the viewing detection module is used for ensuring that a deployment tool process exists; all service containers and API interfaces corresponding to the service containers run normally under the process;
the compression uploading module is used for compressing a deployment tool compressed file, a docker installation package and a mirror image file submitted by the service container, temporarily storing the compressed file, the docker installation package and the mirror image file in a first temporary directory of a deployment node, and then uploading the compressed file, the docker installation package and the mirror image file to a storage system;
the copying recovery module is used for copying the deployment tool compressed file, the docker installation package and the image file submitted by the service container in the storage system to a second temporary directory of the deployment node, and recovering and restoring the deployment node on the premise that the docker main process is available, the deployment tool is available and the image file is complete.
8. The system according to claim 7, wherein the inspection module includes an inspection module, a first detection module, and a second detection module;
the checking module is used for checking whether a deployment tool process exists;
the first detection module is used for circularly detecting all service containers on the premise that the deployment tool process exists, and quitting if the service containers are detected to be abnormal; the cycle detection is finished until all the service containers are normal;
the second detection module is used for circularly detecting the API functional interfaces corresponding to all the service containers on the premise that all the service containers are normal, exiting if the API functional interfaces are detected to be abnormal, ending the circular detection until all the API functional interfaces are normal, and packaging the API functional interfaces.
9. The system according to claim 7, wherein the compression upload module includes a first compression module, a second compression module, and an upload module;
the first compression module is used for storing the deployment tool compressed file and the docker installation package to a first temporary directory of a deployment node;
the second compression module is used for submitting all the operation containers of the deployment node as a local mirror image with a backup label, circularly storing the local mirror image with the backup label as a local file, compressing the local file into a backup file and storing the backup file into a first temporary directory of the deployment node;
the uploading module is used for uploading the deployment tool compressed file, the docker installation package and the backup file which are located in the first temporary directory of the deployment node to the storage system, and cleaning the first temporary directory of the deployment node.
10. The system according to claim 7, wherein the copy recovery module includes a copy module, a first ensure module, a second ensure module, a third ensure module, and a recovery module;
the copying module is used for copying the deployment tool compressed file, the docker installation package and the backup file which are positioned in the storage system to a second temporary directory of the deployment node;
the first ensuring module is used for decompressing the docker installation package to a deployment node local directory, firstly, a docker service cleaning function is used for cleaning the original docker file residues, then, the docker is installed, and the service state of a docker main process is detected until the docker main process is available;
the second ensuring module executes a compressed file deleting function of the deployment tool if the deployment tool is available on the premise that the docker main process is available; if the deployment tool is not available, calling a deployment tool cleaning function, cleaning a residual installation directory of the original deployment tool, then calling a deployment tool installation function, decompressing and installing the deployment tool installation package, and testing the availability of the deployment tool;
the third ensuring module is used for decompressing the image file and checking the integrity of the image file on the premise that both the docker main process and the deployment tool are available;
and the recovery module is used for recovering and restoring the deployment node on the premise that the docker main process, the deployment tool and the image file are complete.
CN202010727286.9A 2020-07-24 2020-07-24 Method and system for containerized deployment of disaster recovery mechanism Active CN111984366B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010727286.9A CN111984366B (en) 2020-07-24 2020-07-24 Method and system for containerized deployment of disaster recovery mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010727286.9A CN111984366B (en) 2020-07-24 2020-07-24 Method and system for containerized deployment of disaster recovery mechanism

Publications (2)

Publication Number Publication Date
CN111984366A true CN111984366A (en) 2020-11-24
CN111984366B CN111984366B (en) 2023-01-06

Family

ID=73438193

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010727286.9A Active CN111984366B (en) 2020-07-24 2020-07-24 Method and system for containerized deployment of disaster recovery mechanism

Country Status (1)

Country Link
CN (1) CN111984366B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327507A (en) * 2021-12-20 2022-04-12 江苏云工场信息技术有限公司 Automatic arranging method and device for CDN (content delivery network) nodes
CN114328007A (en) * 2021-11-19 2022-04-12 苏州浪潮智能科技有限公司 Container backup and restoration method, device and medium thereof

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624919A (en) * 2012-03-30 2012-08-01 电子科技大学 Distributed service integrated system for service-oriented architecture and application method thereof
CN105681420A (en) * 2016-01-18 2016-06-15 浪潮集团有限公司 Method for realizing backup of switch operating system based on Docker
CN106936636A (en) * 2017-03-15 2017-07-07 无锡华云数据技术服务有限公司 A kind of implementation method of the cloud computing test platform of rapid deployment containerization
CN108121595A (en) * 2016-11-28 2018-06-05 中国科学院声学研究所 A kind of Docker containers multi-process management method and system
CN109144777A (en) * 2018-07-27 2019-01-04 北京友普信息技术有限公司 A method of the isomery virtual computing calamity based on Docker is standby
WO2019076369A1 (en) * 2017-10-19 2019-04-25 北京金山云网络技术有限公司 Cloud platform deployment method, device, electronic device, and readable storage medium
CN110798375A (en) * 2019-09-29 2020-02-14 烽火通信科技股份有限公司 Monitoring method, system and terminal equipment for enhancing high availability of container cluster

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624919A (en) * 2012-03-30 2012-08-01 电子科技大学 Distributed service integrated system for service-oriented architecture and application method thereof
CN105681420A (en) * 2016-01-18 2016-06-15 浪潮集团有限公司 Method for realizing backup of switch operating system based on Docker
CN108121595A (en) * 2016-11-28 2018-06-05 中国科学院声学研究所 A kind of Docker containers multi-process management method and system
CN106936636A (en) * 2017-03-15 2017-07-07 无锡华云数据技术服务有限公司 A kind of implementation method of the cloud computing test platform of rapid deployment containerization
WO2019076369A1 (en) * 2017-10-19 2019-04-25 北京金山云网络技术有限公司 Cloud platform deployment method, device, electronic device, and readable storage medium
CN109144777A (en) * 2018-07-27 2019-01-04 北京友普信息技术有限公司 A method of the isomery virtual computing calamity based on Docker is standby
CN110798375A (en) * 2019-09-29 2020-02-14 烽火通信科技股份有限公司 Monitoring method, system and terminal equipment for enhancing high availability of container cluster

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114328007A (en) * 2021-11-19 2022-04-12 苏州浪潮智能科技有限公司 Container backup and restoration method, device and medium thereof
CN114328007B (en) * 2021-11-19 2024-03-22 苏州浪潮智能科技有限公司 Container backup and restoration method, device and medium thereof
CN114327507A (en) * 2021-12-20 2022-04-12 江苏云工场信息技术有限公司 Automatic arranging method and device for CDN (content delivery network) nodes
CN114327507B (en) * 2021-12-20 2022-07-15 江苏云工场信息技术有限公司 Automatic arranging method and device for CDN nodes
WO2023115591A1 (en) * 2021-12-20 2023-06-29 江苏云工场信息技术有限公司 Automatic arrangement method and apparatus for cdn nodes

Also Published As

Publication number Publication date
CN111984366B (en) 2023-01-06

Similar Documents

Publication Publication Date Title
RU2751551C1 (en) Method and apparatus for restoring disrupted operating ability of a unit, electronic apparatus and data storage medium
US20190073258A1 (en) Predicting, diagnosing, and recovering from application failures based on resource access patterns
TWI608419B (en) Method for pre-testing software compatibility and system thereof
Huang et al. Software implemented fault tolerance: Technologies and experience
TWI575362B (en) Backup method, pre-testing method for enviornment updating and system thereof
US7058853B1 (en) Highly available transaction processing
JP5444178B2 (en) Backup / restore processing device, backup / restore processing method and program
CN111984366B (en) Method and system for containerized deployment of disaster recovery mechanism
CN111580929A (en) Validity verification system and method based on virtual machine protection data
JP2007206759A (en) Storage system
US11706080B2 (en) Providing dynamic serviceability for software-defined data centers
CN109144789B (en) Method, device and system for restarting OSD
CN105354113A (en) Server, and system and method for managing server
CN102455954A (en) Power-failure-preventing upgrading method of Linux system
CN112380062A (en) Method and system for rapidly recovering system for multiple times based on system backup point
WO2015043155A1 (en) Method and device for network element backup and recovery based on command set
CN101145983A (en) A self-diagnosis and self-discovery subsystem and method of network management system
CN114020509A (en) Method, device and equipment for repairing work load cluster and readable storage medium
CN113986450A (en) Virtual machine backup method and device
CN111416753B (en) High-availability method of two-node Ceph cluster
CN111147615B (en) Method and system for taking over IP address, computer readable storage medium and server
CN115314361B (en) Server cluster management method and related components thereof
CN114691304B (en) Method, device, equipment and medium for realizing high availability of cluster virtual machine
CN114138560A (en) Backup restoration method and system for operating system
JPH07183891A (en) Computer system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant