Calculate zaqar mongo from mongodb_node_ips
In order to make the zaqar service fully composable, the mongo ips need to be calculated without assuming that mongo and zaqar are on the same node. Change-Id: I0b077e85ba5fcd9fdfd33956cf33ce2403fcb088
This commit is contained in:
parent
6e1d4f3ee0
commit
d910331e81
@ -32,8 +32,23 @@ class tripleo::profile::base::zaqar (
|
||||
) {
|
||||
if $step >= 4 {
|
||||
include ::zaqar
|
||||
include ::zaqar::management::mongodb
|
||||
include ::zaqar::messaging::mongodb
|
||||
|
||||
if str2bool(hiera('mongodb::server::ipv6', false)) {
|
||||
$mongo_node_ips_with_port_prefixed = prefix(hiera('mongodb_node_ips'), '[')
|
||||
$mongo_node_ips_with_port = suffix($mongo_node_ips_with_port_prefixed, ']:27017')
|
||||
} else {
|
||||
$mongo_node_ips_with_port = suffix(hiera('mongodb_node_ips'), ':27017')
|
||||
}
|
||||
$mongodb_replset = hiera('mongodb::server::replset')
|
||||
$mongo_node_string = join($mongo_node_ips_with_port, ',')
|
||||
$database_connection = "mongodb://${mongo_node_string}/zaqar?replicaSet=${mongodb_replset}"
|
||||
|
||||
class { '::zaqar::management::mongodb':
|
||||
uri => $database_connection,
|
||||
}
|
||||
class {'::zaqar::messaging::mongodb':
|
||||
uri => $database_connection,
|
||||
}
|
||||
include ::zaqar::transport::websocket
|
||||
include ::zaqar::transport::wsgi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user