You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ep...@apache.org on 2021/03/03 19:43:59 UTC

[lucene-solr] branch branch_8x updated: SOLR-15204: Document bin solr zk and zkcli (#2437)

This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 5b39fde  SOLR-15204: Document bin solr zk and zkcli (#2437)
5b39fde is described below

commit 5b39fdea5e50d988e1b15c16ed4cadfe89ea1422
Author: Eric Pugh <ep...@opensourceconnections.com>
AuthorDate: Wed Mar 3 14:43:01 2021 -0500

    SOLR-15204: Document bin solr zk and zkcli (#2437)
    
    * Update examples to use bin/solr zk
---
 .../src/authentication-and-authorization-plugins.adoc    | 16 +++++++++++-----
 .../src/kerberos-authentication-plugin.adoc              | 11 ++++++++---
 2 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc b/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc
index fc683df..8ca87c4 100644
--- a/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc
+++ b/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc
@@ -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]
 ====
diff --git a/solr/solr-ref-guide/src/kerberos-authentication-plugin.adoc b/solr/solr-ref-guide/src/kerberos-authentication-plugin.adoc
index 428898b..bbfde5e 100644
--- a/solr/solr-ref-guide/src/kerberos-authentication-plugin.adoc
+++ b/solr/solr-ref-guide/src/kerberos-authentication-plugin.adoc
@@ -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.