minor changes.
updated canonical specific config updated rabbitmq commit id added network refresh to init.pp
This commit is contained in:
parent
725fd68845
commit
9b504bda71
|
@ -1,30 +1,20 @@
|
|||
#
|
||||
# TODO - this is currently hardcoded to be a xenserver
|
||||
class nova::canonical::all(
|
||||
$logdir,
|
||||
$verbose = false,
|
||||
$db_password,
|
||||
$db_name = 'nova',
|
||||
$db_user = 'nova',
|
||||
$db_host = 'localhost',
|
||||
$network_manager,
|
||||
$image_service,
|
||||
|
||||
$flat_network_bridge = 'br100',
|
||||
$glance_host,
|
||||
$glance_port,
|
||||
$allow_admin_api = 'true',
|
||||
$rabbit_host = undef,
|
||||
$rabbit_password = unfef,
|
||||
$rabbit_port = undef,
|
||||
$rabbit_userid = undef,
|
||||
$rabbit_virtual_host = undef,
|
||||
$state_path,
|
||||
$lock_path,
|
||||
$service_down_time,
|
||||
$host,
|
||||
$flat_network_bridge_ip = '11.0.0.1',
|
||||
$flat_network_bridge_netmask = '255.255.255.0',
|
||||
|
||||
$nova_network = '11.0.0.0',
|
||||
$available_ips = '256',
|
||||
|
||||
$admin_user = 'novaadmin',
|
||||
$project_name = 'nova'
|
||||
# they are only supporting libvirt for now
|
||||
) {
|
||||
|
||||
|
||||
|
@ -41,30 +31,23 @@ class nova::canonical::all(
|
|||
logdir => $logdir,
|
||||
verbose => $verbose,
|
||||
sql_connection => "mysql://${db_user}:${db_password}@${db_host}/${db_name}",
|
||||
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,
|
||||
}
|
||||
|
||||
class { "nova::api": enabled => false }
|
||||
# class { 'nova::compute::libvirt': }
|
||||
class { "nova::api": enabled => true }
|
||||
class { "nova::compute":
|
||||
enabled => false
|
||||
enabled => true
|
||||
}
|
||||
class { "nova::network": enabled => false }
|
||||
class { "nova::objectstore": enabled => false }
|
||||
class { "nova::scheduler": enabled => false }
|
||||
|
||||
class { "nova::network::flat":
|
||||
enabled => true,
|
||||
flat_network_bridge => $flat_network_bridge,
|
||||
flat_network_bridge_ip => $flat_network_bridge_ip,
|
||||
flat_network_bridge_netmask => $flat_network_bridge_netmask,
|
||||
}
|
||||
|
||||
class { "nova::objectstore": enabled => true }
|
||||
class { "nova::scheduler": enabled => true }
|
||||
class { 'nova::db':
|
||||
# pass in db config as params
|
||||
password => $db_password,
|
||||
|
@ -77,4 +60,11 @@ class nova::canonical::all(
|
|||
nova::manage::project { $project_name:
|
||||
owner => $admin_user,
|
||||
}
|
||||
|
||||
nova::manage::network { "${project_name}-net-${network}":
|
||||
network => $nova_network,
|
||||
available_ips => $available_ips,
|
||||
require => Nova::Manage::Project[$project_name],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,22 +2,19 @@ class nova(
|
|||
# this is how to query all resources from our clutser
|
||||
$nova_cluster_id='localcluster',
|
||||
$sql_connection = false,
|
||||
$network_manager='nova.network.manager.FlatManager',
|
||||
$flat_network_bridge,
|
||||
$image_service = 'nova.image.local.LocalImageService',
|
||||
# is flat_network_bridge valid if network_manager is not FlatManager?
|
||||
# these glance params should be optional
|
||||
# this should probably just be configured as a glance client
|
||||
$glance_host = undef,
|
||||
$glance_port = undef,
|
||||
$allow_admin_api,
|
||||
$allow_admin_api = undef,
|
||||
$rabbit_host = 'localhost',
|
||||
$rabbit_password='guest',
|
||||
$rabbit_port='5672',
|
||||
$rabbit_userid='guest',
|
||||
$rabbit_virtual_host='/',
|
||||
# Following may need to be broken out to different nova services
|
||||
$service_down_time,
|
||||
$service_down_time = undef,
|
||||
$quota_instances = 10,
|
||||
$quota_cores = 20,
|
||||
$quota_volumes = 10,
|
||||
|
@ -67,6 +64,15 @@ class nova(
|
|||
command => "/usr/bin/nova-manage db sync",
|
||||
refreshonly => "true",
|
||||
}
|
||||
|
||||
# used by debian/ubuntu in nova::network_bridge to refresh
|
||||
# interfaces based on /etc/network/interfaces
|
||||
exec { "networking-refresh":
|
||||
command => "/sbin/ifdown -a ; /sbin/ifup -a",
|
||||
refreshonly => "true",
|
||||
}
|
||||
|
||||
|
||||
# query out the config for our db connection
|
||||
if $sql_connection {
|
||||
nova_config { 'sql_connection': value => $sql_connection }
|
||||
|
@ -78,10 +84,7 @@ class nova(
|
|||
'verbose': value => $verbose;
|
||||
'nodaemon': value => $nodaemon;
|
||||
'logdir': value => $logdir;
|
||||
'network_manager': value => $network_manager;
|
||||
'image_service': value => $image_service;
|
||||
# is flat_network_bridge valid if network_manager is not FlatManager?
|
||||
'flat_network_bridge': value => $flat_network_bridge;
|
||||
'allow_admin_api': value => $allow_admin_api;
|
||||
'rabbit_host': value => $rabbit_host;
|
||||
'rabbit_password': value => $rabbit_password;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
define nova::manage::project ( $owner ) {
|
||||
nova_project { $name:
|
||||
ensure => present,
|
||||
owner => $owner,
|
||||
provider => 'nova_manage',
|
||||
owner => $owner,
|
||||
notify => Exec["nova-db-sync"],
|
||||
require => [Class["nova::db"], Nova::Manage::Admin[$owner]],
|
||||
}
|
||||
|
|
|
@ -7,27 +7,15 @@ class { 'mysql::server':
|
|||
root_password => 'password'
|
||||
}
|
||||
class { 'nova::canonical::all':
|
||||
#dhcpbridge_flagfile=/etc/nova/nova.conf
|
||||
#dhcpbridge=/usr/bin/nova-dhcpbridge
|
||||
#cc_host=192.168.25.30
|
||||
#ec2_url=http://192.168.25.30:8773/services/Cloud
|
||||
#fixed_range=10.0.0.0/32
|
||||
#network_size=255
|
||||
#FAKE_subdomain=ec2
|
||||
#routing_source_ip=192.168.25.30
|
||||
verbose => 'true',
|
||||
logdir => '/var/log/nova',
|
||||
network_manager => 'nova.network.manager.FlatManager',
|
||||
image_service => 'nova.image.glance.GlanceImageService',
|
||||
flat_network_bridge => 'xenbr0',
|
||||
glance_host => 'glance_ip_address',
|
||||
glance_port => '9292',
|
||||
allow_admin_api => 'true',
|
||||
state_path => '/var/lib/nova',
|
||||
lock_path => '/var/lock/nova',
|
||||
service_down_time => '180000000',
|
||||
host => $hostname,
|
||||
flat_network_bridge => 'br100',
|
||||
flat_network_bridge_ip => '11.0.0.1',
|
||||
flat_network_bridge_netmask => '255.255.255.0',
|
||||
|
||||
nova_network => '11.0.0.0',
|
||||
available_ips => '256',
|
||||
|
||||
db_password => 'password',
|
||||
|
||||
admin_user => 'admin',
|
||||
project_name => 'novaproject',
|
||||
}
|
||||
|
|
2
rabbitmq
2
rabbitmq
|
@ -1 +1 @@
|
|||
Subproject commit 627334d99f059f735398447512625c7c6d795846
|
||||
Subproject commit b804bd1ca334b34437abb7ad38535e3bae2ccf1d
|
Loading…
Reference in New Issue