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

[Fleet] Remove fleetServerEnabled feature flag and use fleet system indices #92422

Merged

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Feb 23, 2021

Summary

Resolve #92422

In 7.13 we are going to make Fleet Server the default way to use Elastic Agent, in preparation of this, that PR:

  • Remove the fleetServerEnabled flag
  • Make using the fleet system indices
  • remove unused code that used old Saved object.

This PR should not break anything as the kibana agents endpoint are still here (I will remove this endpoints in a following PR, after syncing with folks from endpoint and elastic package to ensure we do not break anything)

What to test?

You should be able to enroll agent throught Kibana as usual.

You should be able to enroll agent through Fleet server using the default Policy server see (TODO add link to fleet server readme)

@nchaulet nchaulet added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.13.0 labels Feb 23, 2021
@nchaulet nchaulet self-assigned this Feb 23, 2021
@nchaulet nchaulet force-pushed the feature-fleet-server-indices-by-default branch from ca50600 to 1845afa Compare February 23, 2021 18:18
@nchaulet nchaulet force-pushed the feature-fleet-server-indices-by-default branch from 1845afa to 3c28588 Compare February 23, 2021 19:54
@nchaulet nchaulet changed the title [Fleet] Use fleet server indices by default [Fleet] Remove fleetServerEnabled feature flag and use fleet system indices Feb 23, 2021
@nchaulet nchaulet force-pushed the feature-fleet-server-indices-by-default branch 3 times, most recently from 7fbec05 to 35b583d Compare February 24, 2021 16:43
@nchaulet nchaulet force-pushed the feature-fleet-server-indices-by-default branch from 35b583d to f89b0db Compare February 24, 2021 18:12
@nchaulet nchaulet marked this pull request as ready for review February 25, 2021 16:40
@nchaulet nchaulet requested review from a team as code owners February 25, 2021 16:40
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@jen-huang jen-huang added release_note:breaking and removed release_note:skip Skip the PR/issue when compiling release notes labels Mar 1, 2021
@jen-huang
Copy link
Contributor

I added release note breaking tag, but actually I am not sure. Looks like the Kibana API routes will remain in place during this PR, are there actually any breaking changes here? Will Kibana API routes be removed during this release too?

@nchaulet
Copy link
Member Author

nchaulet commented Mar 1, 2021

@jen-huang thanks for adding the label, that PR will not remove the API routes, I would create a follow up PR that remove APIs as soon we are in sync with other teams that use Fleet, I will make sure to add the release note here.

Copy link
Contributor

@skh skh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 for the collector change, thanks!

@nchaulet
Copy link
Member Author

nchaulet commented Mar 2, 2021

@mtojek @EricDavisX I do not think agents saved object are directly used in tests or in elastic-package so we should be good right?

@mtojek
Copy link
Contributor

mtojek commented Mar 2, 2021

@mtojek @EricDavisX I do not think saved object are directly used in tests or in elastic-package so we should be good right?

elastic-package:
We used to visit/fetch saved objects for exporting purposes (elastic-package export) and checking installed assets (asset tests). /cc @ycombinator

@nchaulet
Copy link
Member Author

nchaulet commented Mar 2, 2021

elastic-package:
We used to visit/fetch saved objects for exporting purposes (elastic-package export) and checking installed assets (asset tests).

Sorry I should have precised Fleet saved object like agents, enrolment api keys.

@EricDavisX
Copy link
Contributor

@mtojek @EricDavisX I do not think [Fleet] agents saved object [like Agents, enrollment api keys] are directly used in tests or in elastic-package so we should be good right?

The e2e-testing scenarios do use the API to enroll / install agents and manipulate / apply policy, I suppose that would be impacted? I regret we don't have e2e-testing embedded into Kibana CI yet. But any manual testing done should cover the same usage right? should we use Observability 'deploy my pr' and test on this a bit to be sure?

paul-tavares added a commit to paul-tavares/artifact-downloader that referenced this pull request Mar 2, 2021
Copy link
Contributor

@paul-tavares paul-tavares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nchaulet for making the changes in endpoint - those in this PR look good.

There are, however, several others that need to be done. Here is what I found:

  • search for fleet- (the prefix to all saved object types): you will find several KQL filters (kuery=) that need to have the SO type removed from it.
  • search for _SAVED_OBJECT_TYPE (the suffix of the const's that hold saved object type names): you will see several other areas that use those and thus also need to be adjusted

I found these in both security solution as well as in the functional test folders.

@mtojek
Copy link
Contributor

mtojek commented Mar 3, 2021

@nchaulet

Sorry I should have precised Fleet saved object like agents, enrolment api keys.

Speaking about agents, I think the deepest level the elastic-package is interacting is FleetAPI :) For reference: https://github.com/elastic/elastic-package/blob/master/internal/kibana/agents.go#L100

BTW I really appreciate the heads up, thanks!

@nchaulet
Copy link
Member Author

nchaulet commented Mar 3, 2021

@paul-tavares I just did a pass to remove the fleet-agents: from endpoint, there is still one in the data collector, but I know there is already some work on your side to change that (#92311)

@nchaulet nchaulet requested a review from paul-tavares March 3, 2021 16:57
Copy link
Contributor

@paul-tavares paul-tavares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay @nchaulet . Looks good. Thanks for making the changes in Endpoint

@nchaulet
Copy link
Member Author

nchaulet commented Mar 5, 2021

@elasticmachine merge upstream

@nchaulet
Copy link
Member Author

nchaulet commented Mar 5, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 755.6KB 754.7KB -956.0B
securitySolution 7.8MB 7.8MB -39.0B
total -995.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 367.6KB 367.3KB -259.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @nchaulet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants