Performing a Data Hub OS upgrade

Perform a Data Hub OS upgrade to update the OS and VM packages to those available in the latest pre-warmed image.

Before performing any OS upgrade, make sure there is no data belonging to NiFi or NiFi Registry on the root disk of the VM (this is the case for any version before CDP 7.2.10).

If you have NiFi or NiFi Registry data on the root disk, run the commands below to move the data to the right location prior to performing the upgrade. Before executing these scripts, stop the NiFi and NiFi Registry services.

On the NiFi nodes:

hadoopDirectory=/hadoopfs/$(ls /hadoopfs/ | sort | tail -n 1)
mkdir $hadoopDirectory/working-dir
cp -R /var/lib/nifi/* $hadoopDirectory/working-dir
chown nifi:nifi -R $hadoopDirectory/working-dir
echo "nifi.working.directory should be set to $hadoopDirectory/working-dir"

After the bash script executes, update the nifi.working.directory configuration value with what the script returns.

To set nifi.working.directory, perform the following steps:

  1. Open the Cloudera Manager UI.
  2. Go to the NiFi service.
  3. Select the Configuration tab.
  4. Search for nifi.working.directory.
  5. Set the new value and click Save.

On the management node (where NiFi Registry is):

hadoopDirectory=/hadoopfs/$(ls /hadoopfs/ | sort | tail -n 1)
mkdir $hadoopDirectory/working-dir
cp -R /var/lib/nifiregistry/* $hadoopDirectory/working-dir
chown nifiregistry:nifiregistry -R $hadoopDirectory/working-dir
echo "nifi.registry.working.directory should be set to
$hadoopDirectory/working-dir"

After the bash script executes, update the nifi.registry.working.directory configuration value with what the script returns.

To set nifi.registry.working.directory, perform the following steps:

  1. Open the Cloudera Manager UI.
  2. Go to the NiFi service.
  3. Select the Configuration tab.
  4. Search for nifi.registry.working.directory.
  5. Set the new value and click Save.

After the new configuration values are set on the NiFi and the management nodes, start the services.

  1. In the left-hand menu of CDP, click Data Hubs and then select the Data Hub to upgrade.
  2. Scroll to the bottom of the Data Hub details page and select the Upgrade tab.
  3. From the drop-down menu, select the Target Runtime Version. An OS upgrade is indicated by the text “OS Upgrade only” next to the target version.
  4. Click Upgrade.
  5. Monitor the upgrade progress using the Data Hub Event History tab.