Setting up your environment

Learn about the necessary setup steps, including installing Java, configuring directories, preparing the source NiFi instance, and acquiring sensitive properties.

  1. Install and set up Java.
    1. Install Java 21 on the machine where you are performing the migration.
    2. Add Java 21 to the PATH environment variable.
  2. Download and unpack the Cloudera Flow Management Migration Tool on the machine where the migration will run.

    For example: /etc/nifi-migration-tool-bin

  3. Configure the following directories to support the Migration Tool and its dependencies.
    1. NiFi 1 and 2 library folders:
      • Provide read-only access to the NiFi 1 lib folder or equivalent directory containing all necessary NAR artifacts.

        For example: /etc/nifi1/lib

      • Provide read-only access to the NiFi 2 lib folder or equivalent directory containing all necessary NAR artifacts.

        For example: /etc/nifi2/lib

    2. Work directories:
      • Create two, initially empty directories for the Migration Tool to unpack NiFi 1 and NiFi 2’s dependency NAR files.

        For example: /etc/nifi-1-work and /etc/nifi-2-work

      • Ensure the Migration Tool has write access to these directories that will serve as NiFi 1 and 2 working areas.

      • Avoid using these directories for other purposes.

    3. Output directory:
      • Create an empty directory to store migration artifacts generated by the Migration Tool.

        For example: /etc/migration-tool-output

      • Multiple runs of the Migration Tool using the same output directory will overwrite existing files. For example, if a template migration is run before a component migration, template migration files may remain intact, while other files, such as the Activity Log, are overwritten during the second run.

  4. Prepare the source NiFi Instance.
    1. Ensure all components are in a valid state, as invalid components may not be migrated correctly.
    2. Stop and offload all processors.
    3. Stop the NiFi instance and ensure all FlowFiles have been processed.
  5. Export the flow.json.gz file from the source NiFi 1 instance to the machine performing the migration.

    For example: /etc/flow.json.gz

    1. Unzip flow.json.gz file to product flow.json.
    2. Ensure that the Migration Tool has access to this file.
  6. Acquire the Sensitive Properties Key and Algorithm.
    1. Obtain the nifi.sensitive.props.key and nifi.sensitive.props.algorithm from the source NiFi 1 instance.

      You will need these when updating the migration.tool.properties configuration file.

    2. For deployments in Cloudera on premises or Cloudera on cloud, follow these steps to acquire the sensitive key:
      1. Configure Cloudera Manager to allow API calls to return sensitive values. For more information, see Disabling Redaction of sensitive information when using the Cloudera Manager API.

      2. Run the following API call:
        https://[***HOST***].root.comops.site:7183/api/v54/clusters/[***CLUSTER_NAME***]/services/[***SERVICE_NAME***]?view=EXPORT

        Replace [***HOST***], [***CLUSTER_NAME***], and [***SERVICE_NAME***] with the appropriate values for your cluster.

      3. Locate the random.nifi.sensitive.props.key value, which serves as the nifi.sensitive.props.key property.

      4. Revert Cloudera Manager to its original state to disable sensitive value return.

  7. If the source and target instances use different sensitive properties, update the nifi.sensitive.props.key and nifi.sensitive.props.algorithm properties using a copy of the original nifi.properties file.

    For more information, see the NiFi System Administrator’s Guide.