summaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'puppet')
-rw-r--r--puppet/controller-puppet.yaml3
-rw-r--r--puppet/hieradata/controller.yaml2
-rw-r--r--puppet/manifests/overcloud_controller.pp15
3 files changed, 19 insertions, 1 deletions
diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml
index 780c8cfa..fedfe931 100644
--- a/puppet/controller-puppet.yaml
+++ b/puppet/controller-puppet.yaml
@@ -719,7 +719,8 @@ resources:
keystone::public_bind_host: {get_input: controller_host}
keystone::admin_bind_host: {get_input: controller_host}
keystone::debug: {get_input: debug}
-
+ # MongoDB
+ mongodb::server::bind_ip: {get_input: controller_host}
# MySQL
admin_password: {get_input: admin_password}
enable_galera: {get_input: enable_galera}
diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml
index 47f358a9..523e9dbe 100644
--- a/puppet/hieradata/controller.yaml
+++ b/puppet/hieradata/controller.yaml
@@ -11,6 +11,8 @@ rabbitmq::port: '5672'
rabbitmq::package_source: undef
rabbitmq::repos_ensure: false
+mongodb::server::replset: tripleo
+
# service tenant
nova::api::admin_tenant_name: 'service'
glance::api::keystone_tenant: 'service'
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index 3e3f2e70..0541fa4e 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -39,6 +39,21 @@ if hiera('step') >= 2 {
include ::ntp
}
+ # MongoDB
+ include ::mongodb::globals
+ include ::mongodb::server
+ $mongo_node_ips = split(downcase(hiera('mongo_node_ips')), ',')
+ $mongo_node_ips_with_port = suffix($mongo_node_ips, ':27017')
+
+ if count($mongo_node_ips) > 1 {
+ if downcase($::hostname) == hiera('bootstrap_nodeid') {
+ $mongodb_replset = hiera('mongodb::server::replset')
+ mongodb_replset { $mongodb_replset :
+ members => $mongo_node_ips_with_port,
+ }
+ }
+ }
+
if str2bool(hiera('enable_galera', 'true')) {
$mysql_config_file = '/etc/my.cnf.d/galera.cnf'
} else {