Browse Source

Rename bin/plugin in bin/elasticsearch-plugin

Jim Ferenczi 9 years ago
parent
commit
7d0181b5d4
34 changed files with 87 additions and 85 deletions
  1. 1 1
      buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy
  2. 1 1
      dev-tools/create_bwc_index.py
  3. 5 5
      dev-tools/prepare_release_candidate.py
  4. 1 1
      dev-tools/smoke_test_rc.py
  5. 2 2
      distribution/build.gradle
  6. 0 0
      distribution/src/main/resources/bin/elasticsearch-plugin
  7. 0 0
      distribution/src/main/resources/bin/elasticsearch-plugin.bat
  8. 2 2
      docs/plugins/analysis-icu.asciidoc
  9. 2 2
      docs/plugins/analysis-kuromoji.asciidoc
  10. 2 2
      docs/plugins/analysis-phonetic.asciidoc
  11. 2 2
      docs/plugins/analysis-smartcn.asciidoc
  12. 2 2
      docs/plugins/analysis-stempel.asciidoc
  13. 1 1
      docs/plugins/authors.asciidoc
  14. 2 2
      docs/plugins/delete-by-query.asciidoc
  15. 3 3
      docs/plugins/discovery-azure.asciidoc
  16. 2 2
      docs/plugins/discovery-ec2.asciidoc
  17. 3 3
      docs/plugins/discovery-gce.asciidoc
  18. 2 2
      docs/plugins/lang-javascript.asciidoc
  19. 2 2
      docs/plugins/lang-python.asciidoc
  20. 2 2
      docs/plugins/mapper-attachments.asciidoc
  21. 2 2
      docs/plugins/mapper-murmur3.asciidoc
  22. 2 2
      docs/plugins/mapper-size.asciidoc
  23. 20 20
      docs/plugins/plugin-script.asciidoc
  24. 2 2
      docs/plugins/repository-azure.asciidoc
  25. 2 2
      docs/plugins/repository-hdfs.asciidoc
  26. 2 2
      docs/plugins/repository-s3.asciidoc
  27. 2 2
      docs/plugins/store-smb.asciidoc
  28. 2 2
      docs/reference/migration/migrate_2_0/packaging.asciidoc
  29. 4 4
      docs/reference/migration/migrate_2_0/removals.asciidoc
  30. 1 1
      docs/reference/migration/migrate_2_0/settings.asciidoc
  31. 2 0
      docs/reference/migration/migrate_3_0.asciidoc
  32. 6 6
      qa/vagrant/src/test/resources/packaging/scripts/plugin_test_cases.bash
  33. 2 2
      qa/vagrant/src/test/resources/packaging/scripts/plugins.bash
  34. 1 1
      qa/vagrant/src/test/resources/packaging/scripts/tar.bash

+ 1 - 1
buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy

@@ -340,7 +340,7 @@ class ClusterFormationTasks {
         }
         // delay reading the file location until execution time by wrapping in a closure within a GString
         String file = "${-> new File(node.pluginsTmpDir, pluginZip.singleFile.getName()).toURI().toURL().toString()}"
-        Object[] args = [new File(node.homeDir, 'bin/plugin'), 'install', file]
+        Object[] args = [new File(node.homeDir, 'bin/elasticsearch-plugin'), 'install', file]
         return configureExecTask(name, project, setup, node, args)
     }
 

+ 1 - 1
dev-tools/create_bwc_index.py

@@ -156,7 +156,7 @@ def remove_plugin(version, release_dir, plugin_name):
   run_plugin(version, release_dir, 'remove', [plugin_name])
 
 def run_plugin(version, release_dir, plugin_cmd, args):
-  cmd = [os.path.join(release_dir, 'bin/plugin'), plugin_cmd] + args
+  cmd = [os.path.join(release_dir, 'bin/elasticsearch-plugin'), plugin_cmd] + args
   subprocess.check_call(cmd)
 
 def create_client(http_port=DEFAULT_HTTP_TCP_PORT, timeout=30):

+ 5 - 5
dev-tools/prepare_release_candidate.py

