Transition Solr configuration using Cloudera Manager versions 7.1.1 to 7.2.4

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.

  1. Run the migration script:
    1. /opt/cloudera/cm/solr-upgrade/solr-upgrade.sh config-upgrade -t solrxml -c $HOME/cr7-solr-migration/solr.xml -u /opt/cloudera/cm/solr-upgrade/validators/solr_4_to_8_processors.xml -d /tmp

      If Kerberos is enabled, specify your JAAS configuration file by appending --jaas /path/to/solr-jaas.conf to the command.

    2. If the script reports any incompatibilities, fix them in the working directory ($HOME/cr7-solr-migration/solr.xml in this example) and then rerun the script. Each time you run the script, the files in the output directory (/tmp in this example) are overwritten. Repeat until there are no incompatibilities and the solr.xml migration is successful. For example:
      Validating solrxml...
      No configuration errors found...
      No configuration warnings found...
      
      Following incompatibilities will be fixed by auto-transformations (using --upgrade command):
          * System property used to define SOLR server port has changed from solr.port to jetty.port
      
      Solr solrxml validation is successful. Please review /tmp/solrxml_validation.html for more details.
      
      Applying auto transformations...
      
      The upgraded configuration file is available at /tmp/solr.xml
  2. Copy the migrated solr.xml file to the migrated configuration directory:
    cp /tmp/solr.xml $HOME/cr7-migrated-solr-config
  3. For each collection configuration set in $HOME/cr7-solr-migration/configs/, migrate the configuration and schema. Each time you run the script, the output file is overwritten. Do not proceed to the next collection until the migration is successful and you have copied the migrated file to its final destination.
    1. Run the migration script for solrconfig.xml. For example, for a configuration set named tweets_config:
      /opt/cloudera/cm/solr-upgrade/solr-upgrade.sh config-upgrade -t solrconfig -c $HOME/cr7-solr-migration/configs/tweets_config/conf/solrconfig.xml -u /opt/cloudera/cm/solr-upgrade/validators/solr_4_to_8_processors.xml -d /tmp
    2. If the script reports any incompatibilities, fix them in the working directory ($HOME/cr7-solr-migration/configs/tweets_config/conf/solrconfig.xml in this example) and then rerun the script. Repeat until there are no incompatibilities and the solrconfig.xml migration is successful. You should see a message similar to the following:
      Solr solrconfig validation is successful. Please review /tmp/solrconfig_validation.html for more details.
      
      
      Applying auto transformations...
      
      The upgraded configuration file is available at /tmp/solrconfig.xml
    3. Copy the migrated solrconfig.xml file to the collection configuration directory in the migrated directory. For example:
      cp /tmp/solrconfig.xml $HOME/cr7-migrated-solr-config/configs/tweets_config/conf/
    4. Run the migration script for schema.xml (or managed-schema). For example, for a configuration set named tweets_config:
      /opt/cloudera/cm/solr-upgrade/solr-upgrade.sh config-upgrade -t schema -c $HOME/cr7-solr-migration/configs/tweets_config/conf/schema.xml -u /opt/cloudera/cm/solr-upgrade/validators/solr_4_to_8_processors.xml -d /tmp
    5. If the script reports any incompatibilities, fix them in the working directory ($HOME/cr7-solr-migration/configs/tweets_config/conf/schema.xml in this example) and then rerun the script. Repeat until there are no incompatibilities and the solrconfig.xml migrations are all successful.
    6. Copy the migrated schema.xml file to the collection configuration directory in the migrated directory. For example:
      cp /tmp/schema.xml $HOME/cr7-migrated-solr-config/configs/tweets_config/conf/
    7. Repeat for all configuration sets in $HOME/cr7-solr-migration/configs/.