Skip to content

Commit 5c3ac3e

Browse files
authored
Agent 7 support (#588)
- Removes agent6/agent5 prefixes in variable names. - Introduces `agent_major_version` setting that replaces `agent5_enable`. - Unifies config for Agent 5/6 repos and removes use of facter. - Removes uses of `validate_legacy`. - Keeps the group ownership of config files as 'dd-agent', as they come in the agent package. - Remove `service_name` and `package_name` parameters, since there is no use in changing these. - Import the new RPM signing key only when installing Agent 7. - Bumps major version to 3.0. - Removes 1.x and 2.x instructions from README: these can still be found in puppetforge selecting an older version of the module.
1 parent b97282a commit 5c3ac3e

File tree

116 files changed

+1189
-1422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+1189
-1422
lines changed

CHANGELOG.md

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
Changes
22
=======
33

4+
# 3.0.0 / 2019-12-18
5+
6+
### Overview
7+
8+
**This release will install Agent 7.x by default.**
9+
10+
Some config parameters prefixed with `agent6`/`agent5` have been renamed to
11+
accomodate this change. Please read the [docs]() for more details and update
12+
your configuration accordingly.
13+
14+
Datadog Agent 7 uses Python 3 so if you were running any custom checks written
15+
in Python, they must now be compatible with Python 3. If you were not running
16+
any custom checks or if your custom checks are already compatible with Python 3,
17+
then it is safe to upgrade.
18+
19+
### Notes
20+
21+
* [MAJOR] Agent 7 support. See [#588][].
22+
* Introduces `agent_major_version` parameter that replaces `agent5_enable`.
23+
* Removes `agent6`/`agent5` prefixes in argument names.
24+
* Unifies config for Agent 5/6 repos and removes the use of facter.
25+
* [IMPROVEMENT] Removes uses of `validate_legacy`.
26+
* [IMPROVEMENT] Keeps the group ownership of config files as `dd-agent`.
27+
* [IMPROVEMENT] Removes `service_name` and `package_name` parameters.
28+
429
# 2.10.0 / 2019-12-12
530

631
### Notes
@@ -166,7 +191,7 @@ Changes
166191
# 2.0.0 / 2018-02-27
167192

168193
### Overview
169-
This release is a mejor release, there are a some breaking changes. We have
194+
This release is a major release, there are a some breaking changes. We have
170195
tried to keep the interface as similar as possible to what the community
171196
was already used to, but have had to make some changes and cleaned up some
172197
of the interfaces to some classes. Most notably the main `datadog_agent`
@@ -691,6 +716,7 @@ Please read the [docs]() for more details.
691716
[#581]: https://github.com/DataDog/puppet-datadog-agent/issues/581
692717
[#584]: https://github.com/DataDog/puppet-datadog-agent/issues/584
693718
[#587]: https://github.com/DataDog/puppet-datadog-agent/issues/587
719+
[#588]: https://github.com/DataDog/puppet-datadog-agent/issues/588
694720
[@Aramack]: https://github.com/Aramack
695721
[@BIAndrews]: https://github.com/BIAndrews
696722
[@ColinHebert]: https://github.com/ColinHebert

README.md

+26-93
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,18 @@ Puppet & Datadog
66
[![Puppet Forge Downloads](https://img.shields.io/puppetforge/dt/datadog/datadog_agent.svg)](https://forge.puppetlabs.com/datadog/datadog_agent)
77

88

9-
Description
10-
-----------
9+
## Description
1110

1211
A module to:
1312

14-
1. Install the [DataDog][1] Agent.
13+
1. Install the [Datadog][1] Agent.
1514
2. Send Puppet run reports to [Datadog][1].
1615

17-
Releases
18-
--------
19-
20-
The current version of this Puppet module is compatible with Puppet >= 4.6.x. For users running on older versions of Puppet the legacy module, series 1.x, should support most use-cases.
21-
22-
The majority of users should be able to use the current version, as the Puppet versions supported in the 1.x series of the module have been EOL'd.
23-
24-
Some features might be back-ported if there's enough demand, but in general only maintenance is performed on the 1.x series of the module. Future feature development is performed on the newer Puppet module.
25-
26-
Version 2.x
27-
-----------
28-
2916
## Requirements
3017

31-
For detailed information on compatibility, check the [module page][2] on the Puppet forge.
18+
The current version of this Puppet module supports both Linux and Windows and is compatible with Puppet >= 4.6.x.
19+
20+
For detailed information on compatibility, check the [module page on Puppet Forge][2].
3221

3322
## Installation
3423

@@ -46,56 +35,24 @@ class{ 'datadog_agent':
4635
}
4736
```
4837

49-
### Upgrade from the previous module version 1.x
50-
51-
Most of the manifests are backward compatible. However, there are important changes to the main manifest:
52-
53-
- By default Datadog Agent 6.x is installed.
54-
- To use Agent 5.x in your nodes set the `agent5_enable` boolean parameter to `True`.
55-
- Enhanced support for our APM Tracing Agent.
56-
- Enhanced support for our Process Agent.
57-
- Enhanced support for additional `agent6` options.
58-
- APM Tracing and Process Agents are now opt-in options and are disabled by default.
59-
- The main `datadog_agent` class has parameters to enable and configure the Agents easily.
60-
- Increased granularity for apt/yum repo configuration.
61-
- New location for Datadog Puppet reporting configuration.
38+
### Upgrade from the previous module version 2.x
6239

63-
64-
Version 1.x
65-
-----------
66-
67-
## Requirements
68-
69-
Puppet >=2.7.x and <=4.2.x. For detailed information on compatibility, check the [module page][2] on the Puppet forge.
70-
71-
## Installation
72-
73-
Install `datadog_agent` as a module in your Puppet master's module path.
74-
75-
```
76-
puppet module install datadog-datadog_agent --version 1.12.1
77-
```
78-
79-
### Upgrade from previous git manual install 0.x (unreleased)
80-
81-
You can keep using the `datadog` module but it becomes legacy with the release of `datadog_agent` 1.0.0. Upgrade to get new features, and use the Puppet forge system which is easier for maintenance.
82-
83-
* Delete the Datadog module `rm -r /etc/puppet/modules/datadog`
84-
* Install the new module from the Puppet forge `puppet module install datadog-datadog_agent`
85-
* Update your manifests with the new module class, basically replace `datadog` by `datadog_agent`
40+
- By default Datadog Agent 7.x is installed. To use an earlier Agent version change the setting `agent_major_version`.
41+
- `agent5_enable` is no longer used, as it has been replaced by `agent_major_version`.
42+
- `agent6_extra_options` has been renamed to `agent_extra_options` since it now applies to both Agent version 6 and 7.
43+
- `agent6_log_file` has been renamed to `agent_log_file` since it now applies to both Agent version 6 and 7.
44+
- `agent5_repo_uri` and `agent6_repo_uri` become `agent_repo_uri` for all Agent versions.
45+
- `conf_dir` and `conf6_dir` become `conf_dir` for all Agent versions.
46+
- The repository file created on Linux is now named `datadog` for all agent versions instead of `datadog5`/`datadog6`.
8647

8748
Usage
8849
-----
8950

90-
The following instructions are for both Puppet module versions (1.x, 2.x).
91-
92-
Note: 2.x installs Agent v6 by default, whereas 1.x defaults to Agent v5.
93-
94-
Once the `datadog_agent` module is installed on your `puppetserver`/`puppetmaster`, follow these configuration steps:
51+
Once the `datadog_agent` module is installed on your `puppetserver`/`puppetmaster` (or on a masterless host), follow these configuration steps:
9552

96-
1. Update the default class parameters with your [API key][3].
53+
1. Find your Datadog [API key][3].
9754

98-
2. Specify the module on any nodes you wish to install the DataDog Agent.
55+
2. Specify the module on any nodes you wish to install the Datadog Agent.
9956

10057
```
10158
include datadog_agent
@@ -118,13 +75,8 @@ Once the `datadog_agent` module is installed on your `puppetserver`/`puppetmaste
11875
}
11976
```
12077
121-
- To support reporting, your Puppet master needs the [dogapi][4] gem installed. To install, either run the Puppet Agent on your master with this configuration or install it manually with `gem`. You might need to restart your `puppetserver` service for the freshly installed `dogapi-rb` gem to be picked up.
122-
- On version 2.x, `puppetserver_gem` is defined as a module dependency, it is installed automatically when the module is installed.
123-
- On version 1.x:
124-
- If you are on Puppet Enterprise or POSS (ie. >=3.7.0), there is a soft dependency for reporting on the `puppetserver_gem` module. Install with `puppet module install puppetlabs-puppetserver_gem` - installing manually with `gem` does *not* work.
125-
- You may install `dogapi-rb` with `gem` as the system-level Ruby is used.
126-
- The gem provider is configurable by setting it to `puppetserver_gem` (set by default on PE/POSS (>=3.7.0)) or `gem` if on older versions of Puppet.
127-
- For users running puppet in standalone/masterless mode you will need to set the `puppet_gem_provider` to `puppet_gem` (or `gem` depending on versions) to ensure the `dogapi-rb` is available.
78+
- To support reporting, your Puppet master needs the [dogapi][4] gem installed. To install, either run the Puppet Agent on your master with this configuration or install it manually with `gem`. You might need to restart your `puppetserver` service for the freshly installed `dogapi` gem to be picked up.
79+
- `puppetserver_gem` is defined as a module dependency, it is installed automatically when the module is installed.
12880
12981
3. Include any other integrations you want the agent to use, for example:
13082
@@ -166,7 +118,7 @@ The field `ensure` can be either `present` (default) or `absent`, the later bein
166118
167119
Reporting
168120
---------
169-
Ensure `dogapi-rb` is available on your system as explained earlier.
121+
Ensure the `dogapi` gem is available on your system as explained earlier.
170122
171123
To enable reporting of changes to the Datadog timeline, enable the report processor on your Puppet master, and enable reporting for your clients. The clients send a run report after each check-in back to the master.
172124
@@ -265,7 +217,7 @@ Run Puppet Agent
265217
----------------
266218

267219
```
268-
sudo systemctl /etc/init.d/puppetmaster restart
220+
sudo systemctl restart puppetserver
269221
sudo puppet agent --onetime --no-daemonize --no-splay --verbose
270222
```
271223

@@ -306,50 +258,32 @@ datadog_agent::tags:
306258

307259
These variables can be set in the `datadog_agent` class to control settings in the Agent:
308260

309-
#### 2.x
310-
311261
| variable name | description |
312262
|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
263+
| `agent_major_version` | The version of the Agent to install: either 5, 6 or 7 (default: 7). |
264+
| `agent_version` | Lets you pin a specific minor version of the agent to install, eg: `1:7.16.0-1`. Leave empty to install the latest version (not recommended). |
313265
| `collect_ec2_tags` | Set this to yes to have an instance's custom EC2 tags used as agent tags. |
314266
| `collect_instance_metadata` | Set this to yes to have an instance's EC2 metadata used as agent tags. |
315-
| `datadog_site` | The Datadog site to report to. Defaults to `datadoghq.com`, set to `datadoghq.eu` to report to the EU site. Supported since v2.4.0 of the module, and only with Agent v6+ |
316-
| `dd_url` | The Datadog intake server URL. You are unlikely to need to change this. Overrides `datadog_site` |
267+
| `datadog_site` | The Datadog site to report to. Defaults to `datadoghq.com`, set to `datadoghq.eu` to report to the EU site (Agent versions 6 and 7 only). |
268+
| `dd_url` | The Datadog intake server URL. You are unlikely to need to change this. Overrides `datadog_site` |
317269
| `host` | Overrides the node's host name. |
318270
| `local_tags` | An array of <KEY:VALUE> strings that are set as tags for the node. |
319271
| `non_local_traffic` | Set this to allow other nodes to relay their traffic through this one. |
320-
| `agent5_enable` | A boolean to install Agent v5 and override the Agent v6 default. |
321272
| `apm_enabled` | A boolean to enable the APM Agent (defaults to false). |
322273
| `apm_analyzed_spans` | A hash to add APM events for the Trace Search & Analytics tool. (defaults to undef). For example: `{ 'app\|rails.request' => 1, 'service-name\|operation-name' => 0.8 }` |
323274
| `process_enabled` | A boolean to enable the process agent (defaults to false). |
324275
| `scrub_args` | A boolean to enable the process cmdline scrubbing (defaults to true). |
325276
| `custom_sensitive_words` | An array to add more words beyond the default ones used by the scrubbing feature (defaults to []). |
326277
| `logs_enabled` | A boolean to enable the logs agent (defaults to false). |
327278
| `container_collect_all` | A boolean to enable logs collection for all containers. |
328-
| `agent6_extra_options` | A hash to provide additional configuration options to Agent v6. |
279+
| `agent_extra_options` | A hash to provide additional configuration options (Agent versions 6 and 7 only). |
329280
| `hostname_extraction_regex` | A regex used to extract the hostname captured group to report the run in Datadog instead of reporting the Puppet nodename, for example:<br>`'^(?<hostname>.*\.datadoghq\.com)(\.i-\w{8}\..*)?$'` |
330281

331282
##### Notes:
332283

333-
- `agent6_extra_options` is used to provide a fine grain control of additional Agent v6 config options. A deep merge is performed that may override options provided in the `datadog_agent` class parameters.
284+
- `agent_extra_options` is used to provide a fine grain control of additional Agent v6/v7 config options. A deep merge is performed that may override options provided in the `datadog_agent` class parameters.
334285
- `hostname_extraction_regex` is useful when the Puppet module and the Datadog Agent are reporting different host names for the same host in the infrastructure list.
335286

336-
#### 1.x
337-
338-
| variable name | description |
339-
|-----------------------------|---------------------------------------------------------------------------|
340-
| `collect_ec2_tags` | Set this to yes to have an instance's custom EC2 tags used as agent tags. |
341-
| `collect_instance_metadata` | Set this to yes to have an instance's EC2 metadata used as agent tags. |
342-
| `dd_url` | The Datadog intake server URL. You are unlikely to need to change this. |
343-
| `host` | Overrides the node's host name. |
344-
| `local_tags` | An array of <KEY:VALUE> strings that are set as tags for the node. |
345-
| `non_local_traffic` | Set this to allow other nodes to relay their traffic through this one. |
346-
| `agent6_enable` | A boolean to install Agent v6 and override the Agent v5 default. |
347-
348-
### Proxy Settings
349-
350-
To connect to the Internet through a proxy, set `proxy_host`, `proxy_port`, `proxy_user` and `proxy_password`.
351-
352-
353287
Module Development and Testing
354288
==============================
355289

@@ -388,4 +322,3 @@ pre-commit install
388322
[4]: https://github.com/DataDog/dogapi-rb
389323
[5]: https://app.datadoghq.com/account/settings#integrations
390324
[6]: https://app.datadoghq.com/event/stream
391-

lib/facter/agent_repo.rb

-31
This file was deleted.

0 commit comments

Comments
 (0)