Merge "Add ability to deploy vips on non-controllers"
This commit is contained in:
commit
7d19bc3783
@ -5,6 +5,7 @@ $public_int = hiera('public_int', undef)
|
|||||||
$primary_controller_nodes = hiera('primary_controller_nodes', false)
|
$primary_controller_nodes = hiera('primary_controller_nodes', false)
|
||||||
$network_scheme = hiera('network_scheme', {})
|
$network_scheme = hiera('network_scheme', {})
|
||||||
$use_neutron = hiera('use_neutron', false)
|
$use_neutron = hiera('use_neutron', false)
|
||||||
|
$deploy_vrouter = hiera('deploy_vrouter', true)
|
||||||
|
|
||||||
if ( hiera('vip_management_cidr_netmask', false )){
|
if ( hiera('vip_management_cidr_netmask', false )){
|
||||||
$vip_management_cidr_netmask = hiera('vip_management_cidr_netmask')
|
$vip_management_cidr_netmask = hiera('vip_management_cidr_netmask')
|
||||||
@ -37,30 +38,38 @@ $management_vip_data = {
|
|||||||
ping_host_list => "",
|
ping_host_list => "",
|
||||||
}
|
}
|
||||||
|
|
||||||
$management_vrouter_vip_data = {
|
|
||||||
namespace => 'vrouter',
|
|
||||||
nic => $internal_int,
|
|
||||||
base_veth => "${internal_int}-vrouter",
|
|
||||||
ns => 'vrouter',
|
|
||||||
ns_veth => 'vr-mgmt',
|
|
||||||
ip => hiera('management_vrouter_vip'),
|
|
||||||
cidr_netmask => $vip_management_cidr_netmask,
|
|
||||||
gateway => 'none',
|
|
||||||
gateway_metric => '0',
|
|
||||||
bridge => $network_scheme['roles']['management'],
|
|
||||||
tie_with_ping => false,
|
|
||||||
ping_host_list => "",
|
|
||||||
}
|
|
||||||
|
|
||||||
cluster::virtual_ip { 'management' :
|
cluster::virtual_ip { 'management' :
|
||||||
vip => $management_vip_data,
|
vip => $management_vip_data,
|
||||||
}
|
}
|
||||||
|
|
||||||
cluster::virtual_ip { 'management_vrouter' :
|
|
||||||
vip => $management_vrouter_vip_data,
|
if $deploy_vrouter {
|
||||||
|
$management_vrouter_vip_data = {
|
||||||
|
namespace => 'vrouter',
|
||||||
|
nic => $internal_int,
|
||||||
|
base_veth => "${internal_int}-vrouter",
|
||||||
|
ns => 'vrouter',
|
||||||
|
ns_veth => 'vr-mgmt',
|
||||||
|
ip => hiera('management_vrouter_vip'),
|
||||||
|
cidr_netmask => $vip_management_cidr_netmask,
|
||||||
|
gateway => 'none',
|
||||||
|
gateway_metric => '0',
|
||||||
|
bridge => $network_scheme['roles']['management'],
|
||||||
|
tie_with_ping => false,
|
||||||
|
ping_host_list => "",
|
||||||
|
}
|
||||||
|
|
||||||
|
cluster::virtual_ip { 'management_vrouter' :
|
||||||
|
vip => $management_vrouter_vip_data,
|
||||||
|
}
|
||||||
|
|
||||||
|
$management_vips = ['management', 'management_vrouter']
|
||||||
|
} else {
|
||||||
|
$management_vips = ['management']
|
||||||
}
|
}
|
||||||
|
|
||||||
$management_vips = ['management', 'management_vrouter']
|
|
||||||
|
|
||||||
|
|
||||||
if $public_int {
|
if $public_int {
|
||||||
# todo:(sv): temporary commented. Will be uncommented while 'multiple-l2-network' feature re-implemented
|
# todo:(sv): temporary commented. Will be uncommented while 'multiple-l2-network' feature re-implemented
|
||||||
@ -81,31 +90,38 @@ if $public_int {
|
|||||||
other_networks => $vip_publ_other_nets,
|
other_networks => $vip_publ_other_nets,
|
||||||
}
|
}
|
||||||
|
|
||||||
$public_vrouter_vip_data = {
|
|
||||||
namespace => 'vrouter',
|
|
||||||
nic => $public_int,
|
|
||||||
base_veth => "${public_int}-vrouter",
|
|
||||||
ns_veth => 'vr-ex',
|
|
||||||
ns => 'vrouter',
|
|
||||||
ip => hiera('public_vrouter_vip'),
|
|
||||||
cidr_netmask => $vip_public_cidr_netmask,
|
|
||||||
gateway => $network_scheme['endpoints']['br-ex']['gateway'],
|
|
||||||
gateway_metric => '0',
|
|
||||||
bridge => $network_scheme['roles']['ex'],
|
|
||||||
ns_iptables_start_rules => "iptables -t nat -A POSTROUTING -o vr-ex -j MASQUERADE",
|
|
||||||
ns_iptables_stop_rules => "iptables -t nat -D POSTROUTING -o vr-ex -j MASQUERADE",
|
|
||||||
collocation => 'management_vrouter',
|
|
||||||
}
|
|
||||||
|
|
||||||
cluster::virtual_ip { 'public' :
|
cluster::virtual_ip { 'public' :
|
||||||
vip => $public_vip_data,
|
vip => $public_vip_data,
|
||||||
}
|
}
|
||||||
|
|
||||||
cluster::virtual_ip { 'public_vrouter' :
|
|
||||||
vip => $public_vrouter_vip_data,
|
if $deploy_vrouter {
|
||||||
|
$public_vrouter_vip_data = {
|
||||||
|
namespace => 'vrouter',
|
||||||
|
nic => $public_int,
|
||||||
|
base_veth => "${public_int}-vrouter",
|
||||||
|
ns_veth => 'vr-ex',
|
||||||
|
ns => 'vrouter',
|
||||||
|
ip => hiera('public_vrouter_vip'),
|
||||||
|
cidr_netmask => $vip_public_cidr_netmask,
|
||||||
|
gateway => $network_scheme['endpoints']['br-ex']['gateway'],
|
||||||
|
gateway_metric => '0',
|
||||||
|
bridge => $network_scheme['roles']['ex'],
|
||||||
|
ns_iptables_start_rules => "iptables -t nat -A POSTROUTING -o vr-ex -j MASQUERADE",
|
||||||
|
ns_iptables_stop_rules => "iptables -t nat -D POSTROUTING -o vr-ex -j MASQUERADE",
|
||||||
|
collocation => 'management_vrouter',
|
||||||
|
}
|
||||||
|
|
||||||
|
cluster::virtual_ip { 'public_vrouter' :
|
||||||
|
vip => $public_vrouter_vip_data,
|
||||||
|
}
|
||||||
|
|
||||||
|
$public_vips = ['public_vip', 'public_vrouter']
|
||||||
|
} else {
|
||||||
|
$public_vips = ['public_vip']
|
||||||
}
|
}
|
||||||
|
|
||||||
$public_vips = ['public_vip', 'public_vrouter']
|
|
||||||
$vips = concat($management_vips, $public_vips)
|
$vips = concat($management_vips, $public_vips)
|
||||||
} else {
|
} else {
|
||||||
$vips = $management_vips
|
$vips = $management_vips
|
||||||
|
Loading…
Reference in New Issue
Block a user