-
Notifications
You must be signed in to change notification settings - Fork 204
Add OTEL_COMPONENT=true to packaging to allow building a seperate OTEL EDOT binary
#11237
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
Conversation
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
|
Failing only because it cannot install junit2html. Fixes for that is here - #11238 Once merged I will rebase and then should go green. |
|
@pchila Thanks for the review. I have updated all your the suggestions. |
The binary should probably be called |
|
@cmacknz I updated the binary name to |
|
When I try to build this locally, I get an error about VCS stamping: |
|
The two related issues for vcs stamping issue are but that error doesn't immediately look like either of these two: |
|
We likely need a temporary CI step to build this way to make sure it doesn't accidentally break in a future PR. |
v1v
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed the changes in the BK pipeline - LGTM, although I wonder if using a buildkite matrix could help here. FIPS was enabled in the past and duplicated the code, so I should avoid duplicating steps and use a dynamic approach instead?
💚 Build Succeeded
History
cc @blakerouse |
|
@Mergifyio backport 8.19 9.1 9.2 |
✅ Backports have been created
|
…TEL EDOT binary (#11237) * Add ability to build seperate edot binary. Add build flag to change build. * Get this working. * Fix crossBuild log. * Fix imports. * fixes from code review. * Revert the change for packageAgent. * Update binary name. * Fix docker container. Add CI steps for build. * Change to serial deps. * Try not using go list. * Revert "Change to serial deps." This reverts commit 329de79. * Fix BK to build windows OTEL_COMPONENT. (cherry picked from commit 9f1c464) # Conflicts: # internal/pkg/agent/cmd/common.go # magefile.go
…TEL EDOT binary (#11237) * Add ability to build seperate edot binary. Add build flag to change build. * Get this working. * Fix crossBuild log. * Fix imports. * fixes from code review. * Revert the change for packageAgent. * Update binary name. * Fix docker container. Add CI steps for build. * Change to serial deps. * Try not using go list. * Revert "Change to serial deps." This reverts commit 329de79. * Fix BK to build windows OTEL_COMPONENT. (cherry picked from commit 9f1c464)
…TEL EDOT binary (#11237) * Add ability to build seperate edot binary. Add build flag to change build. * Get this working. * Fix crossBuild log. * Fix imports. * fixes from code review. * Revert the change for packageAgent. * Update binary name. * Fix docker container. Add CI steps for build. * Change to serial deps. * Try not using go list. * Revert "Change to serial deps." This reverts commit 329de79. * Fix BK to build windows OTEL_COMPONENT. (cherry picked from commit 9f1c464) # Conflicts: # internal/edot/cmd/otel.go # internal/pkg/agent/cmd/validate.go # internal/pkg/agent/main.go # magefile.go
…low building a seperate OTEL EDOT binary (#11415) * Add `OTEL_COMPONENT=true` to packaging to allow building a seperate OTEL EDOT binary (#11237) * Add ability to build seperate edot binary. Add build flag to change build. * Get this working. * Fix crossBuild log. * Fix imports. * fixes from code review. * Revert the change for packageAgent. * Update binary name. * Fix docker container. Add CI steps for build. * Change to serial deps. * Try not using go list. * Revert "Change to serial deps." This reverts commit 329de79. * Fix BK to build windows OTEL_COMPONENT. (cherry picked from commit 9f1c464) # Conflicts: # internal/pkg/agent/cmd/common.go # magefile.go * Fix conflicts. * No windows/arm64 in 8.18. --------- Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
…ow building a seperate OTEL EDOT binary (#11417) * Add `OTEL_COMPONENT=true` to packaging to allow building a seperate OTEL EDOT binary (#11237) * Add ability to build seperate edot binary. Add build flag to change build. * Get this working. * Fix crossBuild log. * Fix imports. * fixes from code review. * Revert the change for packageAgent. * Update binary name. * Fix docker container. Add CI steps for build. * Change to serial deps. * Try not using go list. * Revert "Change to serial deps." This reverts commit 329de79. * Fix BK to build windows OTEL_COMPONENT. (cherry picked from commit 9f1c464) * Change to SerialDeps. --------- Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
What does this PR do?
Adds a new
OTEL_COMPONENTflag that allows building the Elastic Agent with a seperate OTEL EDOT collector binary, instead of it being compiled into the Elastic Agent binary. TheOTEL_COMPONENTflag is only temporary and will become the default with no way to turn it off in the future.The binary is currently named
otelcol-componentto allow it to live next to theotelcolscripts. Because the OTEL_COMPONENT flag is optional and thepackages.ymldoesn't really allow that optionality this provides a way for both to exist at the same time.Once this becomes the only way to build then it will just be
otelcoland the scripts will either just be replaced with that actual binary or a symlink if the script is not in the correct place.NOTE: This does not yet include the
agentbeatinto the single binary, that will happen in the next PR. This just confirms that building in this mode does work and runs correctly.Why is it important?
Part of the journey to separate the control plane and data plane components into separate binaries.
Checklist
[ ] 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/fragmentsusing the changelog tool[ ] I have added an integration test or an E2E testDisruptive User Impact
None
How to test this PR locally
Run packaging as you normally would on your system to build an Elastic Agent but add the
OTEL_COMPONENT="true"option before themage package. Example below for building on my system is as follows:PLATFORMS="darwin/arm64" SNAPSHOT="true" EXTERNAL="true" OTEL_COMPONENT="true" PACKAGES="targz" mage packageOnce built running
elastic-agent otelwill spawn the seperate binary and running withelastic-agent runand a configuration that will use the OTEL runtime will also work.