-
Notifications
You must be signed in to change notification settings - Fork 261
/
kitchen.yml
118 lines (102 loc) · 4.52 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
---
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: centos-7-puppet-5
driver_config:
# we use a custom image that runs systemd
image: 'datadog/docker-library:chef_kitchen_systemd_centos_7'
run_command: /root/start.sh
driver:
provision_command:
- rpm -ivh http://yum.puppetlabs.com/puppet5-release-el-7.noarch.rpm #installs the puppet-agent repo
- yum install -y puppet-agent rubygems
- 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 '= 1.17.3'
# 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-8-puppet-5
driver_config:
# we use a custom image that runs systemd
image: 'datadog/docker-library:chef_kitchen_systemd_rocky_8'
platform: rhel # kitchen-docker doesn't recognize rocky otherwise
run_command: /root/start.sh
driver:
provision_command:
- dnf install -y https://yum.puppetlabs.com/puppet7-release-el-8.noarch.rpm #installs the puppet-agent repo
- dnf install -y puppet-agent rubygems
- 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 '= 1.17.3'
- cd /home && bundle install
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
- name: ubuntu-1604-puppet-6
driver_config:
# we use the official image
image: 'ubuntu:16.04'
driver:
provision_command:
- apt-get install -y apt-utils apt-transport-https ca-certificates
- wget https://apt.puppetlabs.com/puppet6-release-xenial.deb
- dpkg -i puppet6-release-xenial.deb #installs the puppet-agent repo
- apt-get update
- apt-get install -y puppet-agent rubygems
- 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 '= 1.17.3'
- 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'
run_command: /root/start.sh
driver:
provision_command:
- zypper ar -G https://yum.puppet.com/puppet/sles/15/x86_64/ puppet-repo
- zypper install -y puppet-agent ruby=2.5
- gem install bundler -v '= 1.17.3'
- gem install net-ssh -v '= 6.1.0'
- gem install serverspec rspec
- ln -s /usr/bin/rspec.ruby2.5 /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.5 install
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
verifier:
name: serverspec
suites:
- name: dd-agent
manifests: init.pp
verifier:
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