Anshum,

The project https://github.com/danizen/solr-config-tool has code that uploads a 
configset to ZooKeeper via API.   It depends only on SolrJ.

You'll want to look at the following Java classes under src/main/java:

      org.danizen.solrconfig.SolrConfig
      org.danizen.solrconfig.tests.CanUpConfig

The idea here was to build a command-line that front-ends some JUnit test cases 
that can be used to do a sort of "Smoke Test" of a Solr Configuration directory.

It isn't at all ready for prime time - it can create a collection but doesn't 
do any indexing or querying.   I could elaborate on my thoughts, but it would 
be a bit technical about how to verify that indexing "worked".   This is part 
of why the command-line tool only acts as a front-end for JUnit tests.  I'd 
imagined that some users of this (which isn't ready for prime time), would 
build their own test plans that include some of these unit tests and some of 
their own.

The goal was to make Continuous Integration in my organization (and yours) a 
little easier - rather than looking at a lot of command-line output, just look 
at unit test results formatted by whatever CI tool you use.

________________________________________
From: Erick Erickson [erickerick...@gmail.com]
Sent: Wednesday, April 06, 2016 5:17 PM
To: solr-user
Subject: Re: Adding configset in SolrCloud via API

As of Solr 5.5 the bin/solr script can do this, see:
https://cwiki.apache.org/confluence/display/solr/Solr+Start+Script+Reference

It's still not quite what you're looking for, but uploading arbitrary
xml scripts through a browser is a security issue, so it's possible
there will never be an API call to do that.

Best
Erick

On Wed, Apr 6, 2016 at 1:52 PM, Anshum Gupta <ans...@anshumgupta.net> wrote:
> As of now, there's no way to do so. There were some efforts on those lines 
> but it's been on hold.
>
> -Anshum
>
>> On Apr 6, 2016, at 12:21 PM, Don Bosco Durai <bo...@apache.org> wrote:
>>
>> Is there an equivalent of server/scripts/cloud-scripts/zkcli.sh  -zkhost 
>> $zk_host -cmd upconfig -confdir $config_folder -confname $config_name using 
>> APIs?
>>
>> I want to bootstrap by uploading the configs via API. Once the configs are 
>> uploaded, I am now able to do everything else via API.
>>
>> Thanks
>>
>> Bosco
>>
>>

Reply via email to