CN117311804A - Application migration method, device, electronic equipment and computer readable medium - Google Patents

Application migration method, device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN117311804A
CN117311804A CN202311218641.XA CN202311218641A CN117311804A CN 117311804 A CN117311804 A CN 117311804A CN 202311218641 A CN202311218641 A CN 202311218641A CN 117311804 A CN117311804 A CN 117311804A
Authority
CN
China
Prior art keywords
script
application
target machine
execution
application server
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.)
Pending
Application number
CN202311218641.XA
Other languages
Chinese (zh)
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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech 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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202311218641.XA priority Critical patent/CN117311804A/en
Publication of CN117311804A publication Critical patent/CN117311804A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an application migration method, an application migration device, electronic equipment and a computer readable medium, and relates to the technical field of automatic programming. One embodiment of the method comprises the following steps: receiving configuration parameters submitted by a user; acquiring each basic script and the arrangement sequence thereof according to the script types, and generating each execution script according to the script parameters and each basic script; editing each execution script according to the editing sequence of each basic script, so as to obtain an application migration script; the application migration script is used for migrating the application on the first application server to the second application server; and remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine, and issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script. The embodiment can solve the technical problem that manual migration is easy to fail in operation.

Description

Application migration method, device, electronic equipment and computer readable medium
Technical Field
The present invention relates to the field of automatic programming, and in particular, to an application migration method, an apparatus, an electronic device, and a computer readable medium.
Background
weblogic is a web application server with development and deployment critical tasks, with various features and advantages, extensibility, availability and architecture. weblogic Server 9.x provides an enterprise-level foundation for enterprises, supports the development and deployment of service-oriented architecture, and provides event services for platforms through reliable messaging infrastructure. Compared with webogic, the tomcat has the advantages of small resources occupied during operation, good expansibility, support of common functions of development and application systems such as load balancing and mail service, and meanwhile, is an open-source server.
Currently, webogic tomcat switching is generally performed manually, and many problems exist on the basis of switching application servers, such as the conventional test environment simulation operation cannot be guaranteed to be consistent with the production environment, so that failure is inevitably caused when the production environment is operated. Moreover, in the manual execution process, the occurrence of abnormal manual operation is unavoidable, and the operation failure is caused by inconsistent environmental data.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide an application migration method, an apparatus, an electronic device, and a computer readable medium, so as to solve the technical problem that manual migration is easy to fail.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an application migration method, including:
receiving configuration parameters submitted by a user, wherein the configuration parameters comprise the IP of a target machine, an account and a password of the user logging in the target machine, a script type and script parameters;
acquiring each basic script and the arrangement sequence thereof according to the script types, and generating each execution script according to the script parameters and each basic script;
arranging each execution script according to the arrangement sequence of each basic script, so as to obtain an application migration script; the application migration script is used for migrating the application on a first application server to a second application server, and the first application server and the second application server are deployed on the same target machine;
and remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine, and issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script.
Optionally, the script parameters include: the method comprises the steps of starting a path of a script on a target machine by an application, stopping the path of the script on the target machine by the application, starting the path of the first application server on the target machine by the second application server, and starting the path of the target application to be migrated, namely a service name, a service port and the path on the target machine.
Optionally, generating each execution script according to the script parameters and each basic script, including:
generating an execution script for calling the application stop script according to the path of the application stop script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application stop script;
generating an execution script for stopping the first application server according to the path of the first application server on the target machine and a basic script for stopping the application server;
generating an execution script for migrating the target application according to the path of the target application to be migrated on the target machine and a basic script of the migration application;
generating an execution script for calling the application starting script according to the path of the application starting script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application starting script;
and generating an execution script for starting the second application server according to the path of the second application server on the target machine and the basic script for starting the application server.
Optionally, arranging each execution script according to the arrangement sequence of each basic script, so as to obtain an application migration script, including:
Scheduling the execution scripts of calling the application stop script, stopping the execution scripts of the first application server, migrating the execution scripts of the target application, calling the execution scripts of the application start script and starting the execution scripts of the second application server according to the scheduling sequence of each basic script, so as to obtain an application migration script; each execution script in the application migration script is sequentially executed according to the following sequence:
calling an execution script of an application stopping script, stopping the execution script of the first application server, migrating the execution script of the target application, calling an execution script of an application starting script, and starting the execution script of a second application server.
Optionally, the configuration parameters further include execution time;
remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine, and issuing the application migration script to the target machine so that the target machine executes the application migration script, wherein the method comprises the following steps:
remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine in response to reaching the execution time;
And in response to successful login to the target machine, issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script.
Optionally, the first application server is weblogic, and the second application server is a combo.
In addition, according to another aspect of the embodiment of the present invention, there is provided an application migration apparatus including:
the receiving module is used for receiving configuration parameters submitted by a user, wherein the configuration parameters comprise the IP of a target machine, the account and the password of the user logging in the target machine, the script type and the script parameters;
the generation module is used for acquiring each basic script and the arrangement sequence thereof according to the script types, and generating each execution script according to the script parameters and each basic script;
the arrangement module is used for arranging each execution script according to the arrangement sequence of each basic script so as to obtain an application migration script; the application migration script is used for migrating the application on a first application server to a second application server, and the first application server and the second application server are deployed on the same target machine;
And the issuing module is used for remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine, and issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script.
Optionally, the script parameters include: the method comprises the steps of starting a path of a script on a target machine by an application, stopping the path of the script on the target machine by the application, starting the path of the first application server on the target machine by the second application server, and starting the path of the target application to be migrated, namely a service name, a service port and the path on the target machine.
Optionally, the generating module is further configured to:
generating an execution script for calling the application stop script according to the path of the application stop script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application stop script;
generating an execution script for stopping the first application server according to the path of the first application server on the target machine and a basic script for stopping the application server;
Generating an execution script for migrating the target application according to the path of the target application to be migrated on the target machine and a basic script of the migration application;
generating an execution script for calling the application starting script according to the path of the application starting script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application starting script;
and generating an execution script for starting the second application server according to the path of the second application server on the target machine and the basic script for starting the application server.
Optionally, the orchestration module is further configured to:
scheduling the execution scripts of calling the application stop script, stopping the execution scripts of the first application server, migrating the execution scripts of the target application, calling the execution scripts of the application start script and starting the execution scripts of the second application server according to the scheduling sequence of each basic script, so as to obtain an application migration script; each execution script in the application migration script is sequentially executed according to the following sequence:
calling an execution script of an application stopping script, stopping the execution script of the first application server, migrating the execution script of the target application, calling an execution script of an application starting script, and starting the execution script of a second application server.
Optionally, the configuration parameters further include execution time;
the issuing module is further configured to:
remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine in response to reaching the execution time;
and in response to successful login to the target machine, issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script.
Optionally, the first application server is weblogic, and the second application server is a combo.
According to another aspect of an embodiment of the present invention, there is also provided an electronic device including:
one or more processors;
storage means for storing one or more programs,
the one or more processors implement the method of any of the embodiments described above when the one or more programs are executed by the one or more processors.
According to another aspect of an embodiment of the present invention, there is also provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the method according to any of the embodiments described above.
According to another aspect of embodiments of the present invention, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements the method according to any of the embodiments described above.
One embodiment of the above invention has the following advantages or benefits: the technical means that each basic script and the arrangement sequence thereof are obtained according to the script types, each execution script is generated according to the script parameters and each basic script, each execution script is arranged according to the arrangement sequence of each basic script, so that an application migration script is obtained, a target machine is logged in remotely according to the IP of the target machine, the account and the password of the target machine by a user, and the application migration script is issued to the target machine, so that the target machine executes the application migration script is realized, and the technical problem that manual migration is easy to operate and fail in the prior art is solved. The embodiment of the invention is based on the existing technical design of automatic operation and maintenance, and is used for arranging scripts on an automatic platform so as to solve the problems of data difference and the like which are easy to occur when the application server is manually operated to switch.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. Wherein:
FIG. 1 is a flow chart of an application migration method according to an embodiment of the present invention;
FIG. 2 is a system architecture diagram of an application migration method implementing an embodiment of the present invention;
FIG. 3 is a flow chart of an application migration method according to one referenceable embodiment of the invention;
FIG. 4 is a flow chart of an application migration method according to another referent embodiment of the invention;
FIG. 5 is a schematic diagram of an application migration apparatus according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 7 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the technical scheme of the invention, the aspects of acquisition, analysis, use, transmission, storage and the like of the related user personal information all meet the requirements of related laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside the aspects of legal use and the like, and are subjected to supervision and management of a supervision department. Necessary measures should be taken for the personal information of the user to prevent illegal access to such personal information data, ensure that personnel having access to the personal information data comply with the regulations of the relevant laws and regulations, and ensure the personal information of the user. Once these user personal information data are no longer needed, the risk should be minimized by limiting or even prohibiting the data collection and/or deletion.
User privacy is protected, when applicable, by de-identifying the data, including in some related applications, such as by removing specific identifiers (e.g., name, age, account number, date of birth, etc.), controlling the amount or specificity of stored data, controlling how the data is stored, and/or other methods.
Fig. 1 is a flowchart of an application migration method according to an embodiment of the present invention. As an embodiment of the present invention, as shown in fig. 1, the application migration method may include:
and step 101, receiving configuration parameters submitted by a user, wherein the configuration parameters comprise the IP of a target machine, the account and the password of the user logging in the target machine, the script type and the script parameters.
As shown in fig. 2, a user may submit configuration parameters including an IP of a target machine (a machine that automatically executes an application migration script), an account number and a password for the user to log into the target machine, a script type, and script parameters through a client. The user may select a script type on the client page, such as application migration, application start-stop, etc., and in the embodiment of the present invention, the script type selected by the user is application migration.
Optionally, the script parameters include: the method comprises the steps of starting a path of a script on a target machine by an application, stopping the path of the script on the target machine by the application, starting the path of the first application server on the target machine by the second application server, and starting the path of the target application to be migrated, namely a service name, a service port and the path on the target machine. Since the application start script and the application stop script are already stored on the target machine, it is necessary to configure the path of the application start script on the target machine and the path of the application stop script on the target machine. Since both the first application server and the second application server are deployed on the target machine, it is also necessary to configure the path of the first application server on the target machine and the path of the second application server on the target machine. Since the applications are to be migrated, it is also necessary to configure the service name, service port, and path on the target machine of the target application to be migrated.
Optionally, the configuration parameters further include execution time, so that in order to implement automatic execution of the application migration script, the execution time of the application migration script may be further configured, and once the execution time of the application migration script is reached, the automation platform issues the well-arranged application migration script to the target machine, so that the target machine executes the application migration script.
Step 102, obtaining each basic script and the arrangement sequence thereof according to the script types, and generating each execution script according to the script parameters and each basic script.
As shown in fig. 2, after receiving the configuration parameters uploaded by the client, the automation platform obtains each basic script and the arrangement sequence thereof according to the script types, and then generates each execution script according to the script parameters configured by the user and each obtained basic script. In the embodiment of the invention, the basic scripts corresponding to the different script types and the arrangement sequence of the basic scripts are pre-configured, so that the basic scripts and the arrangement sequence thereof required for arranging the application migration scripts can be acquired according to the script types configured by the user.
Optionally, generating each execution script according to the script parameters and each basic script, including: generating an execution script for calling the application stop script according to the path of the application stop script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application stop script; generating an execution script for stopping the first application server according to the path of the first application server on the target machine and a basic script for stopping the application server; generating an execution script for migrating the target application according to the path of the target application to be migrated on the target machine and a basic script of the migration application; generating an execution script for calling the application starting script according to the path of the application starting script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application starting script; and generating an execution script for starting the second application server according to the path of the second application server on the target machine and the basic script for starting the application server. In the embodiment of the invention, five execution scripts (respectively, an execution script of calling an application stopping script, an execution script of stopping the first application server, an execution script of migrating the target application, an execution script of calling an application starting script, and an execution script of starting the second application server) are required to be configured, and each execution script is generated according to respective basic scripts and script parameters.
Step 103, arranging each execution script according to the arrangement sequence of each basic script, so as to obtain an application migration script; the application migration script is used for migrating the application on the first application server to the second application server, and the first application server and the second application server are deployed on the same target machine.
After each execution script is generated by the automation platform, each execution script is arranged according to the arrangement sequence of each basic script in step 102, so as to obtain an application migration script. The target machine can migrate the target application on the first application server to the second application server by executing the application migration script; the first application server and the second application server are deployed on the same target machine.
Optionally, the first application server is weblogic, and the second application server is a combo. weblogic is a java application server based on the java ee architecture for developing, integrating, deploying and managing large-scale distributed web applications, web applications and database applications. the tomcat is a free open-source web lightweight application server, is widely used in small and medium-sized systems and occasions with little concurrent access, and is an independently operated program.
Optionally, arranging each execution script according to the arrangement sequence of each basic script, so as to obtain an application migration script, including: scheduling the execution scripts of calling the application stop script, stopping the execution scripts of the first application server, migrating the execution scripts of the target application, calling the execution scripts of the application start script and starting the execution scripts of the second application server according to the scheduling sequence of each basic script, so as to obtain an application migration script; each execution script in the application migration script is sequentially executed according to the following sequence: calling an execution script of an application stopping script, stopping the execution script of the first application server, migrating the execution script of the target application, calling an execution script of an application starting script, and starting the execution script of a second application server. In this step, each execution script obtained in step 102 is programmed to obtain an application migration script, and when the target machine executes the application migration script, the following execution scripts are executed in sequence: calling an execution script of an application stopping script, stopping the execution script of the first application server, migrating the execution script of the target application, calling an execution script of an application starting script, and starting the execution script of a second application server.
And 104, remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine, and issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script.
As shown in fig. 2, after the automation platform completes the arrangement of the execution script, according to the IP of the target machine configured by the user in step 101, the account and the password of the target machine logged in by the user, remotely logging in the target machine, after the login is successful, the automation platform issues the application migration script to the target machine, and after the target machine receives the application migration script, the application migration script is automatically executed, that is, the following execution scripts are executed sequentially: calling an execution script of an application stopping script, stopping the execution script of the first application server, migrating the execution script of the target application, calling an execution script of an application starting script, and starting the execution script of the second application server, thereby completing automatic migration of the application.
Optionally, step 104 may include: remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine in response to reaching the execution time; and in response to successful login to the target machine, issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script. If the user configures the execution time of the application migration script, when the execution time is reached, the automation platform remotely logs in the target machine according to the IP of the target machine configured by the user in step 101, the account and the password of the target machine, after the login is successful, the automation platform issues the application migration script to the target machine, and after the target machine receives the application migration script, the automation platform automatically executes the application migration script.
According to the various embodiments described above, it can be seen that in the embodiments of the present invention, by obtaining each basic script and its arrangement sequence according to the script type, generating each execution script according to the script parameters and each basic script, arranging each execution script according to the arrangement sequence of each basic script, thereby obtaining an application migration script, logging in the target machine remotely according to the IP of the target machine, the account and password of the user logging in the target machine, and issuing the application migration script to the target machine, so that the target machine executes the technical means of the application migration script, and the technical problem that manual migration is easy to fail in operation in the prior art is solved. The embodiment of the invention is based on the existing technical design of automatic operation and maintenance, and is used for arranging scripts on an automatic platform so as to solve the problems of data difference and the like which are easy to occur when the application server is manually operated to switch.
Fig. 3 is a flow chart of an application migration method according to one referenceable embodiment of the invention. As yet another embodiment of the present invention, as shown in fig. 3, the application migration method may include:
step 301, receiving configuration parameters submitted by a user, wherein the configuration parameters comprise the IP of a target machine, an account and a password of the user logging in the target machine, a script type and script parameters.
Wherein the script parameters include: the method comprises the steps of starting a path of a script on a target machine by an application, stopping the path of the script on the target machine by the application, starting the path of the first application server on the target machine by the second application server, and starting the path of the target application to be migrated, namely a service name, a service port and the path on the target machine.
And step 302, acquiring each basic script and the arrangement sequence thereof according to the script types.
And 303, generating an execution script for calling the application stop script according to the path of the application stop script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application stop script.
And step 304, generating an execution script for stopping the first application server according to the path of the first application server on the target machine and the basic script for stopping the application server.
And step 305, generating an execution script for migrating the target application according to the path of the target application to be migrated on the target machine and the basic script of the migrating application.
And step 306, generating an execution script for calling the application starting script according to the path of the application starting script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application starting script.
And step 307, generating an execution script for starting the second application server according to the path of the second application server on the target machine and the basic script for starting the application server.
And step 308, arranging each execution script according to the arrangement sequence of each basic script, thereby obtaining an application migration script.
The application migration script is used for migrating the application on the first application server to the second application server, and the first application server and the second application server are deployed on the same target machine.
Step 309, remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine, and issuing the application migration script to the target machine, so that the target machine executes the application migration script.
In addition, in the embodiment of the present invention, the implementation of the application migration method is described in detail in the application migration method, so that the description is not repeated here.
Fig. 4 is a flow chart of an application migration method according to another referenceable embodiment of the invention. As another embodiment of the present invention, as shown in fig. 4, the application migration method may include:
step 401, receiving configuration parameters submitted by a user, wherein the configuration parameters comprise the IP of a target machine, an account and a password of the user logging in the target machine, a script type, script parameters and execution time.
Wherein the script parameters include: the method comprises the steps of starting a path of a script on a target machine by an application, stopping the path of the script on the target machine by the application, starting the path of the first application server on the target machine by the second application server, and starting the path of the target application to be migrated, namely a service name, a service port and the path on the target machine.
And step 402, acquiring each basic script and the arrangement sequence thereof according to the script types, and generating each execution script according to the script parameters and each basic script.
Step 403, arranging each execution script according to the arrangement sequence of each basic script, thereby obtaining an application migration script; the application migration script is used for migrating the application on the first application server to the second application server, and the first application server and the second application server are deployed on the same target machine.
Step 404, responsive to reaching the execution time, remotely logging in to the target machine according to the IP of the target machine, the account and password of the user logging in to the target machine.
And step 405, in response to successful login to the target machine, issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script.
In addition, in another embodiment of the present invention, the implementation of the application migration method is already described in detail in the application migration method, so that the description is not repeated here.
Fig. 5 is a schematic diagram of an application migration apparatus according to an embodiment of the present invention. As shown in fig. 5, the application migration apparatus 500 includes a receiving module 501, a generating module 502, an orchestration module 503, and a issuing module 504; the receiving module 501 is configured to receive configuration parameters submitted by a user, where the configuration parameters include an IP of a target machine, an account and a password of the user logging in the target machine, a script type and a script parameter; the generating module 502 is configured to obtain each basic script and an arrangement sequence thereof according to the script type, and generate each execution script according to the script parameters and each basic script; the arrangement module 503 is configured to arrange the execution scripts according to an arrangement sequence of the base scripts, so as to obtain an application migration script; the application migration script is used for migrating the application on a first application server to a second application server, and the first application server and the second application server are deployed on the same target machine; the issuing module 504 is configured to remotely log in to the target machine according to the IP of the target machine, the account and the password of the user logging in to the target machine, and issue the application migration script to the target machine, so that the target machine executes the application migration script.
Optionally, the script parameters include: the method comprises the steps of starting a path of a script on a target machine by an application, stopping the path of the script on the target machine by the application, starting the path of the first application server on the target machine by the second application server, and starting the path of the target application to be migrated, namely a service name, a service port and the path on the target machine.
Optionally, the generating module 502 is further configured to:
generating an execution script for calling the application stop script according to the path of the application stop script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application stop script;
generating an execution script for stopping the first application server according to the path of the first application server on the target machine and a basic script for stopping the application server;
generating an execution script for migrating the target application according to the path of the target application to be migrated on the target machine and a basic script of the migration application;
generating an execution script for calling the application starting script according to the path of the application starting script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application starting script;
And generating an execution script for starting the second application server according to the path of the second application server on the target machine and the basic script for starting the application server.
Optionally, the orchestration module 503 is further configured to:
scheduling the execution scripts of calling the application stop script, stopping the execution scripts of the first application server, migrating the execution scripts of the target application, calling the execution scripts of the application start script and starting the execution scripts of the second application server according to the scheduling sequence of each basic script, so as to obtain an application migration script; each execution script in the application migration script is sequentially executed according to the following sequence:
calling an execution script of an application stopping script, stopping the execution script of the first application server, migrating the execution script of the target application, calling an execution script of an application starting script, and starting the execution script of a second application server.
Optionally, the configuration parameters further include execution time;
the issuing module 504 is further configured to:
remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine in response to reaching the execution time;
And in response to successful login to the target machine, issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script.
Optionally, the first application server is weblogic, and the second application server is a combo.
The specific implementation of the application migration apparatus according to the present invention is described in detail in the application migration method described above, and thus the description thereof will not be repeated here.
Fig. 6 illustrates an exemplary system architecture 600 in which an application migration method or application migration apparatus of an embodiment of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 is used as a medium to provide communication links between the terminal devices 601, 602, 603 and the server 605. The network 604 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 605 via the network 604 using the terminal devices 601, 602, 603 to receive or send messages, etc. Various communication client applications such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 601, 602, 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 605 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using terminal devices 601, 602, 603. The background management server can analyze and other data such as the received article information inquiry request and feed back the processing result to the terminal equipment.
It should be noted that, the application migration method provided in the embodiment of the present invention is generally executed by the server 605, and accordingly, the application migration device is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, there is illustrated a schematic diagram of a computer system 700 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, ROM 702, and RAM703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 701.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer programs according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor comprises a receiving module, a generating module, an orchestration module and a issuing module, wherein the names of these modules do not constitute a limitation of the module itself in some cases.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, implement the method of: receiving configuration parameters submitted by a user, wherein the configuration parameters comprise the IP of a target machine, an account and a password of the user logging in the target machine, a script type and script parameters; acquiring each basic script and the arrangement sequence thereof according to the script types, and generating each execution script according to the script parameters and each basic script; arranging each execution script according to the arrangement sequence of each basic script, so as to obtain an application migration script; the application migration script is used for migrating the application on a first application server to a second application server, and the first application server and the second application server are deployed on the same target machine; and remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine, and issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script.
As a further aspect, embodiments of the present invention also provide a computer program product comprising a computer program which, when executed by a processor, implements the method according to any of the above embodiments.
According to the technical scheme of the embodiment of the invention, as the technical means of acquiring each basic script and the arrangement sequence thereof according to the script types, generating each execution script according to the script parameters and each basic script, arranging each execution script according to the arrangement sequence of each basic script, thus obtaining the application migration script, logging in the target machine remotely according to the IP of the target machine, the account and the password of the user logging in the target machine, and issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script are adopted, the technical problem that the manual migration is easy to operate and fails in the prior art is solved. The embodiment of the invention is based on the existing technical design of automatic operation and maintenance, and is used for arranging scripts on an automatic platform so as to solve the problems of data difference and the like which are easy to occur when the application server is manually operated to switch.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (15)

1. An application migration method, comprising:
receiving configuration parameters submitted by a user, wherein the configuration parameters comprise the IP of a target machine, an account and a password of the user logging in the target machine, a script type and script parameters;
acquiring each basic script and the arrangement sequence thereof according to the script types, and generating each execution script according to the script parameters and each basic script;
arranging each execution script according to the arrangement sequence of each basic script, so as to obtain an application migration script; the application migration script is used for migrating the application on a first application server to a second application server, and the first application server and the second application server are deployed on the same target machine;
And remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine, and issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script.
2. The method of claim 1, wherein the script parameters comprise: the method comprises the steps of starting a path of a script on a target machine by an application, stopping the path of the script on the target machine by the application, starting the path of the first application server on the target machine by the second application server, and starting the path of the target application to be migrated, namely a service name, a service port and the path on the target machine.
3. The method of claim 2, wherein generating each execution script from the script parameters and each base script comprises:
generating an execution script for calling the application stop script according to the path of the application stop script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application stop script;
generating an execution script for stopping the first application server according to the path of the first application server on the target machine and a basic script for stopping the application server;
Generating an execution script for migrating the target application according to the path of the target application to be migrated on the target machine and a basic script of the migration application;
generating an execution script for calling the application starting script according to the path of the application starting script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application starting script;
and generating an execution script for starting the second application server according to the path of the second application server on the target machine and the basic script for starting the application server.
4. A method according to claim 3, wherein arranging each execution script according to the arrangement order of each base script, thereby obtaining an application migration script, comprises:
scheduling the execution scripts of calling the application stop script, stopping the execution scripts of the first application server, migrating the execution scripts of the target application, calling the execution scripts of the application start script and starting the execution scripts of the second application server according to the scheduling sequence of each basic script, so as to obtain an application migration script; each execution script in the application migration script is sequentially executed according to the following sequence:
Calling an execution script of an application stopping script, stopping the execution script of the first application server, migrating the execution script of the target application, calling an execution script of an application starting script, and starting the execution script of a second application server.
5. The method of claim 1, wherein the configuration parameters further comprise execution time;
remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine, and issuing the application migration script to the target machine so that the target machine executes the application migration script, wherein the method comprises the following steps:
remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine in response to reaching the execution time;
and in response to successful login to the target machine, issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script.
6. The method of any one of claims 1-5, wherein the first application server is weblogic and the second application server is comcat.
7. An application migration apparatus, comprising:
the receiving module is used for receiving configuration parameters submitted by a user, wherein the configuration parameters comprise the IP of a target machine, the account and the password of the user logging in the target machine, the script type and the script parameters;
the generation module is used for acquiring each basic script and the arrangement sequence thereof according to the script types, and generating each execution script according to the script parameters and each basic script;
the arrangement module is used for arranging each execution script according to the arrangement sequence of each basic script so as to obtain an application migration script; the application migration script is used for migrating the application on a first application server to a second application server, and the first application server and the second application server are deployed on the same target machine;
and the issuing module is used for remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine, and issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script.
8. The apparatus of claim 7, wherein the script parameters comprise: the method comprises the steps of starting a path of a script on a target machine by an application, stopping the path of the script on the target machine by the application, starting the path of the first application server on the target machine by the second application server, and starting the path of the target application to be migrated, namely a service name, a service port and the path on the target machine.
9. The apparatus of claim 8, wherein the generating module is further configured to:
generating an execution script for calling the application stop script according to the path of the application stop script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application stop script;
generating an execution script for stopping the first application server according to the path of the first application server on the target machine and a basic script for stopping the application server;
generating an execution script for migrating the target application according to the path of the target application to be migrated on the target machine and a basic script of the migration application;
generating an execution script for calling the application starting script according to the path of the application starting script on the target machine, the service name of the target application to be migrated, the service port and the basic script for calling the application starting script;
and generating an execution script for starting the second application server according to the path of the second application server on the target machine and the basic script for starting the application server.
10. The apparatus of claim 9, wherein the orchestration module is further to:
Scheduling the execution scripts of calling the application stop script, stopping the execution scripts of the first application server, migrating the execution scripts of the target application, calling the execution scripts of the application start script and starting the execution scripts of the second application server according to the scheduling sequence of each basic script, so as to obtain an application migration script; each execution script in the application migration script is sequentially executed according to the following sequence:
calling an execution script of an application stopping script, stopping the execution script of the first application server, migrating the execution script of the target application, calling an execution script of an application starting script, and starting the execution script of a second application server.
11. The apparatus of claim 7, wherein the configuration parameters further comprise execution time;
the issuing module is further configured to:
remotely logging in the target machine according to the IP of the target machine, the account and the password of the user logging in the target machine in response to reaching the execution time;
and in response to successful login to the target machine, issuing the application migration script to the target machine so as to enable the target machine to execute the application migration script.
12. The method according to any one of claims 7-11, wherein the first application server is weblogic and the second application server is comcat.
13. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
the one or more processors implement the method of any of claims 1-6 when the one or more programs are executed by the one or more processors.
14. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-6.
15. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-6.
CN202311218641.XA 2023-09-20 2023-09-20 Application migration method, device, electronic equipment and computer readable medium Pending CN117311804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311218641.XA CN117311804A (en) 2023-09-20 2023-09-20 Application migration method, device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311218641.XA CN117311804A (en) 2023-09-20 2023-09-20 Application migration method, device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN117311804A true CN117311804A (en) 2023-12-29

Family

ID=89284145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311218641.XA Pending CN117311804A (en) 2023-09-20 2023-09-20 Application migration method, device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN117311804A (en)

Similar Documents

Publication Publication Date Title
CN110442524B (en) Method and device for testing web service interface with authentication authorization
CN109983751B (en) Management service migration for managing devices
CN113296798B (en) Service deployment method, device and readable storage medium
CN112306851A (en) Automatic testing method and device
US11243755B1 (en) Resource aware patching service
JP2024508452A (en) Hosting event-based applications
CN112887355B (en) Service processing method and device for abnormal server
CN112445860B (en) Method and device for processing distributed transaction
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN113127335A (en) System testing method and device
CN117311804A (en) Application migration method, device, electronic equipment and computer readable medium
CN113138772B (en) Construction method and device of data processing platform, electronic equipment and storage medium
CN111176982B (en) Test interface generation method and device
CN110445628B (en) NGINX-based server and deployment and monitoring methods and devices thereof
CN113095060A (en) Method, device, equipment and computer readable medium for processing data
US20210203545A1 (en) Automated configuration and deployment of contact center software suite
CN112559001A (en) Method and device for updating application
WO2020139840A1 (en) System and method for configuring simple object access protocol (soap) components
CN117827630A (en) Method and device for generating test script
US20230038689A1 (en) Systems and methods for providing user guidance via a workspace score
CN114840287B (en) Task interaction method of cross-cloud desktop
CN113760727A (en) Interface regression testing method and device
CN115190008B (en) Fault processing method, fault processing device, electronic equipment and storage medium
EP3893107A1 (en) Intelligent feature delivery in a computing environment
CN117152861A (en) Automatic inspection method, device, electronic equipment and computer readable medium

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