Add optional auto_assign_floating_ip parameter.
This commit is contained in:
@@ -16,25 +16,27 @@ file { '/tmp/test_nova.sh':
|
||||
# environments
|
||||
|
||||
# assumes that eth0 is the public interface
|
||||
$public_interface = 'eth0'
|
||||
$public_interface = 'eth0'
|
||||
# assumes that eth1 is the interface that will be used for the vm network
|
||||
# this configuration assumes this interface is active but does not have an
|
||||
# ip address allocated to it.
|
||||
$private_interface = 'eth1'
|
||||
$private_interface = 'eth1'
|
||||
# credentials
|
||||
$admin_email = 'root@localhost'
|
||||
$admin_password = 'keystone_admin'
|
||||
$keystone_db_password = 'keystone_db_pass'
|
||||
$keystone_admin_token = 'keystone_admin_token'
|
||||
$nova_db_password = 'nova_pass'
|
||||
$nova_user_password = 'nova_pass'
|
||||
$glance_db_password = 'glance_pass'
|
||||
$glance_user_password = 'glance_pass'
|
||||
$rabbit_password = 'openstack_rabbit_password'
|
||||
$rabbit_user = 'openstack_rabbit_user'
|
||||
$fixed_network_range = '10.0.0.0/24'
|
||||
$admin_email = 'root@localhost'
|
||||
$admin_password = 'keystone_admin'
|
||||
$keystone_db_password = 'keystone_db_pass'
|
||||
$keystone_admin_token = 'keystone_admin_token'
|
||||
$nova_db_password = 'nova_pass'
|
||||
$nova_user_password = 'nova_pass'
|
||||
$glance_db_password = 'glance_pass'
|
||||
$glance_user_password = 'glance_pass'
|
||||
$rabbit_password = 'openstack_rabbit_password'
|
||||
$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'
|
||||
$verbose = 'false'
|
||||
# by default it does not enable atomatically adding floating IPs
|
||||
$auto_assign_floating_ip = 'false'
|
||||
|
||||
|
||||
#### end shared variables #################
|
||||
@@ -44,22 +46,23 @@ $verbose = 'false'
|
||||
node /openstack_all/ {
|
||||
|
||||
class { 'openstack::all':
|
||||
public_address => $ipaddress_eth0,
|
||||
public_interface => $public_interface,
|
||||
private_interface => $private_interface,
|
||||
admin_email => $admin_email,
|
||||
admin_password => $admin_password,
|
||||
keystone_db_password => $keystone_db_password,
|
||||
keystone_admin_token => $keystone_admin_token,
|
||||
nova_db_password => $nova_db_password,
|
||||
nova_user_password => $nova_user_password,
|
||||
glance_db_password => $glance_db_password,
|
||||
glance_user_password => $glance_user_password,
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_user => $rabbit_user,
|
||||
libvirt_type => 'kvm',
|
||||
fixed_range => $fixed_network_range,
|
||||
verbose => $verbose,
|
||||
public_address => $ipaddress_eth0,
|
||||
public_interface => $public_interface,
|
||||
private_interface => $private_interface,
|
||||
admin_email => $admin_email,
|
||||
admin_password => $admin_password,
|
||||
keystone_db_password => $keystone_db_password,
|
||||
keystone_admin_token => $keystone_admin_token,
|
||||
nova_db_password => $nova_db_password,
|
||||
nova_user_password => $nova_user_password,
|
||||
glance_db_password => $glance_db_password,
|
||||
glance_user_password => $glance_user_password,
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_user => $rabbit_user,
|
||||
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,
|
||||
|
@@ -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'
|
||||
@@ -53,28 +56,29 @@ class openstack::all(
|
||||
$public_address,
|
||||
$public_interface,
|
||||
$private_interface,
|
||||
$floating_range = false,
|
||||
$fixed_range = '10.0.0.0/24',
|
||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||
$network_config = {},
|
||||
$floating_range = false,
|
||||
$fixed_range = '10.0.0.0/24',
|
||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||
$network_config = {},
|
||||
# middleware credentials
|
||||
$mysql_root_password = 'sql_pass',
|
||||
$rabbit_password = 'rabbit_pw',
|
||||
$rabbit_user = 'nova',
|
||||
$mysql_root_password = 'sql_pass',
|
||||
$rabbit_password = 'rabbit_pw',
|
||||
$rabbit_user = 'nova',
|
||||
# opestack credentials
|
||||
$admin_email = 'someuser@some_fake_email_address.foo',
|
||||
$admin_password = 'ChangeMe',
|
||||
$keystone_db_password = 'keystone_pass',
|
||||
$keystone_admin_token = 'keystone_admin_token',
|
||||
$nova_db_password = 'nova_pass',
|
||||
$nova_user_password = 'nova_pass',
|
||||
$glance_db_password = 'glance_pass',
|
||||
$glance_user_password = 'glance_pass',
|
||||
$admin_email = 'someuser@some_fake_email_address.foo',
|
||||
$admin_password = 'ChangeMe',
|
||||
$keystone_db_password = 'keystone_pass',
|
||||
$keystone_admin_token = 'keystone_admin_token',
|
||||
$nova_db_password = 'nova_pass',
|
||||
$nova_user_password = 'nova_pass',
|
||||
$glance_db_password = 'glance_pass',
|
||||
$glance_user_password = 'glance_pass',
|
||||
# config
|
||||
$verbose = false,
|
||||
$purge_nova_config = true,
|
||||
$libvirt_type = 'kvm',
|
||||
$nova_volume = 'nova-volumes'
|
||||
$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',
|
||||
|
@@ -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':
|
||||
|
Reference in New Issue
Block a user