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.
hush-hush
left a comment
There was a problem hiding this comment.
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.
| $consul_token = '', | ||
| $agent6_enable = $datadog_agent::params::agent6_enable, | ||
| $conf_dir = $datadog_agent::params::conf_dir, | ||
| $conf6_dir = $datadog_agent::params::conf6_dir, |
There was a problem hiding this comment.
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.
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.
|
|
||
| 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.
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.yamlis absent anddocker_daemon.yamlpresent - for agent6: ensure
docker.yamlis present anddocker_daemon.yamlabsent
What do you think ?
| 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.
Why do we require the beta list to update the agent ?
There was a problem hiding this comment.
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.
Same here: why do we need agent5 list ?
|
|
||
| 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.
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.
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.
Indeed. I guess /etc/datadog-agent is the best choice then.
|
|
||
| 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.
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.