-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Fleet] Add support for bundling Stack-version aligned packages with Kibana #112095
Comments
Pinging @elastic/fleet (Team:Fleet) |
Is package-storage still relevant for these packages once they're bundled in Kibana? Can we skip package-storage and go straight to Kibana? This is what I had in mind for APM. A few options come to mind for how to do this:
For APM, if there's an issue with the package that needs fixing it should go into the next stack patch or minor release. I don't know about other stack-aligned packages (@ruflin?) but I would have thought the same would apply there. |
If we don't need the ability to upgrade these packages out-of-band from stack releases (to fix a bug for instance), then I agree we can skip package-storage completely and just sync with the Kibana repository.
This is the option I would prefer so that we can test this in development easily without requiring a nightly build.
As I mentioned above, if we don't need this ability, I totally agree. We've been shipping the APM product without the ability to update ingest pipelines and templates out-of-band from Stack releases for some time now, so I think we'd be safe to hold off on supporting both. |
SGTM. We would also want to be able to override what's in the Kibana image when running tests in apm-server. e.g. by bind-mounting a package into the Kibana Docker container. |
Makes sense, we'll make sure we document where these files are kept on disk for this use case. |
I expect the packages we ship with Kibana to also be available in the registry. This has the side effect that assuming someone is on 7.20.0 and the package 7.20.1 comes up, it could be installed. But the package itself should always only be compatible within the same minor. I would expect this could also become helpful during testing to test upgrades. For the testing the other part is to be able to upload a package to Kibana. It is a feature that partially exist today but will likely be improved in the context of getting this feature done. Having this would eliminate the problem of bind-mount packages into Kibana potentially. |
High-level implementation planChecking in here with a high-level plan for the Fleet team's implementation. Our immediately obtainable goals for this are:
Thinking about these goals from a minimum viable implementation, we're going to pursue the following:
For the initial implementation, any updates to the bundled packages will be manual through GitHub PR's. As an immediate follow-up we'd like to implement some automation that allows us to do the following on a nightly basis:
Current state of the “Install Package by Upload” featureAs Ruflin mentioned above:
Fleet currently includes an API endpoint that allows for the installation of packages via upload. This endpoint simply takes the entire request body, converts it to a Relevant code: I'm continuing to work on auditing the current landscape of the upload feature in the Fleet code. Mainly, I want to track down areas and potential breakages that don't account for packages installed via upload instead of the registry. We have some branching logic, etc, that might introduce concerns that should be documented. |
Can this be implemented to pull the latest versions from |
Yes this shouldn't be a problem. We can make it clear in the manual process that bundled packages should come from staging, and then when we automate the process enforce the same rule. Thanks for the clarity here! |
@kpollich defining the flow in more detail, we suggest to even fetch from |
Please be aware that the Ecosystem team is going to get rid of the Package Storage repository (deprecate) and replace it with GCP buckets. The entire solution will be fully automated and won't require any manual interaction. We have also decided to get rid of stages and keep all packages in the flat space. Stages will be replaced with semver rules. Long story short, a package can be released or "prereleased", Kibana decides whether include prerelease packages in their listing. |
ping @ruflin |
One thing I want to be clear on here is that this effort does not add support for installing bundled packages from the UI or API. This will only support installing packages via setting This means that new clusters set up in air-gapped environments would either need to use the appropriate If installing bundled packages via the UI or API is desired, we will need to consider that separate and discuss the product and technical implications. |
Yes, it was and still is desired, as it will simplify the development workflow for elastic-package. We can take it to a separate discussion :) cc @jsoriano |
For ECE the |
Yes, the ECE scenario should work. We should include this in our test plan for 8.1 testing. @dikshachauhan-qasource do you all have experience testing against ECE? |
Hello all, I'm adding some notes on our follow-up implementation to this process in 8.2 below. In 8.1, we're shipping #122297 - which contains a "first-step" implementation with baseline support for bundled packages as a concept. We're checking in zip archives of a hard-coded set of packages to the Kibana git repo and handling upgrades manually via pull requests. This is not an ideal process for a few reasons:
So, moving forward in 8.2, the Fleet team will be expanding upon our initial implementation to solve these pain points. We're proposing an implementation that enhances Kibana's bootstrap process with a step to resolve bundled packages. We'll add a step to Kibana's bootstrap process that does the following:
An open question I still have is how we should determine the EPR endpoint to fetch from. Fleet does have some existing logic we use to determine which registry endpoint we fetch from elsewhere that might be applicable here as well:
@simitt mentioned previously that we should always fetch from Happy to hear any other thoughts folks might have on the matter as we look forward to a more fleshed-out implementation here. |
In the nearest future, we won't have different endpoints and will store packages in the same flat space (
Considering current deployment rules, it sounds reasonable. Revisions in production should be mature enough. If we decide to go with |
We could just avoid this decision for now by requiring the full URL in the manifest of bundled packages. This would allow package owners to point to any location for the time being until we move to a single registry + semver. |
Hi @joshdover We have not done any specific testing against ECE, however, If you can specify details around it, then we can test that out. Further, we are working upon creating proposed test cases around this ticket and have created at 8.1 Feature Proposed Testcases Could you please take some time to look and confirm, if coverage done there is enough or we are missing anything. Thanks |
Hi @joshdover We have created the future test cases for this ticket and uploaded the same on testrail. Please find below the test cases link: Further, we will create more test cases, if required. Thanks! |
We've delayed the changes to support air-gapped ECE to 8.2, so that can wait. |
I'm closing this parent issue. Further enhancements will be handled in their own issues and backlink here when appropriate. Thanks, all. |
Hi Team Note: This feature is not fully merged now. We will be retesting it on the release build once the feature will get merge. Thanks! |
In #111858 we will be adding support for automatically upgrading a few select packages when Kibana upgrades (or downgrades) to ensure that Stack features that depend on package ingest assets being installed (specifically, index templates and ingest pipelines) will work correctly when a user upgrades Kibana. This is necessary for Kibana features to work correctly, for example new features in the APM UI that depend on new fields that were added in the same Stack version.
To improve the reliability of Stack upgrades, we eventually want to make some changes to this upgrade-on-boot process:
Challenges
Related
The text was updated successfully, but these errors were encountered: