Application migration method and system, electronic equipment and storage medium

Through automated application migration process and task management, the problems of time-consuming, labor-intensive and high error rate in application migration in the existing technology are solved, and efficient and accurate multi-application migration is achieved.

CN118567804APending Publication Date: 2024-08-30太保科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410636615.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The existing application migration process is time-consuming, labor-intensive, manual and error-prone, resulting in low migration efficiency and high probability of errors.

Method used

Provides an application migration method that creates an application migration process through the client, obtains the environment configuration list and generates migration tasks, sends them to the server for execution, realizes automated migration, and provides task approval, progress query, and process switching functions on the server.

Benefits of technology

It improves the efficiency of application migration, reduces the probability of migration errors, simplifies the management process, and can complete the migration of multiple applications at one time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567804A
    Figure CN118567804A
Patent Text Reader

Abstract

The invention provides an application migration method and system, electronic equipment and a storage medium, and the method comprises the steps: S1, creating an application migration process which comprises at least one application needing to be migrated; s2, an environment configuration list is obtained according to the application migration process, the environment configuration list comprises at least one pre-configured environment resource, and each environment resource is used for executing a sub-migration process needed for switching at least one application to a target environment; and S3, generating an application migration task according to the environment configuration list, and sending the application migration task to the server, so that the server executes the application migration task to migrate at least one application to the target environment. On the basis of the mode, the server side can complete migration of several or even dozens of applications selected by the user at a time through the application migration task, the application migration efficiency is effectively improved, and the migration error probability is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to the technical field of software application migration, and in particular to an application migration method, system, electronic device and storage medium. Background Art

[0002] At present, enterprise application migration usually relies on cloud container publishing platforms on the market, such as Red Hat's OpenShift, the world's first open source PaaS platform Cloud Foundry, and Ant Group's distributed cloud PaaS platform SOFAStack. However, when using these platforms, enterprises can only execute the migration steps provided by the platform in a single step. For example, when migrating an application in the SOFAStack platform, it is first necessary to configure server load balancing (SLB), storage resources (PV / PVC), resource objects (CONFIGMAP), etc. in the new environment, and then migrate several or even dozens of applications to be migrated to the new environment in a release manner. After the migration is completed, manually check and re-complete the data configuration. It can be seen that the current application migration process is time-consuming and labor-intensive, and there are many manual operations, which easily increases the probability of migration errors. Summary of the invention

[0003] The object of the present invention is to provide an application migration method, system, electronic device and storage medium, which are used to improve the efficiency of application migration and reduce the probability of migration errors.

[0004] To achieve the above-mentioned purpose, in a first aspect, the present invention provides an application migration method, which is applied to a client and specifically includes: S1, creating an application migration process, wherein the application migration process includes at least one application to be migrated; S2, obtaining an environment configuration list according to the application migration process, wherein the environment configuration list includes at least one pre-configured environment resource, and each environment resource is used to execute a sub-migration process required to switch the at least one application to the target environment; S3, generating an application migration task according to the environment configuration list, and sending the application migration task to a server, so that the server executes the application migration task to migrate the at least one application to the target environment.

[0005] In some embodiments, the S1 specifically includes: S11, in response to a resource configuration operation triggered by a user, obtaining resources of the at least one application, wherein the resources include pre-configured cluster resources; S12, in response to a sub-migration process configuration operation triggered by a user, obtaining at least one sub-migration process to be executed, and creating an application migration process based on the resources and the at least one sub-migration process.

[0006] In some embodiments, the sub-migration process includes any one or a combination of the following: stopping application services, used to stop the services of at least one application in the source cluster; updating configuration items, used to create, delete or update configuration items of at least one application in the target cluster; source cluster de-streaming, used to shut down the node of the client in the source cluster; target cluster service startup, used to create the node of the client on the target cluster and keep the current state of the node consistent with the expected state; target cluster service stop, used to stop the service of at least one application in the target cluster.

[0007] In the second aspect, the present application provides an application migration method, which is applied to the server, and specifically includes: S4, obtaining an application migration task, wherein the application migration task is generated by the client according to an environment configuration list, and the environment configuration list includes at least one pre-configured environment resource, and each environment resource is used to execute a sub-migration process required to switch at least one application to be migrated to a target environment; S5, executing the application migration task to migrate the at least one application to the target environment.

[0008] In some embodiments, S5 specifically includes: S51, creating a task approval process for the application migration task; S52, sending the task approval process to a designated approval object; S53, when the approval object approves the application migration task, executing the application migration task to migrate the at least one application to the target environment.

[0009] In some embodiments, the S53 specifically includes: S531, when the approval object approves the application migration task, determine whether the current time does not exceed the release window time of the application migration task; if so, execute S532, otherwise, execute S533. S532, execute the application migration task within the release window time to migrate the at least one application to the target environment; S533, interrupt the execution of the application migration task and notify the client.

[0010] In some embodiments, the S532 specifically includes: S5321, executing each sub-migration process in the application migration task in sequence according to a preset execution order within the release window time, and obtaining the execution result of the corresponding sub-migration process each time the execution is performed; S5322, when the execution result is an execution failure, notifying the client of the execution result so that the client can change or skip the corresponding sub-migration process.

[0011] In a third aspect, the present application provides an application migration system, comprising a client as described in any one of the first aspect above and / or a server as described in any one of the second aspect above.

[0012] In a fourth aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores instructions, and when the instructions are called by the processor, the processor executes the method described in any one of the first to second aspects above.

[0013] In a fifth aspect, the present application provides a storage medium comprising computer program instructions, wherein the computer program instructions are used to enable a computer to execute the method as described in any one of the first to second aspects above.

[0014] Compared with the prior art, the present invention has the following advantages:

[0015] One aspect of the present application provides an application migration method, system, electronic device and storage medium. In this method, a user can create an application migration process for several or even dozens of applications that need to be migrated. The client can then automatically obtain an environment configuration list based on the application migration process, and then generate an application migration task and send it to the server. In this way, the server can complete the migration of several or even dozens of applications selected by the user at one time through the application migration task, effectively improving the efficiency of application migration and reducing the probability of migration errors.

[0016] The advantage of this application is that the server also provides functions such as task approval, progress query and process switching, so that users can further strengthen the management of application migration. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings are included to provide a further understanding of the present application. They are included and constitute a part of the present application. The accompanying drawings illustrate embodiments of the present application and together with the present specification serve to explain the principles of the present application. In the accompanying drawings:

[0018] Figure 1 is a flow chart of an application migration method provided by an exemplary embodiment of the present application;

[0019] Figure 2 It is a schematic diagram of a process for creating application migration provided by an exemplary embodiment of the present application;

[0020] Figure 3 is a flow chart of another application migration method provided by an exemplary embodiment of the present application;

[0021] Figure 4 is a schematic diagram of a method for executing application migration provided by an exemplary embodiment of the present application;

[0022] Figure 5 is a schematic diagram of an application migration system provided by an exemplary embodiment of the present application;

[0023] Figure 6It is a schematic diagram of an electronic device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.

[0025] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0026] In addition, it should be noted that the use of words such as "first" and "second" to define components is only for the convenience of distinguishing the corresponding components. If not otherwise stated, the above words have no special meaning and cannot be understood as limiting the scope of protection of this application. In addition, although the terms used in this application are selected from well-known and commonly used terms, some terms mentioned in the specification of this application may be selected by the applicant at his or her discretion, and their detailed meanings are explained in the relevant parts of the description of this article. In addition, it is required to understand this application not only by the actual terms used, but also by the meaning implied by each term.

[0027] In a first aspect of the exemplary embodiments of the present application, an application migration method is provided. Figure 1 to Figure 2 The method can be applied to the field of software application migration technology. According to an exemplary embodiment of the present application, the steps of an application migration method can be executed on a client 1, and the corresponding steps of another application migration method can be executed on a server 2. An exemplary implementation scenario of the present application may include a client 11 and a server 22, wherein the client 11 can be used as the initiator of application migration, and the server 22 is used to receive the application to be migrated in the client 11. Figure 1 The following will introduce an application migration method provided by the present application with the client 11 as the execution subject, which specifically includes:

[0028] S1, create an application migration process.

[0029] S2, obtain the environment configuration list according to the application migration process.

[0030] S3, generating an application migration task according to the environment configuration list, and sending the application migration task to the server, so that the server executes the application migration task to migrate at least one application to the target environment.

[0031] Specifically, the application migration process may include at least one application to be migrated. Generally speaking, the application may refer to a single application or a sub-application obtained by segmentation in a complete application. The environment configuration list includes at least one pre-configured environment resource, each of which is used to execute a sub-migration process required for switching at least one application to the target environment.

[0032] In some embodiments, the S1 specifically includes: S11, in response to a resource configuration operation triggered by a user, obtaining resources of the at least one application, wherein the resources include pre-configured cluster resources; S12, in response to a sub-migration process configuration operation triggered by a user, obtaining at least one sub-migration process to be executed, and creating an application migration process based on the resources and the at least one sub-migration process. These resources may, for example, come from a cloud container publishing platform on the market. Exemplarily, the resources used in this embodiment may come from the SOFAStack platform, including but not limited to supporting resources provided by the SOFAStack platform, such as container resources. Preferably, these resources may also include cluster resources for use when the application needs to migrate across clusters. As an example, the resource configuration operations that may be triggered by the user may specifically include: source cluster, target cluster, number of service replicas, image address, container resource configuration (such as requested number of CPU cores, maximum number of CPU cores, requested memory, maximum memory), data volume configuration, access configuration (such as SLB, ClusterIP Service), scheduling configuration (such as grouping strategy, node affinity, application service affinity), stateful mode (the replica name of a service deployed in stateful mode will not change after restart), etc.

[0033] In some embodiments, the user may trigger different resource configuration operations for each application, or may trigger a resource configuration operation for one application, and then the resource configuration operation takes effect on each application in the application migration process by default.

[0034] In some embodiments, Figure 2In the process of creating an application migration process, the user can first trigger a resource configuration operation, and then trigger a sub-migration process configuration operation to create a complete application migration process. The sub-migration process can be flexibly divided according to the logical nodes of the current application migration. As a specific implementation method, the sub-migration process used in this embodiment may include any one or a combination of the following: stop application service, used to stop the service of at least one application in the source cluster; update configuration items, used to create or delete or update the configuration items of at least one application in the target cluster; source cluster extraction, used to shut down the node of the client 1 in the source cluster; target cluster service start, used to create the node of the client 1 on the target cluster and keep the current state of the node consistent with the expected state; target cluster service stop, used to stop the service of at least one application in the target cluster. In this way, users can easily start / stop the cross-cluster migration of applications to ensure that application migration can be customized.

[0035] like Figure 3 The following will introduce an application migration method provided by the present application with the server 22 as the execution subject, which specifically includes:

[0036] S4, obtain application migration tasks.

[0037] S5: Execute the application migration task to migrate the at least one application to the target environment.

[0038] Specifically, the server 22 can receive an application migration task initiated by a user in the client 11, and the application migration task is generated by the client 1 based on the environment configuration list, and the environment configuration list includes at least one pre-configured environment resource, and each environment resource is used to execute a sub-migration process required to switch at least one application to the target environment.

[0039] In some embodiments, S5 specifically includes: S51, creating a task approval process for the application migration task; S52, sending the task approval process to a designated approval object; S53, when the approval object approves the application migration task, executing the application migration task to migrate the at least one application to the target environment. In this way, the review object can approve the application migration task initiated by the user, such as Figure 4 The approval object can refuse approval, and the application migration task ends here. If you want to execute it again, the user needs to re-initiate the application migration task.

[0040] In some embodiments, S53 specifically includes: S531, when the approval object approves the application migration task, determine whether the current time does not exceed the release window time of the application migration task; if so, execute S532, otherwise, execute S533. S532, execute the application migration task within the release window time to migrate the at least one application to the target environment; S533, interrupt the execution of the application migration task and notify the client 1. Figure 4 When the migration task is approved, server 2 can check whether it meets the release window time. If it does, server 2 can execute the application migration task immediately. If it does not reach the release window, it needs to wait for the release window to arrive before continuing to execute; if it exceeds the release window time, the application migration task ends here. If you want to execute it again, the user needs to re-initiate the application migration task.

[0041] In some embodiments, the S532 specifically includes: S5321, executing each sub-migration process in the application migration task in sequence according to a preset execution order within the release window time, and obtaining the execution result of the corresponding sub-migration process each time the execution is performed; S5322, when the execution result is an execution failure, notifying the client 1 of the execution result, so that the client 1 can change or skip the corresponding sub-migration process. As an example, the execution order can take effect in the following order: application service stop, application configuration update, original cluster service de-streaming, new cluster service start, new cluster service stop. When one of the sub-migration processes fails to execute, the server 2 will notify the client 1, and the user can view the reason for the failure based on the execution result. If you want to execute it again, the user can solve the reason for the failure and re-initiate the application migration task. Alternatively, after the server 2 notifies the client 1, the user can also choose to change or skip the current sub-migration process. Figure 4 , the user can choose to skip the sub-migration process, at which point the application migration task will be terminated.

[0042] In some embodiments, multiple application migration tasks can form a task queue, and the server 2 can execute multiple application migration tasks in sequence according to the order of the task queue. When executing the sub-migration process of each application migration task, the server 2 can record its corresponding release progress in real time, and the release progress can be returned to the client 1, so that the user can query the release progress of each sub-migration process. The details of the release progress can include: real-time grouping information, pod resource configuration, number of replicas, etc., which is conducive to user viewing and further strengthening the management of application migration.

[0043] The present application also provides an application migration system, including a client and a server, wherein the client can be, for example, Figure 1 The client 1 shown in FIG. 1 and the server can be, for example, Figure 1 In some embodiments, the application migration system may also adopt a microservice architecture, such as Figure 5 , the microservice architecture can include the following modules:

[0044] Front-end development module (Vue3): located in the front-end UI, a core module for building user interfaces and page applications.

[0045] Traffic forwarding module (Nginx): located at the gateway layer, used for traffic forwarding at the gateway layer.

[0046] Message push module: Located at the business layer, it is used to push information of the application migration system and notify users of the execution results.

[0047] Data synchronization module: located at the business layer, used to synchronize sofa configuration information.

[0048] Task management module: Located at the business layer, it is used to manage the creation, deletion, editing, and execution of application migration tasks.

[0049] Scheduling management module: located at the business layer, used to implement reasonable scheduling for multiple application migration tasks when multiple application migration tasks are executed concurrently.

[0050] User authentication module: located in the business layer, used for user login and other behaviors to implement authentication functions.

[0051] Permission management module: located at the business layer, used to record and manage user roles and permissions.

[0052] Transaction control module: located in the data layer, used to handle data rollback or exceptions.

[0053] Cache module: Located in the data layer, it is used to store temporary data of the application migration system to alleviate the pressure on the system memory.

[0054] Database (MySql): The database basic service provided by the application migration system.

[0055] MemCache: A basic cache tool service provided by the application migration system.

[0056] Cloud host: the operating environment used to create, run and manage the application migration system.

[0057] The above-mentioned application migration system can create application migration tasks for several or even dozens of applications that need to be migrated. Application migration tasks can be executed independently or concurrently, so that the migration of several or even dozens of applications selected by the user can be completed at one time, which effectively improves the efficiency of application migration and reduces the probability of migration errors.

[0058] Further, if Figure 6 An exemplary embodiment of the present application further provides an electronic device, including a memory 601 and a processor 602, wherein the memory 601 stores instructions, and when the instructions are executed by the processor 602, the processor 602 executes any method of the first aspect.

[0059] It should be understood that the processor mentioned in the embodiments of the present application may be a CPU, or other general-purpose processors, DSPs, ASICs, FPGAs or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0060] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory, dynamic random access memory, synchronous dynamic random access memory, double data rate synchronous dynamic random access memory, enhanced synchronous dynamic random access memory, synchronously connected dynamic random access memory, and direct memory bus random access memory.

[0061] The present application also provides a storage medium storing computer program instructions, which, when executed by a processor of a computer, enables the computer to execute the steps of any of the methods mentioned above.

[0062] A computer-readable medium may include a propagated data signal containing computer program code, such as in baseband or as part of a carrier wave. The propagated signal may have a variety of manifestations, including electromagnetic, optical, etc., or a suitable combination. A computer-readable medium may be any computer-readable medium other than a computer-readable storage medium, which may be connected to an instruction execution system, device or apparatus to communicate, propagate or transmit a program for use. The program code on the computer-readable medium may be propagated via any suitable medium, including radio, cable, fiber optic cable, radio frequency signal, or similar medium, or any combination of the above mediums.

[0063] The basic concepts have been described above. Obviously, for those skilled in the art, the above invention disclosure is only used as an example and does not constitute a limitation of the present application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements and amendments to the present application. Such modifications, improvements and amendments are suggested in the present application, so such modifications, improvements and amendments still belong to the spirit and scope of the exemplary embodiments of the present application.

[0064] At the same time, the present application uses specific words to describe the embodiments of the present application. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of the present application. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, some features, structures or characteristics in one or more embodiments of the present application can be appropriately combined.

[0065] Some aspects of the present application may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". The processor may be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or combinations thereof. In addition, various aspects of the present application may be expressed as computer products located in one or more computer-readable media, which include computer-readable program codes. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, tapes ...), optical disks (e.g., compact disks CDs, digital versatile disks DVDs ...), smart cards, and flash memory devices (e.g., cards, sticks, key drives ...).

[0066] A computer-readable medium may include a propagated data signal containing computer program code, such as in baseband or as part of a carrier wave. The propagated signal may have a variety of manifestations, including electromagnetic, optical, etc., or a suitable combination. A computer-readable medium may be any computer-readable medium other than a computer-readable storage medium, which may be connected to an instruction execution system, device or apparatus to communicate, propagate or transmit a program for use. The program code on the computer-readable medium may be propagated via any suitable medium, including radio, cable, fiber optic cable, radio frequency signal, or similar medium, or any combination of the above mediums.

[0067] In some embodiments, numbers describing the number of components and attributes are used. It should be understood that such numbers used in the description of the embodiments are modified by the modifiers "about", "approximately" or "substantially" in some examples. Unless otherwise specified, "about", "approximately" or "substantially" indicate that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may change according to the required features of individual embodiments. In some embodiments, the numerical parameters should take into account the specified significant digits and adopt the general method of retaining digits. Although the numerical domains and parameters used to confirm the breadth of their range in some embodiments of the present application are approximate values, in specific embodiments, the setting of such numerical values ​​is as accurate as possible within the feasible range.

Claims

1. An application migration method, characterized in that: Applied to a client, the method comprises: S1, creating an application migration process, wherein the application migration process includes at least one application to be migrated; S2, obtaining an environment configuration list according to the application migration process, wherein the environment configuration list includes at least one pre-configured environment resource, each environment resource being used to execute a sub-migration process required for switching the at least one application to the target environment; S3, generating an application migration task according to the environment configuration list, and sending the application migration task to the server, so that the server executes the application migration task to migrate the at least one application to the target environment.

2. The method according to claim 1, characterized in that The S1 specifically includes: S11, in response to a resource configuration operation triggered by a user, obtaining resources of the at least one application, wherein the resources include pre-configured cluster resources; S12, in response to a sub-migration process configuration operation triggered by a user, obtaining at least one sub-migration process to be executed, and creating an application migration process according to the resources and the at least one sub-migration process.

3. The method according to claim 2, characterized in that The sub-migration process includes any one or a combination of the following: Stop application service, used to stop the service of the at least one application in the source cluster; Update configuration items, used to create, delete or update configuration items of the at least one application in the target cluster; Source cluster traffic extraction, used to shut down the client node in the source cluster; The target cluster service is started to create a node of the client on the target cluster and keep the current state of the node consistent with the expected state; The target cluster service is stopped, and is used to stop the service of the at least one application in the target cluster.

4. An application migration method, characterized in that: Applied to the server, the method includes: S4, obtaining an application migration task, wherein the application migration task is generated by the client according to an environment configuration list, wherein the environment configuration list includes at least one pre-configured environment resource, each environment resource being used to execute a sub-migration process required for switching at least one application to be migrated to a target environment; S5: Execute the application migration task to migrate the at least one application to the target environment.

5. The method according to claim 4, characterized in that The S5 specifically includes: S51, creating a task approval process for the application migration task; S52, sending the task approval process to a designated approval object; S53: When the approval object approves the application migration task, the application migration task is executed to migrate the at least one application to the target environment.

6. The method according to claim 5, characterized in that The S53 specifically includes: S531, when the approval object approves the application migration task, determine whether the current time does not exceed the release window time of the application migration task; if so, execute S532, otherwise, execute S533; S532, executing the application migration task within the release window time to migrate the at least one application to the target environment; S533: interrupt the execution of the application migration task and notify the client.

7. The method according to claim 6, characterized in that The S532 specifically includes: S5321, executing each sub-migration process in the application migration task in sequence according to a preset execution order within the release window time, and obtaining the execution result of the corresponding sub-migration process each time the sub-migration process is executed; S5322: When the execution result is execution failure, notify the client of the execution result so that the client can change or skip the corresponding sub-migration process.

8. An application migration system, characterized in that: It comprises the client as described in any one of claims 1-3 and / or the server as described in any one of claims 4-7.

9. An electronic device, comprising a memory and a processor, characterized in that: The memory stores instructions, and when the instructions are called by the processor, the processor executes the method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The method comprises computer program instructions, wherein the computer program instructions are used to cause a computer to execute the method according to any one of claims 1 to 7.