Split compute to its own node
This commit is contained in:
parent
7f44799b39
commit
1e7a001c53
|
@ -0,0 +1,73 @@
|
|||
#
|
||||
# TODO - this is currently hardcoded to be a xenserver
|
||||
class nova::ubuntu::cc (
|
||||
$db_password,
|
||||
$db_name = 'nova',
|
||||
$db_user = 'nova',
|
||||
$db_host = 'localhost',
|
||||
$db_allowed_hosts = undef,
|
||||
|
||||
$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',
|
||||
|
||||
$admin_user = 'novaadmin',
|
||||
$project_name = 'nova'
|
||||
) {
|
||||
|
||||
|
||||
# work around hostname bug, LP #653405
|
||||
host { $hostname:
|
||||
ip => $ipaddress,
|
||||
host_aliases => $fqdn,
|
||||
}
|
||||
class { 'nova::rabbitmq':
|
||||
port => $rabbitmq_port,
|
||||
userid => $rabbitmq_userid,
|
||||
password => $rabbitmq_password,
|
||||
virtual_host => $rabbitmq_virtual_host,
|
||||
require => Host[$hostname],
|
||||
}
|
||||
|
||||
class { "nova":
|
||||
logdir => $logdir,
|
||||
verbose => $verbose,
|
||||
sql_connection => "mysql://${db_user}:${db_password}@${db_host}/${db_name}",
|
||||
image_service => $image_service,
|
||||
}
|
||||
|
||||
class { "nova::api": enabled => true }
|
||||
|
||||
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,
|
||||
name => $db_name,
|
||||
user => $db_user,
|
||||
host => $db_host,
|
||||
allowed_hosts => $db_allowed_hosts,
|
||||
}
|
||||
|
||||
nova::manage::admin { $admin_user: }
|
||||
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],
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
# compute.pp
|
||||
class nova::ubuntu::compute (
|
||||
$api_server,
|
||||
$rabbit_host,
|
||||
$db_host,
|
||||
$flat_network_bridge,
|
||||
$flat_network_bridge_ip,
|
||||
$flat_network_bridge_netmask,
|
||||
$rabbit_port = undef,
|
||||
$rabbit_userid = undef,
|
||||
$rabbit_virtual_host = undef,
|
||||
$db_user = 'nova',
|
||||
$db_password = 'nova',
|
||||
$db_name = 'nova',
|
||||
$enabled = 'false'
|
||||
) {
|
||||
|
||||
class { "nova":
|
||||
logdir => $logdir,
|
||||
verbose => $verbose,
|
||||
image_service => $image_service,
|
||||
rabbit_host => $rabbit_host,
|
||||
rabbit_port => $rabbit_port,
|
||||
rabbit_userid => $rabbit_userid,
|
||||
rabbit_virtual_host => $rabbit_virtual_host,
|
||||
sql_connection => "mysql://${db_user}:${db_password}@${db_host}/${db_name}",
|
||||
}
|
||||
|
||||
# TODO For now lets worry about FlatManager, then FlatDHCP, etc.
|
||||
nova_config {
|
||||
'network_manager': value => 'nova.network.manager.FlatManager';
|
||||
'flat_network_bridge': value => $flat_network_bridge;
|
||||
}
|
||||
nova::network::bridge { $flat_network_bridge:
|
||||
ip => $flat_network_bridge_ip,
|
||||
netmask => $flat_network_bridge_netmask,
|
||||
}
|
||||
|
||||
class { "nova::compute":
|
||||
api_server => $api_server,
|
||||
enabled => $enabled,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
# cc.pp
|
||||
|
||||
resources { 'nova_config':
|
||||
purge => true,
|
||||
}
|
||||
|
||||
class { 'mysql::server':
|
||||
root_password => 'password'
|
||||
}
|
||||
|
||||
class { 'nova::ubuntu::cc':
|
||||
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',
|
||||
|
||||
db_allowed_hosts => ['somehost', '10.0.0.2', '10.0.0.3'],
|
||||
|
||||
admin_user => 'admin',
|
||||
project_name => 'novaproject',
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
# compute.pp
|
||||
|
||||
resources { 'nova_config':
|
||||
purge => true,
|
||||
}
|
||||
|
||||
class { 'nova::ubuntu::compute':
|
||||
api_server => '10.0.0.2',
|
||||
rabbit_host => '10.0.0.2',
|
||||
db_host => '10.0.0.2',
|
||||
db_user => 'nova',
|
||||
db_password => 'password',
|
||||
flat_network_bridge => 'br100',
|
||||
flat_network_bridge_ip => '11.0.0.2',
|
||||
flat_network_bridge_netmask => '255.255.255.0',
|
||||
enabled => 'true',
|
||||
}
|
Loading…
Reference in New Issue