Agent required changes for building the agent artifacts#16624
Agent required changes for building the agent artifacts#16624ph merged 5 commits intoelastic:masterfrom ph:agent-devtools-changes
Conversation
The Agent has special requirements: - Only Elastic licensed - Bundle Metricbeat - Bundle Filebeat This PR isolate all the required changes for the devtools to correctly build the agent. This can be merged as is because it doesn't impact building any other beats.
|
Pinging @elastic/ingest (Project:fleet) |
|
This can be safely backported to 7.x |
| extra_vars: | ||
| # OS X 10.8 Mountain Lion is the oldest supported by Go 1.10. | ||
| # https://golang.org/doc/go1.10#ports | ||
| min_supported_osx_version: 10.8 |
There was a problem hiding this comment.
our current build system is based on go1.13. Min macOS version is 1.11
There was a problem hiding this comment.
@urso its a copy-paste of the existing packages task defined in
beats/dev-tools/packaging/packages.yml
Lines 222 to 225 in 6034c9a
I will update mine to 1.11 and make a PR for the other part in master.
|
LGTM @andrewkroh cam you also have a look? |
Co-Authored-By: Nicolas Ruflin <spam@ruflin.com>
Co-Authored-By: Nicolas Ruflin <spam@ruflin.com>
Co-Authored-By: Nicolas Ruflin <spam@ruflin.com>
|
@ruflin all yours changes are in. |
|
Weird, I had to kick Travis manually it was stuck. |
michalpristas
left a comment
There was a problem hiding this comment.
lgtm, looks like a cherry pick of what we have in feature ingest branch right?
|
i've see travis being slow lately. noemi also complained |
|
@michalpristas Yes Its a cherry-pick, there is webhook issues or slowdown on github side. |
andrewkroh
left a comment
There was a problem hiding this comment.
Code changes look good. My questions are mostly about what's in the packages.
| source: '{{ repo.RootDir }}/LICENSE.txt' | ||
| mode: 0644 | ||
| /usr/share/{{.BeatName}}/README.md: | ||
| template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/common/README.md.tmpl' |
There was a problem hiding this comment.
This readme template is specific to a Beat. I think the agent will want to have its own.
| extra_vars: | ||
| from: 'centos:7' | ||
| user: '{{ .BeatName }}' | ||
| linux_capabilities: '' |
There was a problem hiding this comment.
So that agent can run in a container as a non-root user without any special Linux capabilities added to the binary? 🤔
There was a problem hiding this comment.
this is a copy paste from some beat, we in fact need to update user to a full root probably
There was a problem hiding this comment.
root is used here in this PR: https://github.com/elastic/beats/pull/16898/files
| files: | ||
| <<: *agent_binary_files | ||
| install-service-{{.BeatName}}.ps1: | ||
| template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/windows/install-service.ps1.tmpl' |
There was a problem hiding this comment.
Does the agent use the same CLI arguments as the beats? Maybe you need a customized install script?
There was a problem hiding this comment.
we tried to mimic beat behavior here and we support args like -c or path.* i'm not sure about -E
|
I am going to merge this and addresses the changes the mention of @andrewkroh in a followup PR. |
) * Agent required changes for building the agent artifacts The Agent has special requirements: - Only Elastic licensed - Bundle Metricbeat - Bundle Filebeat This PR isolate all the required changes for the devtools to correctly build the agent. This can be merged as is because it doesn't impact building any other beats. * Update dev-tools/mage/pkgspecs.go Co-Authored-By: Nicolas Ruflin <spam@ruflin.com> * Update dev-tools/mage/pkgspecs.go Co-Authored-By: Nicolas Ruflin <spam@ruflin.com> * Update dev-tools/mage/pkgspecs.go Co-Authored-By: Nicolas Ruflin <spam@ruflin.com> * update min version for macos to 1.11 Co-authored-by: Nicolas Ruflin <spam@ruflin.com> (cherry picked from commit ab84afc)
The Agent has special requirements:
This PR isolate all the required changes for the devtools to correctly
build the agent. This can be merged as is because it doesn't impact
building any other beats.
What does this PR do?
Why is it important?
Checklist
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs