Creating a Migration Project
The System Migration function is designed to migrate middleware, databases, and Java applications. It parses source package information from the x86 architecture and automatically installs and deploys the software package compatible with the Kunpeng architecture on the target host. Both container and non-container migrations are supported.
- Container migration: middleware (Redis, Nginx, and Nacos) and Java applications.
- Non-container migration: databases, middleware, and Java applications. Migration Paths describes the migration paths. The tool provides common middleware migration capabilities for middleware implemented in Java.
Prerequisites
You have logged in to the Kunpeng DevKit.
Important Notes
- After a migration task is complete on a node, you can create another migration task on the node.
- If a node is occupied by another project, wait until the occupied project is complete and the node is automatically released. Alternatively, delete the project and select another node.
- Components on the same node cannot be migrated to the same target components.
- You can manually add a local node (that is, the current DevKit node) as a migration project node.
Procedure
- Click System Migration in the navigation tree on the left and then click
to go to the New Project tab page.Figure 1 New Project
- Set Migration Project Name. A project name is automatically generated by default, which can be changed if needed.
The name must meet the following requirements:
- Can contain only letters, digits, periods (.), hyphens (-), and underscores (_).
- Contain 1 to 64 characters.
- Under Component Table, configure the components that you want to migrate.
- When configuring the components to be migrated, you can click Save Configuration in the lower left corner to save the current configuration.
- The estimated migration duration is displayed in real time based on the selected migration content. You can adjust your migration plan accordingly.
- If the information of some selected components is incomplete, the components are marked with red dots. You need to complete the information before starting the migration.
- The target nodes support Kylin V10 SP3 (Arm) and UOS V20 (Arm).
- Method 1: Batch importing source components
- Click Batch Import Source Components next to Component Table. In the dialog box that is displayed, import the source components to be parsed and select the target node.
Figure 2 Batch Import Source Components
- Import a compressed package of source components or a Docker Compose file.
- Compressed package: Use a script to collect information about the database, middleware, application packages, and configuration files on the source node. After the collection is complete, the collected data is compressed into a package. For details, see Batch Importing Source Components.
- Docker Compose file: You can parse a Docker Compose file to obtain the container components in the file.
Docker Compose is a tool for defining and running multi-container applications. It is the key to unlocking a streamlined and efficient development and deployment experience. Compose simplifies the control of your entire application stack, making it easy to manage services, networks, and volumes in a single, comprehensible YAML configuration file.
- Select a target node. You can search for a node by its IP address. If no node is found, click Add Node to add one. A maximum of 20 nodes can be added. For details, see Managing Agent.
- After the target node is selected, click OK. The parsed components are displayed in Component Table.
If the -F option is specified during component collection, the corresponding CustomDirectory xxx migration component (xxx indicates the package directory) is added to the middleware. In the migration implementation phase, the specified directory and data are copied to the target environment.
Figure 3 Component Table
- You can click Edit in the Operation column of Component Table to complete the configuration information.
- Click Batch Import Source Components next to Component Table. In the dialog box that is displayed, import the source components to be parsed and select the target node.
- Method 2: Adding container or non-container component information manually
- Click Add Component Information.
- Enter component information. Table 3 and Table 4 describe the parameters.
Figure 4 Adding components
Table 3 Non-containerized components Parameter
Description
Container Migration
Indicates whether to migrate a container.
Component Belonging
The options are Database, Middleware, and Application.
Source Node
Enter the IP address of the node where the source component is located.
Target Node
Select a target node. You can search for a node by its IP address. If no node is found, click Add Node to add one. A maximum of 20 nodes can be added. For details, see Managing Agent.
Source component
Source Component Name
Name of the source component to be migrated.
NOTE:For Java middleware, select JavaMiddleware to follow the general middleware migration process.
Middleware Name
Enter the name of the middleware to be migrated. The name can be customized.
- It can contain only letters, digits, hyphens (-), underscores (_), and spaces.
- It contains 1 to 64 characters and must start with a letter.
NOTE:This parameter is available when Source Component Name is JavaMiddleware.
Version
Source component version. This parameter is available only to databases and middleware.
Origin of Source Component
Indicates where the source component comes. This parameter is available only to middleware and applications.
NOTE:For details about how to package source components (except the RabbitMQ middleware), see Migration Source Component Preparation Guide.
- Obtain from node server: Obtain the source component package from the specified path on the target node, scan and analyze it, and generate a migration guide report. If the component belongs to middleware, perform the following steps:
- Compress the installation directory of the source component to be scanned into a package, for example, a tar.gz package. Replace the example package name and source component directory with the actual ones.
1tar cvf xxx.tar.gz /xxx/xxx/xxx
- Log in to the tool through SSH and upload the compressed package to a user-defined directory on the node server.
- Go to the directory of storing the compressed package.
1cd User-defined_directory
- Extract the source component package. Replace the example package name with the actual one.
1tar xvf xxx.tar.gz
- After the extraction is complete, you can run the following command to delete the source component package.
1rm -f xxx.tar.gz
- Set the path to the extracted file as the source component path.
- Compress the installation directory of the source component to be scanned into a package, for example, a tar.gz package. Replace the example package name and source component directory with the actual ones.
- Upload source component package: Upload the source component package, scan and analyze it, and generate a migration guide report. If the component belongs to middleware, perform the following steps:
- Compress the directory of the source component to be scanned into a package, for example, a tar.gz package. Replace the example package name and source component directory with the actual ones.
1tar cvf xxx.tar.gz /xxx/xxx/xxx
- Upload the source component package.
- Compress the directory of the source component to be scanned into a package, for example, a tar.gz package. Replace the example package name and source component directory with the actual ones.
- No source component available: No source component package is provided and no migration analysis is performed. This parameter is available only to middleware.
Source Component Path
Path to the source component on the target node.
NOTE:This parameter is displayed when Origin of Source Component is set to Obtain from node server.
Upload Source Package
Click Upload to upload the required source component package in .zip, .tar, or .tar.gz format.
NOTE:This parameter is displayed when Origin of Source Component is set to Upload source component package.
Target component
Target Component Name
Name of the target component.
Origin of Target Component
Indicates where the target component comes. This parameter is available only to databases and middleware.
- Download from URL: By default, the target component package is downloaded from the Kunpeng image repository and automatically installed.
- Obtain from node server: Obtain the target component package from the specified path on the target node and start an automatic installation.
- Upload Target Component Package: Click download the component package in the lower part of the dialog box to obtain the target component package.
NOTE:If Source Component Name is JavaMiddleware, Origin of Target Component indicates the dependency files required by the middleware. You can obtain the files using software porting assessment or from the official website.
URL
Enter the target URL.
NOTE:This parameter is displayed when Origin of Target Component is set to Download from URL.
Target Component Path
Enter the path to the target component on the target node.
NOTE:- This parameter is displayed when Origin of Target Component is set to Obtain from node server.
- If Source Component Name is JavaMiddleware, you can set this parameter to the directory for storing the dependency files, or you can package the dependency files and specify the full path to the package.
Upload Target Component Package
Click Upload to upload the required target component package in .zip, .tar, .tar.gz, or .jar format.
NOTE:- This parameter is displayed when Origin of Target Component is set to Upload Target Component Package.
- If Source Component Name is JavaMiddleware, the dependency files must be packaged before upload.
Default Deployment Path
The default deployment path of the target component cannot be modified.
NOTE:The tool deploys the target component based on the source component path. If the source component path cannot be determined, the default deployment path is used. For the detailed deployment path, see the suggestions on the migration result page.
Commercial Certificate
Click Upload to upload the required commercial certificate.
- Click OK.
- Set IP Address Mappings. IP address mappings are used to link the source and target node IP addresses, improving resolution accuracy. QuickFix provides modification suggestions based on these mappings. The system automatically identifies the mappings in the component table. If a mapping is incorrect, you can edit it or add one.Figure 5 IP Address Mappings
- After a component is added or edited, the tool follows these rules:
- If the IP Address Mappings area does not contain a mapping between the source IP address and the target IP address, the tool automatically adds it.
- When you edit a component, if no other components use its current IP address mapping, this mapping is deleted (unless it was manually added or edited) and the new mapping is added to IP Address Mappings.
- If an identical mapping already exists in IP Address Mappings, the new mapping will not be added.
- If the same source IP address but a different target IP address exist in IP Address Mappings, the different IP address is mapped to the source IP address.
- After a component is deleted, the tool checks whether any component has the same mapping in IP Address Mappings and processes the mapping according to the following rules:
- If no such component exists, a rollback is performed. If the target IP address is not detected for a rollback, the mapping is deleted. If the mapping was manually added or edited, it will not be automatically deleted.
- If such a component exists, the mapping will not be deleted from IP Address Mappings.
- Multiple source IP addresses can be mapped to the same target IP address, but one source IP address cannot be mapped to different target IP addresses.
- If the source IP address is the same as the target IP address, you do not need to add a mapping.
- After a component is added or edited, the tool follows these rules:
- Trust Target Component URL: If you have selected Download from URL, choose whether to trust the target component URL.
If you enable Trust Target Component URL, SSL certificate verification will be skipped for all software downloads in this migration task. Check that the URL is secure.
- Check whether the source code is available.
If the source code of the application package is available, continue to migrate the database, middleware, and applications, and use the Source Code Porting function to migrate SQL statements and configurations. If it is unavailable, select No to migrate SQL statements and configurations.
- If you choose to port without source code, the uploaded application packages are classified, and non-open-source JAR packages need to be decompiled and analyzed. You can specify the JAR packages and group IDs to be filtered out by following instructions in Ignoring Files.
- Porting without source code supports decompilation and deployment of the .class files collected by the middleware (Tomcat/Resin) and the .class files collected in the specified batch packaging directory.
The .class files are binary bytecode files generated after the Java source code (.java files) is compiled by the compiler (javac). Select any of the following options to support porting without source code:
- Migrating middleware of the same type (Tomcat > Tomcat) contains the corresponding application, and Origin of Source Component is Upload source component package or Batch import source components.
- Migrating middleware of the same type (Resin > Resin) contains the corresponding application, and Origin of Source Component is Batch import source components.
- The packaging directory for batch importing source components is CustomDirectory xxx.
- Container applications cannot be ported without source code.
Figure 6 Porting without source code
Table 5 SQL migration parameters Parameter
Description
Migration Source Database
Select the source database to improve the accuracy of migrating source code SQL statements.
NOTE:During migration from MySQL to Vastbase, if Vastbase-transform.jar is not deployed in the current environment, you need to configure the related download information. SQL statement compatibility assessment and conversion will not be performed.
Migration Target Database
Select the target database to improve the accuracy of migrating source code SQL statements.
Origin of Tool Package
Where the tool package comes.
- Download from URL: Vastbase-transform.jar is automatically downloaded from the Kunpeng mirror site to the DevKit node.
- Upload tool package: Copy the tool package download link in the information below and obtain Vastbase-transform.jar.
Upload Tool Package
Click Upload to upload the downloaded Vastbase-transform.jar.
NOTE:This parameter is displayed when Origin of Tool Package is set to Upload tool package.
DDL
You are advised to configure a DDL for each of the SQL source packages to be scanned. A DDL file records complete information about database tables and fields. DDL statements can improve the accuracy of SQL statement parsing. For details about how to obtain a DDL file, see Exporting a DDL File.
Migration Target Middleware Type
- N/A
- BES migration strategy: The uploaded source package contains the built-in Tomcat configuration files and you need to migrate to the built-in BES files.
- TongTech migration strategy: The uploaded source package contains the built-in Tomcat configuration files and you need to migrate to the built-in TongTech files.
- Click Start.