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] ensure container is backwards compatible #25092

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

simitt
Copy link
Contributor

@simitt simitt commented Apr 14, 2021

What does this PR do?

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

Why is it important?

backwards compatibility

How to test this PR locally

Build docker container and then run the following command

docker run  \
--env ELASTIC_AGENT_CLOUD=true \
--env APM_SERVER_PATH=/myapp/apm-server/ \
--env CONFIG_PATH=/myapp/config \
--env HOME_PATH="/myapp" \
-v <path>:/myapp \
--rm docker.elastic.co/beats/elastic-agent:8.0.0-SNAPSHOT
  • ELASTIC_AGENT_CLOUD=false: the agent should always be started
  • ELASTIC_AGENT_CLOUD=true: the agent should only be started if a myapp/config/fleet-setup.yml file is provided

Check that the container keeps running until the process(es) are terminated.

Related issues

closes #25005

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

closes elastic#25005
@simitt simitt added the v7.13.0 label Apr 14, 2021
@simitt simitt requested a review from blakerouse April 14, 2021 17:00
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 14, 2021
@simitt simitt added the Team:Elastic-Agent Label for the Agent team label Apr 14, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 14, 2021
Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

Looks good.

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #25092 opened

  • Start Time: 2021-04-14T17:01:06.816+0000

  • Duration: 66 min 0 sec

  • Commit: 41d9390

Test stats 🧪

Test Results
Failed 0
Passed 6740
Skipped 16
Total 6756

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 6740
Skipped 16
Total 6756

@simitt simitt added the backport-v7.13.0 Automated backport with mergify label Apr 14, 2021
@simitt simitt merged commit cc7fcd1 into elastic:master Apr 14, 2021
mergify bot pushed a commit that referenced this pull request 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 pull request 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>
v1v added a commit to v1v/beats that referenced this pull request Apr 15, 2021
* upstream/master:
  packer cache support for the 7.x and 7.latestMinor branches (elastic#25091)
  Remove EventFetcher and EventsFetcher interface (elastic#25093)
  Update go-structform to 0.0.8 (elastic#25051)
  Update copy_fields.asciidoc (elastic#25053)
  [elastic-agent] ensure container is backwards compatible (elastic#25092)
  Add --fleet-server-service-token. Rename --fleet-server to --fleet-server-es. (elastic#25083)
  Add cgroup.cpuacct percentages (elastic#25057)
  Add tests for truncated and symlinked files in filestream input (elastic#24425)
  Fix panic when Hearbeat monitor initialization fails twice (elastic#25073)
  [Filebeat][httpjson] Change append transform to initiate new fields as a slice (elastic#25074)
  Osquerybeat: Result values type translation (elastic#25012)
  Update Osquerybeat spec to get it downloading from the correct artifactory path (elastic#25076)
  Fix changelog (elastic#25079)
  Strip Azure EventHub connection string in debug logs (elastic#25066)
  Change googlecloud to gcp in field names (elastic#25038)
  Bump stack version to 7.12.0 for testing (elastic#24957)
  packer-cache: cache the existing docker images on ARM and some more (elastic#25068)
  Disable logstash TestFetch flaky test (elastic#25044)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.13.0 Automated backport with mergify Team:Elastic-Agent Label for the Agent team v7.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[elastic-agent] cloud restrict elastic-agent setup
3 participants