SOLR-11902: Clarify bin/solr -h text to describe which commands can be run remotely

The bin/solr scripts contain a number of independent tools.  Many of
these can be run anywhere and just pointed at the correct Solr or ZK
host.  Some must run on the machine hosting Solr itself.

This commit clarifies help text for each bin/solr command, indicating
whether it can be run remotely, or must be run locally.
This commit is contained in:
Jason Gerlowski 2018-02-09 18:05:45 -05:00
parent f70477db01
commit 11a23a9029
3 changed files with 27 additions and 1 deletions

View File

@ -272,6 +272,8 @@ Other Changes
* SOLR-11349: Rename ResponseBuilder's getQueryCommand to createQueryCommand. (Christine Poerschke)
* SOLR-11902: Clarify in bin/solr help text whether commands can be run remotely (Jason Gerlowski)
================== 7.2.1 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

View File

@ -382,6 +382,8 @@ function print_usage() {
echo ""
echo "Usage: solr healthcheck [-c collection] [-z zkHost] [-V]"
echo ""
echo "Can be run from remote (non-Solr) hosts, as long as a proper ZooKeeper connection is provided"
echo ""
echo " -c <collection> Collection to run healthcheck against."
echo ""
echo " -z <zkHost> Zookeeper connection string; default is localhost:9983"
@ -392,7 +394,8 @@ function print_usage() {
echo ""
echo "Usage: solr status"
echo ""
echo " NOTE: This command will show the status of all running Solr servers"
echo " This command will show the status of all running Solr servers."
echo " It can only detect those Solr servers running on the current host."
echo ""
elif [ "$CMD" == "create" ]; then
echo ""
@ -417,6 +420,8 @@ function print_usage() {
echo " delete the configuration directory from Zookeeper so long as it is not being used by another collection."
echo " You can override this behavior by passing -deleteConfig false when running this command."
echo ""
echo " Can be run on remote (non-Solr) hosts, as long as a valid SOLR_HOST is provided in solr.in.sh"
echo ""
echo " -c <name> Name of the core / collection to delete"
echo ""
echo " -deleteConfig <boolean> Delete the configuration directory from Zookeeper; default is true"
@ -431,6 +436,9 @@ function print_usage() {
echo ""
echo "Usage: solr create_core [-c core] [-d confdir] [-p port] [-V]"
echo ""
echo "When a configSet is used, this can be run from remote (non-Solr) hosts. If pointing at a non-configSet directory, this"
echo "must be run from the host that you wish to create the core on"
echo ""
echo " -c <core> Name of core to create"
echo ""
echo " -d <confdir> Configuration directory to copy when creating the new core, built-in options are:"
@ -454,6 +462,7 @@ function print_usage() {
echo ""
echo "Usage: solr create_collection [-c collection] [-d confdir] [-n configName] [-shards #] [-replicationFactor #] [-p port] [-V]"
echo ""
echo "Can be run from remote (non-Solr) hosts, as long as a valid SOLR_HOST is provided in solr.in.sh"
echo " -c <collection> Name of collection to create"
echo ""
echo " -d <confdir> Configuration directory to copy when creating the new collection, built-in options are:"
@ -488,6 +497,7 @@ function print_usage() {
echo ""
elif [ "$CMD" == "zk" ]; then
print_short_zk_usage ""
echo " Can be run on remote (non-Solr) hosts, as long as valid ZK_HOST information is provided"
echo " Be sure to check the Solr logs in case of errors."
echo ""
echo " -z zkHost Optional Zookeeper connection string for all commands. If specified it"
@ -569,6 +579,8 @@ function print_usage() {
echo " solr auth enable -type kerberos -config \"<kerberos configs>\" [-updateIncludeFileOnly <true|false>] [-V]"
echo " solr auth disable [-updateIncludeFileOnly <true|false>] [-V]"
echo ""
echo " Updates or enables/disables authentication. Must be run on the machine hosting Solr."
echo ""
echo " -type <type> The authentication mechanism (basicAuth or kerberos) to enable. Defaults to 'basicAuth'."
echo ""
echo " -credentials <user:pass> The username and password of the initial user. Applicable for basicAuth only."

View File

@ -356,6 +356,8 @@ goto done
@echo.
@echo Usage: solr healthcheck [-c collection] [-z zkHost]
@echo.
@echo Can be run from remote (non-Solr^) hosts, as long as a proper ZooKeeper connection is provided
@echo.
@echo -c collection Collection to run healthcheck against.
@echo.
@echo -z zkHost Zookeeper connection string; default is localhost:9983
@ -389,6 +391,8 @@ echo mode (collection). If you're deleting a collection in SolrCloud mode, the
echo delete the configuration directory from Zookeeper so long as it is not being used by another collection.
echo You can override this behavior by passing -deleteConfig false when running this command.
echo.
echo Can be run on remote (non-Solr^) hosts, as long as a valid SOLR_HOST is provided in solr.in.cmd
echo.
echo -c name Name of core to create
echo.
echo -deleteConfig boolean Delete the configuration directory from Zookeeper; default is true
@ -405,6 +409,9 @@ goto done
echo.
echo Usage: solr create_core [-c name] [-d confdir] [-p port] [-V]
echo.
echo When a configSet is used, this can be run from any host. If pointing at a non-configSet directory, this
echo must be run from the host that you wish to create the core on.
echo.
echo -c name Name of core to create
echo.
echo -d confdir Configuration directory to copy when creating the new core, built-in options are:
@ -430,6 +437,8 @@ goto done
echo.
echo Usage: solr create_collection [-c name] [-d confdir] [-n confname] [-shards #] [-replicationFactor #] [-p port] [-V]
echo.
echo Can be run from remote (non-Solr^) hosts, as long as a valid SOLR_HOST is provided in solr.in.cmd.
echo.
echo -c name Name of collection to create
echo.
echo -d confdir Configuration directory to copy when creating the new collection, built-in options are:
@ -468,6 +477,7 @@ goto done
set ZK_FULL=true
goto zk_short_usage
:zk_full_usage
echo Can be run on remote (non-Solr^) hosts, as long as valid ZK_HOST information is provided.
echo Be sure to check the Solr logs in case of errors.
echo.
echo -z zkHost Optional Zookeeper connection string for all commands. If specified it
@ -568,6 +578,8 @@ echo Usage: solr auth enable [-type basicAuth] -credentials user:pass [-blockUnk
echo solr auth enable [-type basicAuth] -prompt ^<true|false^> [-blockUnknown ^<true|false^>] [-updateIncludeFileOnly ^<true|false^>] [-V]
echo solr auth disable [-updateIncludeFileOnly ^<true|false^>] [-V]
echo
echo Updates or enables/disables authentication. Must be run on the machine hosting Solr.
echo
echo -type ^<type^> The authentication mechanism to enable. Defaults to 'basicAuth'.
echo
echo -credentials ^<user:pass^> The username and password of the initial user