Container template-based domestic application cross-system migration method
Technical Field
The invention belongs to the field of containers in a home-made computing service, and particularly relates to a home-made application cross-system migration method based on a container template.
Background
In the existing life, the localization migration of an application system is to migrate a system operating environment from a traditional X86 series CPU operating environment to a localization environment supporting a localization CPU operating system, and the traditional migration method is to disassemble the application system, take a B/S application system as an example, and firstly complete the migration of a main program of the application system; then migrating the dependent component; and then carrying out migration verification on the client, and carrying out adaptability verification on the browser used by each client.
Thus, conventional application migration has several drawbacks: 1. cold migration of the database results in services that must be interrupted; 2. the application running environment cannot be migrated along with the application, so that parameters need to be reconfigured after migration is completed; 3. the client side environment is inconsistent, so that the client side application needs to be adapted again, parameters of the browser and the control are adjusted, and special components related to the client side, such as format files of office application and streaming file controls, need to be adapted again.
The invention content is as follows:
the invention aims to solve the problems in the prior art by providing a container template-based domestic application cross-system migration method.
In order to solve the above problems, the present invention provides a technical solution:
a domestic application cross-system migration method based on a container template comprises the following steps:
s1, firstly, performing containerization packaging on a source system including an operating system environment through an application container platform;
s2, data are acquired through a data acquisition module, then synchronous database building is carried out on a database in a domestic environment through a data conversion module, and data synchronization is kept;
s3, acquiring the current state of the running process, acquiring running environment parameters through an environment acquisition module, and writing an acquisition result into an environment configuration library;
s4, migrating the container mirror image of the source system to the target system, then starting the application on the target system, configuring the application database as the database on the target system, configuring the container state as the container state of the source system, and repackaging the container into the mirror image;
s5, starting an application container on the target system;
s6, then container packaging is carried out on the client desktop application in the source system;
and S7, starting the client desktop container on the target system to finish the migration process of the client system.
Preferably, the operating system environment in step S1 includes that the application system and the environment in which the system is located depend on the system containerization packaging system at the same time.
Preferably, before data collection in step S2, a database is required to be used to start a data log function in advance.
Preferably, the CRIU tool is used to collect the operating status parameters of the container in step S3.
Preferably, the acquisition result is written into the environment configuration library in the step S3, and the environment synchronous monitoring program is used for monitoring, so as to keep the parameters of the source system and the parameters of the target system consistent.
Preferably, in step S4, the container image of the source system is migrated to the target system, and parameter configuration needs to be performed based on the configuration library.
Preferably, the client desktop application in step S6 includes a browser, a layout file, a streaming file editor, and an electronic signature application.
Preferably, in step S7, the client desktop image needs to be made while the client desktop container is started on the target system.
The invention has the beneficial effects that:
1. the application system packs the source system at one time, then unpacks and packs again after migrating to the domestic environment, so that the application system can adapt to the domestic environment and avoid the influence of environmental difference on program operation;
2. by using a data log synchronization technology, incremental data can be synchronized to a domestic database on a target system under the condition that the system operation is not influenced;
3. the CRIU tool is used for collecting the running state parameters of the container, configuration parameters can be provided for secondary packaging of the container, and the consistency of the container state is ensured;
4. the client migration mode based on the desktop container can ensure that the client control of the application system is completely transplanted, and the situation that the application cannot normally run due to inconsistent control configuration parameters is avoided.
Description of the drawings:
for ease of illustration, the invention is described in detail by the following detailed description and the accompanying drawings.
FIG. 1 is a flow chart of the overall operation of the system of the present invention;
fig. 2 is a block diagram of the system architecture of the present invention.
The specific implementation mode is as follows:
as shown in fig. 1-2, the following technical solutions are adopted in the present embodiment:
the embodiment is as follows:
a domestic application cross-system migration method based on a container template comprises the following steps:
s1, firstly, performing containerization packaging on a source system including an operating system environment through an application container platform;
s2, data are acquired through a data acquisition module, then synchronous database building is carried out on a database in a domestic environment through a data conversion module, and data synchronization is kept;
s3, acquiring the current state of the running process, acquiring running environment parameters through an environment acquisition module, and writing an acquisition result into an environment configuration library;
s4, migrating the container mirror image of the source system to the target system, then starting the application on the target system, configuring the application database as the database on the target system, configuring the container state as the container state of the source system, and repacking the containers into the mirror image;
s5, starting an application container on the target system;
s6, then container packaging is carried out on the client desktop application in the source system;
and S7, starting the client desktop container on the target system to finish the migration process of the client system.
In the step S1, the operating system environment includes an application system and an environment where the system is located, and depends on a system containerization packaging system, the application system performs packaging once in the source system, unpacks and repacks after migrating to the domestic environment, so that the operating system can adapt to the domestic environment, and avoids the influence of environmental difference on program operation.
Before data acquisition in step S2, a data log function needs to be started by using a database in advance, and incremental data can be synchronized to a domestic database on a target system by using a data log synchronization technology without affecting the system operation condition.
In step S3, the CRIU tool is used to acquire the operation state parameters of the container, and the CRIU tool is used to acquire the operation state parameters of the container, so as to provide configuration parameters for secondary packaging of the container, and ensure consistency of container states.
In the step S3, the acquisition result is written into the environment configuration library, and the environment synchronous monitoring program is used for monitoring, so that parameters of the source system and the target system are kept consistent, and program monitoring is facilitated.
In step S4, the container mirror image of the source system is migrated to the target system, and parameter configuration needs to be performed based on the configuration library, so that it is convenient to better ensure that the parameters are normal.
The client desktop application in the step S6 includes a browser, a layout file, a streaming file editor, and an electronic signature application, which facilitates overall file migration.
In step S7, a client desktop mirror image needs to be manufactured while the client desktop container is started on the target system, and a client migration manner based on the desktop container can ensure that the client control of the application system is completely migrated, thereby avoiding that the application cannot normally run due to inconsistent control configuration parameters.
Specifically, when actual operation is performed, firstly, an application container platform performs containerization packaging on a source system including an operating system environment, including the application system and the environment where the system is located, depending on the system containerization packaging; then, a data log function is started by using a database, data are acquired through a data acquisition module, then synchronous database building is carried out on the database in a domestic environment through a data conversion module, and data synchronization is kept; then, acquiring the current state of the running process by using a CRIU tool, acquiring running environment parameters through an environment acquisition module, writing an acquisition result into an environment configuration library, and monitoring through an environment synchronous monitoring program to keep the parameters of a source system and a target system consistent; then migrating the container mirror image of the source system to the target system, simultaneously carrying out parameter configuration based on the configuration library, then starting the application on the target system, configuring the application database as the database on the target system, configuring the container state as the container state of the source system, and carrying out container packaging again to form the mirror image; then starting an application container on the target system; then, container packaging is carried out on the client desktop application in the source system, wherein the client desktop application comprises a browser, a format file, a streaming file editor and an electronic signature application; and finally, starting a client desktop container on the target system, simultaneously making a client desktop mirror image, starting the client desktop container, and completing the migration process of the client system.
While there have been shown and described what are at present considered to be the fundamental principles of the invention and its essential features and advantages, it will be understood by those skilled in the art that the invention is not limited by the embodiments described above, which are merely illustrative of the principles of the invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the invention as defined by the appended claims and their equivalents.