Introduce declarative plugin management (#77544)#80734
Merged
elasticsearchmachine merged 1 commit intoelastic:7.16from Nov 15, 2021
Merged
Introduce declarative plugin management (#77544)#80734elasticsearchmachine merged 1 commit intoelastic:7.16from
elasticsearchmachine merged 1 commit intoelastic:7.16from
Conversation
Closes elastic#70219. Introduce a declarative way for the Elasticsearch server to manage plugins, which reads the `elasticsearch-plugins.yml` file and works which out plugins need to be added and / or removed to match the configuration. Also make it possible to configure a proxy in the config file, instead of through the environment. Most of the work of adding and removing is still done in the `InstallPluginAction` and `RemovePluginAction` classes, so the behaviour should be the same as with the `install` and `remove` commands. However, these commands will now abort if the above config file exists. The intent is to make it harder for the configuration to drift. This new method only applies to `docker` distribution types at the moment. Since this syncing mechanism declarative, rather than imperative, the Cloud-specific plugin wrapper script is no longer required. Instead, an environment variable informs `InstallPluginAction` to install plugins from an archive directory instead of downloading them, where possible.
Collaborator
|
Pinging @elastic/es-delivery (Team:Delivery) |
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
elasticsearchmachine
pushed a commit
that referenced
this pull request
Nov 15, 2021
Use order agnostic assertion when testing plugin installation. https://gradle-enterprise.elastic.co/s/57wwszvhfzwnw/tests/:qa:os:destructiveDistroTest.default-dockerCloud/org.elasticsearch.packaging.test.DockerTests/test022InstallPlugin @pugnascotia This will likely need to be included in your backport of #80734
pugnascotia
pushed a commit
that referenced
this pull request
Nov 16, 2021
Use order agnostic assertion when testing plugin installation. https://gradle-enterprise.elastic.co/s/57wwszvhfzwnw/tests/:qa:os:destructiveDistroTest.default-dockerCloud/org.elasticsearch.packaging.test.DockerTests/test022InstallPlugin @pugnascotia This will likely need to be included in your backport of #80734
mark-vieira
added a commit
to mark-vieira/elasticsearch
that referenced
this pull request
Nov 16, 2021
Use order agnostic assertion when testing plugin installation. https://gradle-enterprise.elastic.co/s/57wwszvhfzwnw/tests/:qa:os:destructiveDistroTest.default-dockerCloud/org.elasticsearch.packaging.test.DockerTests/test022InstallPlugin @pugnascotia This will likely need to be included in your backport of elastic#80734 # Conflicts: # qa/os/src/test/java/org/elasticsearch/packaging/test/DockerTests.java
elasticsearchmachine
pushed a commit
that referenced
this pull request
Nov 16, 2021
* Fix DockerTests.test022InstallPlugin assertion (#80741) Use order agnostic assertion when testing plugin installation. https://gradle-enterprise.elastic.co/s/57wwszvhfzwnw/tests/:qa:os:destructiveDistroTest.default-dockerCloud/org.elasticsearch.packaging.test.DockerTests/test022InstallPlugin @pugnascotia This will likely need to be included in your backport of #80734 # Conflicts: # qa/os/src/test/java/org/elasticsearch/packaging/test/DockerTests.java * Fix compiler error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #77544.
Closes #70219.
Introduce a declarative way for the Elasticsearch server to manage plugins,
which reads the
elasticsearch-plugins.ymlfile and works which outplugins need to be added and / or removed to match the configuration. Also
make it possible to configure a proxy in the config file, instead of
through the environment.
Most of the work of adding and removing is still done in the
InstallPluginActionandRemovePluginActionclasses, so thebehaviour should be the same as with the
installandremovecommands. However, these commands will now abort if the above config
file exists. The intent is to make it harder for the configuration
to drift.
This new method only applies to
dockerdistribution types at themoment.
Since this syncing mechanism declarative, rather than imperative,
the Cloud-specific plugin wrapper script is no longer required.
Instead, an environment variable informs
InstallPluginActiontoinstall plugins from an archive directory instead of downloading
them, where possible.