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

Define a feature flag for enabling the shipper in the agent policy, defaulting to false. #217

Closed
3 tasks
Tracked by #189 ...
ph opened this issue Mar 17, 2022 · 16 comments · Fixed by #1527
Closed
3 tasks
Tracked by #189 ...

Define a feature flag for enabling the shipper in the agent policy, defaulting to false. #217

ph opened this issue Mar 17, 2022 · 16 comments · Fixed by #1527
Assignees
Labels
estimation:Day Task that represents a day of work. Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team V2-Architecture v8.6.0

Comments

@ph
Copy link
Contributor

ph commented Mar 17, 2022

I should be able to turn on or off the possibility to run Elastic Agent with or without the new shipper.

Deliverables:

  • Using an option in the Agent policy, allow someone to configure it via Fleet so multiples Agent can be switched remotely.
  • Turn on via an environment variable, so you can try it on a single agent.
  • Documentation
@ph ph added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Mar 17, 2022
@ph
Copy link
Contributor Author

ph commented Mar 17, 2022

@jlind23 When the plan is fixed we need to synchronize with the Fleet team to make this option available in fleet.

@jlind23
Copy link
Contributor

jlind23 commented Mar 21, 2022

@ph what about the timing? Should we sneak it into 8.3 as part of the shipper work?

@ph
Copy link
Contributor Author

ph commented Mar 21, 2022

I believe so, note depending on the timing we could have it in the fleet UI in 8.4.

@jlind23
Copy link
Contributor

jlind23 commented Apr 28, 2022

@blakerouse May I assign this to you as you'll be working on it with Alex?

@blakerouse blakerouse self-assigned this Apr 28, 2022
@blakerouse
Copy link
Contributor

@jlind23 I have assigned myself. Thanks!

@nimarezainia
Copy link
Contributor

@fearful-symmetry & @cmacknz I was wondering where this flag would reside. the description says that it should be in the policy but in reality it's an Output object so perhaps it should be part of the output configuration (?)

Also once feature flag is toggled, we should be exposing all the shipper related configurations UI.

@jlind23 @jen-huang : perhaps we need a Fleet UI representation also?

@jlind23
Copy link
Contributor

jlind23 commented Oct 5, 2022

@nimarezainia yup, that's true.

@blakerouse
Copy link
Contributor

I am working on this now, so it would be great to have a resolution on where we want to put the key. I think in the output configuration is the best place as it doesn't require any UI work to be done (because we want to default and remove this key in the future anyway). I also think it provides flexibility to use the shipper for 1 output but maybe not for the other.

So I was thinking we could do something like:

shipper:
  enabled: true

Super simple and short version is shipper.enabled: true.

@cmacknz
Copy link
Member

cmacknz commented Oct 11, 2022

I agree, putting the flag in the output section makes sense. Instead of just using shipper.enabled: true is it worth creating a features section? Something like:

features:
  shipper: true

That way we have a place to put other feature flag style configuration in the future.

@nimarezainia
Copy link
Contributor

@blakerouse just to close on this; there are some UI elements that are also Shipper specific and would only make sense when this flag is enabled. We decided that we will go ahead with the UI elements (things like memory queue size, bulk size, disk queue, compressions etc) but obviously what ever the user configures in them will not take effect unless this feature flag is set. We will document this.

It avoid us having breaking changes when we GA and remove the need for this feature flag. Of course the Kafka output is also dependent on this.

@blakerouse
Copy link
Contributor

Being that the fact that a shipper is running will be clearly visible in the elastic-agent status output. I think that we should go with the top-level key of:

shipper:
   ...

So that means in the policy it would look like:

outputs:
  default:
    type: elasticsearch
    hosts: https://localhost:9200
    shipper:
       enabled: true
       queue: {}

This makes it clear that you are configuring the shipper which will be a real component and status reported information inside of the Elastic Agent system.

I think we can even go with if the shipper: key is defined that enabled: true is implied.

@cmacknz
Copy link
Member

cmacknz commented Oct 12, 2022

Yes agreed, we had a meeting today and I think keeping a shipper section makes sense for the reasons Blake listed. We may want to add more shipper specific configuration than just an enabled flag, and there is reason to hide the fact that the shipper exists under the hood.

@nimarezainia
Copy link
Contributor

So still true that the UI for output configs will only take affect when this shipper flag is set?

@blakerouse
Copy link
Contributor

Correct. In the Fleet UI if you defined:

shipper: {}

In the output YAML configuration the shipper would be used (only for inputs thats say they support the shipper as well). So let's say starting out that heartbeat doesn't support the shipper, it will still use its internal elasticsearch output and ignore the shipper flags. Then in the next release if it supports it, then it will just start using it.

@jlind23
Copy link
Contributor

jlind23 commented Nov 9, 2022

@cmacknz @pierrehilbert the PR was merged, shouldn't we close this issue then?

@blakerouse
Copy link
Contributor

Yes, complete!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimation:Day Task that represents a day of work. Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team V2-Architecture v8.6.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants