Chapter 4. Using the migration tool on a .niogit directory

The .niogit directory of your Business Central distribution contains all Business Central data. You can use the Business Central migration tool on your .niogit directory to prepare project data and system configurations for migration to Red Hat Decision Manager 7.5.

Prerequisites

  • Red Hat Decision Manager 7.5 is installed.

    Note

    Do not run Red Hat Decision Manager 7.5 Business Central until you have completed the steps in this section.

  • Red Hat Decision Manager 7.4 is installed and Business Central is not running on Red Hat Decision Manager 7.4.
  • JDK 8 is installed and is available on the path where the project migration tool will be installed.

Procedure

  1. Locate the bin/.niogit directory in your Red Hat Decision Manager 7.4 installation and locate the same directory in your new Red Hat Decision Manager 7.5 installation.

    Example:

    $ ~/$RHDM_7.4_HOME/bin/.niogit
    $ ~/$RHDM_7.5_HOME/bin/.niogit
  2. In your command terminal, copy the .niogit directory from your current Business Central distribution for Red Hat Decision Manager 7.4 to the bin folder of the new Red Hat Decision Manager 7.5 installation directory:

    cp -r /$RHDM_7.4_HOME/bin/.niogit  /$RHDM_7.5_HOME/bin/

    The copied .niogit folder is the directory that the migration tool will prepare for Red Hat Decision Manager 7.5. . The original .niogit folder remains in your Red Hat Decision Manager 7.4 installation and will not be modified by the migration tool in this procedure.

  3. In the Red Hat Decision Manager 7.5. bin directory, delete the .index directory. You must delete this folder because Red Hat Decision Manager 7.5 comes with certain updates that are not compatible with Red Hat Decision Manager 7.4. The bin directory will be re-indexed after the migration when you start Red Hat Decision Manager 7.5.
  4. Note the path to the copied .niogit directory for Red Hat Decision Manager 7.5. The path will be required when you run the migration tool.
  5. If you have specific dependencies, repositories, or pluginRepositories that you want to add, remove, or update as part of the project migration, create a pom-migration.json file containing these elements. When you run the migration tool, the tool will prompt you if you want to include this file in the migration.

    The pom-migration.json file requires the following sections:

    • "dependencies":[]
    • "repositories-add":[]
    • "repositories-remove":[]
    • "repositories-update-urls":[]
    • "pluginRepositories-add":[]
    • "pluginRepositories-remove":[]
    • "pluginRepositories-update-urls":[]

    If any of these elements do not apply to your project, include them as empty sections to prevent parsing errors.

    Example pom-migration.json file:

    {
      "dependencies":[
    
        {"groupId":"junit", "artifactId":"junit", "version":"4.12", "scope":"test"},
        {"groupId":"com.thoughtworks.xstream", "artifactId":"xstream", "version":"4.12", "scope":"test"}
    
      ],
    
      "repositories-add":[
        {
          "id":"jboss-public-repository-group",
          "name":"JBoss Public Repository Group",
          "url":"http://repository.jboss.org/nexus/content/groups/public/",
          "releasesEnabled":true,
          "releasesUpdatePolicy":"never",
          "snapshotEnabled":true,
          "snapshotUpdatePolicy":"never"
        },
        {
          "id":"kie-internal-staging-repository-group",
          "name":"KIE Internal Staging Repositories",
          "url":"https://origin-repository.jboss.org/nexus/content/groups/kie-internal-group",
          "releasesEnabled":true,
          "releasesUpdatePolicy":"never",
          "snapshotEnabled":false,
          "snapshotUpdatePolicy":"never"
        }
      ],
    
      "repositories-remove":[
        {
          "id":"productization-repository", "url":"http://download.lab.bos.redhat.com/brewroot/repos/jb-ip-6.1-build/latest/maven/"
        }
      ],
    
      "repositories-update-urls":[
        {
          "id":"guvnor-m2-repo", "url":"http://localhost:8080/decision-central/maven3/"
        }
      ],
    
      "pluginRepositories-add":[
    
        {
          "id":"jboss-public-repository-group",
          "name":"JBoss Public Repository Group",
          "url":"http://repository.jboss.org/nexus/content/groups/public/",
          "releasesEnabled":true,
          "releasesUpdatePolicy":"never",
          "snapshotEnabled":true,
          "snapshotUpdatePolicy":"never"
        },
        {
          "id":"kie-internal-staging-repository-group",
          "name":"KIE Internal Staging Repositories",
          "url":"https://origin-repository.jboss.org/nexus/content/groups/kie-internal-group",
          "releasesEnabled":true,
          "releasesUpdatePolicy":"never",
          "snapshotEnabled":false,
          "snapshotUpdatePolicy":"never"
        }
    
      ],
      "pluginRepositories-remove":[],
      "pluginRepositories-update-urls":[]
    }

    Example pom-migration.json file with dependencies only:

    {
      "dependencies":[
    
        {"groupId":"junit", "artifactId":"junit", "version":"4.12", "scope":"test"},
        {"groupId":"com.thoughtworks.xstream", "artifactId":"xstream", "version":"4.12", "scope":"test"}
    
      ],
      "repositories-add":[],
      "repositories-remove":[],
      "repositories-update-urls":[],
      "pluginRepositories-add":[],
      "pluginRepositories-remove":[],
      "pluginRepositories-update-urls":[]
    }
  6. Navigate to the Software Downloads page in the Red Hat Customer Portal (login required), and select the product and version from the drop-down options:

    • Product: Decision Manager
    • Version: 7.5
  7. Download Red Hat Decision Manager 7.5 Add-Ons and extract the downloaded rhdm-7.5.0-add-ons.zip file to a temporary directory.
  8. In the extracted rhdm-7.4.0-add-ons folder, extract the rhdm-7.5-migration-tool.zip sub-folder. The migration tool is in the bin directory.
  9. In your command terminal, navigate to the temporary directory where you extracted the rhdm-7.5-migration-tool folder and run the migration tool. The $RHDM_NIOGIT_DIR portion is the path to the .niogit directory that you previously copied to the Red Hat Decision Manager 7.5 installation.

    On Linux or UNIX-based systems:

    $ cd $INSTALL_DIR/rhdm-7.5-migration-tool/bin
    $ ./migration-tool.sh -t $RHDM_NIOGIT_DIR

    On Windows systems:

    $ cd $INSTALL_DIR\rhdm-7.5-migration-tool/bin
    $ migration-tool.bat -t $RHDM_NIOGIT_DIR

    In the command prompt that appears, the following options are displayed:

    • Project structure migration: Migrates the Red Hat Decision Manager 7.4 project repository structure to the new project-oriented structure used in Red Hat Decision Manager 7.4.
    • System configuration directory structure migration: Migrates the system.git repository structure used in Red Hat Decision Manager 7.4 to the new structure used in Red Hat Decision Manager 7.5. This migration option requires the project structure migration to be executed first.
    • POMs migration: Updates pom.xml files with dependencies required for Red Hat Decision Manager 7.5. This migration option requires the project structure migration and system configuration directory structure migration to be executed first.
    • All: Runs all migration options in sequence.
    • Exit: Exits the migration tool.
  10. Select the option to run All migrations in sequence.

    Note

    If you prefer to run one migration option at a time, select and run the first individual migration option. After the tool runs, re-run the Business Central migration tool and select the next individual migration option in the sequence.

  11. Enter yes each time you are prompted to run a specific migration option.

    For the POMs migration option, if you want to include a path to an external pom-migration.json file that you created previously, enter yes when prompted and enter the path.

  12. After the tool finishes running, enter the option to Exit the migration tool.

    The .niogit directory structure is now compatible with Business Central in Red Hat Decision Manager 7.5.

  13. Project directories are in separate repositories and all other related configurations have been migrated. You can navigate to the new .niogit directory to inspect the restructured contents.