[8.5.5.16 or later]

Generating migration reports by using the wsadmin migration commands

You can use the wsadmin migration commands to create, locate, and delete the Liberty migration reports. You can also use these commands to create, delete, and get the summary of IBM Cloud Transformation Advisor data collections.

Before you begin

The following steps require you to have at least one installed application, have familiarity with the Migration commands, and run the wsadmin tool. Liberty migration reports can also be created with the administrative console.

About this task

The following procedure describes how to use wsadmin migration commands to create and manage the following resources:

Procedure

[8.5.5.23 or later]Create and manage a Transformation Advisor data collection.

  • Create a Transformation Advisor data collection for a profile.
    1. In the wsadmin tool, run the AdminTask.createTADataCollection('-interactive') command.

      The createTADataCollection command starts an asynchronous job that creates a Transformation Advisor data collection. The command returns before the scan is complete. When the scan is complete, the Transformation Advisor data collection is generated in the WAS_HOME/profiles/<profile_name>/libertyAdvisor/ location.

      If you run the command from a federated node, the deployment manager profile is scanned and the Transformation Advisor data collection is saved to the deployment manager profile.

      If a Transformation Advisor data collection exists, then by default the createTADataCollection command does not make any updates. Use the --clean parameter with the createTADataCollection command to remove the existing Transformation Advisor data collection and generate a new one.

    2. Enter the parameters when you are prompted.
      The --clean, --maxHeap, and --debug parameters are optional.
    3. Optional: Run the createTADataCollection command and specify the parameters directly in the command.
      For example, the following command runs a Transformation Advisor data collection that creates a debug trace with all messages. It also removes the previously generated collection, and sets the JVM max heap to 1280 MB.
      AdminTask.createTADataCollection('[--debug *=all --clean true --maxHeap 1280m]')
  • Delete a Transformation Advisor data collection.

    In the wsadmin tool, run the AdminTask.deleteTADataCollection() command.

    If a Transformation Advisor data collection is in progress, the deleteTADataCollection command does not stop or delete the Transformation Advisor data collection.

  • Get the status and summary of a Transformation Advisor data collection.

    In the wsadmin tool, run the AdminTask.getTADataCollectionSummary() command.

    If a scan is interrupted before the Transformation Advisor data collection is complete, run the getTADataCollectionSummary command again to continue the scan from the point of interruption. Progress is preserved between scans by default.

Create and manage a Liberty migration report.

  • Create a Liberty migration report for an application.
    1. In the wsadmin tool, run the AdminTask.createMigrationReport('-interactive') command.

      The createMigrationReport command starts an asynchronous job that runs a migration report scan against the specified application. The command returns before the scan is complete. When the scan is complete, a report is generated in the WAS_HOME/profiles/<profile_name>/libertyAdvisor/ location. Use the getMigrationReport command to locate the report when the scan is complete. Use the getMigrationSummary command to retrieve the status of the scan.

    2. Enter the parameters when you are prompted.

      The -applicationName parameter is required. The -targetJava, -includePackages, and -excludePackages parameters are optional and use the default values if no value is specified. The default values can be viewed by using the AdminTask.getMigrationOptions() command.

      When you specify the -applicationName parameter, the application name must not include the file type extension. For example, if the application folder is DefaultApplication.ear, the name of the application is DefaultApplication.

      The best practice is to identify your custom application class packages with the -includePackages option. By doing so, you avoid scanning Java EE and third-party packages, which do not affect your migration effort. If no --includePackages or --excludePackages options are specified, the tool excludes Java EE and some third-party packages by default. These packages are identified as scan options near the beginning of the report.

      If a report exists for an application, running the createMigrationReport command against the same application again overrides the old report.

    3. Optional: Run the createMigrationReport command and specify the parameters directly in the command.
      For example, the following command runs a migration report for the DefaultApplication by using the value ibm8 as the target Java™ :
      AdminTask.createMigrationReport('[-applicationName DefaultApplication -targetJava ibm8]')
  • Locate a migration report for an application.

    In the wsadmin tool, run AdminTask.getMigrationReport('-interactive') or AdminTask.getMigrationReport('[-applicationName APPLICATION_NAME]').

    If no report is present for the specified application, the getMigrationReport command returns an empty string.

  • Delete a migration report for an application.

    In the wsadmin tool, run the AdminTask.deleteMigrationReport('-interactive') or AdminTask.deleteMigrationReport('[-applicationName APPLICATION_NAME]') command.

    If a migration report is still being generated, the deleteMigrationReport command does not stop or delete any migration reports.

  • Get the status and summary of the migration report scan for an application.

    In the wsadmin tool, run the AdminTask.getMigrationSummary('-interactive') or AdminTask.getMigrationSummary('[-applicationName APPLICATION_NAME]') command.

Results

You created a Transformation advisor data collection or a Liberty migration report. You can now use these resources to migrate and modernize your applications. For debugging, use the com.ibm.ws.appmigr.*=all MustGather trace string.