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

[Ingest Manager] Support for linux/arm64 #23479

Merged
merged 8 commits into from
Jan 15, 2021

Conversation

michalpristas
Copy link
Contributor

@michalpristas michalpristas commented Jan 13, 2021

What does this PR do?

Just adds a correct arch for arm64 so arm64 beats are downloaded.
Tested on AWS arm64 server, dashboards seemed ok.

Why is it important?

support Arm 64 packages

How to test

Ideally you have an arm64 device or libvirt enabled and it's easy.
What i did is that I

  • built binary using DEV=true SNAPSHOT=TRUE PLATFORMS="linux/arm64" mage package command
  • used my AWS subscription to spin-up ARM64 Ubuntu server,
  • scp-ed arm packaged there
  • ssh, untar and clear data/elastic-agent-*/downloads directory
  • install with fleet 8.0.0-SNAPSHOT
  • everything should be ok and dashboards populated

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.

@michalpristas michalpristas added enhancement needs_backport PR is waiting to be backported to other branches. v7.12.0 labels Jan 13, 2021
@michalpristas michalpristas self-assigned this Jan 13, 2021
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label Team:Ingest Management labels Jan 13, 2021
@elasticmachine
Copy link
Collaborator

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

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 13, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jan 13, 2021

💚 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 #23479 updated

    • Start Time: 2021-01-15T08:30:02.218+0000
  • Duration: 21 min 8 sec

  • Commit: ac1e08d

Test stats 🧪

Test Results
Failed 0
Passed 1426
Skipped 4
Total 1430

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 1426
Skipped 4
Total 1430

@ph
Copy link
Contributor

ph commented Jan 13, 2021

/Package

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.

@ph
Copy link
Contributor

ph commented Jan 13, 2021

@nkammah Do this need change in the release manager or you will handle all the change at once?

@ferullo Do you have linux arm effort on your side?

@ferullo
Copy link

ferullo commented Jan 13, 2021

Endpoint is not adding Linux ARM support for the time being.

@nkammah
Copy link

nkammah commented Jan 13, 2021

@jmlrt may I let you respond to PH's question

@ph
Copy link
Contributor

ph commented Jan 13, 2021

@jmlrt @nkammah Just to be clear all the beats will also have arm 64 binaries, this was part of the global effort to have them.

@andresrc andresrc added the Team:Elastic-Agent Label for the Agent team label Jan 13, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@michalpristas
Copy link
Contributor Author

I looked into infra code @ph and there are changes which needs to be done yeah. this PR just makes sure agent is ok with arm, arm binary wont be published with this going in.
i identified few places which need to be updated in infra code so after i get this in i will work on infra side

@jmlrt
Copy link
Member

jmlrt commented Jan 14, 2021

@nkammah Do this need change in the release manager or you will handle all the change at once?

Yes, as mentionned above, this will require changes in release-manager DSL.
@michalpristas, that would be great if you can create the PR to infra repo and I can work with you if there you have some question.

@@ -39,6 +39,7 @@ type Spec struct {
PostInstallSteps *transpiler.StepList `yaml:"post_install"`
PreUninstallSteps *transpiler.StepList `yaml:"pre_uninstall"`
When string `yaml:"when"`
Constraints string `yaml:"constraints"`
Copy link
Contributor Author

@michalpristas michalpristas Jan 14, 2021

Choose a reason for hiding this comment

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

i added contraints section which is basically a when section eql expression, evaluated before transformations to save some time.
runtime.os/arch were injected into a tree beforehand, so far as a separate keys not a map, we need to add support for accessing dict elements in eql expression
cc @blakerouse as you already approved the PR

Copy link
Contributor

Choose a reason for hiding this comment

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

Small question, we are adding a new key "constraints", could this be handled already by the "when" key?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it could but it would mean we do the transformation which are not even necessary and then filter out all of the results because precondition failed. i wanted us to spare compute cycles

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.

Perfect usage of EQL conditions, awesome!

@ph
Copy link
Contributor

ph commented Jan 14, 2021

@blakerouse and @michalpristas Its exciting to see EQL syntax reused in other places!

@michalpristas michalpristas merged commit c1290bc into elastic:master Jan 15, 2021
michalpristas added a commit to michalpristas/beats that referenced this pull request Jan 15, 2021
michalpristas added a commit to michalpristas/beats that referenced this pull request Jan 15, 2021
michalpristas added a commit that referenced this pull request Jan 17, 2021
[Ingest Manager] Support for linux/arm64 (#23479)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement needs_backport PR is waiting to be backported to other branches. Team:Elastic-Agent Label for the Agent team v7.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants