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] Fix installers #17077

Merged
merged 13 commits into from
Mar 24, 2020
Merged

Conversation

michalpristas
Copy link
Contributor

What does this PR do?

This PR changes installers in two ways

SNAPSHOT handling

for now turned on by default, if we want to enable it only for snapshot agent we need to modify build to set flag at build time and then enable snapshot installer afterwards

windows refactor

install step on windows was not working properly, while we were unzipping we were creating one additional directory layer, this is now removed.

Small config change

Default configs are not using 9300 endpoint for ES from now on

Why is it important?

To simplify use case when running from snapshot and entire windows flow

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

Scenario 1

run SNAPSHOT=true mage package to build snapshot package
unpack it somewhere locally and try if it runs with no changes to config

Scenario 2

Same as 1 but on windows, windows was broken even for non SNAPSHOT packages.

@elasticmachine
Copy link
Collaborator

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


installCmd := exec.Command("powershell", "-command", powershellCmd)
return installCmd.Run()
}

func alignInstallPath(installPath, version string) string {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this i dont like i will rewrite this part

@michalpristas
Copy link
Contributor Author

Jenkins test this

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, but I haven't tested the artifacts.

@ph
Copy link
Contributor

ph commented Mar 20, 2020

failures doesn't seem related to this PR?

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, testing with agent run.

@ph ph added the needs_backport PR is waiting to be backported to other branches. label Mar 23, 2020
@michalpristas michalpristas merged commit a2385bd into elastic:master Mar 24, 2020
ph pushed a commit to ph/beats that referenced this pull request Apr 7, 2020
[Agent] Fix installers for snapshots (elastic#17077)
@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]>
michalpristas added a commit to michalpristas/beats that referenced this pull request May 6, 2020
[Agent] Fix installers for snapshots (elastic#17077)
michalpristas added a commit to michalpristas/beats that referenced this pull request May 6, 2020
[Agent] Fix installers for snapshots (elastic#17077)
michalpristas added a commit that referenced this pull request May 6, 2020
[Agent] Fix installers for snapshots (#17077)
michalpristas added a commit that referenced this pull request May 7, 2020
[Agent] Fix installers for snapshots (#17077)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants