Skip to content

Commit 6a51983

Browse files
committed
Merge branch 'xenon8/puppet-8-upgrade' into fanny/unit-tests
2 parents 729a6d6 + b70b8a4 commit 6a51983

Some content is hidden

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

66 files changed

+388
-337
lines changed

.circleci/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,18 +230,18 @@ jobs:
230230

231231
kitchen-tests:
232232
machine:
233-
image: ubuntu-2004:2024.08.1
233+
image: ubuntu-2204:2024.08.1
234234
environment:
235235
STRICT_VARIABLES: 'yes'
236-
RUBY_VERSION: '3.1.6'
236+
RUBY_VERSION: '3.4.1'
237237
steps:
238238
- checkout
239239
- run:
240-
name: Setup
240+
name: Install libcurl4 and openssl
241241
command: |
242242
# Needed to bundle install a puppet_litmus gem dependency
243-
sudo apt update -y
244-
sudo apt install -y libcurl4 curl libcurl4-openssl-dev
243+
sudo apt update
244+
sudo apt install -y libcurl4 curl libcurl4-openssl-dev
245245
- run:
246246
name: Install RVM
247247
command: |

CHANGELOG.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ Changes
22
=======
33
# 4.0.0 / 2025-02-01
44

5-
* [FEATURE] Add Support for Puppet 8 ([#823])
6-
* [FEATURE] Update Module Dependencies including updates for StdLib, migrating to newer functions where appropriate ([#823])
7-
* [BUGFIX] Fix issue where MSI path was not correctly parsed ([#823])
5+
* [FEATURE] Add Support for Puppet 8 ([#779])
6+
* [FEATURE] Update Module Dependencies including updates for StdLib, migrating to newer functions where appropriate ([#800])
7+
* [FEATURE] Class definitions updated with references to DataDog examples
88
* [FEATURE] Update to CI Builds to work with Ruby 3
9+
* [BUGFIX] Fix issue where MSI path was not correctly parsed ([#814])
10+
* [DEPRECATE] Drop support for Puppet 6 and below
911
* [DEPRECATE] Remove support for supply a String to the SSL_Verify option on the elasticsearch integration. We now use tls_verify which matches core DataDog code.
12+
* [DEPRECATE] Support for Jenkins integrations is removed
13+
* [DEPRECATE] No longer possible to use the custom metrics parameter when using the PostgresSQL class
1014

1115
# 3.23.0 / 2024-12-09
1216

@@ -936,13 +940,16 @@ Please read the [docs]() for more details.
936940
[#756]: https://github.com/DataDog/puppet-datadog-agent/issues/756
937941
[#761]: https://github.com/DataDog/puppet-datadog-agent/issues/761
938942
[#770]: https://github.com/DataDog/puppet-datadog-agent/issues/770
943+
[#779]: https://github.com/DataDog/puppet-datadog-agent/issues/779
939944
[#782]: https://github.com/DataDog/puppet-datadog-agent/issues/782
940945
[#785]: https://github.com/DataDog/puppet-datadog-agent/issues/785
941946
[#789]: https://github.com/DataDog/puppet-datadog-agent/issues/789
942947
[#790]: https://github.com/DataDog/puppet-datadog-agent/issues/790
943948
[#798]: https://github.com/DataDog/puppet-datadog-agent/issues/798
944949
[#799]: https://github.com/DataDog/puppet-datadog-agent/issues/799
950+
[#800]: https://github.com/DataDog/puppet-datadog-agent/issues/800
945951
[#806]: https://github.com/DataDog/puppet-datadog-agent/issues/806
952+
[#814]: https://github.com/DataDog/puppet-datadog-agent/issues/814
946953
[#820]: https://github.com/DataDog/puppet-datadog-agent/issues/820
947954
[#821]: https://github.com/DataDog/puppet-datadog-agent/issues/821
948955
[@Aramack]: https://github.com/Aramack

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ group :development do
3232
gem "kitchen-puppet"
3333
gem "kitchen-docker", '~> 3.0.0', require: false
3434
gem "kitchen-verifier-serverspec"
35-
gem "rexml", '= 3.2.6', require: false
35+
gem "rexml", '~> 3.4.0', require: false
3636
gem "mixlib-shellout", "~> 2.2.7", platforms: [:ruby]
3737
if ruby_version >= Gem::Version.new('2.5') && ruby_version < Gem::Version.new('3.1')
3838
gem "test-kitchen", '= 3.0.0', platforms: [:ruby]

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ GEM
345345
mime-types (>= 1.16, < 4.0)
346346
netrc (~> 0.8)
347347
retryable (3.0.5)
348-
rexml (3.2.6)
348+
rexml (3.4.0)
349349
rgen (0.9.1)
350350
rspec (3.13.0)
351351
rspec-core (~> 3.13.0)
@@ -544,7 +544,7 @@ DEPENDENCIES
544544
puppet_litmus (~> 1.0)
545545
puppetlabs_spec_helper (~> 8.0)
546546
rb-readline (= 0.5.5)
547-
rexml (= 3.2.6)
547+
rexml (~> 3.4.0)
548548
rspec-puppet-facts (~> 4.0)
549549
rubocop (~> 1.50.0)
550550
rubocop-performance (= 1.16.0)

environments/etc/Puppetfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Track control branch and fall-back to master if no matching branch.
22
mod 'datadog_agent', :local => true
3-
mod 'puppetlabs-apt', '2.4.0'
4-
mod 'puppetlabs-concat', '4.0.0'
5-
mod 'puppetlabs-puppetserver_gem', '1.0.0'
6-
mod 'puppetlabs-stdlib', '4.25.0'
7-
mod 'puppetlabs-powershell', '2.3.0'
8-
mod 'puppetlabs-yumrepo_core', '1.0.3'
9-
mod 'puppet-zypprepo', '3.1.0'
3+
mod 'puppetlabs-apt', '10.0.1'
4+
mod 'puppetlabs-concat', '9.1.0'
5+
mod 'puppetlabs-stdlib', '9.7.0'
6+
mod 'puppetlabs-powershell', '6.0.2'
7+
mod 'puppetlabs-yumrepo_core', '2.1.0'
8+
mod 'puppet-zypprepo', '5.0.0'

kitchen.yml

Lines changed: 103 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -14,58 +14,55 @@ provisioner:
1414
custom_pre_apply_command: 'cp -r /tmp/modules/* /tmp/kitchen/modules/'
1515

1616
platforms:
17-
- name: centos-7-puppet-5
18-
driver_config:
19-
# we use a custom image that runs systemd
20-
image: 'datadog/docker-library:chef_kitchen_systemd_centos_7'
21-
run_command: /root/start.sh
17+
- name: ubuntu-24.04-puppet-8
2218
driver:
19+
image: 'ubuntu:24.04'
2320
provision_command:
24-
- rpm -ivh http://yum.puppetlabs.com/puppet5-release-el-7.noarch.rpm #installs the puppet-agent repo
25-
- yum install -y puppet-agent rubygems
21+
- apt-get install -y apt-utils apt-transport-https ca-certificates
22+
- wget https://apt.puppet.com/puppet8-release-noble.deb
23+
- dpkg -i puppet8-release-noble.deb #installs the puppet-agent repo
24+
- apt-get update
25+
- apt-get install -y puppet-agent rubygems ruby-dev make gcc
2626
- ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet
2727

2828
- mkdir /home/kitchen/puppet
2929
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
3030
- printf <%= File.read('environments/etc/Gemfile').inspect %> > /home/Gemfile
3131

3232
- gem install bundler -v '= 2.4.13'
33-
# we use bundle to install gems and to lock dependencies versions of semantic_puppet and multipart-post
3433
- cd /home && bundle install
3534
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
3635

37-
- name: rocky-8-puppet-5
38-
driver_config:
39-
# we use a custom image that runs systemd
40-
image: 'datadog/docker-library:chef_kitchen_systemd_rocky_8'
41-
platform: rhel # kitchen-docker doesn't recognize rocky otherwise
42-
run_command: /root/start.sh
36+
- name: ubuntu-22.04-puppet-8
4337
driver:
38+
image: 'ubuntu:22.04'
4439
provision_command:
45-
- dnf install -y https://yum.puppetlabs.com/puppet7-release-el-8.noarch.rpm #installs the puppet-agent repo
46-
- dnf install -y puppet-agent rubygems
40+
- apt-get update
41+
- apt-get install -y apt-utils apt-transport-https ca-certificates wget
42+
- wget https://apt.puppet.com/puppet8-release-jammy.deb
43+
- dpkg -i puppet8-release-jammy.deb #installs the puppet-agent repo
44+
- apt-get update
45+
- apt-get install -y puppet-agent rubygems ruby-dev make gcc
4746
- ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet
4847

49-
- mkdir /home/kitchen/puppet
48+
- mkdir /home/kitchen/puppet -p
5049
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
5150
- printf <%= File.read('environments/etc/Gemfile').inspect %> > /home/Gemfile
5251

5352
- gem install bundler -v '= 2.4.13'
54-
5553
- cd /home && bundle install
5654
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
5755

58-
- name: ubuntu-1604-puppet-6
59-
driver_config:
60-
# we use the official image
61-
image: 'ubuntu:16.04'
56+
- name: ubuntu-20.04-puppet-8
6257
driver:
58+
image: 'ubuntu:20.04'
59+
docker_platform: linux/amd64
6360
provision_command:
64-
- apt-get install -y apt-utils apt-transport-https ca-certificates
65-
- wget https://apt.puppetlabs.com/puppet6-release-xenial.deb
66-
- dpkg -i puppet6-release-xenial.deb #installs the puppet-agent repo
61+
- apt-get install -y apt-utils apt-transport-https ca-certificates make gcc
62+
- wget https://apt.puppet.com/puppet8-release-focal.deb
63+
- dpkg -i puppet8-release-focal.deb #installs the puppet-agent repo
6764
- apt-get update
68-
- apt-get install -y puppet-agent rubygems
65+
- apt-get install -y puppet-agent rubygems ruby-dev
6966
- ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet
7067

7168
- mkdir /home/kitchen/puppet
@@ -76,40 +73,99 @@ platforms:
7673
- cd /home && bundle install
7774
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
7875

79-
- name: opensuse/leap-15
80-
# Workaround for flakes on initializing opensuse/leap-15:
81-
# => SCP did not finish successfully (255): (Net::SCP::Error)
82-
transport:
83-
max_ssh_sessions: 1
84-
driver_config:
85-
# we use a custom image that runs systemd
86-
image: 'datadog/docker-library:chef_kitchen_systemd_opensuse_leap_15'
87-
run_command: /root/start.sh
88-
76+
# mirrorlist.centos.org is no longer available for <= centos8/centos-stream8
77+
# - name: centos-stream8-puppet-8
78+
# driver_config:
79+
# image: 'quay.io/centos/centos:stream9'
80+
# platform: centosstream
81+
# driver:
82+
# use_sudo: true
83+
# privileged: true
84+
# provision_command:
85+
# - rpm -Uvh https://yum.puppet.com/puppet8-release-el-8.noarch.rpm #installs the puppet-agent repo
86+
# - yum install -y puppet-agent rubygems ruby-devel make gcc
87+
# - ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet
88+
89+
# - mkdir /home/kitchen/puppet -p
90+
# - printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
91+
# - printf <%= File.read('environments/etc/Gemfile').inspect %> > /home/Gemfile
92+
93+
# - gem install bundler -v '= 2.4.13'
94+
# # we use bundle to install gems and to lock dependencies versions of semantic_puppet and multipart-post
95+
# - cd /home && bundle install
96+
# - cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
97+
98+
- name: centos-stream9-puppet-8
8999
driver:
100+
image: 'quay.io/centos/centos:stream9'
101+
platform: centosstream
102+
use_sudo: true
103+
privileged: true
90104
provision_command:
91-
- zypper ar -G https://yum.puppet.com/puppet/sles/15/x86_64/ puppet-repo
92-
- zypper install -y puppet-agent ruby=2.5
105+
- rpm -Uvh https://yum.puppet.com/puppet8-release-el-9.noarch.rpm #installs the puppet-agent repo
106+
- yum install -y puppet-agent rubygems ruby-devel
107+
- dnf group install -y "Development Tools"
108+
- ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet
109+
110+
- mkdir /home/kitchen/puppet -p
111+
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
112+
- printf <%= File.read('environments/etc/Gemfile').inspect %> > /home/Gemfile
113+
93114
- gem install bundler -v '= 2.4.13'
94-
- gem install net-ssh -v '= 6.1.0'
95-
- gem install rspec-its -v '= 1.3.1'
96-
- gem install serverspec rspec
97-
- ln -s /usr/bin/rspec.ruby2.5 /usr/bin/rspec
98-
- ln -s /opt/puppetlabs/puppet/bin/puppet /usr/bin/puppet
115+
# we use bundle to install gems and to lock dependencies versions of semantic_puppet and multipart-post
116+
- cd /home && bundle install
117+
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
118+
119+
- name: rocky-9-puppet-8
120+
driver:
121+
image: 'rockylinux:9.3'
122+
platform: centosstream # kitchen-docker has issues installing packages otherwises
123+
provision_command:
124+
- dnf install -y https://yum.puppet.com/puppet8-release-el-9.noarch.rpm #installs the puppet-agent repo
125+
- dnf install -y puppet-agent rubygems ruby-devel
126+
- dnf group install -y "Development Tools"
127+
- ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet
128+
99129
- mkdir /home/kitchen/puppet
100130
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
101131
- printf <%= File.read('environments/etc/Gemfile').inspect %> > /home/Gemfile
102132

103-
- cd /home && bundle.ruby2.5 install
133+
- gem install bundler -v '= 2.4.13'
134+
135+
- cd /home && bundle install
104136
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
105137

106-
verifier:
107-
name: serverspec
138+
# - name: opensuse/leap-15
139+
# # Workaround for flakes on initializing opensuse/leap-15:
140+
# # => SCP did not finish successfully (255): (Net::SCP::Error)
141+
# transport:
142+
# max_ssh_sessions: 1
143+
# driver_config:
144+
# # we use a custom image that runs systemd
145+
# image: 'datadog/docker-library:chef_kitchen_systemd_opensuse_leap_15'
146+
# run_command: /root/start.sh
147+
# driver:
148+
# provision_command:
149+
# - zypper ar -G https://yum.puppet.com/puppet/sles/15/x86_64/ puppet-repo
150+
# - zypper install -y puppet-agent ruby=2.5
151+
# - gem install bundler -v '= 1.17.3'
152+
# - gem install net-ssh -v '= 6.1.0'
153+
# - gem install rspec-its -v '= 1.3.1'
154+
# - gem install serverspec rspec
155+
# - ln -s /usr/bin/rspec.ruby2.5 /usr/bin/rspec
156+
# - ln -s /opt/puppetlabs/puppet/bin/puppet /usr/bin/puppet
157+
# - mkdir /home/kitchen/puppet
158+
# - printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
159+
# - printf <%= File.read('environments/etc/Gemfile').inspect %> > /home/Gemfile
160+
161+
# - cd /home && bundle.ruby2.5 install
162+
# - cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
108163

109164
suites:
110165
- name: dd-agent
111166
manifests: init.pp
112167
verifier:
168+
name: serverspec
113169
default_pattern: true
114170
additional_install_commmand: source /etc/profile.d/rvm.sh
115171
env_vars:
@@ -122,6 +178,7 @@ suites:
122178
provisioner:
123179
manifests_path: environments/etc/installer-manifests
124180
verifier:
181+
name: serverspec
125182
default_pattern: true
126183
additional_install_commmand: source /etc/profile.d/rvm.sh
127184
env_vars:

manifests/integrations/activemq_xml.pp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Class: datadog_agent::integrations::activemq_xml
22
#
3-
# This class will install the necessary configuration for the activemq_xml integration
3+
# This class will install the necessary configuration for the activemq_xml integration.
4+
#
5+
# See the sample activemq.d/conf.yaml for all available configuration options.
6+
# https://github.com/DataDog/integrations-core/blob/master/activemq/datadog_checks/activemq/data/conf.yaml.example
7+
#
8+
# See the metrics.yaml file for the list of default collected metrics.
9+
# https://github.com/DataDog/integrations-core/blob/master/activemq/datadog_checks/activemq/data/metrics.yaml
10+
#
11+
# This check has a limit of 350 metrics per instance. If you require
12+
# additional metrics, contact Datadog Support at https://docs.datadoghq.com/help/
413
#
514
# Parameters:
615
# $url

manifests/integrations/apache.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# This class will install the necessary configuration for the apache integration
44
#
5+
# See the sample apache.d/conf.yaml for all available configuration options.
6+
# https://github.com/DataDog/integrations-core/blob/master/apache/datadog_checks/apache/data/conf.yaml.example
7+
#
58
# Parameters:
69
# $url:
710
# The URL for apache status URL handled by mod-status.

manifests/integrations/cacti.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# This class will install the necessary configuration for the cacti integration
44
#
5+
# See the sample cacti.d/conf.yaml for all available configuration options.
6+
# https://github.com/DataDog/integrations-core/blob/master/cacti/datadog_checks/cacti/data/conf.yaml.example
7+
#
58
# Parameters:
69
# $host:
710
# The host cacti MySQL db is running on

manifests/integrations/cassandra.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
# This class will install the necessary configuration for the Cassandra
44
# integration.
55
#
6+
# See the sample cassandra.d/conf.yaml for all available configuration options.
7+
# https://github.com/DataDog/integrations-core/blob/master/cassandra/datadog_checks/cassandra/data/conf.yaml.example
8+
#
9+
# See the metrics.yaml file for the list of default collected metrics.
10+
# https://github.com/DataDog/integrations-core/blob/master/cassandra/datadog_checks/cassandra/data/metrics.yaml
11+
#
612
# This check has a limit of 350 metrics per instance. If you require
713
# additional metrics, contact Datadog Support at https://docs.datadoghq.com/help/
814
#

manifests/integrations/ceph.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# This class will install the necessary configuration for the ceph integration
44
#
5+
# See the sample ceph.d/conf.yaml for all available configuration options
6+
# https://github.com/DataDog/integrations-core/blob/master/ceph/datadog_checks/ceph/data/conf.yaml.example
7+
#
58
# Parameters:
69
# $tags
710
# Optional array of tags

manifests/integrations/consul.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# This class will install the necessary configuration for the consul integration
44
#
5+
# See the sample consul.d/conf.yaml for all available configuration options
6+
# https://github.com/DataDog/integrations-core/blob/master/consul/datadog_checks/consul/data/conf.yaml.example
7+
#
58
# Parameters:
69
# $url:
710
# The URL for consul

manifests/integrations/directory.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# This class will install the necessary config to hook the directory in the agent
44
#
5+
# See the sample directory.d/conf.yaml for all available configuration options
6+
# https://github.com/DataDog/integrations-core/blob/master/directory/datadog_checks/directory/data/conf.yaml.example
7+
#
58
# Parameters:
69
# directory
710
# (Required) - string, the directory path to monitor

0 commit comments

Comments
 (0)