]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commitdiff
Bring Redhat support to acceptance tests
authorEmilien Macchi <emilien@redhat.com>
Mon, 11 May 2015 19:38:43 +0000 (15:38 -0400)
committerEmilien Macchi <emilien@redhat.com>
Wed, 13 May 2015 12:10:39 +0000 (08:10 -0400)
OpenStack Infra has jobs to run this on both Ubuntu Trusty and CentOS7.

* Add minitest to Gemfile (dependency to run beaker on centos - see
  http://projects.theforeman.org/issues/2650 for details)
* separate nodepool files to have trusty & centos7 support in OS infra
* basic_keystone_spec: add case for repo configuration and support
  RH systems.
* rabbitmq: install module from source and on RH, install erlang before rabbitmq-server.

Change-Id: Ie6c823c7906afb37dd9e49fa434fefc3e26b5569
Closes-bug: #1444736

Gemfile
spec/acceptance/ceilometer_with_mysql_spec.rb
spec/acceptance/nodesets/nodepool-centos7.yml [new file with mode: 0644]
spec/acceptance/nodesets/nodepool-trusty.yml [moved from spec/acceptance/nodesets/nodepool.yml with 100% similarity]
spec/spec_helper_acceptance.rb

diff --git a/Gemfile b/Gemfile
index 571fd65dc889bff25f21c31eb3fa647e6e38adbf..4c65317ac6056cfb8886259313b157994d44f728 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -3,6 +3,7 @@ source 'https://rubygems.org'
 group :development, :test do
   gem 'puppetlabs_spec_helper', :require => false
   gem 'rspec-puppet', '~> 2.1.0', :require => false
+  gem 'minitest', '~> 4.7', :require => 'minitest/unit'
 
   gem 'metadata-json-lint'
   gem 'puppet-lint-param-docs'
index 7d6998216a39bf98a35e88364cb3485b0f96ff9c..6a98d1ea5d3fab16fcf3d643001c113108c4639c 100644 (file)
@@ -9,10 +9,33 @@ describe 'ceilometer with mysql' do
       Exec { logoutput => 'on_failure' }
 
       # Common resources
-      include ::apt
-      class { '::openstack_extras::repo::debian::ubuntu':
-        release         => 'kilo',
-        package_require => true,
+      case $::osfamily {
+        'Debian': {
+          include ::apt
+          class { '::openstack_extras::repo::debian::ubuntu':
+            release         => 'kilo',
+            package_require => true,
+          }
+        }
+        'RedHat': {
+          class { '::openstack_extras::repo::redhat::redhat':
+            # Kilo is not GA yet, so let's use the testing repo
+            manage_rdo => false,
+            repo_hash  => {
+              'rdo-kilo-testing' => {
+                'baseurl'  => 'https://repos.fedorapeople.org/repos/openstack/openstack-kilo/testing/el7/',
+                # packages are not GA so not signed
+                'gpgcheck' => '0',
+                'priority' => 97,
+              },
+            },
+          }
+          include ::erlang
+          Class['erlang'] -> Class['rabbitmq']
+        }
+        default: {
+          fail("Unsupported osfamily (${::osfamily})")
+        }
       }
 
       class { '::mysql::server': }
diff --git a/spec/acceptance/nodesets/nodepool-centos7.yml b/spec/acceptance/nodesets/nodepool-centos7.yml
new file mode 100644 (file)
index 0000000..aed4f0b
--- /dev/null
@@ -0,0 +1,9 @@
+HOSTS:
+  centos-70-x64:
+    roles:
+      - master
+    platform: el-7-x86_64
+    hypervisor : none
+    ip: 127.0.0.1
+CONFIG:
+  type: foss
index 5e3340170350d5ff4ddcddd947231f5d085d696f..2d49992e3a11bb313f738090114cba26aaaeb406 100644 (file)
@@ -31,12 +31,15 @@ RSpec.configure do |c|
       on host, puppet('module','install','puppetlabs-mysql'), { :acceptable_exit_codes => 0 }
       on host, puppet('module','install','dprince/qpid'), { :acceptable_exit_codes => 0 }
       on host, puppet('module','install','stahnma-epel'), { :acceptable_exit_codes => 0 }
-      on host, puppet('module','install','puppetlabs-rabbitmq'), { :acceptable_exit_codes => 0 }
+      on host, puppet('module','install','garethr-erlang'), { :acceptable_exit_codes => 0 }
 
       # install puppet modules from git, use master
       shell('git clone https://git.openstack.org/stackforge/puppet-openstacklib /etc/puppet/modules/openstacklib')
       shell('git clone https://git.openstack.org/stackforge/puppet-openstack_extras /etc/puppet/modules/openstack_extras')
       shell('git clone https://git.openstack.org/stackforge/puppet-keystone /etc/puppet/modules/keystone')
+      # TODO(EmilienM) Cloning RabbitMQ module for now because we wait for a release including
+      # https://github.com/enovance/puppetlabs-rabbitmq/commit/0227f762070ffbbea3c28d6a60174de98fa4cc1c
+      shell('git clone https://github.com/puppetlabs/puppetlabs-rabbitmq/ /etc/puppet/modules/rabbitmq')
 
       # Install the module being tested
       puppet_module_install(:source => proj_root, :module_name => 'ceilometer')