Rate This Document
Findability
Accuracy
Completeness
Readability

Porting Without Source Code

The tool decompiles the source code in the application package during a migration. After the decompilation is complete, the tool analyzes SQL statements and configurations and generates a migration report. You can view a migration report on the migration result page and perform necessary operations as instructed to verify or complete the migration.

  • You can drag the side panel of the Guidance Suggestion area to adjust the area size. You can also click a file in the file list on the navigation pane to quickly locate the first suggestion.
  • Click View Details. The number of suggestions (excluding compatible SQL statements and modified system content) contained in the file is displayed in the list on the left of the Guidance Suggestion area.
  • On the upper part of the Migration Result page, you can click New Project to return to the New Project page, where you can modify the information of the components to be migrated and restart the migration.
  • The button indicates that the data in the column supports search, and you can click the button to search for data. The button indicates that the data in the column supports filtering, and you can click the button to filter data. The button indicates that the data in the column supports sorting, and you can click the button to sort data in ascending or descending order. The button indicates the columns presented in the table, and you can click the button to set what columns to display.

Prerequisites

  • You have logged in to the Kunpeng DevKit.
  • You have created a system migration project and completed the migration.

Migration Report – Applications

  1. Go to the Migration Result page and view the migration report. By default, the Application tab page is displayed. The page contains two parts: Code to Be Adapted and Dependency Libraries to Be Adapted.
    Figure 1 Migration report 1
  2. Modify the code.
    1. Click Quick Fix in the upper left corner.
      Figure 2 Code to Be Adapted
      Table 1 Code parameters

      Parameter

      Description

      File Name

      Source file name.

      Target Node

      Target nodes can be filtered.

      Package Source

      Source of the software package to which the source file belongs.

      Source Path

      Path to the source file in the software package.

      Software Package Name

      It is not displayed by default. You can view the software package name by clicking .

      Total SQL Statements

      Total number of extracted SQL statements.

      SQL Statements to Modify

      Number of SQL statements that need to be modified.

      Configurations to Modify

      Number of configurations that need to be modified.

      Status

      Migration status of the file, which is Migrated, To be migrated, or Masked.

      Guidance

      Click View Details to view the guidance details.

      Remarks

      Supplementary information.

      Operation

      You can modify the migration status and add remarks.

    2. The files that support Quick Fix are displayed on the right, including their issue type, issue description, modification suggestions, and code differences. Select a file that requires Quick Fix and click Fix in the lower right corner.
      • Quick Fix supports file search by software package name, file path, and type.
      • Click Select All/Deselect All in the upper part to select or deselect all issues to be fixed. You can also click Cancel in the notification bar to deselect a selected issue. Due to performance limitations, a maximum of 10000 items can be fixed at a time. To fix the remaining items, click OK again.
      • You can also click Details in the Guidance column, move the cursor to code with wavy lines, and click Quick Fix in the floating message to automatically rectify the fault.
      Figure 3 Quick Fix
    3. For the code snippets that do not support Quick Fix, click Details in the Guidance column. The guidance suggestions are displayed on the right.
      Figure 4 Guidance
    4. After the modification is complete, click Deploy Application or Download Application Package. The application may malfunction if certain SQL statements or configurations are not adapted.
      • Deploy Application: You can recompile and package the updated source code and deploy the application package to the target node.

        If you chose Batch Import Source Components when adding components, the application is deployed in the source component path by default. If you chose Add Component Information, the application is deployed in the /devkit_migrated/app directory by default.

      • Download Application Package: After modifying the source code, you can recompile and package it, and download it to your local PC.
      • Before deploying or downloading the application package, ensure that the JDK environment is ready. The tool checks the /usr/bin and /usr/local/bin directories for the JDK by default. If the JDK is not found or you need to use the JDK in another path, you can customize the JDK. For details, see Configuring the JDK.
      • The applications included in the middleware cannot be downloaded. Only application deployment is supported.
  3. Modify the dependency libraries.
    Figure 5 Dependency Libraries to Be Adapted
    Table 2 Dependency library parameters

    Parameter

    Description

    Source Component Name

    Name of the migrated source component.

    Source Node

    Source node of the component. Filtering is supported.

    Target Node

    Target node for the component. Filtering is supported.

    Component Belonging

    What the component belongs to.

    Origin of Source Component

    Where the component comes.

    Target Component Name

    Name of the target component.

    Status

    Migration status of the component, which is Migrated, To be migrated, or Masked.

    Guidance

    Click View Details to view the guidance details.

    Status Source

    Where the component comes. It is hidden by default and you can click to display it. It defaults to a migration handled by the tool. If you want to modify the component status, the status source will change to Customized.

    Remarks

    Supplementary information.

    Updated

    Time when the migration status is displayed. It is hidden by default and you can click to display it.

    Operation

    You can modify the migration status and add remarks.

    Click View Details in the Guidance column, and you will see the guidance details on the right. Java application packages can be automatically converted to JAR packages that can run on the Kunpeng platform.
    Figure 6 Guidance Suggestion
    • For dependencies that fail to be replaced, run a script to obtain related dependencies or required files according to Migration Guide.
      1. Click script for downloading dependency files, extract the downloaded package, and run the script.
        sh dependency_download.sh

        See the following example. If the information in bold is displayed, the dependency has been successfully downloaded:

        Start downloading: DmDialect-for-hibernate5.6-8.1.3.140.jar
        Start downloading: DmJdbcDriver18-8.1.3.140.jar
        Download failed: 
        DmDialect-for-hibernate5.6-8.1.3.140.jar       100%[====================================================================================================>]  49.62K   203KB/s    in 0.2s    
        Downloaded: DmDialect-for-hibernate5.6-8.1.3.140.jar
        DmJdbcDriver18-8.1.3.140.jar                   100%[====================================================================================================>]   1.31M  92.7KB/s    in 8.3s    
        Downloaded: DmJdbcDriver18-8.1.3.140.jar
        All files have been downloaded.
        • The script execution requires Internet connection. For details, refer to Configuring a Proxy for Wget.
        • After the download is successful, a download folder that stores the dependencies is generated in the same directory as the script.
      2. For architecture-related dependencies, replace the dependencies that fail to be converted one by one using replacement package paths. For database-related dependencies, refer to the handling suggestions.
      3. Use the prepared test cases to check whether the application is successfully migrated in the Kunpeng environment.
    • For the dependencies that are successfully replaced, perform operations based on the migration guide. These dependencies can be rolled back when needed. After the rollback, in the case of architecture-related dependencies, the converted software package is replaced by the original software package; in the case of database-related dependencies, dependency files added to the application package are deleted.
  4. After the migration is complete, you can close the side panel on the right to update the file or component status and remarks.
    Figure 7 Editing files or components
    • Method 1: Click Edit in the Operation column, select a state from the drop-down list, and click Save.
    • Method 2: You can select multiple files or components and click Batch Edit to edit the selected source files or components at the same time. Click OK to save the modification.
      • Click Select All/Deselect All in the upper part to select or deselect all file or components. You can also click Cancel in the notification bar to deselect a selected file or component.
      • The notification bar above Dependency Libraries to Be Adapted displays the selected and total numbers of source components. The lower left corner displays the total number of items in the parent directory of the application.

Migration report – middleware/database

  1. Go to the Migration Result page and view the migration report. Use middleware as an example.
    Figure 8 Migration report 2
    Table 3 Parameters in the migration report

    Parameter

    Description

    Source Component Name

    Name of the migrated source component.

    Source Node

    Source node of the component. Filtering is supported.

    Target Node

    Target node for the component. Filtering is supported.

    Component Belonging

    What the component belongs to.

    Origin of Source Component

    Where the component comes.

    Target Component Name

    Name of the target component.

    Status

    Migration status of the component, which is Migrated, To be migrated, or Masked.

    Guidance

    Click View Details to view the guidance details.

    Status Source

    Where the component comes. It is hidden by default and you can click to display it. It defaults to a migration handled by the tool. If you want to modify the component status, the status source will change to Customized.

    Remarks

    Supplementary information.

    Updated

    Time when the migration status is displayed. It is hidden by default and you can click to display it.

    Operation

    You can modify the migration status and add remarks.

  2. Click View Details in the Guidance column, and you will see the guidance details on the right.
    • Migrated: Verify system functions based on the verification method provided in Guidance Suggestion. The following uses migration from Oracle JDK to BiSheng JDK as an example.
      Figure 9 Guidance Suggestion
    • To be migrated: Perform a manual migration and verify system functions based on Guidance Suggestion. The following uses a RabbitMQ migration as an example.
      Figure 10 Guidance Suggestion
      If middleware requires modifying a configuration file, click the file and modify it based on the suggestions.
      • For migration between the same middleware and same major version (for example, from Tomcat 8.* to Tomcat 8.*), modify the files to be adapted and click Save and Sync. Then the modified source files are backed up and synchronized to the target node.
      • In other migration scenarios, you can click Save to save the modifications and back up the source files.
      • If a configuration file fails to save, resolve the issue based on the cause and click Retry.
      • If the files to be adapted fail to synchronize to the target node:
        • You can click View Details above Migration Report to quickly locate the middleware that first fails to be synchronized. Open the configuration file that fails to be synchronized, move the cursor over Synchronization failed in the upper part of the page, view the cause, and try again.
        • You can move the cursor over the Synchronization failed icon for the corresponding middleware in the Component List, click View Details to view the cause, and retry one or all middleware. Alternatively, click next to Synchronization failed to retry.
      • If middleware is in the To be migrated state solely due to configuration file issues, the middleware status will be automatically updated to Migrated after the configuration file is modified and synchronized to the target node.

      You can click Edit and Remigrate under the guidance suggestion to return to the New Project page, edit the component information, and click Restart to retry the migration.

  3. After the migration is complete, you can close the side panel on the right to update the component status and remarks.
    Figure 11 Editing components
    • Method 1: Click Edit in the Operation column, select a state from the drop-down list, and click Save.
    • Method 2: You can select multiple files and click Batch Edit in the left upper corner to edit the source files at the same time. Click OK to save the modification.

      Click Select All/Deselect All in the upper part to select or deselect all components. You can also click Cancel in the notification bar to deselect a selected component.

  4. You can click Source Code Porting in the lower left corner of the page to port the source code.