re-add nova-network support
This commit adds nova network support for openstack::compute, openstack::controller, and openstack::nova::controller.
This commit is contained in:
@@ -22,9 +22,18 @@ class openstack::compute (
|
|||||||
$nova_user_password,
|
$nova_user_password,
|
||||||
# Required Rabbit
|
# Required Rabbit
|
||||||
$rabbit_password,
|
$rabbit_password,
|
||||||
# Network
|
|
||||||
# DB
|
# DB
|
||||||
$sql_connection = false,
|
$sql_connection = false,
|
||||||
|
# Network
|
||||||
|
$quantum = true,
|
||||||
|
$public_address = $internal_address,
|
||||||
|
$admin_address = $internal_address,
|
||||||
|
$public_interface = undef,
|
||||||
|
$private_interface = undef,
|
||||||
|
$fixed_range = undef,
|
||||||
|
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||||
|
$network_config = {},
|
||||||
|
$multi_host = false,
|
||||||
# Nova
|
# Nova
|
||||||
$purge_nova_config = true,
|
$purge_nova_config = true,
|
||||||
# Rabbit
|
# Rabbit
|
||||||
@@ -84,41 +93,46 @@ class openstack::compute (
|
|||||||
|
|
||||||
# if the compute node should be configured as a multi-host
|
# if the compute node should be configured as a multi-host
|
||||||
# compute installation
|
# compute installation
|
||||||
if $multi_host {
|
if $quantum == false {
|
||||||
include keystone::python
|
if $multi_host {
|
||||||
#nova_config {
|
include keystone::python
|
||||||
# 'multi_host': value => 'True';
|
nova_config {
|
||||||
# 'send_arp_for_ha': value => 'True';
|
'multi_host': value => 'True';
|
||||||
#}
|
'send_arp_for_ha': value => 'True';
|
||||||
#if ! $public_interface {
|
}
|
||||||
# fail('public_interface must be defined for multi host compute nodes')
|
if ! $public_interface {
|
||||||
#}
|
fail('public_interface must be defined for multi host compute nodes')
|
||||||
#$enable_network_service = true
|
}
|
||||||
class { 'nova::api':
|
$enable_network_service = true
|
||||||
enabled => true,
|
class { 'nova::api':
|
||||||
admin_tenant_name => 'services',
|
enabled => true,
|
||||||
admin_user => 'nova',
|
admin_tenant_name => 'services',
|
||||||
admin_password => $nova_user_password,
|
admin_user => 'nova',
|
||||||
# TODO override enabled_apis
|
admin_password => $nova_user_password,
|
||||||
|
# TODO override enabled_apis
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$enable_network_service = false
|
||||||
|
nova_config {
|
||||||
|
'multi_host': value => 'False';
|
||||||
|
'send_arp_for_ha': value => 'False';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'nova::network':
|
||||||
|
private_interface => $private_interface,
|
||||||
|
public_interface => $public_interface,
|
||||||
|
fixed_range => $fixed_range,
|
||||||
|
floating_range => false,
|
||||||
|
network_manager => $network_manager,
|
||||||
|
config_overrides => $network_config,
|
||||||
|
create_networks => false,
|
||||||
|
enabled => $enable_network_service,
|
||||||
|
install_service => $enable_network_service,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#$enable_network_service = false
|
# TODO install quantum
|
||||||
#nova_config {
|
|
||||||
# 'multi_host': value => 'False';
|
|
||||||
# 'send_arp_for_ha': value => 'False';
|
|
||||||
#}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#class { 'nova::network':
|
|
||||||
# private_interface => $private_interface,
|
|
||||||
# public_interface => $public_interface,
|
|
||||||
# fixed_range => $fixed_range,
|
|
||||||
# floating_range => false,
|
|
||||||
# network_manager => $network_manager,
|
|
||||||
# config_overrides => $network_config,
|
|
||||||
# create_networks => false,
|
|
||||||
# enabled => $enable_network_service,
|
|
||||||
# install_service => $enable_network_service,
|
|
||||||
#}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -83,6 +83,7 @@ class openstack::controller (
|
|||||||
# Required Horizon
|
# Required Horizon
|
||||||
$secret_key = 'dummy_secret_key',
|
$secret_key = 'dummy_secret_key',
|
||||||
# not sure if this works correctly
|
# not sure if this works correctly
|
||||||
|
# Network
|
||||||
$internal_address = $public_address,
|
$internal_address = $public_address,
|
||||||
$admin_address = $public_address,
|
$admin_address = $public_address,
|
||||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||||
@@ -111,6 +112,7 @@ class openstack::controller (
|
|||||||
$nova_db_user = 'nova',
|
$nova_db_user = 'nova',
|
||||||
$nova_db_dbname = 'nova',
|
$nova_db_dbname = 'nova',
|
||||||
$purge_nova_config = true,
|
$purge_nova_config = true,
|
||||||
|
$quantum = true,
|
||||||
# Rabbit
|
# Rabbit
|
||||||
$rabbit_password = 'rabbit_pw',
|
$rabbit_password = 'rabbit_pw',
|
||||||
$rabbit_user = 'nova',
|
$rabbit_user = 'nova',
|
||||||
@@ -228,6 +230,7 @@ class openstack::controller (
|
|||||||
db_host => $db_host,
|
db_host => $db_host,
|
||||||
# Network
|
# Network
|
||||||
network_manager => $network_manager,
|
network_manager => $network_manager,
|
||||||
|
network_config => $network_config,
|
||||||
floating_range => $floating_range,
|
floating_range => $floating_range,
|
||||||
fixed_range => $fixed_range,
|
fixed_range => $fixed_range,
|
||||||
public_address => $public_address,
|
public_address => $public_address,
|
||||||
@@ -237,6 +240,8 @@ class openstack::controller (
|
|||||||
create_networks => $create_networks,
|
create_networks => $create_networks,
|
||||||
num_networks => $num_networks,
|
num_networks => $num_networks,
|
||||||
multi_host => $multi_host,
|
multi_host => $multi_host,
|
||||||
|
public_interface => $public_interface,
|
||||||
|
private_interface => $private_interface,
|
||||||
quantum => $quantum,
|
quantum => $quantum,
|
||||||
# Nova
|
# Nova
|
||||||
nova_user_password => $nova_user_password,
|
nova_user_password => $nova_user_password,
|
||||||
|
@@ -30,15 +30,18 @@ class openstack::nova::controller (
|
|||||||
$nova_user_password,
|
$nova_user_password,
|
||||||
$nova_db_password,
|
$nova_db_password,
|
||||||
# Network
|
# Network
|
||||||
$fixed_range = '10.0.0.0/24',
|
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||||
|
$network_config = {},
|
||||||
$floating_range = false,
|
$floating_range = false,
|
||||||
$internal_address = $public_address,
|
$fixed_range = '10.0.0.0/24',
|
||||||
$admin_address = $public_address,
|
$admin_address = $public_address,
|
||||||
|
$internal_address = $public_address,
|
||||||
$auto_assign_floating_ip = false,
|
$auto_assign_floating_ip = false,
|
||||||
$create_networks = true,
|
$create_networks = true,
|
||||||
$num_networks = 1,
|
$num_networks = 1,
|
||||||
$multi_host = false,
|
$multi_host = false,
|
||||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
$public_interface = undef,
|
||||||
|
$private_interface = undef,
|
||||||
$quantum = true,
|
$quantum = true,
|
||||||
# Nova
|
# Nova
|
||||||
$nova_db_user = 'nova',
|
$nova_db_user = 'nova',
|
||||||
@@ -115,17 +118,6 @@ class openstack::nova::controller (
|
|||||||
auth_host => $keystone_host,
|
auth_host => $keystone_host,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Configure nova-network
|
|
||||||
if $multi_host {
|
|
||||||
nova_config { 'multi_host': value => 'True' }
|
|
||||||
$enable_network_service = false
|
|
||||||
} else {
|
|
||||||
if $enabled {
|
|
||||||
$enable_network_service = true
|
|
||||||
} else {
|
|
||||||
$enable_network_service = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if $enabled {
|
if $enabled {
|
||||||
$really_create_networks = $create_networks
|
$really_create_networks = $create_networks
|
||||||
@@ -134,6 +126,18 @@ class openstack::nova::controller (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $quantum == false {
|
if $quantum == false {
|
||||||
|
# Configure nova-network
|
||||||
|
if $multi_host {
|
||||||
|
nova_config { 'multi_host': value => 'True' }
|
||||||
|
$enable_network_service = false
|
||||||
|
} else {
|
||||||
|
if $enabled {
|
||||||
|
$enable_network_service = true
|
||||||
|
} else {
|
||||||
|
$enable_network_service = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class { 'nova::network':
|
class { 'nova::network':
|
||||||
private_interface => $private_interface,
|
private_interface => $private_interface,
|
||||||
public_interface => $public_interface,
|
public_interface => $public_interface,
|
||||||
@@ -146,6 +150,8 @@ class openstack::nova::controller (
|
|||||||
enabled => $enable_network_service,
|
enabled => $enable_network_service,
|
||||||
install_service => $enable_network_service,
|
install_service => $enable_network_service,
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
# Set up Quantum
|
||||||
}
|
}
|
||||||
|
|
||||||
if $auto_assign_floating_ip {
|
if $auto_assign_floating_ip {
|
||||||
|
Reference in New Issue
Block a user