Helper script to manager Solr configs

Starting from Datafari 6

 

For now, there is no script to push easily configs for other collections than FileShare. Indeed, for this main collection we have a dedicated admin UI in order to do that. But for the other configurations, we have to use the cloud-scripts in the Solr folder, that is not very easy to use.

We realized a script that can help you to push, download configs into ZK. And also reload the collection after that.

The script named manage-zk-config.sh and is located into $DATAFARI_HOME/bin/zkUtils.

The script is interactive and you have to answer some questions :

What is the name of the Solr collection that you want to manage ?

Enter the name of the collection that you want to manage, if you are in cluster mode, the script also knows in what Solr the collection is located : into the analytics Solr on the main server or the Solr into the Solr dedicated nodes.

Do you want to push your configuration or download the configuration ? (upload/download)

You have to indicate if you want to upload a new configuration to Zookeeper (push) or at the opposite download the configuration from ZK.

1.If you chose upload into the previous question :

What is the location of the folder that contains your configuration to upload ?

Enter here the location of the folder that contains the files that you modified. Even if you modified a single file, you have to indicate the folder name of the configuration : all the files of the folder will be pushed to ZK.

Finally you can reload the collection directly with the script. If you choose no, the configuration will be sent to ZK but the Solr collection will not be reloaded and you will not be able to see the changes into it.

  1. if you chose download into the previous question

Enter here the location of the folder that will contain the configuration that you want to download from ZK. Note that the folder must be writeable by datafari user.

Â