-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
new plugins pack strategy proposal #4787
Comments
After discussing this with @purbon, @ph and @suyograo we think this strategy for basic offline plugins installation could potentially be a good alternative and solve what I call the impedance problems, or dependencies conflicts, we potentially introduce when manipulating the bundler files directly. One use-case where this will not work is with x-packs where the requirement is to provide plugin packs that support offline installation but in an additive way. This mean that it should be possible to install a logstash x-pack on-top of a current logstash installation that has installed plugins and also support this in offline mode. The above strategy completely swaps the bundler state so if we apply this strategy to x-packs, the current logstash installed plugins would be lost. It seems that the only way we think this will be possible is to still support injecting bundler's cache to install new plugins on top of a current installation.To minimize potential dependency conflicts, which is the initial problem we are trying to solve above by avoiding directly playing with Bundler's state, we think that enforcing stricter dependencies versions constrains for all core gems and all plugins within a released version and creating a more relaxed conflict resolution class in Bundler (as supported in recent/upcoming versions) we would probably avoid dependency conflicts. |
The PR #6404 and the issue #6393 align with the your proposed additive strategy and also don't impact the ruby cache. The code in #6404 does the following (high level view): Logstash with internet
Offline Logstash
Generating an X-packs and generating an offline pack uses the same creation code in https://github.com/elastic/logstash/tree/master/tools/paquet Both artifact uses the same file structure and so it goes with the same install path.
This is still an open question that might come in the real world usage. I'll will close this issue thanks @colinsurprenant for the write up and the discussion that lead to #6404. |
this idea applies to both offline plugins installation and eventual pre-packaged plugins packs themes.
This is an extract of the conversation in #4779 which derails the original PR intent.
The problem we are facing with our offline installation process is that by disrupting Bundler's state by either cleaning
*.gem
files or simply by installing or updating plugins on one side and trying to pack the resulting installation and move it to another target installation to provide the ability to install these new plugins in an offline way, we create an impedance mismatch between 2 different bundler states. TheGemfile
andGemfile.jruby-1.9.lock
does not match the current state as just unpacked on the target installation. This result in problems as described in #4651 and #4779.One of the original problem is the cleaning of the Bundler cache at artifact generation:
*.gem
file are discarded from the artifact creation.bin/plugin pack
andbin/plugin unpack
commands freezes and restores the complete plugins state, includingGemfile
andGemfile.jruby-1.9.lock
and this would allows just running logstash on the target system exactly as it was on the source system without having to do anybin/plugin install
orbin/plugin update
command after thebin/plugin unpack
. We would just document thatbin/plugin install
orbin/plugin update
require connectivity. I don't thinks it actually make sense to supportbin/plugin install
orbin/plugin update
offline!*.gem
files at packaging time, we could ship the core logstash package without any plugins or just a very limited set of core plugins including their.gem
files and provide a few additional plugins packages that can be downloaded and installed the same way as (4). Obviously one of these additional package would be the infamous "default" plugins package that would be pretty big since it would also include all the.gem
files but since its an optional and non essential download, it would be acceptable and we would also provide other smaller plugins combinations packages like a "getting started" that would cover the courses and workshop, etc.With such a pack, there would be no installing or updating individual plugins, to update or install a new plugin, the pack plugins state could be (recreated and) moved back to another connected machine, unpacked, perform new plugin install or update, repacked and moved back to the disconnected machine.
Let me sequence the new workflow under that idea:
bin/plugin pack
bin/plugin unpack
Now if you need to update a single plugins. there are 2 possibilities:
bin/plugin unpack
bin/plugin pack
bin/plugin pack
on disconnected logstashbin/plugin unpack
bin/plugin pack
The text was updated successfully, but these errors were encountered: