Add optional auto_assign_floating_ip parameter.

This commit is contained in:
Wong Hoi Sing Edison
2012-06-20 11:41:23 +08:00
parent 90dffc1364
commit b8c7b9a556
3 changed files with 69 additions and 49 deletions

View File

@@ -35,6 +35,8 @@ $rabbit_user = 'openstack_rabbit_user'
$fixed_network_range = '10.0.0.0/24'
# switch this to true to have all service log at verbose
$verbose = 'false'
# by default it does not enable atomatically adding floating IPs
$auto_assign_floating_ip = 'false'
#### end shared variables #################
@@ -60,6 +62,7 @@ node /openstack_all/ {
libvirt_type => 'kvm',
fixed_range => $fixed_network_range,
verbose => $verbose,
auto_assign_floating_ip => $auto_assign_floating_ip,
}
class { 'openstack::auth_file':
@@ -96,6 +99,7 @@ node /openstack_controller/ {
# by default is assumes flat dhcp networking mode
network_manager => 'nova.network.manager.FlatDHCPManager',
verbose => $verbose,
auto_assign_floating_ip => $auto_assign_floating_ip,
mysql_root_password => $mysql_root_password,
admin_email => $admin_email,
admin_password => $admin_password,

View File

@@ -15,6 +15,9 @@
# [fixed_range] The fixed private ip range to be created for the private VM network. Optional. Defaults to '10.0.0.0/24'.
# [network_manager] The network manager to use for the nova network service.
# Optional. Defaults to 'nova.network.manager.FlatDHCPManager'.
# [auto_assign_floating_ip] Rather configured to automatically allocate and
# assign a floating IP address to virtual instances when they are launched.
# Defaults to false.
# [network_config] Used to specify network manager specific parameters .Optional. Defualts to {}.
# [mysql_root_password] The root password to set for the mysql database. Optional. Defaults to sql_pass'.
# [rabbit_password] The password to use for the rabbitmq user. Optional. Defaults to rabbit_pw'
@@ -72,6 +75,7 @@ class openstack::all(
$glance_user_password = 'glance_pass',
# config
$verbose = false,
$auto_assign_floating_ip = false,
$purge_nova_config = true,
$libvirt_type = 'kvm',
$nova_volume = 'nova-volumes'
@@ -211,6 +215,10 @@ class openstack::all(
create_networks => true,
}
if $auto_assign_floating_ip {
nova_config { 'auto_assign_floating_ip': value => 'True'; }
}
# a bunch of nova services that require no configuration
class { [
'nova::scheduler',

View File

@@ -26,6 +26,9 @@
# [num_networks] Number of networks that fixed range should be split into.
# [multi_host] Rather node should support multi-host networking mode for HA.
# Optional. Defaults to false.
# [auto_assign_floating_ip] Rather configured to automatically allocate and
# assign a floating IP address to virtual instances when they are launched.
# Defaults to false.
# [network_config] Hash that can be used to pass implementation specifc
# network settings. Optioal. Defaults to {}
# [verbose] Rahter to log services at verbose.
@@ -68,6 +71,7 @@ class openstack::controller(
$create_networks = true,
$num_networks = 1,
$multi_host = false,
$auto_assign_floating_ip = false,
# TODO need to reconsider this design...
# this is where the config options that are specific to the network
# types go. I am not extremely happy with this....
@@ -269,6 +273,10 @@ class openstack::controller(
install_service => $enable_network_service,
}
if $auto_assign_floating_ip {
nova_config { 'auto_assign_floating_ip': value => 'True'; }
}
######## Horizon ########
class { 'memcached':