Merge pull request #218 from enovance/bug/217/emilien
compute/hypervisor: Add Ceilometer Agent Compute support
This commit is contained in:
commit
7ba2af42f3
@ -42,6 +42,7 @@ class cloud::compute::hypervisor(
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
include 'cloud::compute'
|
include 'cloud::compute'
|
||||||
|
include 'cloud::telemetry'
|
||||||
|
|
||||||
exec { 'insert_module_nbd':
|
exec { 'insert_module_nbd':
|
||||||
command => '/bin/echo "nbd" > /etc/modules',
|
command => '/bin/echo "nbd" > /etc/modules',
|
||||||
@ -133,4 +134,6 @@ Host *
|
|||||||
Exec <<| tag == 'set_secret_value_virsh' |>>
|
Exec <<| tag == 'set_secret_value_virsh' |>>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class { 'ceilometer::agent::compute': }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,19 @@ describe 'cloud::compute::hypervisor' do
|
|||||||
neutron_endpoint => '10.0.0.1',
|
neutron_endpoint => '10.0.0.1',
|
||||||
neutron_region_name => 'MyRegion',
|
neutron_region_name => 'MyRegion',
|
||||||
neutron_password => 'secrete',
|
neutron_password => 'secrete',
|
||||||
log_facility => 'LOG_LOCAL0' }"
|
log_facility => 'LOG_LOCAL0' }
|
||||||
|
class { 'cloud::telemetry':
|
||||||
|
ceilometer_secret => 'secrete',
|
||||||
|
rabbit_hosts => ['10.0.0.1'],
|
||||||
|
rabbit_password => 'secrete',
|
||||||
|
ks_keystone_internal_host => '10.0.0.1',
|
||||||
|
ks_keystone_internal_port => '5000',
|
||||||
|
ks_keystone_internal_proto => 'http',
|
||||||
|
ks_ceilometer_password => 'secrete',
|
||||||
|
log_facility => 'LOG_LOCAL0',
|
||||||
|
use_syslog => true,
|
||||||
|
verbose => true,
|
||||||
|
debug => true }"
|
||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
@ -81,6 +93,49 @@ describe 'cloud::compute::hypervisor' do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'configure ceilometer common' do
|
||||||
|
should contain_class('ceilometer').with(
|
||||||
|
:verbose => true,
|
||||||
|
:debug => true,
|
||||||
|
:rabbit_userid => 'ceilometer',
|
||||||
|
:rabbit_hosts => ['10.0.0.1'],
|
||||||
|
:rabbit_password => 'secrete',
|
||||||
|
:metering_secret => 'secrete',
|
||||||
|
:use_syslog => true,
|
||||||
|
:log_facility => 'LOG_LOCAL0'
|
||||||
|
)
|
||||||
|
should contain_class('ceilometer::agent::auth').with(
|
||||||
|
:auth_password => 'secrete',
|
||||||
|
:auth_url => 'http://10.0.0.1:5000/v2.0'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'configure neutron on compute node' do
|
||||||
|
should contain_class('nova::network::neutron').with(
|
||||||
|
:neutron_admin_password => 'secrete',
|
||||||
|
:neutron_admin_auth_url => 'http://10.0.0.1:35357/v2.0',
|
||||||
|
:neutron_region_name => 'MyRegion',
|
||||||
|
:neutron_url => 'http://10.0.0.1:9696'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'configure ceilometer common' do
|
||||||
|
should contain_class('ceilometer').with(
|
||||||
|
:verbose => true,
|
||||||
|
:debug => true,
|
||||||
|
:rabbit_userid => 'ceilometer',
|
||||||
|
:rabbit_hosts => ['10.0.0.1'],
|
||||||
|
:rabbit_password => 'secrete',
|
||||||
|
:metering_secret => 'secrete',
|
||||||
|
:use_syslog => true,
|
||||||
|
:log_facility => 'LOG_LOCAL0'
|
||||||
|
)
|
||||||
|
should contain_class('ceilometer::agent::auth').with(
|
||||||
|
:auth_password => 'secrete',
|
||||||
|
:auth_url => 'http://10.0.0.1:5000/v2.0'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
it 'checks if Nova DB is populated' do
|
it 'checks if Nova DB is populated' do
|
||||||
should contain_exec('nova_db_sync').with(
|
should contain_exec('nova_db_sync').with(
|
||||||
:command => '/usr/bin/nova-manage db sync',
|
:command => '/usr/bin/nova-manage db sync',
|
||||||
@ -124,6 +179,10 @@ describe 'cloud::compute::hypervisor' do
|
|||||||
should contain_class('nova::compute::neutron')
|
should contain_class('nova::compute::neutron')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'configure ceilometer agent compute' do
|
||||||
|
should contain_class('ceilometer::agent::compute')
|
||||||
|
end
|
||||||
|
|
||||||
it 'configure nova-conpute to support RBD backend' do
|
it 'configure nova-conpute to support RBD backend' do
|
||||||
should contain_nova_config('DEFAULT/libvirt_images_type').with('value' => 'rbd')
|
should contain_nova_config('DEFAULT/libvirt_images_type').with('value' => 'rbd')
|
||||||
should contain_nova_config('DEFAULT/libvirt_images_rbd_pool').with('value' => 'cinder')
|
should contain_nova_config('DEFAULT/libvirt_images_rbd_pool').with('value' => 'cinder')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user