The solr-download-metadata.sh
script downloads metadata from
HDP
Search ZooKeeper. You can then copy this information into a CDP cluster
and use it as input for the to CDP Private Cloud Base upgrade process.
-
Set the
JAVA_HOME
environment variable to the JDK location.
For example:
export JAVA_HOME=/usr/jdk64/jdk1.8.0_112
-
Add java to
PATH
. For example:
export PATH=$PATH:$JAVA_HOME/bin
-
On a host running Solr server, set the
SOLR_ZK_ENSEMBLE
environment variable:
export SOLR_ZK_ENSEMBLE=[***HOSTNAME***]:2181/solr
Replace [***HOSTNAME***] with a value that is valid in
your environment.
-
On a host running Solr server, set the
SOLR_ADMIN_URI
environment variable:
export SOLR_ADMIN_URI=[***HOSTNAME***]:8983/solr
Replace [***HOSTNAME***] with an actual value that is
valid in your environment. Make sure that you include the protocol (HTTP or
HTTPS) and do not include a trailing slash (/
).
For
example:
export SOLR_ADMIN_URI=htp://example.com:8983/solr
-
On a secure cluster you may need to set additional zkcli flags, for
instance:
export ZKCLI_JVM_FLAGS="-Djava.security.auth.login.config=[***/PATH/TO/JAAS.CONF***]"
Replace [***/PATH/TO/JAAS.CONF***] with path to a valid
jaas.conf
file.
-
If you have enabled Kerberos, run the kinit command with the Solr service
superuser. For example:
kinit solr@[***EXAMPLE.COM***]
Replace
[***EXAMPLE.COM***] with your Kerberos realm name.
-
Download the current (HDP Search 2 or 3) Solr configuration from
ZooKeeper:
-
solr-download-metadata.sh [***DIRECTORY***]
Replace [***DIRECTORY***] with the path to the
directory where you want to download the Solr configuration.
-
If you have enabled Kerberos and configured ZooKeeper Access Control
Lists (ACLs), specify your JAAS configuration file by adding the
--jaas
parameter to the command.
solr-download-metadata.sh --jaas [***/PATH/TO/JAAS.CONF***] [***DIRECTORY***]
Replace [***/PATH/TO/JAAS.CONF***] with the path to a
valid jaas.conf
file.
Replace [***DIRECTORY***] with the path to the
directory where you want to download the Solr configuration.
In case of a successful run, the last line printed out by the script
is:
Successfully downloaded SOLR metadata from
Zookeeper
-
Copy the migrated data to
$HOME/cr7-solr-migration
in the
interim Solr instance.
-
Initialize a directory for the migrated configuration as a copy of the current
configuration:
cp -r $HOME/cr7-solr-migration
$HOME/cr7-migrated-solr-config