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

[Agent] Make default config OS agnostic #17016

Merged
merged 7 commits into from
Mar 17, 2020

Conversation

michalpristas
Copy link
Contributor

What does this PR do?

PR changes path of install and download directories in default config to be OS agnostic by using path.data.

Why is it important?

It simplifies first run experience when running agent by removing the need to change configuration values which are configured to non existent paths.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works

How to test this PR locally

You need to build and package agent to contain data/beats subdirectory containing filebeat and metricbeat archives (tar.gz on linux and darwin).

Second step is just running agent and verifying that metricbeat was installed to data/install and is successfully started

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Project:fleet)

Copy link
Collaborator

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

LGTM. We should continue to iterate on the naming / paths but this already improves it.

@@ -52,15 +52,15 @@ download:
# e.g /windows-x86.zip
sourceURI: "https://artifacts.elastic.co/downloads/beats/"
# path to the directory containing downloaded packages
target_directory: "/home/elastic/downloads"
target_directory: "${path.data}/beats"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps still call it downloads and not beats as this will also download endpoint?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for download

@michalpristas
Copy link
Contributor Author

/downloads sounds good to me as well i changed packaging to inject beats into downloads so it is usable right away. this changes downloader to use downloads subdir as a default fallback instead of beats

@michalpristas
Copy link
Contributor Author

going to test packaging before merge

Copy link
Contributor

@ph ph left a comment

Choose a reason for hiding this comment

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

LGTM

@ph ph added the needs_backport PR is waiting to be backported to other branches. label Mar 16, 2020
@ph
Copy link
Contributor

ph commented Mar 16, 2020

added need backport label.

@michalpristas michalpristas merged commit 543f2aa into elastic:master Mar 17, 2020
@ph ph removed the needs_backport PR is waiting to be backported to other branches. label Apr 7, 2020
@ph
Copy link
Contributor

ph commented Apr 7, 2020

backported in #17574 to have a working build

ph added a commit that referenced this pull request Apr 7, 2020
… enable building the agent. (#17574)

* Fix issue when building Agent snapshot and enable building the agent. (#16927)

An extension in the generated files ("SNAPSHOT") was preventing us to
correctly generate the agent artifact with the packaged
metricbeat/filebeat.

Fixes: #16908
(cherry picked from commit 62d3683)

* [Agent] Fix installers (#17077)

[Agent] Fix installers for snapshots (#17077)

* [Agent] fixed mage package for agent (#17368)

[Agent] fixed mage package for agent (#17368)

* [Agent] Make default config OS agnostic (#17016)

[Agent] Make default config OS agnostic (#17016)

* [Agent] Docker image for integration tests (#16898)

[Agent] Docker image for integration tests (#16898)

Co-authored-by: Michal Pristas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants