Transition the configuration using Cloudera Manager versions 7.3.1 or higher
The migration script transforms configuration metadata before the actual upgrade and checks its validity for the target Solr version. In case it identifies incompatibilities it cannot resolve, the script stops, letting you fix the input file with the incompatibility. Afterwards, you can rerun the script to continue with the transition process.
When running the script, you must specify the location of the CDH 5 Solr binaries
CDH_SOLR_HOME environment variable. Solr binaries are
For information on
solr-upgrade.sh command syntax and usage options,
run the following command:
In this procedure you run
solr-upgrade.sh with the
upgrade-metadata option. It transforms configuration metadata
to make it compatible with the target Solr version. The input of the script
([***/SOLR/METADATA/INPUT/DIRECTORY***]) is the Solr
configuration that you have downloaded from the ZooKeeper service of the source
The Solr configuration transition script,
included with Cloudera Manager 7.1 agent software. This enables you to run the
script after upgrading to Cloudera Manager 7.1, but before upgrading to Cloudera Runtime 7.1.1
The script is located at
Make sure that you run the script on a host that is assigned a Solr
Server or Solr service Gateway role.
Confirm that the
SOLR_ZK_ENSEMBLEenvironment variable is set in
Replace [***zk01.example.com:2181,zk02.example.com:2181/solr***] and [***conf.example.SOLR-1***] with actual values valid in your environment.
export SOLR_ZK_ENSEMBLE=[***zk01.example.com:2181,zk02.example.com:2181/solr***] \ export SENTRY_CONF_DIR=/etc/solr/[***conf.example.SOLR-1888]/sentry-conf
Run the migration script:
Replace [***/SOLR/METADATA/INPUT/DIRECTORY***] and [***SOLR/METADATA/OUTPUT/DIRECTORY***] with actual values valid in your environment.
/opt/cloudera/cm/solr-upgrade/solr-upgrade.sh upgrade-metadata \ -c [***/SOLR/METADATA/INPUT/DIRECTORY***] \ -d [***SOLR/METADATA/OUTPUT/DIRECTORY***]For example:
/opt/cloudera/cm/solr-upgrade/solr-upgrade.sh upgrade-metadata \ -c $HOME/cr7-solr-migration -d $HOME/cr7-migrated-solr-config
If you have enabled Kerberos, specify your JAAS configuration file by adding
--jaas [***PATH/TO/SOLR/JAAS.CONF***]to the command.For example:
/opt/cloudera/cm/solr-upgrade/solr-upgrade.sh \ --jaas [***PATH/TO/SOLR/JAAS.CONF***] \ upgrade-metadata -c $HOME/cr7-solr-migration -d $HOME/cr7-migrated-solr-config
The output directory does not only contain the migrated configuration files but several
*_validation.htmlfiles for all the steps of the migration and a new
index_validation.htmlfile linking to these files.
The output contains the following logs at the beginning and end of the steps:
---------- upgrading ... ---------- upgrade successful for …
If a step reports an error, the script stops at that point and the
METADATA UPGRADE SUCCESSFULmessage is missing. Check the output for the problematic step. If the script stops on error, the last step printed only has the
upgradingbut not the
Fix the erroneous file in the input directory
$HOME/cr7-solr-migrationin this example) and re-run the script.
Each time you run the script, the files in the output directory (
$HOME/cr7-migrated-solr-configin this example) are overwritten. Repeat until the script outputs no incompatibilities.
If the script runs successfully, the last line of the output is the following:
METADATA UPGRADE SUCCESSFUL FOR METADATA IN [***/SOLR/METADATA/INPUT/DIRECTORY***] OUTPUT STORED IN [***SOLR/METADATA/OUTPUT/DIRECTORY***]
METADATA UPGRADE SUCCESSFUL FOR METADATA IN $HOME/cr7-solr-migration OUTPUT STORED IN $HOME/cr7-migrated-solr-config