-
Notifications
You must be signed in to change notification settings - Fork 262
/
Copy pathkitchen.yml
186 lines (166 loc) · 7.09 KB
/
kitchen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
---
driver:
name: docker
provisioner:
name: puppet_apply
manifests_path: environments/etc/manifests
modules_path: /tmp/modules
require_puppet_repo: false
require_puppet_collections: false
require_chef_for_busser: false
puppet_debug: true
puppet_verbose: true
custom_pre_apply_command: 'cp -r /tmp/modules/* /tmp/kitchen/modules/'
platforms:
- name: ubuntu-24.04-puppet-8
driver:
image: 'ubuntu:24.04'
provision_command:
- apt-get install -y apt-utils apt-transport-https ca-certificates
- wget https://apt.puppet.com/puppet8-release-noble.deb
- dpkg -i puppet8-release-noble.deb #installs the puppet-agent repo
- apt-get update
- apt-get install -y puppet-agent rubygems ruby-dev make gcc
- ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet
- mkdir /home/kitchen/puppet
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
- printf <%= File.read('environments/etc/Gemfile').inspect %> > /home/Gemfile
- gem install bundler -v '= 2.4.13'
- cd /home && bundle install
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
- name: ubuntu-22.04-puppet-8
driver:
image: 'ubuntu:22.04'
provision_command:
- apt-get update
- apt-get install -y apt-utils apt-transport-https ca-certificates wget
- wget https://apt.puppet.com/puppet8-release-jammy.deb
- dpkg -i puppet8-release-jammy.deb #installs the puppet-agent repo
- apt-get update
- apt-get install -y puppet-agent rubygems ruby-dev make gcc
- ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet
- mkdir /home/kitchen/puppet -p
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
- printf <%= File.read('environments/etc/Gemfile').inspect %> > /home/Gemfile
- gem install bundler -v '= 2.4.13'
- cd /home && bundle install
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
- name: ubuntu-20.04-puppet-7
driver:
image: 'ubuntu:20.04'
docker_platform: linux/amd64
provision_command:
- apt-get install -y apt-utils apt-transport-https ca-certificates make gcc
- wget https://apt.puppet.com/puppet7-release-focal.deb
- dpkg -i puppet7-release-focal.deb #installs the puppet-agent repo
- apt-get update
- apt-get install -y puppet-agent rubygems ruby-dev
- ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet
- mkdir /home/kitchen/puppet
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
- printf <%= File.read('environments/etc/Gemfile').inspect %> > /home/Gemfile
- gem install bundler -v '= 2.4.13'
- cd /home && bundle install
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
- name: centos-stream9-puppet-8
driver:
image: 'datadog/docker-library:chef_kitchen_systemd_centos_9'
platform: centosstream
docker_platform: linux/amd64
privileged: true
run_options: --cgroupns=host --tmpfs=/run --volume=/sys/fs/cgroup:/sys/fs/cgroup:rw
run_command: /root/start.sh
provision_command:
- dnf module -y reset ruby
- dnf module -y enable ruby:3.1
- dnf module -y install ruby:3.1/common
- rpm -Uvh https://yum.puppet.com/puppet8-release-el-9.noarch.rpm #installs the puppet-agent repo
- yum install -y puppet-agent-8.10.0 rubygems ruby-devel procps-ng
- dnf group install -y "Development Tools"
- ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet
- mkdir /home/kitchen/puppet -p
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
- printf <%= File.read('environments/etc/Gemfile').inspect %> > /home/Gemfile
- gem install bundler -v '= 2.4.13'
# we use bundle to install gems and to lock dependencies versions of semantic_puppet and multipart-post
- cd /home && bundle install
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
- name: rocky-9-puppet-8
driver:
image: 'datadog/docker-library:chef_kitchen_systemd_rocky_9'
platform: rhel # kitchen-docker has issues installing packages otherwises
docker_platform: linux/amd64
privileged: true
run_options: --cgroupns=host --volume=/sys/fs/cgroup:/sys/fs/cgroup:rw
run_command: /root/start.sh
provision_command:
- dnf module -y reset ruby
- dnf module -y enable ruby:3.1
- dnf module -y install ruby:3.1/common
- rpm -Uvh https://yum.puppet.com/puppet8-release-el-9.noarch.rpm #installs the puppet-agent repo
- yum install -y puppet-agent-8.10.0 rubygems ruby-devel procps-ng
- dnf group install -y "Development Tools"
- ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet
- mkdir /home/kitchen/puppet -p
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
- printf <%= File.read('environments/etc/Gemfile').inspect %> > /home/Gemfile
- gem install bundler -v '= 2.4.13'
# we use bundle to install gems and to lock dependencies versions of semantic_puppet and multipart-post
- cd /home && bundle install
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
#- name: opensuse/leap-15
# # Workaround for flakes on initializing opensuse/leap-15:
# # => SCP did not finish successfully (255): (Net::SCP::Error)
# transport:
# max_ssh_sessions: 1
# driver_config:
# # we use a custom image that runs systemd
# image: 'datadog/docker-library:chef_kitchen_systemd_opensuse_leap_15'
# docker_platform: linux/amd64
# run_command: /root/start.sh
# driver:
# provision_command:
# - zypper ar -G https://yum.puppet.com/puppet/sles/15/x86_64/ puppet-repo
# - zypper refresh
# - zypper install -y puppet-agent
# - export PATH="/opt/puppetlabs/puppet/bin:$PATH"
# - ruby -v
# - puppet --version
#
# - gem install bundler -v '= 1.17.3'
# - gem install net-ssh -v '= 6.1.0'
# - gem install rspec-its -v '= 1.3.1'
# - gem install serverspec rspec
# - ln -s /usr/bin/rspec.ruby2.7 /usr/bin/rspec
# - ln -s /opt/puppetlabs/puppet/bin/puppet /usr/bin/puppet
# - mkdir /home/kitchen/puppet
# - printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
# - printf <%= File.read('environments/etc/Gemfile').inspect %> > /home/Gemfile
#
# - cd /home && bundle.ruby2.7 install
# - cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
suites:
- name: dd-agent
manifests: init.pp
verifier:
name: serverspec
default_pattern: true
additional_install_commmand: source /etc/profile.d/rvm.sh
env_vars:
TARGET_HOST: 127.0.0.1
TARGET_PORT: 2222
LOGIN_USER: root
LOGIN_PASSWORD: puppet
- name: dd-installer
manifests: init.pp
provisioner:
manifests_path: environments/etc/installer-manifests
verifier:
name: serverspec
default_pattern: true
additional_install_commmand: source /etc/profile.d/rvm.sh
env_vars:
TARGET_HOST: 127.0.0.1
TARGET_PORT: 2222
LOGIN_USER: root
LOGIN_PASSWORD: puppet