summaryrefslogtreecommitdiffstats
path: root/puppet/manifests
diff options
context:
space:
mode:
authorEmilien Macchi <emilien@redhat.com>2015-03-18 12:01:20 -0400
committerYanis Guenane <yanis.guenane@enovance.com>2015-04-15 14:52:10 +0200
commitbdaeca208cdb879a6875c74a6324af677da95449 (patch)
tree239aba5fd28968898b5e61104c6d0a298e2bb722 /puppet/manifests
parente202d2dbf578fd6842e9fd16389dc61729995cc0 (diff)
puppet: Ceilometer use MongoDB datastore backend
This patch configure Ceilometer to use MongoDB backend. Change-Id: I22be0e22e7a3991ebd2d3aa7d14c518418a2458a
Diffstat (limited to 'puppet/manifests')
-rw-r--r--puppet/manifests/overcloud_controller.pp14
1 files changed, 5 insertions, 9 deletions
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index 9ec224a9..bc4a25bb 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -44,8 +44,10 @@ if hiera('step') >= 2 {
include ::mongodb::server
$mongo_node_ips = split(downcase(hiera('mongo_node_ips')), ',')
$mongo_node_ips_with_port = suffix($mongo_node_ips, ':27017')
+ $mongo_node_string = join($mongo_node_ips_with_port, ',')
$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,
@@ -120,14 +122,6 @@ if hiera('step') >= 2 {
dbname => $heat_dsn[6],
allowed_hosts => $allowed_hosts,
}
- $ceilometer_dsn = split(hiera('ceilometer::db::database_connection'), '[@:/?]')
- class { 'ceilometer::db::mysql':
- user => $ceilometer_dsn[3],
- password => $ceilometer_dsn[4],
- host => $ceilometer_dsn[5],
- dbname => $ceilometer_dsn[6],
- allowed_hosts => $allowed_hosts,
- }
$rabbit_nodes = split(downcase(hiera('rabbit_node_names', $::hostname)), ',')
if count($rabbit_nodes) > 1 {
@@ -340,13 +334,15 @@ if hiera('step') >= 3 {
# Ceilometer
include ::ceilometer
include ::ceilometer::api
- include ::ceilometer::db
include ::ceilometer::agent::notification
include ::ceilometer::agent::central
include ::ceilometer::alarm::notifier
include ::ceilometer::alarm::evaluator
include ::ceilometer::expirer
include ::ceilometer::collector
+ class { '::ceilometer::db' :
+ database_connection => $ceilometer_mongodb_conn_string,
+ }
class { 'ceilometer::agent::auth':
auth_url => join(['http://', hiera('controller_virtual_ip'), ':5000/v2.0']),
}