Setting up your environment
Learn about the necessary setup steps, including installing Java, configuring directories, preparing the source NiFi instance, and acquiring sensitive properties.
-
Migrating flows to Cloudera Flow Management 4.0.0 requires upgrading to Cloudera Flow Management 2.1.7.1000 before moving to 4.0.0.
For detailed guidance on preparing for the upgrade to NiFi 2 in Cloudera Flow Management 4.0.0, see Preparing for upgrade to NiFi 2.
-
Download the Cloudera Flow Management Migration Tool from the Cloudera Flow Management Migration Tool Repository.
-
Install and set up Java.
- Install Java 21 on the machine where you are performing the migration.
-
Add Java 21 to the
PATH
environment variable.
-
Download and unpack the Cloudera Flow Management Migration
Tool on the machine where the migration will run.
For example: /etc/nifi-migration-tool-bin
-
Configure the following directories to support the Migration Tool and its
dependencies.
-
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
-
-
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.
-
-
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.
-
-
NiFi 1 and 2 library folders:
-
Prepare the source NiFi Instance.
- Ensure all components are in a valid state, as invalid components may not be migrated correctly.
- Stop and offload all processors.
- Stop the NiFi instance and ensure all FlowFiles have been processed.
-
Export the flow.json.gz file from the source NiFi 1
instance to the machine performing the migration.
For example: /etc/flow.json.gz
- Unzip flow.json.gz file to product flow.json.
- Ensure that the Migration Tool has access to this file.
-
Acquire the Sensitive Properties Key and Algorithm.
-
Obtain the
nifi.sensitive.props.key
andnifi.sensitive.props.algorithm
from the source NiFi 1 instance.You will need these when updating the migration.tool.properties configuration file.
-
For deployments in Cloudera on premises or Cloudera on cloud, follow
these steps to acquire the sensitive key:
-
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.
-
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. -
Locate the
random.nifi.sensitive.props.key
value, which serves as thenifi.sensitive.props.key
property. -
Revert Cloudera Manager to its original state to disable sensitive value return.
-
-
Obtain the
-
If the source and target instances use different sensitive properties, update
the
nifi.sensitive.props.key
andnifi.sensitive.props.algorithm
properties using a copy of the original nifi.properties file.For more information, see the NiFi System Administrator’s Guide.