I already have a Solr instance running in my JBoss, with custom classes, config and so on.
Now, my next stet is setup SolrCloud.
I only found examples and help around Jetty, so, I have no idea about basically two things:
- Where should I put the zookeeper config file
- How to pass parameters to JBoss telling him where is the other instances (like this)
All the parameters are JAVA_OPTS.
The easiest way to setup (single machine, for test/development etc.) is to use embedded ZooKeeper.
-DzkRun (enable zookeeper)
-DnumShards=2 (your number of shards goes here)
-Dbootstrap_confdir=$SOLR_HOME/collection1/conf – configures bootstrapping of zookeeper data.
-Djetty.port=8080 (your port)
-Dcollection.configName=myconf (config name for zookeeper)
If you have several nodes,
install standalone zookeeper:
use -DzkHost: instead of zkRun.
you may use script zkCli from solr scripts to bootstrap, or either configure -Dbootstrap_confdir ON ONE NODE ONLY.
The rest are the same