Merge pull request #182 from puppetlabs/master
merge master into folsom
This commit is contained in:
commit
a53ccc7a3f
|
@ -2,10 +2,12 @@ fixtures:
|
|||
repositories:
|
||||
"apt": "git://github.com/puppetlabs/puppetlabs-apt.git"
|
||||
"keystone": "git://github.com/puppetlabs/puppetlabs-keystone.git"
|
||||
"cinder": "git://github.com/puppetlabs/puppetlabs-cinder.git"
|
||||
"mysql": "git://github.com/puppetlabs/puppetlabs-mysql.git"
|
||||
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
|
||||
"sysctl": "git://github.com/duritong/puppet-sysctl.git"
|
||||
"rabbitmq": "git://github.com/puppetlabs/puppetlabs-rabbitmq.git"
|
||||
'inifile': 'git://github.com/cprice-puppet/puppetlabs-inifile'
|
||||
"create_resources": 'git://github.com/puppetlabs/puppetlabs-create_resources'
|
||||
symlinks:
|
||||
"nova": "#{source_dir}"
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
language: ruby
|
||||
rvm:
|
||||
- 1.8.7
|
||||
before_script:
|
||||
after_script:
|
||||
script: "rake spec"
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- folsom
|
||||
- essex
|
||||
env:
|
||||
- PUPPET_VERSION=2.7.13
|
||||
- PUPPET_VERSION=2.7.6
|
||||
- PUPPET_VERSION=2.6.9
|
||||
notifications:
|
||||
email: false
|
||||
gemfile: .gemfile
|
|
@ -35,6 +35,10 @@ class nova::api(
|
|||
Nova_paste_api_ini<| |> ~> Exec['post-nova_config']
|
||||
Nova_paste_api_ini<| |> ~> Service['nova-api']
|
||||
|
||||
class {'cinder::client':
|
||||
notify => Service[$::nova::params::api_service_name],
|
||||
}
|
||||
|
||||
nova::generic_service { 'api':
|
||||
enabled => $enabled,
|
||||
ensure_package => $ensure_package,
|
||||
|
|
|
@ -8,7 +8,7 @@ class nova::compute::libvirt (
|
|||
|
||||
Service['libvirt'] -> Service['nova-compute']
|
||||
|
||||
if($::nova::params::compute_package_name) {
|
||||
if($::osfamily == 'Debian') {
|
||||
package { "nova-compute-${libvirt_type}":
|
||||
ensure => present,
|
||||
before => Package['nova-compute'],
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
class nova::compute::quantum (
|
||||
|
||||
$libvirt_vif_driver = 'nova.virt.libvirt.vif.LibvirtOpenVswitchDriver'
|
||||
){
|
||||
|
||||
nova_config {
|
||||
'libvirt_vif_driver': value => 'nova.virt.libvirt.vif.LibvirtOpenVswitchDriver';
|
||||
'libvirt_vif_driver': value => $libvirt_vif_driver;
|
||||
#'libvirt_vif_driver': value => 'nova.virt.libvirt.vif.LibvirtHybirdOVSBridgeDriver';
|
||||
'libvirt_use_virtio_for_bridges': value => 'True';
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class nova(
|
|||
$verbose = false,
|
||||
$periodic_interval = '60',
|
||||
$report_interval = '10',
|
||||
$root_wrap_config = '/etc/nova/rootwrap.conf',
|
||||
$rootwrap_config = '/etc/nova/rootwrap.conf',
|
||||
# deprecated in folsom
|
||||
#$root_helper = $::nova::params::root_helper,
|
||||
$monitoring_notifications = false
|
||||
|
@ -174,7 +174,7 @@ class nova(
|
|||
'state_path': value => $state_path;
|
||||
'lock_path': value => $lock_path;
|
||||
'service_down_time': value => $service_down_time;
|
||||
'root_wrap_config': value => $root_wrap_config;
|
||||
'rootwrap_config': value => $rootwrap_config;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,9 +29,8 @@ class nova::keystone::auth(
|
|||
type => 'compute',
|
||||
description => "Openstack Compute Service",
|
||||
}
|
||||
keystone_endpoint { $auth_name:
|
||||
keystone_endpoint { "${region}/${auth_name}":
|
||||
ensure => present,
|
||||
region => $region,
|
||||
public_url => "http://${public_address}:${compute_port}/${compute_version}/%(tenant_id)s",
|
||||
admin_url => "http://${admin_address}:${compute_port}/${compute_version}/%(tenant_id)s",
|
||||
internal_url => "http://${internal_address}:${compute_port}/${compute_version}/%(tenant_id)s",
|
||||
|
@ -42,9 +41,8 @@ class nova::keystone::auth(
|
|||
type => 'volume',
|
||||
description => 'Volume Service',
|
||||
}
|
||||
keystone_endpoint { "${auth_name}_volume":
|
||||
keystone_endpoint { "${region}/${auth_name}_volume":
|
||||
ensure => present,
|
||||
region => $region,
|
||||
public_url => "http://${public_address}:${volume_port}/${volume_version}/%(tenant_id)s",
|
||||
admin_url => "http://${admin_address}:${volume_port}/${volume_version}/%(tenant_id)s",
|
||||
internal_url => "http://${internal_address}:${volume_port}/${volume_version}/%(tenant_id)s",
|
||||
|
@ -55,9 +53,8 @@ class nova::keystone::auth(
|
|||
type => 'ec2',
|
||||
description => 'EC2 Service',
|
||||
}
|
||||
keystone_endpoint { "${auth_name}_ec2":
|
||||
keystone_endpoint { "${region}/${auth_name}_ec2":
|
||||
ensure => present,
|
||||
region => $region,
|
||||
public_url => "http://${public_address}:${ec2_port}/services/Cloud",
|
||||
admin_url => "http://${admin_address}:${ec2_port}/services/Admin",
|
||||
internal_url => "http://${internal_address}:${ec2_port}/services/Cloud",
|
||||
|
|
|
@ -5,19 +5,19 @@ class nova::params {
|
|||
case $::osfamily {
|
||||
'RedHat': {
|
||||
# package names
|
||||
$api_package_name = false
|
||||
$cert_package_name = false
|
||||
$common_package_name = 'openstack-nova'
|
||||
$compute_package_name = false
|
||||
$consoleauth_package_name = false
|
||||
$api_package_name = 'openstack-nova-api'
|
||||
$cert_package_name = 'openstack-nova-cert'
|
||||
$common_package_name = 'openstack-nova-common'
|
||||
$compute_package_name = 'openstack-nova-compute'
|
||||
$consoleauth_package_name = 'openstack-nova-console'
|
||||
$doc_package_name = 'openstack-nova-doc'
|
||||
$libvirt_package_name = 'libvirt'
|
||||
$network_package_name = false
|
||||
$network_package_name = 'openstack-nova-network'
|
||||
$numpy_package_name = 'numpy'
|
||||
$objectstore_package_name = false
|
||||
$scheduler_package_name = false
|
||||
$objectstore_package_name = 'openstack-nova-objectstore'
|
||||
$scheduler_package_name = 'openstack-nova-scheduler'
|
||||
$tgt_package_name = 'scsi-target-utils'
|
||||
$volume_package_name = false
|
||||
$volume_package_name = 'openstack-nova-volume'
|
||||
$vncproxy_package_name = 'openstack-nova-novncproxy'
|
||||
# service names
|
||||
$api_service_name = 'openstack-nova-api'
|
||||
|
|
|
@ -104,6 +104,6 @@ describe 'nova::api' do
|
|||
'ensure' => 'stopped',
|
||||
'enable' => false
|
||||
)}
|
||||
it { should_not contain_package('nova-api') }
|
||||
it { should contain_package('nova-api').with_name('openstack-nova-api') }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -37,7 +37,7 @@ describe 'nova::cert' do
|
|||
it { should contain_package('nova-cert').with(
|
||||
'ensure' => '2012.1-2'
|
||||
)}
|
||||
end
|
||||
end
|
||||
end
|
||||
describe 'on rhel' do
|
||||
let :facts do
|
||||
|
@ -48,6 +48,6 @@ describe 'nova::cert' do
|
|||
'ensure' => 'stopped',
|
||||
'enable' => false
|
||||
)}
|
||||
it { should_not contain_package('nova-cert') }
|
||||
it { should contain_package('nova-cert').with_name('openstack-nova-cert') }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
require 'spec_helper'
|
||||
describe 'nova::compute::quantum' do
|
||||
|
||||
it { should contain_nova_config('libvirt_use_virtio_for_bridges').with_value('True')}
|
||||
it { should contain_nova_config('libvirt_vif_driver').with_value('nova.virt.libvirt.vif.LibvirtOpenVswitchDriver')}
|
||||
|
||||
context 'when overriding params' do
|
||||
let :params do
|
||||
{:libvirt_vif_driver => 'foo' }
|
||||
end
|
||||
it { should contain_nova_config('libvirt_vif_driver').with_value('foo')}
|
||||
end
|
||||
|
||||
end
|
|
@ -71,7 +71,7 @@ describe 'nova::compute' do
|
|||
it { should contain_package('nova-compute').with(
|
||||
'ensure' => '2012.1-2'
|
||||
)}
|
||||
end
|
||||
end
|
||||
end
|
||||
describe 'on rhel' do
|
||||
let :facts do
|
||||
|
@ -82,7 +82,7 @@ describe 'nova::compute' do
|
|||
'ensure' => 'stopped',
|
||||
'enable' => false
|
||||
)}
|
||||
it { should_not contain_package('nova-compute') }
|
||||
it { should contain_package('nova-compute').with_name('openstack-nova-compute') }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -73,7 +73,7 @@ describe 'nova' do
|
|||
it { should contain_nova_config('state_path').with_value('/var/lib/nova') }
|
||||
it { should contain_nova_config('lock_path').with_value('/var/lock/nova') }
|
||||
it { should contain_nova_config('service_down_time').with_value('60') }
|
||||
it { should contain_nova_config('root_wrap_config').with_value('/etc/nova/rootwrap.conf') }
|
||||
it { should contain_nova_config('rootwrap_config').with_value('/etc/nova/rootwrap.conf') }
|
||||
|
||||
|
||||
|
||||
|
@ -123,10 +123,10 @@ describe 'nova' do
|
|||
{:osfamily => 'RedHat'}
|
||||
end
|
||||
it { should contain_package('nova-common').with(
|
||||
'name' => 'openstack-nova',
|
||||
'name' => 'openstack-nova-common',
|
||||
'ensure' => 'present'
|
||||
)}
|
||||
it { should contain_nova_config('root_wrap_config').with_value('/etc/nova/rootwrap.conf') }
|
||||
it { should contain_nova_config('rootwrap_config').with_value('/etc/nova/rootwrap.conf') }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -36,25 +36,22 @@ describe 'nova::keystone::auth' do
|
|||
:description => 'EC2 Service'
|
||||
)}
|
||||
|
||||
it { should contain_keystone_endpoint('nova').with(
|
||||
it { should contain_keystone_endpoint('RegionOne/nova').with(
|
||||
:ensure => 'present',
|
||||
:region => 'RegionOne',
|
||||
:public_url => 'http://127.0.0.1:8774/v2/%(tenant_id)s',
|
||||
:admin_url => 'http://127.0.0.1:8774/v2/%(tenant_id)s',
|
||||
:internal_url => 'http://127.0.0.1:8774/v2/%(tenant_id)s'
|
||||
)}
|
||||
|
||||
it { should contain_keystone_endpoint('nova_volume').with(
|
||||
it { should contain_keystone_endpoint('RegionOne/nova_volume').with(
|
||||
:ensure => 'present',
|
||||
:region => 'RegionOne',
|
||||
:public_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s',
|
||||
:admin_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s',
|
||||
:internal_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s'
|
||||
)}
|
||||
|
||||
it { should contain_keystone_endpoint('nova_ec2').with(
|
||||
it { should contain_keystone_endpoint('RegionOne/nova_ec2').with(
|
||||
:ensure => 'present',
|
||||
:region => 'RegionOne',
|
||||
:public_url => 'http://127.0.0.1:8773/services/Cloud',
|
||||
:admin_url => 'http://127.0.0.1:8773/services/Admin',
|
||||
:internal_url => 'http://127.0.0.1:8773/services/Cloud'
|
||||
|
@ -129,25 +126,22 @@ describe 'nova::keystone::auth' do
|
|||
}
|
||||
end
|
||||
|
||||
it { should contain_keystone_endpoint('nova').with(
|
||||
it { should contain_keystone_endpoint('RegionTwo/nova').with(
|
||||
:ensure => 'present',
|
||||
:region => 'RegionTwo',
|
||||
:public_url => 'http://10.0.0.1:9774/v2.2/%(tenant_id)s',
|
||||
:admin_url => 'http://10.0.0.2:9774/v2.2/%(tenant_id)s',
|
||||
:internal_url => 'http://10.0.0.3:9774/v2.2/%(tenant_id)s'
|
||||
)}
|
||||
|
||||
it { should contain_keystone_endpoint('nova_volume').with(
|
||||
it { should contain_keystone_endpoint('RegionTwo/nova_volume').with(
|
||||
:ensure => 'present',
|
||||
:region => 'RegionTwo',
|
||||
:public_url => 'http://10.0.0.1:9776/v2.1/%(tenant_id)s',
|
||||
:admin_url => 'http://10.0.0.2:9776/v2.1/%(tenant_id)s',
|
||||
:internal_url => 'http://10.0.0.3:9776/v2.1/%(tenant_id)s'
|
||||
)}
|
||||
|
||||
it { should contain_keystone_endpoint('nova_ec2').with(
|
||||
it { should contain_keystone_endpoint('RegionTwo/nova_ec2').with(
|
||||
:ensure => 'present',
|
||||
:region => 'RegionTwo',
|
||||
:public_url => 'http://10.0.0.1:9773/services/Cloud',
|
||||
:admin_url => 'http://10.0.0.2:9773/services/Admin',
|
||||
:internal_url => 'http://10.0.0.3:9773/services/Cloud'
|
||||
|
|
|
@ -207,6 +207,6 @@ describe 'nova::network' do
|
|||
'ensure' => 'stopped',
|
||||
'enable' => false
|
||||
)}
|
||||
it { should_not contain_package('nova-network') }
|
||||
it { should contain_package('nova-network').with_name('openstack-nova-network') }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -37,7 +37,7 @@ describe 'nova::objectstore' do
|
|||
it { should contain_package('nova-objectstore').with(
|
||||
'ensure' => '2012.1-2'
|
||||
)}
|
||||
end
|
||||
end
|
||||
end
|
||||
describe 'on rhel' do
|
||||
let :facts do
|
||||
|
@ -48,6 +48,6 @@ describe 'nova::objectstore' do
|
|||
'ensure' => 'stopped',
|
||||
'enable' => false
|
||||
)}
|
||||
it { should_not contain_package('nova-objectstore') }
|
||||
it { should contain_package('nova-objectstore').with('openstack-nova-objectstore') }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -48,6 +48,6 @@ describe 'nova::scheduler' do
|
|||
'ensure' => 'stopped',
|
||||
'enable' => false
|
||||
)}
|
||||
it { should_not contain_package('nova-scheduler') }
|
||||
it { should contain_package('nova-scheduler').with_name('openstack-nova-scheduler') }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -48,6 +48,6 @@ describe 'nova::volume' do
|
|||
'ensure' => 'stopped',
|
||||
'enable' => false
|
||||
)}
|
||||
it { should_not contain_package('nova-volume') }
|
||||
it { should contain_package('nova-volume').with_name('openstack-nova-volume') }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue