beaker-puppet 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: baf6c7573f1464e753122579affd37a18e9184c7
4
- data.tar.gz: 1552fbe2833aab8842839f3f715073dd91baffa9
3
+ metadata.gz: 0e4984104b47dcc714f53c2207bc453aeabf46aa
4
+ data.tar.gz: b09f92e371c98e7aaaf4667d9bfe23de2dee3abb
5
5
  SHA512:
6
- metadata.gz: b3c687b34317b0d7601e09aa7da6779b04685fb355cb662d1e5aa36cd06a9883f78d947b2f37ef7016494303b34f9b6dbfb793733f09b79d557a6d68872867aa
7
- data.tar.gz: 9fcb8b9f18b67918e802599d68e3b3d0c0463a9766f9151334570f8fe53a216246883ac832295e728cb4c3e23da2267ff3450e1ce52c4bc9819c03a7bdcf7597
6
+ metadata.gz: b96fd2fa745a86e4ff0523639a390c8eeb73c2a6ea9cd834110ac699899f86a9818b9b6f35e57db853e3f96da8f342477ad01309457fcd2ce1d8b6141516cd6a
7
+ data.tar.gz: 392f44a882bd9f9f14c532ae7297bfdea012832dce57f9522087550ed400207360c35101bdd62996d3a9687edd1c9614eb5fb5c01d50da298ca6476a7de1a0e7
@@ -1,3 +1,3 @@
1
1
  module BeakerPuppet
2
- VERSION = '0.12.0'
2
+ VERSION = '0.13.0'
3
3
  end
@@ -2,6 +2,8 @@ extend BeakerPuppet::Install::Puppet5
2
2
  extend Beaker::DSL::InstallUtils::FOSSUtils
3
3
 
4
4
  test_name "Install Puppet Server" do
5
+ skip_test "not testing with puppetserver" unless @options['is_puppetserver']
6
+
5
7
  server_version = ENV['SERVER_VERSION'] || 'latest'
6
8
  release_stream = ENV['RELEASE_STREAM'] || 'puppet'
7
9
  nightly_builds_url = ENV['NIGHTLY_BUILDS_URL'] || 'http://nightlies.puppet.com'
@@ -1,5 +1,6 @@
1
1
  platforms = hosts.map{|val| val[:platform]}
2
2
  skip_test "No cumulus hosts present" unless platforms.any? { |val| /cumulus/ =~ val }
3
+ skip_test "not testing with puppetserver" unless @options['is_puppetserver']
3
4
  confine :to, {}, hosts.select { |host| host[:roles].include?('master') }
4
5
 
5
6
  step 'install Cumulus Modules on masters' do
@@ -0,0 +1,12 @@
1
+ platforms = hosts.map{|val| val[:platform]}
2
+ skip_test "No arista hosts present" unless platforms.any? { |val| /^eos-/ =~ val }
3
+ skip_test 'not testing with puppetserver' unless @options['is_puppetserver']
4
+ test_name 'Arista Switch Pre-suite' do
5
+ masters = select_hosts({:roles => ['master', 'compile_master']})
6
+
7
+ step 'install Arista Module on masters' do
8
+ masters.each do |node|
9
+ on(node, puppet('module','install','aristanetworks-netdev_stdlib_eos'))
10
+ end
11
+ end
12
+ end
@@ -1,15 +1,8 @@
1
1
  platforms = hosts.map{|val| val[:platform]}
2
2
  skip_test "No arista hosts present" unless platforms.any? { |val| /^eos-/ =~ val }
3
3
  test_name 'Arista Switch Pre-suite' do
4
- masters = select_hosts({:roles => ['master', 'compile_master']})
5
4
  switchs = select_hosts({:platform => ['eos-4-i386']})
6
5
 
7
- step 'install Arista Module on masters' do
8
- masters.each do |node|
9
- on(node, puppet('module','install','aristanetworks-netdev_stdlib_eos'))
10
- end
11
- end
12
-
13
6
  step 'add puppet user to switch' do
14
7
  switchs.each do |switch|
15
8
  on(switch, "useradd -U puppet")
@@ -1 +1,4 @@
1
- on(master, puppet('resource', 'service', master['puppetservice'], "ensure=running"))
1
+ test_name "Ensure the master is running"
2
+ skip_test 'not testing with puppetserver' unless @options['is_puppetserver']
3
+
4
+ on(master, puppet('resource', 'service', master['puppetservice'], "ensure=running", "enable=true"))
@@ -1,4 +1,5 @@
1
1
  test_name "Stop firewall" do
2
+ skip_test 'not testing with puppetserver' unless @options['is_puppetserver']
2
3
  hosts.each do |host|
3
4
  case host['platform']
4
5
  when /debian/
@@ -1,4 +1,5 @@
1
1
  test_name "Validate Sign Cert" do
2
+ skip_test 'not testing with puppetserver' unless @options['is_puppetserver']
2
3
  hostname = on(master, 'facter hostname').stdout.strip
3
4
  fqdn = on(master, 'facter fqdn').stdout.strip
4
5
 
@@ -77,21 +77,6 @@ END
77
77
  end
78
78
  end
79
79
 
80
- step "Hosts: create basic puppet.conf" do
81
- hosts.each do |host|
82
- confdir = host.puppet['confdir']
83
- on host, "mkdir -p #{confdir}"
84
- puppetconf = File.join(confdir, 'puppet.conf')
85
-
86
- if host['roles'].include?('agent')
87
- on host, "echo '[agent]' > '#{puppetconf}' && " +
88
- "echo server=#{master} >> '#{puppetconf}'"
89
- else
90
- on host, "touch '#{puppetconf}'"
91
- end
92
- end
93
- end
94
-
95
80
  step "Hosts: create environments directory like AIO does" do
96
81
  hosts.each do |host|
97
82
  codedir = host.puppet['codedir']
@@ -0,0 +1,15 @@
1
+ test_name 'Hosts: create basic puppet.conf' do
2
+ skip_test 'not testing with puppetserver' unless @options['is_puppetserver']
3
+ hosts.each do |host|
4
+ confdir = host.puppet['confdir']
5
+ on host, "mkdir -p #{confdir}"
6
+ puppetconf = File.join(confdir, 'puppet.conf')
7
+
8
+ if host['roles'].include?('agent')
9
+ on host, "echo '[agent]' > '#{puppetconf}' && " +
10
+ "echo server=#{master} >> '#{puppetconf}'"
11
+ else
12
+ on host, "touch '#{puppetconf}'"
13
+ end
14
+ end
15
+ end
@@ -1,5 +1,7 @@
1
1
  test_name "Puppet Master sanity checks: PID file and SSL dir creation"
2
2
 
3
+ skip_test 'not testing with puppetserver' unless @options['is_puppetserver']
4
+
3
5
  hostname = on(master, 'facter hostname').stdout.strip
4
6
  fqdn = on(master, 'facter fqdn').stdout.strip
5
7
 
@@ -62,6 +62,10 @@ def install_scp_module(mod, hosts)
62
62
  scp_to hosts, mod[:url].split(':', 2)[1], target
63
63
  end
64
64
 
65
+ test_name 'Install Puppet Modules'
66
+
67
+ skip_test 'not testing with puppetserver' unless @options['is_puppetserver']
68
+
65
69
  modules = PuppetModules.new(options[:modules]).list
66
70
 
67
71
  step "Masters: Install Puppet Modules"
data/tasks/ci.rake CHANGED
@@ -11,6 +11,11 @@ REPO_CONFIGS_DIR = 'repo-configs'
11
11
  CLEAN.include('*.tar', REPO_CONFIGS_DIR, 'tmp', '.beaker')
12
12
 
13
13
  # Default test target if none specified
14
+ # TODO There are some projects that do not need to test against a master. It
15
+ # might be worth it to distinguish between these two scenarios so that we are
16
+ # maximizing our available resources. As it, we are allocating a master for all
17
+ # runs. Luckily, that master is also classified as an agent, so it's not a total
18
+ # waste of resources.
14
19
  DEFAULT_MASTER_TEST_TARGET = 'redhat7-64m'
15
20
  DEFAULT_TEST_TARGETS = "#{DEFAULT_MASTER_TEST_TARGET}a-windows2012r2-64a"
16
21
 
@@ -191,7 +196,9 @@ def beaker_suite(type)
191
196
  beaker(:init, '--hosts', ENV['HOSTS'], '--options-file', "config/#{String(type)}/options.rb")
192
197
  beaker(:provision)
193
198
  beaker(:exec, 'pre-suite', '--pre-suite', pre_suites(type))
199
+ beaker(:exec, 'pre-suite')
194
200
  beaker(:exec, ENV['TESTS'])
201
+ beaker(:exec, 'post-suite')
195
202
  beaker(:destroy)
196
203
  end
197
204
 
@@ -206,7 +213,8 @@ def pre_suites(type)
206
213
  "#{beaker_root}/setup/aio/011_Install_Puppet_Server.rb",
207
214
  "#{beaker_root}/setup/aio/012_Finalize_Installs.rb",
208
215
  "#{beaker_root}/setup/aio/020_InstallCumulusModules.rb",
209
- "#{beaker_root}/setup/aio/021_InstallAristaModule.rb",
216
+ "#{beaker_root}/setup/aio/021_InstallAristaModuleMasters.rb",
217
+ "#{beaker_root}/setup/aio/022_InstallAristaModuleAgents.rb",
210
218
  "#{beaker_root}/setup/common/025_StopFirewall.rb",
211
219
  "#{beaker_root}/setup/common/030_StopSssd.rb",
212
220
  "#{beaker_root}/setup/common/040_ValidateSignCert.rb",
@@ -222,6 +230,7 @@ def pre_suites(type)
222
230
  "#{beaker_root}/setup/common/000-delete-puppet-when-none.rb",
223
231
  "#{beaker_root}/setup/git/000_EnvSetup.rb",
224
232
  "#{beaker_root}/setup/git/010_TestSetup.rb",
233
+ "#{beaker_root}/setup/git/011_SetMaster.rb",
225
234
  "#{beaker_root}/setup/git/020_PuppetUserAndGroup.rb",
226
235
  "#{beaker_root}/setup/common/025_StopFirewall.rb",
227
236
  "#{beaker_root}/setup/git/030_PuppetMasterSanity.rb",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-26 00:00:00.000000000 Z
11
+ date: 2018-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -237,7 +237,8 @@ files:
237
237
  - setup/aio/011_Install_Puppet_Server.rb
238
238
  - setup/aio/012_Finalize_Installs.rb
239
239
  - setup/aio/020_InstallCumulusModules.rb
240
- - setup/aio/021_InstallAristaModule.rb
240
+ - setup/aio/021_InstallAristaModuleMasters.rb
241
+ - setup/aio/022_InstallAristaModuleAgents.rb
241
242
  - setup/aio/045_EnsureMasterStarted.rb
242
243
  - setup/common/000-delete-puppet-when-none.rb
243
244
  - setup/common/025_StopFirewall.rb
@@ -246,6 +247,7 @@ files:
246
247
  - setup/gem/010_GemInstall.rb
247
248
  - setup/git/000_EnvSetup.rb
248
249
  - setup/git/010_TestSetup.rb
250
+ - setup/git/011_SetMaster.rb
249
251
  - setup/git/020_PuppetUserAndGroup.rb
250
252
  - setup/git/030_PuppetMasterSanity.rb
251
253
  - setup/git/060_InstallModules.rb