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

[elastic-agent] cloud restrict elastic-agent setup #25005

Closed
simitt opened this issue Apr 9, 2021 · 6 comments · Fixed by #25092
Closed

[elastic-agent] cloud restrict elastic-agent setup #25005

simitt opened this issue Apr 9, 2021 · 6 comments · Fixed by #25092
Assignees
Labels
Team:Elastic-Agent Label for the Agent team v7.13.0

Comments

@simitt
Copy link
Contributor

simitt commented Apr 9, 2021

For backwards compatibility on cloud, ensure that the container cmd only triggers the elastic-agent setup if any of the configuration files for the agent are present.

@simitt simitt added v7.13.0 Team:Elastic-Agent Label for the Agent team labels Apr 9, 2021
@simitt simitt self-assigned this Apr 9, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@ruflin
Copy link
Contributor

ruflin commented Apr 9, 2021

Will this make testing without a container or in the default container harder? I wonder if we could have some logic that it is always executed by default but if a certain condition matches, it is skipped.

@simitt
Copy link
Contributor Author

simitt commented Apr 9, 2021

This will not impact the default container behavior, it is only in combination with the cloud setup.

@blakerouse
Copy link
Contributor

The container command already skips the enrollment and boot strapping if fleet.yml is present (unless its forced by the environment variable)? Is this different than that?

@mostlyjason
Copy link

Tagging @ph track this one and adding to iteration board

@simitt
Copy link
Contributor Author

simitt commented Apr 13, 2021

@blakerouse yes, because for backwards compatibility to older ECE versions (which will not support the agent and fleet setup), there shouldn't be any notion of enrolling the elastic agent etc; there won't be a fleet.yml present when first called.
The way we can figure this out is to not run a enroll/setup command when ELASTIC_AGENT_CLOUD=false or unset and no configuration file is provided. I'll create a PR for this in a bit.

simitt added a commit to simitt/beats that referenced this issue Apr 14, 2021
only run setup and the elastic agent if configuration is provided
when in cloud mode

closes elastic#25005
simitt added a commit that referenced this issue Apr 14, 2021
only run setup and the elastic agent if configuration is provided
when in cloud mode

closes #25005
mergify bot pushed a commit that referenced this issue Apr 14, 2021
only run setup and the elastic agent if configuration is provided
when in cloud mode

closes #25005

(cherry picked from commit cc7fcd1)
simitt added a commit that referenced this issue Apr 15, 2021
…5098)

only run setup and the elastic agent if configuration is provided
when in cloud mode

closes #25005

(cherry picked from commit cc7fcd1)

Co-authored-by: Silvia Mitter <silvia.mitter@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent Label for the Agent team v7.13.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants