Before you can transition Solr configuration metadata, you need to download the
current Solr configuration from ZooKeeper.
The migration tool supports migrating schema.xml
(or
managed-schema
), solrconfig.xml
, and
solr.xml
configuration files. Run these commands on the host
you selected as the Solr Server for Upgrade in Set
configuration properties in Cloudera Manager.
-
Set the
CDH_SOLR_HOME
environment variable for your
installation method:
-
Set the
JAVA_HOME
environment variable to the JDK you are
using. For example:
export JAVA_HOME="/usr/java/jdk1.8.0_141-cloudera"
-
Create a working directory for the migration:
mkdir $HOME/cr7-solr-migration
-
If Kerberos is enabled on the cluster, run
kinit
with the Solr
service superuser. For example:
kinit solr@EXAMPLE.COM
Replace solr@EXAMPLE.COM
with your Kerberos realm name.
-
Download the current (CDH 5) Solr configuration from ZooKeeper:
/opt/cloudera/cm/solr-upgrade/solr-upgrade.sh download-metadata -d $HOME/cr7-solr-migration
If Kerberos is enabled and ZooKeeper Access Controll Lists (ACLs) are
configured, specify your JAAS configuration file by adding the
--jaas
parameter to the command. For example:
/opt/cloudera/cm/solr-upgrade/solr-upgrade.sh --jaas $HOME/solr-jaas.conf download-metadata -d $HOME/cr7-solr-migration
-
Initialize a directory for the migrated configuration as a copy of the current
config:
cp -r $HOME/cr7-solr-migration $HOME/cr7-migrated-solr-config