Skip to content

Conversation

@ph
Copy link
Contributor

@ph ph commented Apr 7, 2020

Cherry-pick of PR #17241 to 7.x branch. Original message:

What does this PR do?

This PR introduces new collection of steps just like we have with rules.
This collection is part of baked in spec file and is called post_install
When installation needs to be run it executed Install method of respective installer and after that it runs collection of these hooks.

At the moment two steps were introduced, rename and remove;

Example of the config:

name: Metricbeat
cmd: metricbeat
args: ["-E", "setup.ilm.enabled=false"]
configurable: grpc
post_install:
  - move_file:
      path: "modules.d/system.yml"
      target: "modules.d/system.yml.disabled"

Why is it important?

Metricbeat is collecting system metrics by default and is sending them to default ES index. We want to avoid this default behavior as default behavior is specified by configuration coming from fleet.

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
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Fixes: #17197
Related: elastic/kibana#60319

@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

Copy link
Contributor

@michalpristas michalpristas left a comment

Choose a reason for hiding this comment

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

Lgtm

[Agent] Enable post install hooks (#17241)

(cherry picked from commit 5c2eb42)
@ph ph merged commit d4d6d4f into elastic:7.x Apr 7, 2020
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