Skip to content

Commit

Permalink
Merge remote-tracking branch 'puppet/5.0.x'
Browse files Browse the repository at this point in the history
* puppet/5.0.x:
  bumping pxp-agent to c45c7039bf6d3079598de7f4ec2b7974bef93de9
  bumping puppet to 4ee182d9778954e51da298719a7d38d292d50a26
  bumping puppet to 393823d6143c578c58a6bef36b08035337bb868e
  (maint) Update mirrored nssm to match upstream archive
  bumping puppet to 90ad998f5fb15a7562528861266280b3d62e4f2a
  (PA-611) Fix md5 for libselinux tarball
  bumping puppet to 1481600768994e98a33d08653f048e047493c5c8
  bumping puppet to 625ea19cf1eebb60f389dd916b2abce85dbdc6ae
  bumping pxp-agent to de6702c5b3202dcbdaebca46fecc5c84af565ad1
  bumping pxp-agent to c1113c7b0b791376c479740994f2e40892eb349f
  bumping pxp-agent to ea8074678c3e12d19bc333cb45033183dfc5d621
  bumping pxp-agent to f6af761685aff73b32bc62e84f357efc6f192287
  bumping puppet to 0fa0e6e9fbbcf0bc15be5204891a2c011f0b8a6b
  bumping puppet to bca74e2a91ce6c21d6847316e3ce7b82ece57d60
  bumping pxp-agent to f54216f373216726264097cbd6b96e6b3494a20d
  bumping puppet to 0d0f58d627d1f5d8033cd9124067749e18ad50a3
  bumping pxp-agent to 3e5fdb7ea2644670424e549ad2ce201162c8edf9
  (PA-1269) Enable EC2 master install
  • Loading branch information
Magisus committed Jul 13, 2017
2 parents f2da47f + e78394a commit 64e69e4
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 18 deletions.
66 changes: 51 additions & 15 deletions acceptance/setup/aio/pre-suite/010_Install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,62 @@
end

step "Install puppetserver..." do
if ENV['TESTING_RELEASED_PACKAGES']
# unlike the install_puppet_agent_* beaker methods,
# install_puppetlabs_release_repo_on does not use pc1 by default. Have to
# supply pc1 arg to install from pc1 rather than latest in pre-puppet
# collection repos which was version 1.2.0.
install_puppetlabs_release_repo_on(master, 'pc1')
if ENV['SERVER_VERSION'].nil? || ENV['SERVER_VERSION'] == 'latest'
server_version = 'latest'
server_download_url = "http://nightlies.puppet.com"
else
# the dev repos have only a single package, so we need one for both server
# and agent to satisfy server's dep on agent
if ENV['SERVER_VERSION'].nil? || ENV['SERVER_VERSION'] == 'latest'
server_version = 'latest'
server_download_url = "http://nightlies.puppet.com"
server_version = ENV['SERVER_VERSION']
server_download_url = "http://builds.delivery.puppetlabs.net"
end
if master[:hypervisor] == 'ec2'
if master[:platform].match(/(?:el|centos|oracle|redhat|scientific)/)
# An EC2 master instance does not have access to puppetlabs.net for getting
# dev repos. We will install the nightly repo to satisfy the puppetserver
# requirement and then override it with the targeted SHA package later
# So, install the puppet-agent package directly
if server_version == 'latest'
logger.info "EC2 master found: Installing nightly build of puppet-agent repo to satisfy puppetserver dependency."
install_repos_on(master, 'puppet-agent', 'nightly', 'repo-configs')
install_repos_on(master, 'puppetserver', 'nightly', 'repo-configs')
else
variant, version = master['platform'].to_array
if server_version.to_i < 5
logger.info "EC2 master found: Installing nightly build of puppet-agent repo to satisfy puppetserver dependency."
on(master, "rpm -Uvh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-#{version}.noarch.rpm")
else
logger.info "EC2 master found: Installing nightly build of puppet-agent repo to satisfy puppetserver dependency."
on(master, "rpm -Uvh https://yum.puppetlabs.com/puppet5-release-el-#{version}.noarch.rpm")
end
end

master.install_package('puppetserver')

logger.info "EC2 master found: Installing #{ENV['SHA']} build of puppet-agent."
# Override nightly puppet-agent with targeted SHA.
# Currently, only an `el` master is supported for this operation.
opts = {
:puppet_collection => 'PC1',
:puppet_agent_sha => ENV['SHA'],
:puppet_agent_version => ENV['SUITE_VERSION'] || ENV['SHA'] ,
:dev_builds_url => "http://builds.delivery.puppetlabs.net"
}

copy_dir_local = File.join('tmp', 'repo_configs', master['platform'])
release_path_end, release_file = master.puppet_agent_dev_package_info( opts[:puppet_collection], opts[:puppet_agent_version], opts)
release_path = "#{opts[:dev_builds_url]}/puppet-agent/#{opts[:puppet_agent_sha]}/repos/"
release_path << release_path_end
fetch_http_file(release_path, release_file, copy_dir_local)
scp_to master, File.join(copy_dir_local, release_file), master.external_copy_base
on master, "rpm -Uvh #{File.join(master.external_copy_base, release_file)} --oldpackage --force"
else
server_version = ENV['SERVER_VERSION']
server_download_url = "http://builds.delivery.puppetlabs.net"
fail_test("EC2 master found, but it was not an `el` host: The specified `puppet-agent` build (#{ENV['SHA']}) cannot be installed.")
end
else
install_puppetlabs_dev_repo(master, 'puppetserver', server_version, nil, :dev_builds_url => server_download_url)
install_puppetlabs_dev_repo(master, 'puppet-agent', ENV['SHA'], nil, :dev_builds_url => ENV['AGENT_DOWNLOAD_URL'])
install_puppetlabs_dev_repo(master, 'puppet-agent', ENV['SHA'])
master.install_package('puppetserver')
end
master.install_package('puppetserver')

end

# make sure install is sane, beaker has already added puppet and ruby
Expand Down
4 changes: 2 additions & 2 deletions configs/components/nssm.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
component "nssm" do |pkg, settings, platform|
pkg.version "2.24"
pkg.md5sum "0fa251d152383ded6850097279291bb0"
pkg.md5sum "b2edd0e4a7a7be9d157c0da0ef65b1bc"
pkg.url "https://nssm.cc/release/nssm-#{pkg.get_version}.zip"

# Because we're unpacking a zip archive, we need to set the path to the executable.
Expand All @@ -10,5 +10,5 @@

win_arch = platform.architecture == "x64" ? "win64" : "win32"

pkg.install_file "#{win_arch}/nssm.exe", "#{settings[:service_dir]}/nssm.exe"
pkg.install_file "nssm-2.24/#{win_arch}/nssm.exe", "#{settings[:service_dir]}/nssm.exe"
end
2 changes: 1 addition & 1 deletion configs/components/ruby-selinux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
pkg.url "http://pkgs.fedoraproject.org/repo/pkgs/libselinux/libselinux-1.33.4.tgz/08762379de2242926854080dad649b67/libselinux-1.33.4.tgz"
else
pkg.version "2.0.94"
pkg.md5sum "f814c71fca5a85ebfeb81b57afed59db"
pkg.md5sum "544f75aab11c2af352facc51af12029f"
pkg.url "https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20100525/devel/libselinux-#{pkg.get_version}.tar.gz"
end

Expand Down

0 comments on commit 64e69e4

Please sign in to comment.