Merge "Add support for ovn clustered databases"
This commit is contained in:
commit
209609f037
|
@ -20,6 +20,15 @@
|
||||||
# (Optional) The IP-Address where OVN DBs are listening.
|
# (Optional) The IP-Address where OVN DBs are listening.
|
||||||
# Defaults to hiera('ovn_dbs_vip')
|
# Defaults to hiera('ovn_dbs_vip')
|
||||||
#
|
#
|
||||||
|
# [*ovn_db_node_ips*]
|
||||||
|
# (Optional) The OVN DBs node ip addresses are listening.
|
||||||
|
# Defaults to hiera('ovn_dbs_node_ips')
|
||||||
|
#
|
||||||
|
# [*ovn_db_clustered*]
|
||||||
|
# (Optional) Boolean indicating if we're running with ovn db clustering
|
||||||
|
# or pacemaker. Defaults to false for backwards compatibility
|
||||||
|
# Defaults to hiera('ovn_db_clustered', false)
|
||||||
|
#
|
||||||
# [*ovn_sbdb_port*]
|
# [*ovn_sbdb_port*]
|
||||||
# (Optional) Port number on which southbound database is listening
|
# (Optional) Port number on which southbound database is listening
|
||||||
# Defaults to hiera('ovn::southbound::port')
|
# Defaults to hiera('ovn::southbound::port')
|
||||||
|
@ -44,15 +53,23 @@
|
||||||
# Defaults to hiera('ovn_chassis_mac_map')
|
# Defaults to hiera('ovn_chassis_mac_map')
|
||||||
#
|
#
|
||||||
class tripleo::profile::base::neutron::agents::ovn (
|
class tripleo::profile::base::neutron::agents::ovn (
|
||||||
$ovn_db_host = hiera('ovn_dbs_vip'),
|
$ovn_db_host = hiera('ovn_dbs_vip', undef),
|
||||||
|
$ovn_db_node_ips = hiera('ovn_dbs_node_ips', undef),
|
||||||
|
$ovn_db_clustered = hiera('ovn_db_clustered', false),
|
||||||
$ovn_sbdb_port = hiera('ovn::southbound::port'),
|
$ovn_sbdb_port = hiera('ovn::southbound::port'),
|
||||||
$protocol = 'tcp',
|
$protocol = 'tcp',
|
||||||
$step = Integer(hiera('step')),
|
$step = Integer(hiera('step')),
|
||||||
$ovn_chassis_mac_map = hiera('ovn_chassis_mac_map', undef),
|
$ovn_chassis_mac_map = hiera('ovn_chassis_mac_map', undef),
|
||||||
) {
|
) {
|
||||||
if $step >= 4 {
|
if $step >= 4 {
|
||||||
|
if $ovn_db_clustered {
|
||||||
|
$db_hosts = any2array($ovn_db_node_ips)
|
||||||
|
} else {
|
||||||
|
$db_hosts = any2array($ovn_db_host)
|
||||||
|
}
|
||||||
|
$sb_conn = $db_hosts.map |$h| { join([$protocol, normalize_ip_for_uri($h), "${ovn_sbdb_port}"], ':') }
|
||||||
class { 'ovn::controller':
|
class { 'ovn::controller':
|
||||||
ovn_remote => join([$protocol, normalize_ip_for_uri($ovn_db_host), "${ovn_sbdb_port}"], ':'),
|
ovn_remote => join(any2array($sb_conn), ','),
|
||||||
enable_ovn_match_northd => true,
|
enable_ovn_match_northd => true,
|
||||||
ovn_chassis_mac_map => $ovn_chassis_mac_map,
|
ovn_chassis_mac_map => $ovn_chassis_mac_map,
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,15 @@
|
||||||
# The IP-Address where OVN DBs are listening.
|
# The IP-Address where OVN DBs are listening.
|
||||||
# Defaults to hiera('ovn_dbs_vip')
|
# Defaults to hiera('ovn_dbs_vip')
|
||||||
#
|
#
|
||||||
|
# [*ovn_db_node_ips*]
|
||||||
|
# (Optional) The OVN DBs node ip addresses are listening.
|
||||||
|
# Defaults to hiera('ovn_dbs_node_ips')
|
||||||
|
#
|
||||||
|
# [*ovn_db_clustered*]
|
||||||
|
# (Optional) Boolean indicating if we're running with ovn db clustering
|
||||||
|
# or pacemaker. Defaults to false for backwards compatibility
|
||||||
|
# Defaults to hiera('ovn_db_clustered', false)
|
||||||
|
#
|
||||||
# [*ovn_sb_port*]
|
# [*ovn_sb_port*]
|
||||||
# (Optional) Port number on which southbound database is listening
|
# (Optional) Port number on which southbound database is listening
|
||||||
# Defaults to hiera('ovn::southbound::port')
|
# Defaults to hiera('ovn::southbound::port')
|
||||||
|
@ -54,7 +63,9 @@
|
||||||
# Defaults to 60000
|
# Defaults to 60000
|
||||||
#
|
#
|
||||||
class tripleo::profile::base::neutron::ovn_metadata (
|
class tripleo::profile::base::neutron::ovn_metadata (
|
||||||
$ovn_db_host = hiera('ovn_dbs_vip'),
|
$ovn_db_host = hiera('ovn_dbs_vip', undef),
|
||||||
|
$ovn_db_node_ips = hiera('ovn_dbs_node_ips', undef),
|
||||||
|
$ovn_db_clustered = hiera('ovn_db_clustered', false),
|
||||||
$ovn_sb_port = hiera('ovn::southbound::port'),
|
$ovn_sb_port = hiera('ovn::southbound::port'),
|
||||||
$ovn_sb_private_key = $::os_service_default,
|
$ovn_sb_private_key = $::os_service_default,
|
||||||
$ovn_sb_certificate = $::os_service_default,
|
$ovn_sb_certificate = $::os_service_default,
|
||||||
|
@ -65,8 +76,16 @@ class tripleo::profile::base::neutron::ovn_metadata (
|
||||||
) {
|
) {
|
||||||
if $step >= 4 {
|
if $step >= 4 {
|
||||||
include tripleo::profile::base::neutron
|
include tripleo::profile::base::neutron
|
||||||
|
|
||||||
|
if $ovn_db_clustered {
|
||||||
|
$db_hosts = any2array($ovn_db_node_ips)
|
||||||
|
} else {
|
||||||
|
$db_hosts = any2array($ovn_db_host)
|
||||||
|
}
|
||||||
|
$sb_conn = $db_hosts.map |$h| { join([$protocol, normalize_ip_for_uri($h), "${ovn_sb_port}"], ':') }
|
||||||
|
|
||||||
class { 'neutron::agents::ovn_metadata':
|
class { 'neutron::agents::ovn_metadata':
|
||||||
ovn_sb_connection => join(["${protocol}", normalize_ip_for_uri($ovn_db_host), "${ovn_sb_port}"], ':'),
|
ovn_sb_connection => join(any2array($sb_conn), ','),
|
||||||
ovn_sb_private_key => $ovn_sb_private_key,
|
ovn_sb_private_key => $ovn_sb_private_key,
|
||||||
ovn_sb_certificate => $ovn_sb_certificate,
|
ovn_sb_certificate => $ovn_sb_certificate,
|
||||||
ovn_sb_ca_cert => $ovn_sb_ca_cert,
|
ovn_sb_ca_cert => $ovn_sb_ca_cert,
|
||||||
|
|
|
@ -20,6 +20,15 @@
|
||||||
# The IP-Address where OVN DBs are listening.
|
# The IP-Address where OVN DBs are listening.
|
||||||
# Defaults to hiera('ovn_dbs_vip')
|
# Defaults to hiera('ovn_dbs_vip')
|
||||||
#
|
#
|
||||||
|
# [*ovn_db_node_ips*]
|
||||||
|
# (Optional) The OVN DBs node ip addresses are listening.
|
||||||
|
# Defaults to hiera('ovn_dbs_node_ips')
|
||||||
|
#
|
||||||
|
# [*ovn_db_clustered*]
|
||||||
|
# (Optional) Boolean indicating if we're running with ovn db clustering
|
||||||
|
# or pacemaker. Defaults to false for backwards compatibility
|
||||||
|
# Defaults to hiera('ovn_db_clustered', false)
|
||||||
|
#
|
||||||
# [*ovn_nb_port*]
|
# [*ovn_nb_port*]
|
||||||
# (Optional) Port number on which northbound database is listening
|
# (Optional) Port number on which northbound database is listening
|
||||||
# Defaults to hiera('ovn::northbound::port')
|
# Defaults to hiera('ovn::northbound::port')
|
||||||
|
@ -66,7 +75,9 @@
|
||||||
# Defaults to hiera('step')
|
# Defaults to hiera('step')
|
||||||
#
|
#
|
||||||
class tripleo::profile::base::neutron::plugins::ml2::ovn (
|
class tripleo::profile::base::neutron::plugins::ml2::ovn (
|
||||||
$ovn_db_host = hiera('ovn_dbs_vip'),
|
$ovn_db_host = hiera('ovn_dbs_vip', undef),
|
||||||
|
$ovn_db_node_ips = hiera('ovn_dbs_node_ips', undef),
|
||||||
|
$ovn_db_clustered = hiera('ovn_db_clustered', false),
|
||||||
$ovn_nb_port = hiera('ovn::northbound::port'),
|
$ovn_nb_port = hiera('ovn::northbound::port'),
|
||||||
$ovn_sb_port = hiera('ovn::southbound::port'),
|
$ovn_sb_port = hiera('ovn::southbound::port'),
|
||||||
$ovn_nb_private_key = $::os_service_default,
|
$ovn_nb_private_key = $::os_service_default,
|
||||||
|
@ -78,10 +89,19 @@ class tripleo::profile::base::neutron::plugins::ml2::ovn (
|
||||||
$protocol = 'tcp',
|
$protocol = 'tcp',
|
||||||
$step = Integer(hiera('step'))
|
$step = Integer(hiera('step'))
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if $step >= 4 {
|
if $step >= 4 {
|
||||||
|
if $ovn_db_clustered {
|
||||||
|
$db_hosts = any2array($ovn_db_node_ips)
|
||||||
|
} else {
|
||||||
|
$db_hosts = any2array($ovn_db_host)
|
||||||
|
}
|
||||||
|
$sb_conn = $db_hosts.map |$h| { join([$protocol, normalize_ip_for_uri($h), "${ovn_sb_port}"], ':') }
|
||||||
|
$nb_conn = $db_hosts.map |$h| { join([$protocol, normalize_ip_for_uri($h), "${ovn_nb_port}"], ':') }
|
||||||
|
|
||||||
class { 'neutron::plugins::ml2::ovn':
|
class { 'neutron::plugins::ml2::ovn':
|
||||||
ovn_nb_connection => join(["${protocol}", normalize_ip_for_uri($ovn_db_host), "${ovn_nb_port}"], ':'),
|
ovn_nb_connection => join(any2array($nb_conn), ','),
|
||||||
ovn_sb_connection => join(["${protocol}", normalize_ip_for_uri($ovn_db_host), "${ovn_sb_port}"], ':'),
|
ovn_sb_connection => join(any2array($sb_conn), ','),
|
||||||
ovn_nb_private_key => $ovn_nb_private_key,
|
ovn_nb_private_key => $ovn_nb_private_key,
|
||||||
ovn_nb_certificate => $ovn_nb_certificate,
|
ovn_nb_certificate => $ovn_nb_certificate,
|
||||||
ovn_nb_ca_cert => $ovn_nb_ca_cert,
|
ovn_nb_ca_cert => $ovn_nb_ca_cert,
|
||||||
|
|
Loading…
Reference in New Issue