diff --git a/nova/manifests/all.pp b/nova/manifests/all.pp index c75d84211..13f00275c 100644 --- a/nova/manifests/all.pp +++ b/nova/manifests/all.pp @@ -3,7 +3,7 @@ class nova::all( $logdir, $verbose, - # $sql_connection='mysql://root:@127.0.0.1/nova', + $sql_connection='mysql://root:@127.0.0.1/nova', $network_manager, $image_service, $flat_network_bridge = 'xenbr0', @@ -33,8 +33,8 @@ class nova::all( $xenapi_connection_url, $xenapi_connection_username, $xenapi_connection_password, - $xenapi_inject_image = 'false' - $db_host = + $xenapi_inject_image = 'false', + $db_host = 'localhost' ) { class { "nova": diff --git a/nova/manifests/canonical/all.pp b/nova/manifests/canonical/all.pp index d3719f02e..196b561bc 100644 --- a/nova/manifests/canonical/all.pp +++ b/nova/manifests/canonical/all.pp @@ -1,6 +1,6 @@ # # TODO - this is currently hardcoded to be a xenserver -class nova::all( +class nova::canonical::all( $logdir, $verbose, $sql_connection='mysql://root:@127.0.0.1/nova', @@ -18,23 +18,8 @@ class nova::all( $state_path, $lock_path, $service_down_time, - $quota_instances, - $quota_cores, - $quota_volumes, - $quota_gigabytes, - $quota_floating_ips, - $quota_metadata_items, - $quota_max_injected_files, - $quota_max_injected_file_content_bytes, - $quota_max_injected_file_path_bytes, - $host, - $compute_type = 'libvirt', -# do kvm and libvirt have extra config options? - $xenapi_connection_url, - $xenapi_connection_username, - $xenapi_connection_password, - $xenapi_inject_image = 'false' - $db_host = + $host + # they are only supporting libvirt for now ) { class { "nova": @@ -55,26 +40,12 @@ class nova::all( state_path => $state_path, lock_path => $lock_path, service_down_time => $service_down_time, - quota_instances => $quota_instances, - quota_cores => $quota_cores, - quota_volumes => $quota_volumes, - quota_gigabytes => $quota_gigabytes, - quota_floating_ips => $quota_floating_ips, - quota_metadata_items => $quota_metadata_items, - quota_max_injected_files => $quota_max_injected_files, - quota_max_injected_file_content_bytes => $quota_max_injected_file_content_bytes, - quota_max_injected_file_path_bytes => $quota_max_injected_file_path_bytes, } class { "nova::api": enabled => false } + # class { 'nova::compute::libvirt': } class { "nova::compute": - compute_type => $compute_type, - host => $host, - xenapi_connection_url => $xenapi_connection_url, - xenapi_connection_username => $xenapi_connection_username, - xenapi_connection_password => $xenapi_connection_password, - xenapi_inject_image => $xenapi_inject_image, - enabled => false + enabled => false } class { "nova::network": enabled => false } class { "nova::objectstore": enabled => false } diff --git a/nova/manifests/compute.pp b/nova/manifests/compute.pp index dd8ea7ede..687dc856f 100644 --- a/nova/manifests/compute.pp +++ b/nova/manifests/compute.pp @@ -1,27 +1,9 @@ # this class should probably never be declared except # from the virtualization implementation of the compute node class nova::compute( - $host, - $compute_type = 'xenserver', - $xenapi_connection_url, - $xenapi_connection_username, - $xenapi_connection_password, - $xenapi_inject_image=false, $enabled = false ) { - if $compute_type == 'xenserver' { - class { 'nova::compute::xenserver': - xenapi_connection_url => $xenapi_connection_url, - xenapi_connection_username => $xenapi_connection_username, - xenapi_connection_password => $xenapi_connection_password, - xenapi_inject_image => $xenapi_inject_image, - host => $host, - } - } else { - fail("Unsupported compute type: ${compute_type}") - } - Nova_config<| |>~>Service['nova-compute'] if $enabled { diff --git a/nova/manifests/compute/xenserver.pp b/nova/manifests/compute/xenserver.pp index 934e24545..e74fbd46d 100644 --- a/nova/manifests/compute/xenserver.pp +++ b/nova/manifests/compute/xenserver.pp @@ -4,9 +4,13 @@ class nova::compute::xenserver( $xenapi_connection_url, $xenapi_connection_username, $xenapi_connection_password, - $xenapi_inject_image=false + $xenapi_inject_image=false, + $enabled=true ) { + class { 'nova': + enabled => $enabled, + } nova_config { 'xenapi_connection_url': value => $xenapi_connection_url; 'xenapi_connection_username': value => $xenapi_connection_username; diff --git a/nova/manifests/db.pp b/nova/manifests/db.pp index 0055db2ef..712426d00 100644 --- a/nova/manifests/db.pp +++ b/nova/manifests/db.pp @@ -2,14 +2,14 @@ class nova::db( $password, $name = 'nova', $user = 'nova', - $host = '127.0.0.1' - $zone = 'localzone' + $host = '127.0.0.1', + $cluster_id = 'localzone' ) { # now this requires storedconfigs # TODO - worry about the security implications @@nova_config { 'database_url': - value => "mysql://${user}:${password}@${host}/${name}" + value => "mysql://${user}:${password}@${host}/${name}" , tag => $zone, } diff --git a/nova/manifests/init.pp b/nova/manifests/init.pp index bb917a263..7925e27ec 100644 --- a/nova/manifests/init.pp +++ b/nova/manifests/init.pp @@ -16,15 +16,16 @@ class nova( $rabbit_virtual_host, # Following may need to be broken out to different nova services $service_down_time, - $quota_instances, - $quota_cores, - $quota_volumes, - $quota_gigabytes, - $quota_floating_ips, - $quota_metadata_items, - $quota_max_injected_files, - $quota_max_injected_file_content_bytes, - $quota_max_injected_file_path_bytes, + # TODO - do we really want to enforce the defaults here? + $quota_instances = 10, + $quota_cores = 20, + $quota_volumes = 10, + $quota_gigabytes = 1000, + $quota_floating_ips = 10, + $quota_metadata_items = 128, + $quota_max_injected_files = 5, + $quota_max_injected_file_content_bytes = 10240, + $quota_max_injected_file_path_bytes = 255, $logdir = '/var/log/nova', $state_path = '/var/lib/nova', $lock_path = '/var/lock/nova', diff --git a/nova/tests/canonical/all.pp b/nova/tests/canonical/all.pp index f85a60750..382e4533c 100644 --- a/nova/tests/canonical/all.pp +++ b/nova/tests/canonical/all.pp @@ -1,4 +1,4 @@ -Nova_config { target => '/tmp/nova.config' } +#Nova_config { target => '/tmp/nova.config' } resources { 'nova_config': purge => true, } @@ -6,7 +6,7 @@ resources { 'nova_config': class { 'mysql::server': root_password => 'password' } -class { 'nova::all': +class { 'nova::canonical::all': #dhcpbridge_flagfile=/etc/nova/nova.conf #dhcpbridge=/usr/bin/nova-dhcpbridge #verbose => true,