Merge pull request #35 from bodepd/feature/master/various_fixes

Various fixes:
This commit is contained in:
Dan Bode 2011-06-23 16:27:26 -07:00
commit db4bf30fd9
4 changed files with 21 additions and 27 deletions

View File

@ -22,8 +22,9 @@ class nova::controller(
$available_ips = '256',
$image_service = 'nova.image.glance.GlanceImageService',
$glance_host = 'localhost',
$glance_port = '9292',
$glance_api_servers = 'localhost:9292',
$glance_host = undef,
$glance_port = undef,
$admin_user = 'novaadmin',
$project_name = 'nova',
@ -32,23 +33,11 @@ class nova::controller(
) {
# work around hostname bug, LP #653405
host { $hostname:
ip => $ipaddress,
host_aliases => $fqdn,
}
class { 'nova::rabbitmq':
port => $rabbit_port,
userid => $rabbit_userid,
password => $rabbit_password,
virtual_host => $rabbit_virtual_host,
require => Host[$hostname],
}
class { "nova":
verbose => $verbose,
sql_connection => "mysql://${db_user}:${db_password}@${db_host}/${db_name}",
image_service => $image_service,
glance_api_servers => $glance_api_servers,
glance_host => $glance_host,
glance_port => $glance_port,
rabbit_host => $rabbit_host,
@ -86,13 +75,4 @@ class nova::controller(
available_ips => $available_ips,
require => Nova::Manage::Project[$project_name],
}
# set up glance server
class { 'glance::api':
swift_store_user => 'foo_user',
swift_store_key => 'foo_pass',
}
class { 'glance::registry': }
}

View File

@ -6,6 +6,8 @@ class nova(
# these glance params should be optional
# this should probably just be configured as a glance client
$glance_api_servers = 'localhost:9292',
$glance_host = 'localhost',
$glance_port = '9292',
$allow_admin_api = false,
$rabbit_host = 'localhost',
$rabbit_password='guest',
@ -29,8 +31,12 @@ class nova(
notify +> Exec['post-nova_config']
}
# TODO - why is this required?
package { ['python', 'python-greenlet']:
ensure => present
package { 'python':
ensure => present,
}
package { 'python-greenlet':
ensure => present,
require => Package['python'],
}
class { 'nova::utilities': }
@ -102,6 +108,8 @@ class nova(
if $image_service == 'nova.image.glance.GlanceImageService' {
nova_config {
'glance_api_servers': value => $glance_api_servers;
'glance_host': value => $glance_host;
'glance_port': value => $glance_port;
}
}

View File

@ -1,6 +1,6 @@
define nova::manage::admin {
File['/etc/nova/nova.conf'] -> Nova::Manage::Admin[$name]
File['/etc/nova/nova.conf'] -> Nova_admin[$name]
Exec<| title == 'initial-db-sync' |> -> Nova_admin[$name]
nova_admin{ $name:

View File

@ -13,6 +13,12 @@ class nova::rabbitmq(
# only configure nova after the queue is up
Class['rabbitmq::service'] -> Package<| title == 'nova-common' |>
# work around hostname bug, LP #653405
host { $hostname:
ip => $ipaddress,
host_aliases => $fqdn,
}
if $install_repo {
# this is debian specific
class { 'rabbitmq::repo::apt':