[ 
https://issues.apache.org/jira/browse/SOLR-3619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14169895#comment-14169895
 ] 

Timothy Potter commented on SOLR-3619:
--------------------------------------

Interesting discussion related to this ticket on the #solr IRC channel today. 
In a nutshell, we're thinking the bin/solr scripts would default to starting 
the Solr server in cloud-mode and the next step after a new user starts the 
server they can do: bin/solr create_collection -name foo -shards 4 -replicas 2 
-configset schemaless (as an example) ... this would be for 5.x. If a user 
doesn't want cloud mode, then the user can start a standalone server but will 
be on their own for creating cores using the core admin api or the Web UI.

We also discussed starting ZooKeeper in a separate process instead of embedded 
but that can be tackled by another ticket.

Here's a record of that discussion:

[11:28am] timpotter: Hi - so as part of SOLR-3619, I’d like to add a command to 
the bin/solr scripts to create a new core or collection (depending on which 
mode Solr is running in cloud or standalone). I think it over complicates 
things to have two commands (create_core AND create_collection) so my first 
thought was to have some overloaded command like create_index but that 
introduces yet another term in our nomenclature that will only confuse new 
users even more … chatting with Hoss and Steve about this they suggested just 
using create_collection and if Solr is running in standalone mode, the 
Collections API just does the right thing and creates the core (vs. erroring 
out). Anyone have any thoughts about this?
[11:28am] timpotter: the idea here is that you’d fire up solr using bin/solr 
start and then either A) go to the Web UI or  can just create a new collection 
right there on the command-line
[11:28am] timpotter: (emoticon unintentional, should be B.
[11:30am] erikhatcher: timpotter: maybe it could default (or vice versa) to 
falling back to creating a core in standalone mode, and have a command-line 
switch that just errors after the collection creation fails 
(-force-solrcloud-mode ?)
[11:32am] timpotter: erikhatcher: It could do that … I think Hoss’ point is 
that the Collections API should just work in standalone mode but maybe that’s 
opening a big can of worms …
[11:32am] anshum: I’d say it’d be better to error out and only support 
collection creation in cloud mode… creating a core under the hood when running 
in standalone mode would confuse users as none of the other ‘Collection’ API 
calls would work though the collection creation would succeed
[11:38am] timpotter: anshum - that’s good point … so how to tell users to 
create a core in standalone mode … most important in my mind is easy to get 
started
[11:39am] anshum: we should default to solrcloud mode.. i.e. a zk comes up 
behind the scenes…, have defaults…  and bring things up
[11:39am] anshum: leave the core creation to advanced users only
[11:39am] anshum: we really wouldn’t want someone who’s getting started to know 
about ‘cores’ .. but that’s my thought..
[11:40am] timpotter: correct - which is why I liked create_collection but 
there’s no requirement to start Solr in cloud mode
[11:40am] timpotter: so if I start in standalone mode, what do I do next?
[11:43am] anshum: timpotter: that’s the thing. cloud = zk enabled. If the start 
scripts starts solr with embedded zk by default, there’s no standalone mode. If 
by standalone mode you mean 1 node, that could still be a solrcloud setup with 
1 node, embedded zk..
[11:45am] sarowe: anshum: i don't think we should ever use embedded zk, it's a 
bad practice
[11:45am] hoss: anshum: i would go even farther: no embedded zk, the start 
script with --example launches a distinct zk process .... but i think 
ultimatley tim is worried baout incrimental progress
[11:45am] timpotter: anshum - yes the script can do that (ie. make cloud mode 
the default)
[11:46am] anshum: sarowe/hoss: sure… that’s even better.. I don’t think the 
user needs to familiarize with standalone vs cloud .. and I’m always +1 on 
non-embedded zk..
[11:46am] timpotter: is that what we want to do in 5.x? ie. download -> start 
solr (in cloud mode) -> create_collection? If so, that’s doable
[11:47am] anshum: timpotter: I would like that.
[11:48am] sarowe: timpotter: but that leaves your original question unanswered: 
what to do in (non-default) standalone mode?  should create_collection create a 
core?
[11:48am] timpotter: sarowe - sounds like just error out and the user is left 
to their own devices (curl to core API or Web UI)
[11:49am] anshum: sarowe: there is no standalone mode (non-cloud)… is what I’m 
saying… start script starts solrcloud in 5x ?
[11:49am] timpotter: which seems fine if non-cloud mode is not the default 
anymore
[11:49am] timpotter: anshum - correct - but people still do master/slave all 
the time so there has to be a way to not do cloud
[11:50am] sarowe: timpotter: I haven't looked for it, but does bin/solr support 
master/slave now?
[11:50am] anshum: in that case, have a create core command, explicit, advanced 
usage…
[11:51am] anshum: even I’m not sure about bin/solr doing the master/slave now.. 
timpotter ?
[11:51am] timpotter: no, script doesn’t do anything specific for master slave 
as that’s all solrconfig.xml settings
[11:52am] timpotter: but the scripts do allow you to start Solr without 
specfiying a ZooKeeper connection string … to summarize, sounds like the 
bin/solr scripts are pretty much for the default behavior and if you want to 
stray from that, you’re on your own
[11:53am] anshum: timpotter: I may be missing something here… but is the script 
supposed to help people getting started or help people with ops..?
[11:53am] timpotter: both
[11:54am] anshum: timpotter/sarowe/hoss: so for ops, we might add ‘create 
core’, default is create collection, which only runs in cloud mode… trying to 
create a collection in non-cloud mode would lead to an error
[11:55am] anshum: specially as the user would have explicitly studied and 
specified that he ‘wants’ to run in non-cloud mode… he would also know about 
core admin commands and the difference between create collection and create core
[11:55am] anshum: i.e. for the purpose of ops
[11:56am] timpotter: I should clarify - bin/solr does basic ops (start, stop, 
restart, healthcheck, info) as well as launching specific examples … I don’t 
intend for it to become a tool to do all ops … was just thinking the 
create_collection command would be a nice simple addition for getting started 
(since we’re not booting up Solr with a collection1 already created)
[11:59am] anshum: timpotter: right, so someone who’s getting started (who wants 
to use create_collection) would have used the defaults. For anyone else, we 
should/could just error out
[11:59am] timpotter: that makes sense



> Rename 'example' dir to 'server' and pull examples into an 'examples' 
> directory
> -------------------------------------------------------------------------------
>
>                 Key: SOLR-3619
>                 URL: https://issues.apache.org/jira/browse/SOLR-3619
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Mark Miller
>            Assignee: Timothy Potter
>             Fix For: 4.9, Trunk
>
>         Attachments: SOLR-3619.patch, SOLR-3619.patch, managed-schema, 
> server-name-layout.png, solrconfig.xml
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to