beaker-puppet 0.11.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/beaker-puppet/install_utils/foss_utils.rb +4 -4
- data/lib/beaker-puppet/version.rb +1 -1
- data/setup/aio/010_Install_Puppet_Agent.rb +20 -0
- data/setup/aio/011_Install_Puppet_Server.rb +28 -0
- data/setup/aio/012_Finalize_Installs.rb +27 -0
- data/tasks/ci.rake +3 -1
- metadata +4 -2
- data/setup/aio/010_Install.rb +0 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baf6c7573f1464e753122579affd37a18e9184c7
|
4
|
+
data.tar.gz: 1552fbe2833aab8842839f3f715073dd91baffa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3c687b34317b0d7601e09aa7da6779b04685fb355cb662d1e5aa36cd06a9883f78d947b2f37ef7016494303b34f9b6dbfb793733f09b79d557a6d68872867aa
|
7
|
+
data.tar.gz: 9fcb8b9f18b67918e802599d68e3b3d0c0463a9766f9151334570f8fe53a216246883ac832295e728cb4c3e23da2267ff3450e1ce52c4bc9819c03a7bdcf7597
|
data/README.md
CHANGED
@@ -56,3 +56,13 @@ environment variable. You can also specify the tests that get executed with the
|
|
56
56
|
# Contributing
|
57
57
|
|
58
58
|
Please refer to puppetlabs/beaker's [contributing](https://github.com/puppetlabs/beaker/blob/master/CONTRIBUTING.md) guide.
|
59
|
+
|
60
|
+
# Releasing
|
61
|
+
|
62
|
+
To release new versions of beaker-puppet, please use the [jenkins job](https://cinext-jenkinsmaster-sre-prod-1.delivery.puppetlabs.net/job/qe_beaker-puppet_init-multijob_master/). This job
|
63
|
+
lives on internal infrastructure.
|
64
|
+
|
65
|
+
To run the job, click on `Build with Parameters` in the menu on the left. Make
|
66
|
+
sure you check the box next to `PUBLIC` and enter the appropriate version. The
|
67
|
+
version should adhere to semantic version standards. When in doubt, consult the
|
68
|
+
maintainers of Beaker for guidance.
|
@@ -964,14 +964,14 @@ module Beaker
|
|
964
964
|
|
965
965
|
when /^(debian|ubuntu|cumulus|huaweios)$/
|
966
966
|
if repo_name.match(/puppet\d*/)
|
967
|
-
|
967
|
+
remote = "%s/%s-release-%s.deb" %
|
968
|
+
[opts[:release_apt_repo_url], repo_name, codename]
|
968
969
|
else
|
969
970
|
repo_name = '-' + repo_name unless repo_name.empty?
|
970
|
-
|
971
|
+
remote = "%s/puppetlabs-release%s-%s.deb" %
|
972
|
+
[opts[:release_apt_repo_url], repo_name, codename]
|
971
973
|
end
|
972
974
|
|
973
|
-
remote = URI.join( opts[:release_apt_repo_url], deb )
|
974
|
-
|
975
975
|
on host, "wget -O /tmp/puppet.deb #{remote}"
|
976
976
|
on host, "dpkg -i --force-all /tmp/puppet.deb"
|
977
977
|
on host, "apt-get update"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
extend BeakerPuppet::Install::Puppet5
|
2
|
+
extend Beaker::DSL::InstallUtils::FOSSUtils
|
3
|
+
|
4
|
+
test_name "Install Packages" do
|
5
|
+
|
6
|
+
dev_builds_url = ENV['DEV_BUILDS_URL'] || 'http://builds.delivery.puppetlabs.net'
|
7
|
+
|
8
|
+
step "Install puppet-agent..." do
|
9
|
+
sha = ENV['SHA']
|
10
|
+
install_from_build_data_url('puppet-agent', "#{dev_builds_url}/puppet-agent/#{sha}/artifacts/#{sha}.yaml", hosts)
|
11
|
+
end
|
12
|
+
|
13
|
+
# make sure install is sane, beaker has already added puppet and ruby
|
14
|
+
# to PATH in ~/.ssh/environment
|
15
|
+
agents.each do |agent|
|
16
|
+
on agent, puppet('--version')
|
17
|
+
ruby = ruby_command(agent)
|
18
|
+
on agent, "#{ruby} --version"
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
extend BeakerPuppet::Install::Puppet5
|
2
|
+
extend Beaker::DSL::InstallUtils::FOSSUtils
|
3
|
+
|
4
|
+
test_name "Install Puppet Server" do
|
5
|
+
server_version = ENV['SERVER_VERSION'] || 'latest'
|
6
|
+
release_stream = ENV['RELEASE_STREAM'] || 'puppet'
|
7
|
+
nightly_builds_url = ENV['NIGHTLY_BUILDS_URL'] || 'http://nightlies.puppet.com'
|
8
|
+
dev_builds_url = ENV['DEV_BUILDS_URL'] || 'http://builds.delivery.puppetlabs.net'
|
9
|
+
|
10
|
+
if nightly_builds_url == 'http://nightlies.puppet.com'
|
11
|
+
yum_nightlies_url = nightly_builds_url + '/yum'
|
12
|
+
apt_nightlies_url = nightly_builds_url + '/apt'
|
13
|
+
else
|
14
|
+
yum_nightlies_url = nightly_builds_url
|
15
|
+
apt_nightlies_url = nightly_builds_url
|
16
|
+
end
|
17
|
+
|
18
|
+
if server_version == 'latest'
|
19
|
+
opts = {
|
20
|
+
:release_yum_repo_url => yum_nightlies_url,
|
21
|
+
:release_apt_repo_url => apt_nightlies_url
|
22
|
+
}
|
23
|
+
install_puppetlabs_release_repo_on(master, "#{release_stream}-nightly", opts)
|
24
|
+
master.install_package('puppetserver')
|
25
|
+
else
|
26
|
+
install_from_build_data_url('puppetserver', "#{dev_builds_url}/puppetserver/#{server_version}/artifacts/#{server_version}.yaml", master)
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
extend Beaker::DSL::InstallUtils::FOSSUtils
|
2
|
+
|
3
|
+
test_name "Finalize Host Installation"
|
4
|
+
|
5
|
+
step "Verify host times" do
|
6
|
+
# Get a rough estimate of clock skew among hosts
|
7
|
+
times = []
|
8
|
+
hosts.each do |host|
|
9
|
+
ruby = ruby_command(host)
|
10
|
+
on(host, "#{ruby} -e 'puts Time.now.strftime(\"%Y-%m-%d %T.%L %z\")'") do |result|
|
11
|
+
times << result.stdout.chomp
|
12
|
+
end
|
13
|
+
end
|
14
|
+
times.map! do |time|
|
15
|
+
(Time.strptime(time, "%Y-%m-%d %T.%L %z").to_f * 1000.0).to_i
|
16
|
+
end
|
17
|
+
diff = times.max - times.min
|
18
|
+
if diff < 60000
|
19
|
+
logger.info "Host times vary #{diff} ms"
|
20
|
+
else
|
21
|
+
logger.warn "Host times vary #{diff} ms, tests may fail"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
step "Configure gem mirror" do
|
26
|
+
configure_gem_mirror(hosts)
|
27
|
+
end
|
data/tasks/ci.rake
CHANGED
@@ -202,7 +202,9 @@ def pre_suites(type)
|
|
202
202
|
when :aio
|
203
203
|
[
|
204
204
|
"#{beaker_root}/setup/common/000-delete-puppet-when-none.rb",
|
205
|
-
"#{beaker_root}/setup/aio/
|
205
|
+
"#{beaker_root}/setup/aio/010_Install_Puppet_Agent.rb",
|
206
|
+
"#{beaker_root}/setup/aio/011_Install_Puppet_Server.rb",
|
207
|
+
"#{beaker_root}/setup/aio/012_Finalize_Installs.rb",
|
206
208
|
"#{beaker_root}/setup/aio/020_InstallCumulusModules.rb",
|
207
209
|
"#{beaker_root}/setup/aio/021_InstallAristaModule.rb",
|
208
210
|
"#{beaker_root}/setup/common/025_StopFirewall.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
@@ -233,7 +233,9 @@ files:
|
|
233
233
|
- lib/beaker/dsl/install_utils/foss_utils.rb
|
234
234
|
- lib/beaker/dsl/install_utils/module_utils.rb
|
235
235
|
- lib/beaker/dsl/install_utils/puppet_utils.rb
|
236
|
-
- setup/aio/
|
236
|
+
- setup/aio/010_Install_Puppet_Agent.rb
|
237
|
+
- setup/aio/011_Install_Puppet_Server.rb
|
238
|
+
- setup/aio/012_Finalize_Installs.rb
|
237
239
|
- setup/aio/020_InstallCumulusModules.rb
|
238
240
|
- setup/aio/021_InstallAristaModule.rb
|
239
241
|
- setup/aio/045_EnsureMasterStarted.rb
|
data/setup/aio/010_Install.rb
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
extend BeakerPuppet::Install::Puppet5
|
2
|
-
extend Beaker::DSL::InstallUtils::FOSSUtils
|
3
|
-
|
4
|
-
test_name "Install Packages"
|
5
|
-
|
6
|
-
dev_builds_url = ENV['DEV_BUILDS_URL'] || 'http://builds.delivery.puppetlabs.net'
|
7
|
-
nightly_builds_url = ENV['NIGHTLY_BUILDS_URL'] || "http://ravi.puppetlabs.com"
|
8
|
-
|
9
|
-
step "Install puppet-agent..." do
|
10
|
-
sha = ENV['SHA']
|
11
|
-
install_from_build_data_url('puppet-agent', "#{dev_builds_url}/puppet-agent/#{sha}/artifacts/#{sha}.yaml", hosts)
|
12
|
-
end
|
13
|
-
|
14
|
-
step "Install puppetserver..." do
|
15
|
-
if ENV['SERVER_VERSION'].nil? || ENV['SERVER_VERSION'] == 'latest'
|
16
|
-
install_puppetlabs_dev_repo(master, 'puppetserver', 'latest', nil, :dev_builds_url => nightly_builds_url)
|
17
|
-
master.install_package('puppetserver')
|
18
|
-
else
|
19
|
-
server_version = ENV['SERVER_VERSION']
|
20
|
-
install_from_build_data_url('puppetserver', "#{dev_builds_url}/puppetserver/#{server_version}/artifacts/#{server_version}.yaml", master)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
# make sure install is sane, beaker has already added puppet and ruby
|
25
|
-
# to PATH in ~/.ssh/environment
|
26
|
-
agents.each do |agent|
|
27
|
-
on agent, puppet('--version')
|
28
|
-
ruby = ruby_command(agent)
|
29
|
-
on agent, "#{ruby} --version"
|
30
|
-
end
|
31
|
-
|
32
|
-
# Get a rough estimate of clock skew among hosts
|
33
|
-
times = []
|
34
|
-
hosts.each do |host|
|
35
|
-
ruby = ruby_command(host)
|
36
|
-
on(host, "#{ruby} -e 'puts Time.now.strftime(\"%Y-%m-%d %T.%L %z\")'") do |result|
|
37
|
-
times << result.stdout.chomp
|
38
|
-
end
|
39
|
-
end
|
40
|
-
times.map! do |time|
|
41
|
-
(Time.strptime(time, "%Y-%m-%d %T.%L %z").to_f * 1000.0).to_i
|
42
|
-
end
|
43
|
-
diff = times.max - times.min
|
44
|
-
if diff < 60000
|
45
|
-
logger.info "Host times vary #{diff} ms"
|
46
|
-
else
|
47
|
-
logger.warn "Host times vary #{diff} ms, tests may fail"
|
48
|
-
end
|
49
|
-
|
50
|
-
configure_gem_mirror(hosts)
|