-
Notifications
You must be signed in to change notification settings - Fork 4.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
[Elastic Agent] Add the ability to run the Fleet Server #23736
Conversation
Pinging @elastic/agent (Team:Agent) |
b9822f7
to
136fb85
Compare
Pinging @elastic/ingest-management (Team:Ingest Management) |
- remove_key: | ||
key: output | ||
|
||
- select_into: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the output directly as part of the input would also simplify the spec file here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would still need to be moved because the output is a top-level key to Fleet Server.
I also don't think we want that, because we do not want to send username/password from the input. That also would have a chicken-n-egg problem of getting that information initially.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This goes back to a previous discussion. I think the fleet-server config should be designed and optimised for what is needed for Elastic Agent. So either it directly supports input as the default or it maps it internally. But the translation should not be up to the Elastic Agent. It can be a temporary solution for now.
Not sure I follow the chicken-egg part around username / password? Can you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fleet Server does all of that. It has a top level inputs
just like Elastic Agent. The issue is the output, which is also top level output
and matches Elastic Agent.
The issue is on start-up there is no output, because Elastic Agent has not enrolled but Fleet Server needs to connect to an output so that the Elastic Agent can enroll.
- remove_key: | ||
key: server | ||
|
||
- map: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I would expect this spec file to only require the input routing to fleet-server. Why is this needed? Is this something we just add for every input automatically and because of this need to remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes every input automatically gets these items from Elastic Agent, so they need to be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change looks ok
@@ -64,3 +64,4 @@ | |||
- Log level reloadable from fleet {pull}22690[22690] | |||
- Push log level downstream {pull}22815[22815] | |||
- Add metrics collection for Agent {pull}22793[22793] | |||
- Add support for Fleet Server {pull} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fill in PR number
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
/test |
* Add the ability to run the Fleet Server. * Add test and changelog. * Fix changelog. (cherry picked from commit d59f780)
… Fleet Server (#23785) * [Elastic Agent] Add the ability to run the Fleet Server (#23736) * Add the ability to run the Fleet Server. * Add test and changelog. * Fix changelog. (cherry picked from commit d59f780) * Fixed monitoring filebeat and metricbeat not connecting to Agent over GRPC (#23843) Fixed monitoring filebeat and metricbeat not connecting to Agent over GRPC (#23843) Co-authored-by: Michal Pristas <michal.pristas@gmail.com>
What does this PR do?
Adds the ability for Fleet Server to be started by Elastic Agent.
This just adds the basics for Fleet Server to be ran by Elastic Agent. This does not handle the enrollment piece of starting Fleet Server to perform the enrollment for the running Elastic Agent parent. That work will be present in a follow up branch.
This provides enough for the Fleet Server to be started by the Elastic Agent and for the release manager build of Elastic Agent to include the Fleet Server.
The Fleet Server requires a custom output configuration for elasticsearch because Fleet Server requires custom permissions and connection information before Elastic Agent has even enrolled into Fleet. This can currently be set manually in the
fleet.yml
once the Elastic Agent is enrolled in the current Kibana.The follow up branch will handle writing the
fleet.server.output.elasticsearch
into thefleet.yml
.Why is it important?
Needed so Elastic Agent can run the Fleet server.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues
Logs