Download the configuration

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.

  1. Set the CDH_SOLR_HOME environment variable for your installation method:
    • Parcels:
      export CDH_SOLR_HOME=/opt/cloudera/parcels/CDH/lib/solr
    • Packages:
      export CDH_SOLR_HOME=/usr/lib/solr
  2. Set the JAVA_HOME environment variable to the JDK you are using. For example:
    export JAVA_HOME="/usr/java/jdk1.8.0_141-cloudera"
  3. Create a working directory for the migration:
    mkdir $HOME/cr7-solr-migration
  4. 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.

  5. 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
  6. 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