compute/network: update to icehouse

Tests do not pass until
https://github.com/enovance/puppet-openstack-cloud/pull/438
This commit is contained in:
Emilien Macchi
2014-04-27 00:35:22 +02:00
parent e99e5d0a6e
commit 7a93102016
5 changed files with 102 additions and 48 deletions

View File

@@ -2,16 +2,16 @@ fixtures:
repositories: repositories:
'cinder': 'cinder':
repo: 'git://github.com/enovance/puppet-cinder' repo: 'git://github.com/enovance/puppet-cinder'
ref: 'bd1536626f2b5d66f9ea77bcd69ba7d1f5f33961' ref: '504a061918ac08297f6a9b9f64f1836643573447'
'keystone': 'keystone':
repo: 'git://github.com/enovance/puppet-keystone.git' repo: 'git://github.com/enovance/puppet-keystone.git'
ref: 'ce49f6b6d9bb0e89e3e1e63a88a1d63d5a930851' ref: 'd9aac2f78240e0fd651a6dc0ac05db4ffcba885b'
'nova': 'nova':
repo: 'git://github.com/enovance/puppet-nova.git' repo: 'git://github.com/enovance/puppet-nova.git'
ref: 'b7811392062b649572f470f5f3ddca1882997210' ref: '47d576d2e62b4c449309ef228cdbc17bcf3fdcf0'
'glance': 'glance':
repo: 'git://github.com/enovance/puppet-glance.git' repo: 'git://github.com/enovance/puppet-glance.git'
ref: '001f1b6a8ef6bd0fde8fbe0a4b3362f31e6bbcda' ref: 'e61e47d664e4d18e849bc7c3d5f40f452397d0f4'
'horizon': 'horizon':
repo: 'git://github.com/enovance/puppet-horizon' repo: 'git://github.com/enovance/puppet-horizon'
ref: 'da0cedce6f14f5c35e733ac345d8d862db11cd2b' ref: 'da0cedce6f14f5c35e733ac345d8d862db11cd2b'
@@ -20,13 +20,13 @@ fixtures:
ref: '9b60581a1c8fd2c1a98adafc1bcdc53796859e23' ref: '9b60581a1c8fd2c1a98adafc1bcdc53796859e23'
'neutron': 'neutron':
repo: 'git://github.com/enovance/puppet-neutron' repo: 'git://github.com/enovance/puppet-neutron'
ref: '39b7efdbc83c65966b7a961df98561c5550c2d23' ref: '78428c844f73bf585a8f8a3bdf615ba2a0e8983b'
'ceilometer': 'ceilometer':
repo: 'git://github.com/enovance/puppet-ceilometer' repo: 'git://github.com/enovance/puppet-ceilometer'
ref: 'f71f935a3e41dcd11f8f5986a1fe0708b124e589' ref: 'f444fc8937a6bc05d0257c1a935e742491e94b02'
'heat': 'heat':
repo: 'git://github.com/enovance/puppet-heat' repo: 'git://github.com/enovance/puppet-heat'
ref: 'bdf094da21161ec6f78530775a0c41fc76fd3339' ref: '2847d4d42fdc413c0297b7aeedc9f29198e336c2'
'apt': 'apt':
repo: 'git://github.com/enovance/puppetlabs-apt.git' repo: 'git://github.com/enovance/puppetlabs-apt.git'
ref: '9b001af8775c7231ea2656b7eb43d6141b536f49' ref: '9b001af8775c7231ea2656b7eb43d6141b536f49'

View File

@@ -19,28 +19,28 @@ forge 'http://forge.puppetlabs.com'
# Core OpenStack projects # Core OpenStack projects
mod 'ceilometer', mod 'ceilometer',
:git => 'git://github.com/enovance/puppet-ceilometer.git', :git => 'git://github.com/enovance/puppet-ceilometer.git',
:ref => 'f71f935a3e41dcd11f8f5986a1fe0708b124e589' :ref => 'f444fc8937a6bc05d0257c1a935e742491e94b02'
mod 'cinder', mod 'cinder',
:git => 'git://github.com/enovance/puppet-cinder.git', :git => 'git://github.com/enovance/puppet-cinder.git',
:ref => 'bd1536626f2b5d66f9ea77bcd69ba7d1f5f33961' :ref => '504a061918ac08297f6a9b9f64f1836643573447'
mod 'glance', mod 'glance',
:git => 'git://github.com/enovance/puppet-glance.git', :git => 'git://github.com/enovance/puppet-glance.git',
:ref => '001f1b6a8ef6bd0fde8fbe0a4b3362f31e6bbcda' :ref => 'e61e47d664e4d18e849bc7c3d5f40f452397d0f4'
mod 'heat', mod 'heat',
:git => 'git://github.com/enovance/puppet-heat.git', :git => 'git://github.com/enovance/puppet-heat.git',
:ref => 'bdf094da21161ec6f78530775a0c41fc76fd3339' :ref => '2847d4d42fdc413c0297b7aeedc9f29198e336c2'
mod 'horizon', mod 'horizon',
:git => 'git://github.com/enovance/puppet-horizon.git', :git => 'git://github.com/enovance/puppet-horizon.git',
:ref => 'da0cedce6f14f5c35e733ac345d8d862db11cd2b' :ref => 'da0cedce6f14f5c35e733ac345d8d862db11cd2b'
mod 'keystone', mod 'keystone',
:git => 'git://github.com/enovance/puppet-keystone.git', :git => 'git://github.com/enovance/puppet-keystone.git',
:ref => 'ce49f6b6d9bb0e89e3e1e63a88a1d63d5a930851' :ref => 'd9aac2f78240e0fd651a6dc0ac05db4ffcba885b'
mod 'neutron', mod 'neutron',
:git => 'git://github.com/enovance/puppet-neutron.git', :git => 'git://github.com/enovance/puppet-neutron.git',
:ref => '39b7efdbc83c65966b7a961df98561c5550c2d23' :ref => '78428c844f73bf585a8f8a3bdf615ba2a0e8983b'
mod 'nova', mod 'nova',
:git => 'git://github.com/enovance/puppet-nova.git', :git => 'git://github.com/enovance/puppet-nova.git',
:ref => 'b7811392062b649572f470f5f3ddca1882997210' :ref => '47d576d2e62b4c449309ef228cdbc17bcf3fdcf0'
mod 'swift', mod 'swift',
:git => 'git://github.com/enovance/puppet-swift.git', :git => 'git://github.com/enovance/puppet-swift.git',
:ref => '9b60581a1c8fd2c1a98adafc1bcdc53796859e23' :ref => '9b60581a1c8fd2c1a98adafc1bcdc53796859e23'

View File

@@ -25,7 +25,13 @@ class cloud::network::controller(
$ks_keystone_public_port = 5000, $ks_keystone_public_port = 5000,
$ks_neutron_public_port = 9696, $ks_neutron_public_port = 9696,
$api_eth = '127.0.0.1', $api_eth = '127.0.0.1',
$ks_admin_tenant = 'admin' $ks_admin_tenant = 'admin',
$nova_url = 'http://127.0.0.1:8774/v2',
$nova_admin_auth_url = 'http://127.0.0.1:35357/v2.0',
$nova_admin_username = 'nova',
$nova_admin_tenant_name = 'services',
$nova_admin_password = 'novapassword',
$nova_region_name = 'RegionOne'
) { ) {
include 'cloud::network' include 'cloud::network'
@@ -43,6 +49,15 @@ class cloud::network::controller(
report_interval => '30', report_interval => '30',
} }
class { 'neutron::server::notifications':
nova_url => $nova_url,
nova_admin_auth_url => $nova_admin_auth_url,
nova_admin_username => $nova_admin_username,
nova_admin_tenant_name => $nova_admin_tenant_name,
nova_admin_password => $nova_admin_password,
nova_region_name => $nova_region_name
}
# Note(EmilienM): # Note(EmilienM):
# We check if DB tables are created, if not we populate Neutron DB. # We check if DB tables are created, if not we populate Neutron DB.
# It's a hack to fit with our setup where we run MySQL/Galera # It's a hack to fit with our setup where we run MySQL/Galera

View File

@@ -70,10 +70,7 @@ describe 'cloud::compute::hypervisor' do
{ :libvirt_type => 'kvm', { :libvirt_type => 'kvm',
:server_proxyclient_address => '7.0.0.1', :server_proxyclient_address => '7.0.0.1',
:spice_port => '6082', :spice_port => '6082',
:has_ceph => true, :has_ceph => false,
:cinder_rbd_user => 'cinder',
:nova_rbd_pool => 'nova',
:nova_rbd_secret_uuid => 'secrete',
:nova_ssh_private_key => 'secrete', :nova_ssh_private_key => 'secrete',
:nova_ssh_public_key => 'public', :nova_ssh_public_key => 'public',
:ks_nova_public_proto => 'http', :ks_nova_public_proto => 'http',
@@ -213,15 +210,6 @@ describe 'cloud::compute::hypervisor' do
) )
end end
it 'configure libvirt driver' do
should contain_class('nova::compute::libvirt').with(
:libvirt_type => 'kvm',
:vncserver_listen => '0.0.0.0',
:migration_support => true,
:libvirt_disk_cachemodes => ['network=writeback']
)
end
it 'configure nova compute with neutron' do it 'configure nova compute with neutron' do
should contain_class('nova::compute::neutron') should contain_class('nova::compute::neutron')
end end
@@ -230,24 +218,23 @@ describe 'cloud::compute::hypervisor' do
should contain_class('ceilometer::agent::compute') should contain_class('ceilometer::agent::compute')
end end
it 'configure nova-compute to support RBD backend' do it 'should not configure nova-compute for RBD backend' do
should contain_nova_config('DEFAULT/libvirt_images_type').with('value' => 'rbd') should_not contain_nova_config('libvirt/rbd_user').with('value' => 'cinder')
should contain_nova_config('DEFAULT/libvirt_images_rbd_pool').with('value' => 'nova') end
should contain_nova_config('DEFAULT/libvirt_images_rbd_ceph_conf').with('value' => '/etc/ceph/ceph.conf')
should contain_nova_config('DEFAULT/rbd_user').with('value' => 'cinder') it 'configure libvirt driver without disk cachemodes' do
should contain_nova_config('DEFAULT/rbd_secret_uuid').with('value' => 'secrete') should contain_class('nova::compute::libvirt').with(
should contain_group('cephkeyring').with(:ensure => 'present') :libvirt_type => 'kvm',
should contain_exec('add-nova-to-group').with( :vncserver_listen => '0.0.0.0',
:command => 'usermod -a -G cephkeyring nova', :migration_support => true,
:unless => 'groups nova | grep cephkeyring', :libvirt_disk_cachemodes => []
:path => ['/usr/sbin', '/usr/bin', '/bin', '/sbin']
) )
end end
it 'configure nova-compute with extra parameters' do it 'configure nova-compute with extra parameters' do
should contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone') should contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
should contain_nova_config('DEFAULT/libvirt_inject_key').with('value' => false) should contain_nova_config('libvirt/inject_key').with('value' => false)
should contain_nova_config('DEFAULT/libvirt_inject_partition').with('value' => '-2') should contain_nova_config('libvirt/inject_partition').with('value' => '-2')
should contain_nova_config('DEFAULT/live_migration_flag').with('value' => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST') should contain_nova_config('DEFAULT/live_migration_flag').with('value' => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST')
end end
@@ -267,15 +254,50 @@ describe 'cloud::compute::hypervisor' do
end end
end end
context 'without RBD backend' do context 'with RBD backend on Debian plaforms' do
before :each do before :each do
params.merge!( :has_ceph => false ) facts.merge!( :osfamily => 'Debian' )
params.merge!(
:has_ceph => true,
:cinder_rbd_user => 'cinder',
:nova_rbd_pool => 'nova',
:nova_rbd_secret_uuid => 'secrete' )
end end
it 'should not configure nova-compute for RBD backend' do it 'configure nova-compute to support RBD backend' do
should_not contain_nova_config('DEFAULT/rbd_user').with('value' => 'cinder') should contain_nova_config('libvirt/images_type').with('value' => 'rbd')
should contain_nova_config('libvirt/images_rbd_pool').with('value' => 'nova')
should contain_nova_config('libvirt/images_rbd_ceph_conf').with('value' => '/etc/ceph/ceph.conf')
should contain_nova_config('libvirt/rbd_user').with('value' => 'cinder')
should contain_nova_config('libvirt/rbd_secret_uuid').with('value' => 'secrete')
should contain_group('cephkeyring').with(:ensure => 'present')
should contain_exec('add-nova-to-group').with(
:command => 'usermod -a -G cephkeyring nova',
:unless => 'groups nova | grep cephkeyring'
)
end end
it 'configure libvirt driver without disk cachemodes' do
it 'configure libvirt driver' do
should contain_class('nova::compute::libvirt').with(
:libvirt_type => 'kvm',
:vncserver_listen => '0.0.0.0',
:migration_support => true,
:libvirt_disk_cachemodes => ['network=writeback']
)
end
end
context 'when trying to enable RBD backend on RedHat plaforms' do
before :each do
facts.merge!( :operatingsystem => 'RedHat' )
params.merge!(
:has_ceph => true,
:cinder_rbd_user => 'cinder',
:nova_rbd_pool => 'nova',
:nova_rbd_secret_uuid => 'secrete' )
end
it 'configure libvirt driver without libvirt_disk_cachemodes' do
should contain_class('nova::compute::libvirt').with( should contain_class('nova::compute::libvirt').with(
:libvirt_type => 'kvm', :libvirt_type => 'kvm',
:vncserver_listen => '0.0.0.0', :vncserver_listen => '0.0.0.0',
@@ -284,6 +306,7 @@ describe 'cloud::compute::hypervisor' do
) )
end end
end end
end end
context 'on Debian platforms' do context 'on Debian platforms' do

View File

@@ -43,6 +43,12 @@ describe 'cloud::network::controller' do
:ks_neutron_password => 'secrete', :ks_neutron_password => 'secrete',
:ks_keystone_admin_host => '10.0.0.1', :ks_keystone_admin_host => '10.0.0.1',
:ks_keystone_public_port => '5000', :ks_keystone_public_port => '5000',
:nova_url => 'http://127.0.0.1:8774/v2',
:$nova_admin_auth_url => 'http://127.0.0.1:35357/v2.0',
:nova_admin_username => 'nova',
:nova_admin_tenant_name => 'services',
:nova_admin_password => 'novapassword',
:nova_region_name => 'RegionOne',
:api_eth => '10.0.0.1' } :api_eth => '10.0.0.1' }
end end
@@ -92,6 +98,16 @@ describe 'cloud::network::controller' do
) )
end end
it 'configure neutron server notifications to nova' do
should contain_class('neutron::server::notifications').with(
:nova_url => 'http://127.0.0.1:8774/v2',
:nova_admin_auth_url => 'http://127.0.0.1:35357/v2.0',
:nova_admin_username => 'nova',
:nova_admin_tenant_name => 'services',
:nova_admin_password => 'novapassword',
:nova_region_name => 'RegionOne'
)
end
it 'checks if Neutron DB is populated' do it 'checks if Neutron DB is populated' do
should contain_exec('neutron_db_sync').with( should contain_exec('neutron_db_sync').with(
:command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head', :command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head',