There are a couple ways you can proceed. You can preconfigure some SolrCores in 
solr.xml. Even if you don't, you want a solr.xml, because that is where a lot 
of cloud properties are defined. Or you can use the collections API or the core 
admin API.

I guess I'd recommend the collections API.

You have a couple options for getting in config. I'd recommend using the ZkCli 
tool to upload each of your config sets: 
http://wiki.apache.org/solr/SolrCloud#Getting_your_Configuration_Files_into_ZooKeeper

After that, use the collections API to create the necessary cores on each node.

Another options is to setup solr.xml like you would locally, then start with 
-Dconf_bootstrap=true and it will duplicate your local config and collection 
setup in ZooKeeper.

- Mark

On Jan 17, 2013, at 9:10 PM, Shawn Heisey <s...@elyograg.org> wrote:

> I'm trying to get a 2-node SolrCloud install off the ground with the 4.1 
> branch.  This is a new project for a different system than my existing Solr 
> 3.5.0 setup.  It will have one shard and two replicas.
> 
> I have part of the example in /opt/mbsolr4 -- jetty, the war file, logs, etc. 
>  This is the CWD.
> 
> I want all my config and data to live in /index/mbsolr4, so I am using 
> -Dsolr.solr.home=/index/mbsolr4.  This setup mirrors what I am doing for 
> upgrading the other system from 3.5.0 to 4.1, which is not using SolrCloud.
> 
> There is also a separate 3-node zookeeper ensemble, with two of those nodes 
> living on the two Solr servers.
> 
> What do I need in the solr home (/index/mbsolr4) before I start Solr? If I 
> was not using SolrCloud, I would put solr.xml in there, pointing at 
> directories relative to that location.
> 
> I'm going to have multiple collections.  Some of those collections will use 
> the same config/schema, others will use slightly different versions.  I have 
> worked out the zkHost value that I will need:
> 
> -DzkHost=mbzoo1:2181,mbzoo2:2181,mbzoo3:2181/mbsolr1
> 
> I have both Solr servers started and talking to zookeeper, but there are no 
> collections so the UI doesn't work.
> 
> Are the following options enough for me to get my first config & collection 
> into zookeeper/solrcloud -- assuming the config is right?  Do I need 
> numShards and the replica count at this phase?
> 
> -Dbootstrap_confdir=/index/mbsolr4/bootstrapconf
> -Dcollection.configName=mbbasecfg
> 
> Thanks,
> Shawn

Reply via email to