Add EL7 Support, Fix unit and integration tests

This commit is a merge of two patchsets that adds
support for EL7 and fixes unit and integration tests.
They are required to be in the same patchset in order
for all tests to pass.
---
Make puppet-ceph unit tests compliant with Puppet4

- Bump rspec-puppet to 2.1.0 includine Puppet 4.0 support [1].
- Bump puppetlabs-apache to 1.4.1
- Bump puppetlabs-concat to 1.2.1
- Fix puppet lint issue with missing doc
- Fix dependency version acceptance tests
- Drop firefly from the ::ceph::rgw::apache tests as it seems buggy.
- Fix acceptance tests. Beaker acceptance test have been enabled for trusty
  and centos recently. This module does not yet support them so currently
  jenkins tests always fail.

[1] https://github.com/rodjek/rspec-puppet/commits/v2.1.0

Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
(cherry picked from commit ca86aafb05)
---
Add EL7 support

If Fedora is 20 or more, CentOS / Red Hat 7, we want to install EPEL7.
Otherwise, we want to setup EPEL6 for backward compatibility with Fedora
19 and before, and CentOS / Red Hat 6.X and before.

Co-Authored-By: Emilien Macchi <emilien@redhat.com>
Co-Authored-By: David Gurtner <aldavud@crimson.ch>
Co-Authored-By: Gael Chamoulaud <gchamoul@redhat.com>
Co-Authored-By: Andrew Woodward <xarses@gmail.com>
Co-Authored-By: Florian Haas <florian@hastexo.com>
Co-Authored-By: Jan Kundrat <jkt@kde.org>
Co-Authored-By: Aimon Bustardo <me@aimon.net>
(cherry picked from commit 009d222911)

Closes-bug: #1422516
Closes-bug: #1392002
Change-Id: I4af127715260b7999dcc7c3e0079ffaf28439c1e
This commit is contained in:
Gael Chamoulaud
2015-04-30 10:53:36 +02:00
committed by David Moreau Simard
parent a1c1ce2aea
commit 71fccdf944
22 changed files with 435 additions and 75 deletions

View File

@@ -24,13 +24,18 @@ RSpec.configure do |c|
hosts.each do |host|
install_puppet
# clean out any module cruft
shell('rm -fr /etc/puppet/modules/*')
on host, "mkdir -p #{host['distmoduledir']}"
# we will provide our own epel with some excludes later
shell('test -f /etc/debian_version || yum-config-manager --disable epel')
end
c.formatter = :documentation
c.before :suite do
puppet_module_install(:source => proj_root, :module_name => 'ceph')
scp_to hosts, File.join(proj_root, 'spec/fixtures/hieradata/hiera.yaml'), '/etc/puppet/hiera.yaml'
hosts.each do |host|
scp_to hosts, File.join(proj_root, 'spec/fixtures/hieradata/hiera.yaml'), '/etc/puppet/hiera.yaml'
# https://tickets.puppetlabs.com/browse/PUP-2566
on host, 'sed -i "/templatedir/d" /etc/puppet/puppet.conf'
install_package host, 'git'
@@ -38,8 +43,9 @@ RSpec.configure do |c|
on host, puppet('module install puppetlabs/stdlib --version ">=4.0.0 <5.0.0"'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module install puppetlabs/inifile --version ">=1.0.0 <2.0.0"'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module install puppetlabs/apt --version ">=1.4.0 <2.0.0"'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module install puppetlabs/concat --version ">=1.1.0 <2.0.0"'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module install puppetlabs/apache --version ">=1.0.1 <2.0.0"'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module install puppetlabs/concat --version ">=1.2.1 <2.0.0"'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module install puppetlabs/apache --version ">=1.4.1 <2.0.0"'), { :acceptable_exit_codes => [0,1] }
puppet_module_install(:source => proj_root, :module_name => 'ceph')
# Flush the firewall
flushfw = <<-EOS
iptables -F