Skip to content

Commit

Permalink
Re-boostrap beaker tests
Browse files Browse the repository at this point in the history
Current puppet-ceph CI is broken for all functional jobs.
I would like to restart from scratch the way we test the module.

1) centos7: deploy Jewel using buildlogs.centos.org repo
CentOS SIG does not provide packaging to deploy the Jewel repository,
let's install it by hand.

2) Remove RGW tests for now. We'll re-add them later, in a
puppet-openstack-integration scenario.

3) Reset spec files to match with other Puppet OpenStack modules.

4) On CentOS, use systemd resource and not sysvinit.

5) Fix keyring idempotency with SElinux.

Change-Id: Ie9ba521cdb4ac6823746d37bb5d1697e274e4119
  • Loading branch information
EmilienM committed Jul 7, 2016
1 parent 874e7a8 commit fb88544
Show file tree
Hide file tree
Showing 19 changed files with 145 additions and 1,712 deletions.
16 changes: 0 additions & 16 deletions .fixtures.yml

This file was deleted.

24 changes: 14 additions & 10 deletions .gitignore
@@ -1,11 +1,15 @@
*.swp
*~
.project
spec/fixtures/modules/*
pkg
pkg/
Gemfile.lock
.bundle
vendor
.vagrant/*
log
.bundled_gems/
vendor/
spec/fixtures/
.vagrant/
.bundle/
coverage/
.idea/
*.swp
*.iml
openstack/

# Files created by releasenotes build
releasenotes/build
.tox
109 changes: 0 additions & 109 deletions .nodeset.yml

This file was deleted.

134 changes: 0 additions & 134 deletions .prefabs.yml

This file was deleted.

30 changes: 10 additions & 20 deletions Gemfile
@@ -1,25 +1,15 @@
source 'https://rubygems.org'
source ENV['GEM_SOURCE'] || "https://rubygems.org"

group :development, :test do
gem 'puppetlabs_spec_helper', :require => false
gem 'rspec-puppet', '~> 2.1.0', :require => false
gem 'beaker-rspec', :require => false
gem 'puppet-lint-param-docs'
gem 'metadata-json-lint'
gem 'puppet-lint-absolute_classname-check'
gem 'puppet-lint-absolute_template_path'
gem 'puppet-lint-trailing_newline-check'

# Puppet 4.x related lint checks
gem 'puppet-lint-unquoted_string-check'
gem 'puppet-lint-leading_zero-check'
gem 'puppet-lint-variable_contains_upcase'
gem 'puppet-lint-numericvariable'
group :development, :test, :system_tests do
gem 'puppet-openstack_spec_helper',
:git => 'https://git.openstack.org/openstack/puppet-openstack_spec_helper',
:require => false
end

gem 'json'
gem 'minitest', :require => false
gem 'test', :require => false
gem 'test-unit', :require => false
if facterversion = ENV['FACTER_GEM_VERSION']
gem 'facter', facterversion, :require => false
else
gem 'facter', :require => false
end

if puppetversion = ENV['PUPPET_GEM_VERSION']
Expand Down
13 changes: 1 addition & 12 deletions Rakefile
@@ -1,12 +1 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'metadata-json-lint/rake_task'

begin
require 'rspec-system/rake_task'
rescue LoadError
# don't warn anymore as rspec-system is deprecated
end

PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('disable_80chars')
require 'puppet-openstack_spec_helper/rake_tasks'
11 changes: 6 additions & 5 deletions manifests/key.pp
Expand Up @@ -104,11 +104,12 @@
# which is supported by ceph-authtool
if ! defined(File[$keyring_path]) {
file { $keyring_path:
ensure => file,
owner => $user,
group => $group,
mode => $mode,
require => Package['ceph'],
ensure => file,
owner => $user,
group => $group,
mode => $mode,
selinux_ignore_defaults => true,
require => Package['ceph'],
}
}

Expand Down
6 changes: 1 addition & 5 deletions manifests/mon.pp
Expand Up @@ -89,11 +89,7 @@
status => "status ceph-mon id=${id}",
}
}
# For Ubuntu Xenial system
# Note: once CentOS7 SIG provides ceph packaging on:
# http://buildlogs.centos.org/centos/7/storage/x86_64/ceph-jewel/
# then we can drop the Ubuntu conditional.
elsif $::service_provider == 'systemd' and $::operatingsystem == 'Ubuntu' {
elsif $::service_provider == 'systemd' {
$init = 'systemd'
Service {
name => $mon_service,
Expand Down
16 changes: 7 additions & 9 deletions manifests/repo.pp
Expand Up @@ -114,17 +114,15 @@
if $::operatingsystem != 'CentOS' {
warning("CentOS SIG repository is only supported on CentOS operating system, not on ${::operatingsystem}, which can lead to packaging issues.")
}
# Bump to Jewel once this bug is solved:
# https://bugs.centos.org/view.php?id=10803
exec { 'installing_centos-release-ceph':
command => '/usr/bin/yum install -y centos-release-ceph-hammer',
logoutput => 'on_failure',
tries => 3,
try_sleep => 1,
unless => '/usr/bin/rpm -qa | /usr/bin/grep -q centos-release-ceph-hammer',
yumrepo { 'ceph-jewel-sig':
enabled => '1',
baseurl => 'http://buildlogs.centos.org/centos/7/storage/x86_64/ceph-jewel/',
descr => 'Ceph Jewel SIG',
mirrorlist => 'absent',
gpgcheck => '0',
}
# Make sure we install the repo before any Package resource
Exec['installing_centos-release-ceph'] -> Package<| tag == 'ceph' |>
Yumrepo['ceph-jewel-sig'] -> Package<| tag == 'ceph' |>
} else {
# If you want to deploy Ceph using packages provided by ceph.com repositories.
if ((($::operatingsystem == 'RedHat' or $::operatingsystem == 'CentOS') and (versioncmp($::operatingsystemmajrelease, '7') < 0)) or ($::operatingsystem == 'Fedora' and (versioncmp($::operatingsystemmajrelease, '19') < 0))) {
Expand Down

0 comments on commit fb88544

Please sign in to comment.