mirror of
https://github.com/apache/lucene.git
synced 2025-02-28 21:39:25 +00:00
SOLR-15204: Document bin solr zk and zkcli (#2437)
* Update examples to use bin/solr zk
This commit is contained in:
parent
d822a38a48
commit
c974b233e4
@ -70,17 +70,23 @@ Here is a more detailed `security.json` example. In this, the Basic authenticati
|
||||
|
||||
=== In SolrCloud Mode
|
||||
|
||||
While configuring Solr to use an authentication or authorization plugin, you will need to upload a `security.json` file to ZooKeeper. The following command writes the file as it uploads it - you could also upload a file that you have already created locally.
|
||||
While configuring Solr to use an authentication or authorization plugin, you will need to upload a `security.json` file to ZooKeeper.
|
||||
|
||||
[source,bash]
|
||||
Create the file `security.json` with the contents:
|
||||
|
||||
[source,json]
|
||||
----
|
||||
>server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:2181 -cmd put /security.json
|
||||
'{"authentication": {"class": "org.apache.solr.security.KerberosPlugin"}}'
|
||||
{"authentication": {"class": "org.apache.solr.security.KerberosPlugin"}}
|
||||
----
|
||||
|
||||
Note that this example defines the `KerberosPlugin` for authentication. You will want to modify this section as appropriate for the plugin you are using.
|
||||
|
||||
This example also defines `security.json` on the command line, but you can also define a file locally and upload it to ZooKeeper.
|
||||
Then use the `bin/solr zk` command to upload the file:
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
>bin/solr zk cp ./security.json zk:security.json -z localhost:2181
|
||||
----
|
||||
|
||||
[WARNING]
|
||||
====
|
||||
|
@ -165,13 +165,18 @@ bin/zkServer.sh start -Djava.security.auth.login.config=/etc/zookeeper/conf/jaas
|
||||
|
||||
=== Create security.json
|
||||
|
||||
Create the `security.json` file.
|
||||
Create the file `security.json` with the contents:
|
||||
|
||||
In SolrCloud mode, you can set up Solr to use the Kerberos plugin by uploading the `security.json` to ZooKeeper while you create it, as follows:
|
||||
[source,json]
|
||||
----
|
||||
{"authentication": {"class": "org.apache.solr.security.KerberosPlugin"}}
|
||||
----
|
||||
|
||||
Then use the `bin/solr zk` command to upload the file:
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:2181 -cmd put /security.json '{"authentication":{"class": "org.apache.solr.security.KerberosPlugin"}}'
|
||||
>bin/solr zk cp ./security.json zk:security.json -z localhost:2181
|
||||
----
|
||||
|
||||
If you are using Solr in standalone mode, you need to create the `security.json` file and put it in your `$SOLR_HOME` directory.
|
||||
|
Loading…
x
Reference in New Issue
Block a user