-
Notifications
You must be signed in to change notification settings - Fork 260
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
[agent6] adding support for the agent beta #356
Conversation
fix lint issues
[spec] fix for older rubies. [agent6] consistent YAML experience across puppets [spec][agent6] cover old puppet ZAML regex
… both beta and stable.
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 left a few questions/comments (event if I'm not a puppet expert). Only real point is for the docker.yaml
file in agent6.
$conf_dir = $datadog_agent::params::conf_dir, | ||
$conf6_dir = $datadog_agent::params::conf6_dir, |
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.
Would it be possible to overwrite $conf_dir
if agent6 is enable ? It would avoid adding a if/else statement in every integration .pp
.
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.
variables are actually constants in puppet, so unfortunately no dice.
I first tried just adding agent6_enable
but then that forced the customer to override conf_dir
manually, that would result in a ton of issues and most customers would just expect the agent6_enable
tag to work.
@@ -33,11 +33,23 @@ | |||
notify => Service[$datadog_agent::params::service_name] | |||
} | |||
|
|||
file { "${datadog_agent::params::conf_dir}/docker.yaml": | |||
if $::datadog_agent::agent6_enable { | |||
$legacy_conf = "${datadog_agent::conf6_dir}/docker.yaml" |
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.
The old docker.yaml
configuration file was remove from agent6 but the new docker check (the one in Go) is named docker
. The docker_daemon.yaml
configuration is not supported anymore.
I guess we should ensure:
- for agent5: ensure
docker.yaml
is absent anddocker_daemon.yaml
present - for agent6: ensure
docker.yaml
is present anddocker_daemon.yaml
absent
What do you think ?
@@ -46,6 +49,7 @@ | |||
refreshonly => true, | |||
tries => 2, # https://bugs.launchpad.net/launchpad/+bug/1430011 won't get fixed until 16.04 xenial | |||
try_sleep => 30, | |||
require => File['/etc/apt/sources.list.d/datadog-beta.list'], |
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.
Why do we require the beta list to update the agent ?
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.
Because the resource ensures the file will be absent
- the file resource is required, and then the file is ensure => absent
.
refreshonly => true, | ||
tries => 2, # https://bugs.launchpad.net/launchpad/+bug/1430011 won't get fixed until 16.04 xenial | ||
try_sleep => 30, | ||
require => File['/etc/apt/sources.list.d/datadog.list'], |
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.
Same here: why do we need agent5 list ?
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.
Same :)
@@ -46,7 +46,7 @@ | |||
end | |||
|
|||
it do | |||
should contain_file('/etc/dd-agent/datadog.yaml')\ | |||
should contain_file('/etc/datadog-agent/datadog-reports.yaml')\ |
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.
So no matter the agent version we use /etc/datadog-agent
for report ? Won't it be confusing for people update the puppet classes but not the agent ?
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.
Yeah, this sucks a bit... I guess maybe /etc/datadog/
is better. What I don't want to do is keep dd-agent around, because that will eventually be even more confusing for customers moving away from agent5.
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.
Indeed. I guess /etc/datadog-agent
is the best choice then.
@@ -46,7 +46,7 @@ | |||
end | |||
|
|||
it do | |||
should contain_file('/etc/dd-agent/datadog.yaml')\ | |||
should contain_file('/etc/datadog-agent/datadog-reports.yaml')\ |
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.
Indeed. I guess /etc/datadog-agent
is the best choice then.
[agent6] adding support for the agent beta (DataDog#356)
* [agent6] add support for agent6 config locations. * [agent6] adding agent6 repos. * [agent6] adding datadog.yaml config template. * [agent6] preparing main manifest for agent6 support. fix lint issues * [agent6][spec] fixes + spec test work [spec] fix for older rubies. [agent6] consistent YAML experience across puppets [spec][agent6] cover old puppet ZAML regex * [agent6][repo] remove beta if on stable and viceversa * [agent6][spec] adding RHEL and Ubuntu repo tests * [agent6][yum] no ensure on yumrepo -> use datadog repo definition for both beta and stable. * [docker_daemon] agent6 goes back to docker.yaml for config * [gemfile] pin jwt to 1.5.6
This PR aims to provide a means to install the agent 6 (currently in
beta
) via the puppet module. It should allow for a seamless upgrade/downgrade experience as the integration configurations should be dropped in the right location in either case.Please note the subset of configuration features for agent6 is still limited, with more to come in the coming days/weeks.