[docs] Update readme, attribute docs for Agent 6
In particular, mention support of Windows.
[skip ci]
MODIFY
.kitchen.yml
.kitchen.yml
@@ -31,6 +31,7 @@ platforms:
windows_platform = 'windows-2012r2'
windows_chef_versions = %w(
+ 13
12.2.1
)

MODIFY
README.md
README.md
@@ -17,11 +17,10 @@ Datadog Cookbook
Chef recipes to deploy Datadog's components and configuration automatically.
This cookbook includes new support for Datadog Agent version 6.0, please refer to
-the [inline docs](https://github.com/DataDog/chef-datadog/blob/v2.14.0/attributes/default.rb#L31-L68)
+the [dedicated section](#agent-6-support) and the [inline docs](https://github.com/DataDog/chef-datadog/blob/v2.14.0/attributes/default.rb#L31-L68)
for more details on the supported platforms and how to use it.
-Log collection is now available with agent 6.0, please refer to the [inline docs](https://github.com/DataDog/chef-datadog/blob/v2.14.0/attributes/default.rb#L371-L376) to enable it.
-For general information on the Datadog Agent 6, please refer to the [datadog-agent](https://github.com/DataDog/datadog-agent/) repo.
+Log collection is now available with agent 6.0, please refer to the [inline docs](https://github.com/DataDog/chef-datadog/blob/v2.14.0/attributes/default.rb#L371-L376) to enable it.
**NB: This README may refer to features that are not released yet. Please check the README of the
git tag/the gem version you're using for your version's documentation**
@@ -108,8 +107,8 @@ There are many other integration-specific recipes, that are meant to assist in d
Usage
=====
-### Agent6 Note
-Please note the cookbook now supports installing both Agent5 and Agent6 of the datadog agent on debian and RHEL based linux distributions (not yet supported on windows). By default versions `<=2.x` of the cookbook will default to install Agent5, you may however override this behavior with the `node['datadog']['agent6']` attribute.
+### Agent 6 Support
+Please note the cookbook now supports installing both Agent v5 and Agent v6 of the Datadog Agent on Linux (since v2.14.0) and Windows (since v2.15.0). By default versions `<=2.x` of the cookbook will default to install Agent5, you may however override this behavior with the `node['datadog']['agent6']` attribute.
```
default_attributes(
'datadog' => {
@@ -118,43 +117,20 @@ Please note the cookbook now supports installing both Agent5 and Agent6 of the d
)
```
-Additional attributes are available to have finer control over how you install agent6. These are agent6 counterparts to several well known agent5 attributes (code [here](https://github.com/DataDog/chef-datadog/blob/master/attributes/default.rb#L31-L69)):
- * `agent6_version`: should allow you to pin the agent version.
- * `agent6_package_action`: defaults to `'install'`, may be set to `'upgrade'` to always upgrade to latest.
+Note: to _upgrade_ to Agent 6 on a node with Agent 5 already installed, you also have to pin `agent6_version` to a v6 version (recommended), or set `agent6_package_action` to `'upgrade'`.
+
+Additional attributes are available to have finer control over how you install Agent 6. These are Agent 6 counterparts to several well known Agent 5 attributes (code [here](https://github.com/DataDog/chef-datadog/blob/master/attributes/default.rb#L31-L69)):
+ * `agent6_version`: allows you to pin the agent version (recommended).
+ * `agent6_package_action`: defaults to `'install'`, may be set to `'upgrade'` to automatically upgrade to latest (not recommended, we recommend pinning to a version with `agent6_version` and change that version to upgrade).
* `agent6_aptrepo`: desired APT repo for the agent. Defaults to `http://apt.datadoghq.com`
* `agent6_aptrepo_dist`: desired distribution for the APT repo. Defaults to `stable`
* `agent6_yumrepo`: desired YUM repo for the agent. Defaults to `https://yum.datadoghq.com/stable/6/x86_64/`
-Should wish to add additional elements to the agent6 configuration file, typically `/etc/datadog/datadog.yaml` you may use the `node['datadog']['extra_config']` attribute. This attribute is a hash and will be marshaled into the configuration file accordingly. For instance, to enable the `apm` tracing agent bundled with agent6:
- ```
- default_attributes(
- 'datadog' => {
- 'extra_config' => {
- 'apm_config' => {
- 'enabled' => true
- }
- }
- }
- )
- ```
+Please review the [attributes/default.rb](https://github.com/DataDog/chef-datadog/blob/master/attributes/default.rb) file (at the version of the cookbook you use) for the list and usage of the attributes used by the cookbook.
-or to enable both process agent and apm:
- ```
- default_attributes(
- 'datadog' => {
- 'extra_config' => {
- 'apm_config' => {
- 'enabled' => true
- },
- 'process_config' => {
- 'enabled' => 'disabled'
- }
- }
- }
- )
- ```
- NB: please take a look at the process and apm agents for more details regarding configuration options. [APM Trace Agent](https://github.com/DataDog/datadog-trace-agent) and [Process Agent](https://github.com/DataDog/datadog-process-agent)
+Should you wish to add additional elements to the agent6 configuration file (typically `/etc/datadog-agent/datadog.yaml`) that are not directly available as attributes of the cookbook, you may use the `node['datadog']['extra_config']` attribute. This attribute is a hash and will be marshaled into the configuration file accordingly.
+For general information on the Datadog Agent 6, please refer to the [datadog-agent](https://github.com/DataDog/datadog-agent/) repo.
### Instructions

MODIFY
attributes/default.rb
attributes/default.rb
@@ -30,13 +30,13 @@ default['datadog']['application_key'] = nil
########################################################################
### Agent6-only attributes ###
-### Only works on Linux (DEB/RPM) for now ###
# If you're installing a pre-release version of Agent 6 (beta or RC), you need to:
# * on debian: set node['datadog']['agent6_aptrepo_dist'] to 'beta' instead of 'stable'
# * on RHEL: set node['datadog']['agent6_yumrepo'] to 'https://yum.datadoghq.com/beta/x86_64/'
+# In all cases, follow the instructions below:
-# Set to true to install an agent6 instead of agent5.
+# Set node['datadog']['agent6'] to true to install an agent6 instead of agent5.
# To upgrade from agent5 to agent6, you need to:
# * set node['datadog']['agent6'] to true, and
# * either set node['datadog']['agent6_version'] to an existing agent6 version (recommended), or
@@ -191,7 +191,8 @@ rescue ArgumentError
Chef::Log.warn "could not parse python version string: #{node['languages']['python']['version']}"
end
-# Agent Version
+# Agent Version for v5 Agents
+# To pin the version of v6 Agents, use the `agent6_version` attribute instead.
# Default of `nil` will install latest version. On Windows, this will also upgrade to latest
# This attribute accepts either a `string` or `hash` with the key as platform_name and value of package version
# In the case of fedora and amazon linux, use platform_name of rhel
@@ -203,7 +204,8 @@ end
# }
default['datadog']['agent_version'] = nil
-# Agent package action
+# Agent package action for v5 Agents
+# For v6 Agents, use the agent6_package_action attribute instead
# Allow override with `upgrade` to get latest (Linux only)
default['datadog']['agent_package_action'] = 'install'
@@ -225,8 +227,7 @@ default['datadog']['chef_handler_enable'] = true
# Log level. Should be a valid python log level https://docs.python.org/2/library/logging.html#logging-levels
default['datadog']['log_level'] = 'INFO'
-# Default to false to non_local_traffic
-# See: https://github.com/DataDog/dd-agent/wiki/Network-Traffic-and-Proxy-Configuration
+# Set to true to allow non local traffic to Dogstatsd (and, in Agent 5, to the Forwarder)
default['datadog']['non_local_traffic'] = false
# The loopback address the Forwarder and Dogstatsd will bind.

[docs] Update readme, attribute docs for Agent 6 (#529)

In particular, mention support of Windows.

[skip ci]