@@ -56,14 +56,14 @@ The packages may be downloaded from the following URLs:
 
 Plugins can be installed as follows:
 
-    bin/plugin -Des.plugins.staging=true install cloud-aws
+    bin/elasticsearch-plugin -Des.plugins.staging=true install cloud-aws
 
 The same goes for the x-plugins:
 
-    bin/plugin -Des.plugins.staging=true install license
-    bin/plugin -Des.plugins.staging=true install marvel-agent
-    bin/plugin -Des.plugins.staging=true install shield
-    bin/plugin -Des.plugins.staging=true install watcher
+    bin/elasticsearch-plugin -Des.plugins.staging=true install license
+    bin/elasticsearch-plugin -Des.plugins.staging=true install marvel-agent
+    bin/elasticsearch-plugin -Des.plugins.staging=true install shield
+    bin/elasticsearch-plugin -Des.plugins.staging=true install watcher
 
 To install the deb from an APT repo:
 

+ 1 - 1
dev-tools/smoke_test_rc.py

@@ -178,7 +178,7 @@ def smoke_test_release(release, files, expected_hash, plugins):
       continue # nothing to do here
     es_run_path = os.path.join(tmp_dir, 'elasticsearch-%s' % (release), 'bin/elasticsearch')
     print('  Smoke testing package [%s]' % release_file)
-    es_plugin_path = os.path.join(tmp_dir, 'elasticsearch-%s' % (release), 'bin/plugin')
+    es_plugin_path = os.path.join(tmp_dir, 'elasticsearch-%s' % (release), 'bin/elasticsearch-plugin')
     plugin_names = {}
     for plugin  in plugins:
       print('     Install plugin [%s]' % (plugin))

+ 2 - 2
distribution/build.gradle

@@ -372,7 +372,7 @@ task run(type: RunTask) {}
 
 /**
  * Build some variables that are replaced in the packages. This includes both
- * scripts like bin/elasticsearch and bin/plugin that a user might run and also
+ * scripts like bin/elasticsearch and bin/elasticsearch-plugin that a user might run and also
  * scripts like postinst which are run as part of the installation.
  *
  * <dl>
@@ -384,7 +384,7 @@ task run(type: RunTask) {}
  *  <dt>path.conf</dt>
  *  <dd>The default directory from which to load configuration. This is used in
  *    the packaging scripts, but in that context it is always
- *    /etc/elasticsearch. Its also used in bin/plugin, where it is
+ *    /etc/elasticsearch. Its also used in bin/elasticsearch-plugin, where it is
  *    /etc/elasticsearch for the os packages but $ESHOME/config otherwise.</dd>
  *  <dt>path.env</dt>
  *  <dd>The env file sourced before bin/elasticsearch to set environment

+ 0 - 0
distribution/src/main/resources/bin/plugin → distribution/src/main/resources/bin/elasticsearch-plugin


+ 0 - 0
distribution/src/main/resources/bin/plugin.bat → distribution/src/main/resources/bin/elasticsearch-plugin.bat


+ 2 - 2
docs/plugins/analysis-icu.asciidoc

@@ -15,7 +15,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install analysis-icu
+sudo bin/elasticsearch-plugin install analysis-icu
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -29,7 +29,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove analysis-icu
+sudo bin/elasticsearch-plugin remove analysis-icu
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 2 - 2
docs/plugins/analysis-kuromoji.asciidoc

@@ -12,7 +12,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install analysis-kuromoji
+sudo bin/elasticsearch-plugin install analysis-kuromoji
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -26,7 +26,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove analysis-kuromoji
+sudo bin/elasticsearch-plugin remove analysis-kuromoji
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 2 - 2
docs/plugins/analysis-phonetic.asciidoc

@@ -13,7 +13,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install analysis-phonetic
+sudo bin/elasticsearch-plugin install analysis-phonetic
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -27,7 +27,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove analysis-phonetic
+sudo bin/elasticsearch-plugin remove analysis-phonetic
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 2 - 2
docs/plugins/analysis-smartcn.asciidoc

@@ -18,7 +18,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install analysis-smartcn
+sudo bin/elasticsearch-plugin install analysis-smartcn
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -32,7 +32,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove analysis-smartcn
+sudo bin/elasticsearch-plugin remove analysis-smartcn
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 2 - 2
docs/plugins/analysis-stempel.asciidoc

@@ -15,7 +15,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install analysis-stempel
+sudo bin/elasticsearch-plugin install analysis-stempel
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -29,7 +29,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove analysis-stempel
+sudo bin/elasticsearch-plugin remove analysis-stempel
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 1 - 1
docs/plugins/authors.asciidoc

@@ -68,7 +68,7 @@ in the presence of plugins with the incorrect `elasticsearch.version`.
 === Testing your plugin
 
 When testing a Java plugin, it will only be auto-loaded if it is in the
-`plugins/` directory.  Use `bin/plugin install file:///path/to/your/plugin`
+`plugins/` directory.  Use `bin/elasticsearch-plugin install file:///path/to/your/plugin`
 to install your plugin for testing.
 
 You may also load your plugin within the test framework for integration tests.

+ 2 - 2
docs/plugins/delete-by-query.asciidoc

@@ -30,7 +30,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install delete-by-query
+sudo bin/elasticsearch-plugin install delete-by-query
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -43,7 +43,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove delete-by-query
+sudo bin/elasticsearch-plugin remove delete-by-query
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 3 - 3
docs/plugins/discovery-azure.asciidoc

@@ -11,7 +11,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install discovery-azure
+sudo bin/elasticsearch-plugin install discovery-azure
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -25,7 +25,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove discovery-azure
+sudo bin/elasticsearch-plugin remove discovery-azure
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.
@@ -403,7 +403,7 @@ This command should give you a JSON result:
 sudo service elasticsearch stop
 
 # Install the plugin
-sudo /usr/share/elasticsearch/bin/plugin install discovery-azure
+sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install discovery-azure
 
 # Configure it
 sudo vi /etc/elasticsearch/elasticsearch.yml

+ 2 - 2
docs/plugins/discovery-ec2.asciidoc

@@ -11,7 +11,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install discovery-ec2
+sudo bin/elasticsearch-plugin install discovery-ec2
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -25,7 +25,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove discovery-ec2
+sudo bin/elasticsearch-plugin remove discovery-ec2
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 3 - 3
docs/plugins/discovery-gce.asciidoc

@@ -11,7 +11,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install discovery-gce
+sudo bin/elasticsearch-plugin install discovery-gce
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -25,7 +25,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove discovery-gce
+sudo bin/elasticsearch-plugin remove discovery-gce
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.
@@ -216,7 +216,7 @@ Install the plugin:
 [source,sh]
 --------------------------------------------------
 # Use Plugin Manager to install it
-sudo bin/plugin install discovery-gce
+sudo bin/elasticsearch-plugin install discovery-gce
 --------------------------------------------------
 
 Open the `elasticsearch.yml` file:

+ 2 - 2
docs/plugins/lang-javascript.asciidoc

@@ -13,7 +13,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install lang-javascript
+sudo bin/elasticsearch-plugin install lang-javascript
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -27,7 +27,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove lang-javascript
+sudo bin/elasticsearch-plugin remove lang-javascript
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 2 - 2
docs/plugins/lang-python.asciidoc

@@ -12,7 +12,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install lang-python
+sudo bin/elasticsearch-plugin install lang-python
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -26,7 +26,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove lang-python
+sudo bin/elasticsearch-plugin remove lang-python
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 2 - 2
docs/plugins/mapper-attachments.asciidoc

@@ -15,7 +15,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install mapper-attachments
+sudo bin/elasticsearch-plugin install mapper-attachments
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -29,7 +29,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove mapper-attachments
+sudo bin/elasticsearch-plugin remove mapper-attachments
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 2 - 2
docs/plugins/mapper-murmur3.asciidoc

@@ -13,7 +13,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install mapper-murmur3
+sudo bin/elasticsearch-plugin install mapper-murmur3
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -27,7 +27,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove mapper-murmur3
+sudo bin/elasticsearch-plugin remove mapper-murmur3
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 2 - 2
docs/plugins/mapper-size.asciidoc

@@ -13,7 +13,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install mapper-size
+sudo bin/elasticsearch-plugin install mapper-size
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -27,7 +27,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove mapper-size
+sudo bin/elasticsearch-plugin remove mapper-size
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 20 - 20
docs/plugins/plugin-script.asciidoc

@@ -10,15 +10,15 @@ Run the following command to get usage instructions:
 
 [source,shell]
 -----------------------------------
-sudo bin/plugin -h
+sudo bin/elasticsearch-plugin -h
 -----------------------------------
 
 [IMPORTANT]
 .Running as root
 =====================
 If Elasticsearch was installed using the deb or rpm package then run
-`bin/plugin` as `root` so it can write to the appropriate files on disk.
-Otherwise run `bin/plugin` as the user that owns all of the Elasticsearch
+`bin/elasticsearch-plugin` as `root` so it can write to the appropriate files on disk.
+Otherwise run `bin/elasticsearch-plugin` as the user that owns all of the Elasticsearch
 files.
 =====================
 
@@ -36,7 +36,7 @@ Core Elasticsearch plugins can be installed as follows:
 
 [source,shell]
 -----------------------------------
-sudo bin/plugin install [plugin_name]
+sudo bin/elasticsearch-plugin install [plugin_name]
 -----------------------------------
 
 For instance, to install the core <<analysis-icu,ICU plugin>>, just run the
@@ -44,7 +44,7 @@ following command:
 
 [source,shell]
 -----------------------------------
-sudo bin/plugin install analysis-icu
+sudo bin/elasticsearch-plugin install analysis-icu
 -----------------------------------
 
 This command will install the version of the plugin that matches your
@@ -59,7 +59,7 @@ and Sonatype), or from GitHub.  In this case, the command is as follows:
 
 [source,shell]
 -----------------------------------
-sudo bin/plugin install [org]/[user|component]/[version]
+sudo bin/elasticsearch-plugin install [org]/[user|component]/[version]
 -----------------------------------
 
 For instance, to install the https://github.com/lmenezes/elasticsearch-kopf[Kopf]
@@ -67,8 +67,8 @@ plugin from GitHub, run one of the following commands:
 
 [source,shell]
 -----------------------------------
-sudo bin/plugin install lmenezes/elasticsearch-kopf <1>
-sudo bin/plugin install lmenezes/elasticsearch-kopf/2.x <2>
+sudo bin/elasticsearch-plugin install lmenezes/elasticsearch-kopf <1>
+sudo bin/elasticsearch-plugin install lmenezes/elasticsearch-kopf/2.x <2>
 -----------------------------------
 <1> Installs the latest version from GitHub.
 <2> Installs the 1.x version from GitHub.
@@ -80,7 +80,7 @@ plugin from Sonatype, run:
 
 [source,shell]
 -----------------------------------
-sudo bin/plugin install org.elasticsearch.plugin/mapper-attachments/3.0.0 <1>
+sudo bin/elasticsearch-plugin install org.elasticsearch.plugin/mapper-attachments/3.0.0 <1>
 -----------------------------------
 <1> When installing from `download.elastic.co` or from Maven Central/Sonatype, the
     version is required.
@@ -92,7 +92,7 @@ A plugin can also be downloaded directly from a custom location by specifying th
 
 [source,shell]
 -----------------------------------
-sudo bin/plugin install [url] <1>
+sudo bin/elasticsearch-plugin install [url] <1>
 -----------------------------------
 <1> must be a valid URL, the plugin name is determined from its descriptor.
 
@@ -100,7 +100,7 @@ For instance, to install a plugin from your local file system, you could run:
 
 [source,shell]
 -----------------------------------
-sudo bin/plugin install file:///path/to/plugin.zip
+sudo bin/elasticsearch-plugin install file:///path/to/plugin.zip
 -----------------------------------
 
 The plugin script will refuse to talk to an HTTPS URL with an untrusted
@@ -109,7 +109,7 @@ to a local Java truststore and pass the location to the script as follows:
 
 [source,shell]
 -----------------------------------
-sudo bin/plugin -Djavax.net.ssl.trustStore=/path/to/trustStore.jks install https://....
+sudo bin/elasticsearch-plugin -Djavax.net.ssl.trustStore=/path/to/trustStore.jks install https://....
 -----------------------------------
 
 [[listing-removing]]
@@ -122,7 +122,7 @@ A list of the currently loaded plugins can be retrieved with the `list` option:
 
 [source,shell]
 -----------------------------------
-sudo bin/plugin list
+sudo bin/elasticsearch-plugin list
 -----------------------------------
 
 Alternatively, use the {ref}/cluster-nodes-info.html[node-info API] to find
@@ -136,7 +136,7 @@ Plugins can be removed manually, by deleting the appropriate directory under
 
 [source,shell]
 -----------------------------------
-sudo bin/plugin remove [pluginname]
+sudo bin/elasticsearch-plugin remove [pluginname]
 -----------------------------------
 
 After a Java plugin has been removed, you will need to restart the node to complete the removal process.
@@ -167,7 +167,7 @@ can do this as follows:
 
 [source,sh]
 ---------------------
-sudo bin/plugin -Des.path.conf=/path/to/custom/config/dir install <plugin name>
+sudo bin/elasticsearch-plugin -Des.path.conf=/path/to/custom/config/dir install <plugin name>
 ---------------------
 
 You can also set the `CONF_DIR` environment variable to the custom config
@@ -183,13 +183,13 @@ waits. Here is some examples of setting it to different values:
 [source,shell]
 -----------------------------------
 # Wait for 30 seconds before failing
-sudo bin/plugin install mobz/elasticsearch-head --timeout 30s
+sudo bin/elasticsearch-plugin install mobz/elasticsearch-head --timeout 30s
 
 # Wait for 1 minute before failing
-sudo bin/plugin install mobz/elasticsearch-head --timeout 1m
+sudo bin/elasticsearch-plugin install mobz/elasticsearch-head --timeout 1m
 
 # Wait forever (default)
-sudo bin/plugin install mobz/elasticsearch-head --timeout 0
+sudo bin/elasticsearch-plugin install mobz/elasticsearch-head --timeout 0
 -----------------------------------
 
 [float]
@@ -201,7 +201,7 @@ options can be set on the command line:
 
 [source,shell]
 -----------------------------------
-sudo bin/plugin install mobz/elasticsearch-head -DproxyHost=host_name -DproxyPort=port_number
+sudo bin/elasticsearch-plugin install mobz/elasticsearch-head -DproxyHost=host_name -DproxyPort=port_number
 -----------------------------------
 
 On Windows, they need to be added to the `JAVA_OPTS` environment variable:
@@ -209,7 +209,7 @@ On Windows, they need to be added to the `JAVA_OPTS` environment variable:
 [source,shell]
 -----------------------------------
 set JAVA_OPTS="-DproxyHost=host_name -DproxyPort=port_number"
-bin/plugin install mobz/elasticsearch-head
+bin/elasticsearch-plugin install mobz/elasticsearch-head
 -----------------------------------
 
 === Settings related to plugins

+ 2 - 2
docs/plugins/repository-azure.asciidoc

@@ -12,7 +12,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install repository-azure
+sudo bin/elasticsearch-plugin install repository-azure
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -26,7 +26,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove repository-azure
+sudo bin/elasticsearch-plugin remove repository-azure
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 2 - 2
docs/plugins/repository-hdfs.asciidoc

@@ -12,7 +12,7 @@ This plugin can be installed through the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install repository-hdfs
+sudo bin/elasticsearch-plugin install repository-hdfs
 ----------------------------------------------------------------
 
 The plugin must be installed on _every_ node in the cluster, and each node must
@@ -26,7 +26,7 @@ The plugin can be removed by specifying the _installed_ package:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove repository-hdfs
+sudo bin/elasticsearch-plugin remove repository-hdfs
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 2 - 2
docs/plugins/repository-s3.asciidoc

@@ -12,7 +12,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install repository-s3
+sudo bin/elasticsearch-plugin install repository-s3
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -26,7 +26,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove repository-s3
+sudo bin/elasticsearch-plugin remove repository-s3
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 2 - 2
docs/plugins/store-smb.asciidoc

@@ -11,7 +11,7 @@ This plugin can be installed using the plugin manager:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin install store-smb
+sudo bin/elasticsearch-plugin install store-smb
 ----------------------------------------------------------------
 
 The plugin must be installed on every node in the cluster, and each node must
@@ -25,7 +25,7 @@ The plugin can be removed with the following command:
 
 [source,sh]
 ----------------------------------------------------------------
-sudo bin/plugin remove store-smb
+sudo bin/elasticsearch-plugin remove store-smb
 ----------------------------------------------------------------
 
 The node must be stopped before removing the plugin.

+ 2 - 2
docs/reference/migration/migrate_2_0/packaging.asciidoc

@@ -32,7 +32,7 @@ the foreground, was deprecated in 1.0 and removed in 2.0.
 
 ==== `V` for version
 
-The `-v` parameter now means `--verbose` for both `bin/plugin` and
+The `-v` parameter now means `--verbose` for both `bin/elasticsearch-plugin` and
 `bin/elasticsearch` (although it has no effect on the latter).  To output the
 version, use `-V` or `--version` instead.
 
@@ -52,7 +52,7 @@ Official plugins can be installed as follows:
 
 [source,sh]
 ---------------
-sudo bin/plugin install analysis-icu
+sudo bin/elasticsearch-plugin install analysis-icu
 ---------------
 
 Community-provided plugins can be installed as before.

+ 4 - 4
docs/reference/migration/migrate_2_0/removals.asciidoc

@@ -38,7 +38,7 @@ can install the plugin with:
 
 [source,sh]
 ------------------
-./bin/plugin install delete-by-query
+./bin/elasticsearch-plugin install delete-by-query
 ------------------
 
 See {plugins}/plugins-delete-by-query.html for more information.
@@ -55,7 +55,7 @@ still need to use multicast discovery, you can install the plugin with:
 
 [source,sh]
 ------------------
-./bin/plugin install discovery-multicast
+./bin/elasticsearch-plugin install discovery-multicast
 ------------------
 
 ==== `_shutdown` API
@@ -70,7 +70,7 @@ out of core and is available as a plugin. It can be installed as:
 
 [source,sh]
 ------------------
-./bin/plugin install mapper-murmur3
+./bin/elasticsearch-plugin install mapper-murmur3
 ------------------
 
 ==== `_size` is now a plugin
@@ -81,7 +81,7 @@ can be installed as:
 
 [source,sh]
 ------------------
-./bin/plugin install mapper-size
+./bin/elasticsearch-plugin install mapper-size
 ------------------
 
 ==== Thrift and memcached transport

+ 1 - 1
docs/reference/migration/migrate_2_0/settings.asciidoc

@@ -182,7 +182,7 @@ The location of a custom config directory may be specified as follows:
 [source,sh]
 --------------
 ./bin/elasticsearch --path.conf=/path/to/conf/dir
-./bin/plugin -Des.path.conf=/path/to/conf/dir install analysis-icu
+./bin/elasticsearch-plugin -Des.path.conf=/path/to/conf/dir install analysis-icu
 --------------
 
 When using the RPM or debian packages, the plugin script and the

+ 2 - 0
docs/reference/migration/migrate_3_0.asciidoc

@@ -331,6 +331,8 @@ disable doc values is by using the `doc_values` property of mappings.
 [[breaking_30_plugins]]
 === Plugin changes
 
+The command `bin/plugin` has been renamed to `bin/elasticsearch-plugin`.
+
 ==== Site plugins removed
 
 Site plugins have been removed. It is recommended to migrate site plugins to Kibana plugins.

+ 6 - 6
qa/vagrant/src/test/resources/packaging/scripts/plugin_test_cases.bash

@@ -85,10 +85,10 @@ fi
 
 @test "[$GROUP] install jvm-example plugin with a custom CONFIG_FILE and check failure" {
     local relativePath=${1:-$(readlink -m jvm-example-*.zip)}
-    CONF_FILE="$ESCONFIG/elasticsearch.yml" run sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/plugin" install "file://$relativePath"
+    CONF_FILE="$ESCONFIG/elasticsearch.yml" run sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/elasticsearch-plugin" install "file://$relativePath"
     # this should fail because CONF_FILE is no longer supported
     [ $status = 1 ]
-    CONF_FILE="$ESCONFIG/elasticsearch.yml" run sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/plugin" remove jvm-example
+    CONF_FILE="$ESCONFIG/elasticsearch.yml" run sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/elasticsearch-plugin" remove jvm-example
     echo "status is $status"
     [ $status = 1 ]
 }
@@ -170,7 +170,7 @@ fi
   local JAVA=$(which java)
 
   sudo chmod -x $JAVA
-  run "$ESHOME/bin/plugin"
+  run "$ESHOME/bin/elasticsearch-plugin"
   sudo chmod +x $JAVA
 
   [ "$status" -eq 1 ]
@@ -264,7 +264,7 @@ fi
 }
 
 @test "[$GROUP] check the installed plugins can be listed with 'plugins list' and result matches the list of plugins in plugins pom" {
-    "$ESHOME/bin/plugin" list | tail -n +2 | sed 's/^......//' > /tmp/installed
+    "$ESHOME/bin/elasticsearch-plugin" list | tail -n +2 | sed 's/^......//' > /tmp/installed
     compare_plugins_list "/tmp/installed" "'plugins list'"
 }
 
@@ -389,7 +389,7 @@ fi
 
 @test "[$GROUP] install jvm-example with different logging modes and check output" {
     local relativePath=${1:-$(readlink -m jvm-example-*.zip)}
-    sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/plugin" install "file://$relativePath" > /tmp/plugin-cli-output
+    sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/elasticsearch-plugin" install "file://$relativePath" > /tmp/plugin-cli-output
     local loglines=$(cat /tmp/plugin-cli-output | wc -l)
     if [ "$GROUP" == "TAR PLUGINS" ]; then
     # tar extraction does not create the plugins directory so the plugin tool will print an additional line that the directory will be created
@@ -408,7 +408,7 @@ fi
     remove_jvm_example
 
     local relativePath=${1:-$(readlink -m jvm-example-*.zip)}
-    sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/plugin" install "file://$relativePath" -Des.logger.level=DEBUG > /tmp/plugin-cli-output
+    sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/elasticsearch-plugin" install "file://$relativePath" -Des.logger.level=DEBUG > /tmp/plugin-cli-output
     local loglines=$(cat /tmp/plugin-cli-output | wc -l)
     if [ "$GROUP" == "TAR PLUGINS" ]; then
         [ "$loglines" -gt "7" ] || {

+ 2 - 2
qa/vagrant/src/test/resources/packaging/scripts/plugins.bash

@@ -32,7 +32,7 @@ install_plugin() {
 
     assert_file_exist "$path"
 
-    sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/plugin" install "file://$path"
+    sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/elasticsearch-plugin" install "file://$path"
 
     assert_file_exist "$ESPLUGINS/$name"
     assert_file_exist "$ESPLUGINS/$name/plugin-descriptor.properties"
@@ -60,7 +60,7 @@ remove_plugin() {
     local name=$1
 
     echo "Removing $name...."
-    sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/plugin" remove $name
+    sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/elasticsearch-plugin" remove $name
 
     assert_file_not_exist "$ESPLUGINS/$name"
 

+ 1 - 1
qa/vagrant/src/test/resources/packaging/scripts/tar.bash

@@ -82,7 +82,7 @@ verify_archive_installation() {
     assert_file "$ESHOME/bin" d
     assert_file "$ESHOME/bin/elasticsearch" f
     assert_file "$ESHOME/bin/elasticsearch.in.sh" f
-    assert_file "$ESHOME/bin/plugin" f
+    assert_file "$ESHOME/bin/elasticsearch-plugin" f
     assert_file "$ESCONFIG" d
     assert_file "$ESCONFIG/elasticsearch.yml" f
     assert_file "$ESCONFIG/logging.yml" f