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

Don't require APM to enable datadog-installer #588

Merged
merged 3 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,28 @@ jobs:
inventory:
type: string
default: "ci.ini"
apm_enabled:
type: string
remote_updates:
type: string
docker:
- image: datadog/docker-library:ansible_<<parameters.os>>_<<parameters.ansible_version>>
steps:
- checkout
- run: ANSIBLE_JINJA2_NATIVE="<<parameters.jinja2_native>>" ansible-playbook -i ./ci_test/inventory/<<parameters.inventory>> "./ci_test/install_installer.yaml"
- run: datadog-installer version
- run: >
ANSIBLE_JINJA2_NATIVE="<<parameters.jinja2_native>>" ansible-playbook
-i ./ci_test/inventory/<<parameters.inventory>> "./ci_test/install_installer.yaml"
-e datadog_apm_instrumentation_enabled="<<parameters.apm_enabled>>"
-e datadog_remote_updates="<<parameters.remote_updates>>"
- run: >
bash -c 'if [ -n "<<parameters.apm_enabled>>" ] || [ "<<parameters.remote_updates>>" = "true" ]; then
datadog-installer version;
elif command -v datadog-installer; then
echo datadog-installer should not be installed;
exit 2;
else
echo datadog-installer is not installed as expected;
fi'

workflows:
version: 2
Expand Down Expand Up @@ -351,3 +367,5 @@ workflows:
parameters:
ansible_version: ["2_10", "3_4", "4_10"]
os: ["debian", "centos", "amazonlinux2"]
apm_enabled: ["host", ""]
remote_updates: ["true", "false"]
2 changes: 0 additions & 2 deletions ci_test/install_installer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@
datadog_api_key: "11111111111111111111111111111111"
datadog_enabled: false
datadog_skip_running_check: true
datadog_apm_instrumentation_enabled: host
datadog_remote_updates: true
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ datadog_apm_instrumentation_docker_config:
- stderr
config_sources: BASIC

# Enable remote updates through datadog-installer
datadog_remote_updates: false

#
# Internal variables
# The following variables are for internal use only, do not modify them.
Expand Down
2 changes: 1 addition & 1 deletion tasks/installer-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
- name: Enable installer
set_fact:
datadog_installer_enabled: true
when: datadog_apm_instrumentation_enabled | length > 0
when: datadog_apm_instrumentation_enabled | length > 0 or datadog_remote_updates | bool