diff options
author | Carlos Camacho <ccamacho@redhat.com> | 2016-05-11 15:51:36 +0200 |
---|---|---|
committer | Carlos Camacho <ccamacho@redhat.com> | 2016-06-12 21:25:39 +0000 |
commit | 11074fb08f5bb86b1b84065ec1bfada3ad387053 (patch) | |
tree | 210845b03f6b250b5e357fddd411e0d8a88f542f /puppet/manifests | |
parent | 184dba99c1a11c0a5b82bb10b8fec301d1eb1437 (diff) |
Composable roles within services - MongoDB
Add MongoDB as a composable service.
Co-Authored-By: Juan Antonio Osorio Robles <jaosorior@redhat.com>
Change-Id: Idaa3275def3bcdb302a66fc1c88531ff718bcf67
Depends-On: Idb1e78ebec7682fe68ca5902a22cfb6030498091
Diffstat (limited to 'puppet/manifests')
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 8 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller_pacemaker.pp | 25 |
2 files changed, 2 insertions, 31 deletions
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index 872e7c88..95c933d4 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -36,9 +36,6 @@ if hiera('step') >= 2 { # MongoDB if downcase(hiera('ceilometer_backend')) == 'mongodb' { - include ::mongodb::globals - include ::mongodb::client - include ::mongodb::server # NOTE(gfidente): We need to pass the list of IPv6 addresses *with* port and # without the brackets as 'members' argument for the 'mongodb_replset' # resource. @@ -54,11 +51,6 @@ if hiera('step') >= 2 { $mongodb_replset = hiera('mongodb::server::replset') $ceilometer_mongodb_conn_string = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}" - if downcase(hiera('bootstrap_nodeid')) == $::hostname { - mongodb_replset { $mongodb_replset : - members => $mongo_node_ips_with_port_nobr, - } - } } if str2bool(hiera('enable_galera', true)) { diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index ee513a0d..614f23ba 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -100,11 +100,7 @@ if hiera('step') >= 1 { } if downcase(hiera('ceilometer_backend')) == 'mongodb' { - include ::mongodb::globals - include ::mongodb::client - class { '::mongodb::server' : - service_manage => false, - } + include ::mongodb::params } # Galera @@ -166,6 +162,7 @@ if hiera('step') >= 1 { if hiera('step') >= 2 { + # NOTE(gfidente): the following vars are needed on all nodes so they # need to stay out of pacemaker_master conditional. # The addresses mangling will hopefully go away when we'll be able to @@ -192,24 +189,6 @@ if hiera('step') >= 2 { clone_params => true, } - if downcase(hiera('ceilometer_backend')) == 'mongodb' { - pacemaker::resource::service { $::mongodb::params::service_name : - op_params => 'start timeout=370s stop timeout=200s', - clone_params => true, - require => Class['::mongodb::server'], - } - # NOTE (spredzy) : The replset can only be run - # once all the nodes have joined the cluster. - mongodb_conn_validator { $mongo_node_ips_with_port : - timeout => '600', - require => Pacemaker::Resource::Service[$::mongodb::params::service_name], - before => Mongodb_replset[$mongodb_replset], - } - mongodb_replset { $mongodb_replset : - members => $mongo_node_ips_with_port_nobr, - } - } - pacemaker::resource::ocf { 'galera' : ocf_agent_name => 'heartbeat:galera', op_params => 'promote timeout=300s on-fail=block', |