Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce declarative plugin management (#77544) #80734

Merged

Conversation

pugnascotia
Copy link
Contributor

Backport of #77544.

Closes #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.

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.
@pugnascotia pugnascotia added >feature :Core/Infra/Plugins Plugin API and infrastructure backport :Delivery/Cloud Cloud-specific packaging and deployment auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) v7.16.0 labels Nov 15, 2021
@elasticmachine elasticmachine added Team:Delivery Meta label for Delivery team Team:Core/Infra Meta label for core/infra team labels Nov 15, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine elasticsearchmachine merged commit 0724109 into elastic:7.16 Nov 15, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :Core/Infra/Plugins Plugin API and infrastructure :Delivery/Cloud Cloud-specific packaging and deployment >feature Team:Core/Infra Meta label for core/infra team Team:Delivery Meta label for Delivery team v7.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants