11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Once a configuration directory has been uploaded to ZooKeeper, you can update them using the ZooKeeper<br />

Command Line Interface (zkCLI).<br />

It's a good idea to keep these files under version control.<br />

Uploading configs using zkcli or <strong>Solr</strong>J<br />

In production situations, Config Sets can also be uploaded to ZooKeeper independent of collection creation using<br />

either <strong>Solr</strong>'s zkcli.sh script, or the Cloud<strong>Solr</strong>Client.uploadConfig java method.<br />

The below command can be used to upload a new configset using the zkcli script.<br />

$ sh zkcli.sh -cmd upconfig -zkhost -confname <br />

-solrhome -confdir <br />

More information about the ZooKeeper Command Line Utility to help manage changes to configuration files, can<br />

be found in the section on Command Line Utilities.<br />

Managing Your <strong>Solr</strong>Cloud Configuration Files<br />

To update or change your <strong>Solr</strong>Cloud configuration files:<br />

1.<br />

2.<br />

3.<br />

4.<br />

5.<br />

Download the latest configuration files from ZooKeeper, using the source control checkout process.<br />

Make your changes.<br />

Commit your changed file to source control.<br />

Push the changes back to ZooKeeper.<br />

Reload the collection so that the changes will be in effect.<br />

Preparing ZooKeeper before first cluster start<br />

If you will share the same ZooKeeper instance with other applications you should use a chroot in ZooKeeper.<br />

Please see Taking <strong>Solr</strong> to Production#ZooKeeperchroot for instructions.<br />

There are certain configuration files containing cluster wide configuration. Since some of these are crucial for the<br />

cluster to function properly, you may need to upload such files to ZooKeeper before starting your <strong>Solr</strong> cluster for<br />

the first time. Examples of such configuration files (not exhaustive) are solr.xml, security.json and clus<br />

terprops.json.<br />

If you for example would like to keep your solr.xml in ZooKeeper to avoid having to copy it to every node's so<br />

lr_home directory, you can push it to ZooKeeper with the zkcli.sh utility (Unix example):<br />

zkcli.sh -zkhost localhost:2181 -cmd putfile /solr.xml /path/to/solr.xml<br />

ZooKeeper Access Control<br />

This section describes using ZooKeeper access control lists (ACLs) with <strong>Solr</strong>. For information about ZooKeeper<br />

ACLs, see the ZooKeeper documentation at http://zookeeper.apache.org/doc/r3.4.6/zookeeperProgrammers.htm<br />

l#sc_ZooKeeperAccessControl.<br />

About ZooKeeper ACLs<br />

How to Enable ACLs<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

560

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!