From d8208ab9748e0b2781230407bc8c06fbf62c0a62 Mon Sep 17 00:00:00 2001 From: Chris Blumentritt Date: Sun, 29 May 2011 18:13:00 -0500 Subject: [PATCH 1/2] Variety of changes to get the nova all test to run --- nova/manifests/all.pp | 6 +++++- nova/manifests/api.pp | 2 +- nova/manifests/db.pp | 4 ++-- nova/manifests/init.pp | 7 +++---- nova/manifests/network.pp | 2 +- nova/manifests/objectstore.pp | 2 +- nova/manifests/scheduler.pp | 2 +- nova/tests/all.pp | 5 +++-- 8 files changed, 17 insertions(+), 13 deletions(-) diff --git a/nova/manifests/all.pp b/nova/manifests/all.pp index ca6eb4031..2eb7ccd6c 100644 --- a/nova/manifests/all.pp +++ b/nova/manifests/all.pp @@ -6,6 +6,7 @@ class nova::all( $sql_connection, $network_manager, $image_service, + $logdir, $verbose = 'undef', $nodaemon = 'undef', $flat_network_bridge = 'xenbr0', @@ -18,7 +19,10 @@ class nova::all( $ipv6_backend = 'account_identifier' ) { - class { "nova": } + class { "nova": + sql_connection => sql_connection + + } class { "nova::api": enabled => false } class { "nova::compute": enabled => false } class { "nova::network": enabled => false } diff --git a/nova/manifests/api.pp b/nova/manifests/api.pp index 24ae5ec35..04ee5f8b2 100644 --- a/nova/manifests/api.pp +++ b/nova/manifests/api.pp @@ -14,6 +14,6 @@ class nova::api($enabled=false) inherits nova { ensure => $service_ensure, enable => $enabled, require => Package["nova-api"], - subscribe => File["/etc/nova/nova.conf"] + #subscribe => File["/etc/nova/nova.conf"] } } diff --git a/nova/manifests/db.pp b/nova/manifests/db.pp index 50a02fc06..6c1fc8f40 100644 --- a/nova/manifests/db.pp +++ b/nova/manifests/db.pp @@ -5,8 +5,8 @@ class nova::db( $host = 'localhost' ) { mysql::db { $name: - user => $user, - password => $password, + db_user => $user, + db_pw => $password, host => $host, # I may want to inject some sql # sql='', diff --git a/nova/manifests/init.pp b/nova/manifests/init.pp index 6d0caa0d7..105207242 100644 --- a/nova/manifests/init.pp +++ b/nova/manifests/init.pp @@ -1,10 +1,9 @@ class nova( $verbose = false, - $nodaemon = false - $logdir = '' - $sql_connection, + $nodaemon = false, + $logdir = '', + $sql_connection # just for network? - $network_manager ) { class { 'puppet': } diff --git a/nova/manifests/network.pp b/nova/manifests/network.pp index 1e313bc05..ec8aa126f 100644 --- a/nova/manifests/network.pp +++ b/nova/manifests/network.pp @@ -15,6 +15,6 @@ class nova::network( $enabled=false ) inherits nova { ensure => $service_ensure, enable => $enabled, require => Package["nova-network"], - subscribe => File["/etc/nova/nova.conf"] + #subscribe => File["/etc/nova/nova.conf"] } } diff --git a/nova/manifests/objectstore.pp b/nova/manifests/objectstore.pp index 0bdafd913..324ec5d75 100644 --- a/nova/manifests/objectstore.pp +++ b/nova/manifests/objectstore.pp @@ -15,6 +15,6 @@ class nova::objectstore( $enabled=false ) inherits nova { ensure => $service_ensure, enable => $enabled, require => Package["nova-objectstore"], - subscribe => File["/etc/nova/nova.conf"] + #subscribe => File["/etc/nova/nova.conf"] } } diff --git a/nova/manifests/scheduler.pp b/nova/manifests/scheduler.pp index b76c680ac..1d1b18de7 100644 --- a/nova/manifests/scheduler.pp +++ b/nova/manifests/scheduler.pp @@ -15,6 +15,6 @@ class nova::scheduler( $enabled ) inherits nova { ensure => $service_ensure, enable => $enabled, require => Package["nova-scheduler"], - subscribe => File["/etc/nova/nova.conf"] + #subscribe => File["/etc/nova/nova.conf"] } } diff --git a/nova/tests/all.pp b/nova/tests/all.pp index 55fc6bc88..278a2ca0f 100644 --- a/nova/tests/all.pp +++ b/nova/tests/all.pp @@ -3,18 +3,19 @@ stage { 'repo-setup': } class { 'apt': disable_keys => true, - always_apt_update => true, + #always_apt_update => true, stage => 'repo-setup', } class { 'nova::repo': stage => 'repo-setup', } class { 'mysql::server': - root_password => 'password' + mysql_root_pw => 'password' } class { 'nova::all': verbose => 'undef', nodaemon => 'undef', + logdir => '/var/log/nova', sql_connection => 'mysql://root:@127.0.0.1/nova', network_manager => 'nova.network.manager.FlatManager', image_service => 'nova.image.glance.GlanceImageService', From 403ea6dc56868b7eb1a77f231b3ff702d6d35c16 Mon Sep 17 00:00:00 2001 From: Chris Blumentritt Date: Tue, 31 May 2011 10:40:53 -0500 Subject: [PATCH 2/2] adding parameters to nova and nova::compute class --- nova/manifests/all.pp | 79 +++++++++++++++++++++++++++++++-------- nova/manifests/compute.pp | 9 ++++- nova/manifests/init.pp | 30 +++++++++++++-- nova/tests/all.pp | 29 ++++++++++---- 4 files changed, 120 insertions(+), 27 deletions(-) diff --git a/nova/manifests/all.pp b/nova/manifests/all.pp index 2eb7ccd6c..4169ae577 100644 --- a/nova/manifests/all.pp +++ b/nova/manifests/all.pp @@ -1,30 +1,77 @@ class nova::all( - $xenapi_connection_url, - $xenapi_connection_username, - $xenapi_connection_password, - $xenapi_inject_image = 'false', + $logdir, + $verbose, $sql_connection, $network_manager, $image_service, - $logdir, - $verbose = 'undef', - $nodaemon = 'undef', $flat_network_bridge = 'xenbr0', - $connection_type = 'xenapi', - $rescue_timeout = '86400', + $glance_host, + $glance_port, $allow_admin_api = 'true', - $xenapi_inject_image = 'false', - $use_ipv6 = 'false', - $flat_injected = 'true', - $ipv6_backend = 'account_identifier' + $rabbit_host, + $rabbit_password, + $rabbit_port, + $rabbit_userid, + $rabbit_virtual_host, + $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, + $connection_type, + $xenapi_connection_url, + $xenapi_connection_username, + $xenapi_connection_password, + $xenapi_inject_image = 'false' ) { class { "nova": - sql_connection => sql_connection - + logdir => $logdir, + verbose => $verbose, + sql_connection => $sql_connection, + network_manager => $network_manager, + image_service => $image_service, + flat_network_bridge => $flat_network_bridge, + glance_host => $glance_host, + glance_port => $glance_port, + allow_admin_api => $allow_admin_api, + rabbit_host => $rabbit_host, + rabbit_password => $rabbit_password, + rabbit_port => $rabbit_port, + rabbit_userid => $rabbit_userid, + rabbit_virtual_host => $rabbit_virtual_host, + 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": enabled => false } + class { "nova::compute": + host => $host, + connection_type => $connection_type, + 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 + } class { "nova::network": enabled => false } class { "nova::objectstore": enabled => false } class { "nova::scheduler": enabled => false } diff --git a/nova/manifests/compute.pp b/nova/manifests/compute.pp index 1786c1884..f10ee8e60 100644 --- a/nova/manifests/compute.pp +++ b/nova/manifests/compute.pp @@ -1,6 +1,13 @@ class nova::compute( $enabled = false, - $nova_config = '/etc/nova/nova.conf' + $nova_config = '/etc/nova/nova.conf', + $host, + $connection_type, + # There will need to be a map of host compute vm to host instance + $xenapi_connection_url, + $xenapi_connection_username, + $xenapi_connection_password, + $xenapi_inject_image ) { Nova_config<| |>~>Service['nova_compute'] diff --git a/nova/manifests/init.pp b/nova/manifests/init.pp index 105207242..c5fc018b8 100644 --- a/nova/manifests/init.pp +++ b/nova/manifests/init.pp @@ -1,9 +1,33 @@ class nova( $verbose = false, $nodaemon = false, - $logdir = '', - $sql_connection - # just for network? + $logdir = '/var/log/nova', + $sql_connection, + $network_manager, + $image_service, + # is flat_network_bridge valid if network_manager is not FlatManager? + $flat_network_bridge, + $glance_host, + $glance_port, # default is 9292 + $allow_admin_api, + $rabbit_host, + $rabbit_password, + $rabbit_port, + $rabbit_userid, + $rabbit_virtual_host, + # Following may need to be broken out to different nova services + $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 ) { class { 'puppet': } diff --git a/nova/tests/all.pp b/nova/tests/all.pp index 278a2ca0f..3349b7e1e 100644 --- a/nova/tests/all.pp +++ b/nova/tests/all.pp @@ -13,22 +13,37 @@ class { 'mysql::server': mysql_root_pw => 'password' } class { 'nova::all': - verbose => 'undef', - nodaemon => 'undef', + verbose => 'true', logdir => '/var/log/nova', sql_connection => 'mysql://root:@127.0.0.1/nova', network_manager => 'nova.network.manager.FlatManager', image_service => 'nova.image.glance.GlanceImageService', flat_network_bridge => 'xenbr0', + glance_host => '', + glance_port => '9292', + allow_admin_api => 'true', + rabbit_host => 'rabbit ip address>', + rabbit_password => 'rabbit password>', + rabbit_port => '5672', + rabbit_userid => 'rabbit user>', + rabbit_virtual_host => '/', + state_path => 'var/lib/nova', + lock_path => 'var/lock/nova', + service_down_time => '180000000', + quota_instances => '1000000', + quota_cores => '1000000', + quota_volumes => '1000000', + quota_gigabytes => '1000000', + quota_floating_ips => '1000000', + quota_metadata_items => '1000000', + quota_max_injected_files => '1000000', + quota_max_injected_file_content_bytes => '1000000', + quota_max_injected_file_path_bytes => '1000000', + host => $ipaddress, connection_type => 'xenapi', xenapi_connection_url => 'https://', xenapi_connection_username => 'root', xenapi_connection_password => 'password', xenapi_inject_image => 'false', - rescue_timeout => '86400', - allow_admin_api => 'true', - use_ipv6 => 'false', - flat_injected => 'true', - ipv6_backend => 'account_identifier', }