-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Better support for installing plugins in ephemeral environments #66474
Comments
Pinging @elastic/es-delivery (Team:Delivery) |
Pinging @elastic/es-core-infra (Team:Core/Infra) |
We discussed this at length with folks from @elastic/cloud-delivery. There are basically two general solutions here w/o getting too much into details:
The general sentiment of the Elasticsearch team is to avoid option (1). Plugins are packaged and distributed separately from Elasticsearch for a reason, there are many of them (20) and they support very specific and often times mutually exclusive use cases. There is quite simply never a need to use most of these plugins. Eagerly including them in our generic Docker image would increase it's size by 118MB and provide little or no benefit the vast majority of the time. The preference would be some variation of (2) where Elasticsearch would produce an artifact server as another Docker image. ES installs in cloud would then be configured to install plugins from that local server. There are still some details to figure out here such as would such a thing be per Cloud environment or per cluster, how do we describe such an "internal" component in stack packs, does this align well with our plans for cloud-first testing, etc. In any case, we need to make a decision here because obviously (2) is probably going to mean some additional effort from both ES and Cloud delivery teams. cc @bleskes |
What changes are we imagining on the ES side? I ask because we already support installing plugins via a proxy. If ESS could make a suitably-configured proxy available and call |
@pugnascotia we would prefer a more declarative approach for cloud, where we can specify the plugins we want to have install rather imperatively adding and removing plugins. The other consideration is that we always install at least some plugins in cloud ( e.g. repository-<> ) and we are sensitive to how long it takes as it delays the time it takes to create a deployment. We discussed implementing this as a remove + add operation in the call that would work from a cloud perspective as long as it doesn't delay the time it takes to create the deployment. Calling We looked at the potential of using the download service too and do on-line installation of plugins (air-gaped installations would be required to provide their own proxy/mirror, similar to how they provide their own repository). In the testing we did on a staging allocator, it took |
I ran into this Today:
We need to take pre-releases into account too in the context of cloud first testing. |
Right, that won't work because you're attempting to install the latest released version of I think if the intention is to install these plugins from some proxy/mirror/etc, then for several reasons like what Alpar ran into above, and cloud-first testing, that said proxy should be produced by Elasticsearch itself so that pre-release plugins can also be distributed/installed in ESS. |
I don't think that is the case, though the error message is poor here. The plugin installer knows that ES is a snapshot, and in that case tries to form an appropriate staging url to find the plugin at. Yet there is no staging hash passed in, so we bail. All that is required is passing in the staging hash. However, in this case, it looks like this is not a staged released, but just a daily snapshot. We don't currently support that since snapshots have no unique identifier for one day vs another (each snapshot overwrites the previous day in the artifacts backend). If we had snapshots prefixed by hash (which was the plan long ago for the artifacts service, but I don't think ever got implemented), then simply passing in that hash would make this all work, no need for an additional proxy. Having such a proxy, especially with the expectation that ES owns it, seems very heavyweight to me for something just for testing snapshots. It's not something we want users to ever do, hence why we guarded it with the hash so that there is no possibility of trying to install a newer snapshot of a plugin that is incompatible and can fail in mysterious ways. |
Ah, thanks for the clarification on that, Ryan. |
I feel like we've stalled a bit on this conversation. @alpar-t I think we need to escalate this within the cloud team to arrive at a consensus on which direction to take here. |
I think we can close this in favour of #70219. |
Hi Just for your information, we do publish daily snapshots with unique identifiers. The Docker images are available through our Docker UI . For example, by using the latest snapshot version and adding the environment variable
I hope that helps. |
Actually, I was forgetting that this issue also covers installing snapshot plugins. |
Unless I am misunderstanding the context here, I believe every snapshot does have a unique identifier as a prefix in the form of build-id: |
@Conky5 @mgreau I'm glad to hear this! My knowledge is outdated. It looks like this may be possible now. Looking at a recent snapshot as an example, the
So, I think we can update the plugin installer to work in this case. We will still need the hash, but it will work very similarly to the build candidate support, just with a different base. |
Is this issue still needed to complement #70219 and have the proposed declarative way of installing plugins also honor build Ids ? |
Closing in favour of #70219. |
In environments where an Elasticsearch node is ephemeral, e.g. containerisation with Docker, it isn't always desirable or even possible to reach out to the internet to install plugins when the container starts. We would like to have some concept or support for "bundling" plugins, or otherwise making it easier to install plugins on what could be a short-lived ES node.
An additional complication is support for air-gapped environments, where an ES node cannot simply reach out to the internet to download a plugin.
The text was updated successfully, but these errors were encountered: