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 sliding frame on the left 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/Deselect All in the upper left corner to select or deselect all files to be fixed on the current page.
      • 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 Package or Download Application Package. The application may malfunction if certain SQL statements or configurations are not adapted.
      • Deploy Application Package: 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 package is deployed in the source component path by default. If you chose Add Component Information, the application package 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.

  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, decompress 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. Click Edit in the Status column, select a state from the drop-down list, and click Save.

    You can select multiple files or components and click Batch Edit to edit the selected files or components at the same time. Click OK to save the modification.

Migration report – middleware/database

  1. Go to the Migration Result page and view the migration report. Use middleware as an example.
    Figure 7 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 a migration from Tomcat to TongWeb as an example.
      Figure 8 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 9 Guidance Suggestion

      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 right sliding frame. Click Edit in the Operation column, select a state from the drop-down list, and click Save.

    You can select multiple components and click Batch Edit to edit the selected components at the same time. Click OK to save the modification.

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