datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

[Omnibus] Support packaging of the agent at a different location than /opt/datadog-agent

Open Pythyu opened this issue 5 months ago • 3 comments

What does this PR do?

Allow omnibus to package and build the agent at a different location than /opt/datadog-agent. Also gives the option to generate config files at a custom path instead of /etc/datadog-agent.

Note: The packaged agent is still meant to work from /opt/datadog-agent and will still try to get config files from /etc/datadog-agent

Motivation

MacOS runners don't support virtualization and have already a datadog-agent present for internal tracking. We need to be able to build the agent on runners without overwriting on the existing agent.

Additional Notes

This PR depends on this omnibus-ruby PR

Currently tested only on the base flavor Capture d’écran 2024-09-06 à 19 28 47 Once the macOS builds uses this PR, we can remove this test job since regression will be handled by the macOS build job.

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Manual testing

export INSTALL_DIR="/some/custom/path" # needs to be exported
inv omnibus.build --install-directory "$INSTALL_DIR" --config-directory "/some/custom/config/path"

CI Currently custom_agent_build_test create an x64 build to /custom/datadog-agent with config files in /custom/etc/datadog-agent the job fails if not correctly generated at these locations.

Pythyu avatar Sep 06 '24 17:09 Pythyu