Files
puppet-nova/manifests/compute.pp
Dan Bode c9757ec448 require sections are specified in nova_config
This massive code commit actually implements something very simple.

previously, we allowed nova_config to omit a section and assumed that
section was default.

This commit updates the code to require section names for all settings.

This change is being made b/c:
- it better maps to the config on disk
- it is consistent with the other modules

Change-Id: Iae71a4c48ed0f9792566f16f0bf13e61569b46e5
2013-04-12 15:06:58 -07:00

51 lines
1.5 KiB
Puppet

#schedulee this class should probably never be declared except
# from the virtualization implementation of the compute node
class nova::compute(
$enabled = false,
$ensure_package = 'present',
$vnc_enabled = true,
$vncserver_proxyclient_address = '127.0.0.1',
$vncproxy_host = false,
$vncproxy_protocol = 'http',
$vncproxy_port = '6080',
$vncproxy_path = '/vnc_auto.html',
$virtio_nic = false
) {
include nova::params
if ($vnc_enabled) {
if ($vncproxy_host) {
$vncproxy_base_url = "${vncproxy_protocol}://${vncproxy_host}:${vncproxy_port}${vncproxy_path}"
# config for vnc proxy
nova_config {
'DEFAULT/novncproxy_base_url': value => $vncproxy_base_url;
}
}
}
nova_config {
'DEFAULT/vnc_enabled': value => $vnc_enabled;
'DEFAULT/vncserver_proxyclient_address': value => $vncserver_proxyclient_address;
}
package { 'bridge-utils':
ensure => present,
before => Nova::Generic_service['compute'],
}
nova::generic_service { 'compute':
enabled => $enabled,
package_name => $::nova::params::compute_package_name,
service_name => $::nova::params::compute_service_name,
ensure_package => $ensure_package,
before => Exec['networking-refresh']
}
if $virtio_nic {
# Enable the virtio network card for instances
nova_config { 'DEFAULT/libvirt_use_virtio_for_bridges': value => 'True' }
}
}