summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--controller.yaml4
-rw-r--r--overcloud-without-mergepy.yaml5
-rw-r--r--puppet/controller-puppet.yaml13
-rw-r--r--puppet/manifests/overcloud_controller.pp45
4 files changed, 55 insertions, 12 deletions
diff --git a/controller.yaml b/controller.yaml
index e6d410f5..71b8a04e 100644
--- a/controller.yaml
+++ b/controller.yaml
@@ -14,6 +14,10 @@ parameters:
description: The keystone auth secret.
type: string
hidden: true
+ CeilometerBackend:
+ default: 'mongodb'
+ description: The ceilometer backend type.
+ type: string
CeilometerMeteringSecret:
default: unset
description: Secret shared by the ceilometer services.
diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml
index 142e502e..fce322c8 100644
--- a/overcloud-without-mergepy.yaml
+++ b/overcloud-without-mergepy.yaml
@@ -15,6 +15,10 @@ parameters:
description: The password for the keystone admin account, used for monitoring, querying neutron etc.
type: string
hidden: true
+ CeilometerBackend:
+ default: 'mongodb'
+ description: The ceilometer backend type.
+ type: string
CeilometerMeteringSecret:
default: unset
description: Secret shared by the ceilometer services.
@@ -543,6 +547,7 @@ resources:
properties:
AdminPassword: {get_param: AdminPassword}
AdminToken: {get_param: AdminToken}
+ CeilometerBackend: {get_param: CeilometerBackend}
CeilometerMeteringSecret: {get_param: CeilometerMeteringSecret}
CeilometerPassword: {get_param: CeilometerPassword}
CinderLVMLoopDeviceSize: {get_param: CinderLVMLoopDeviceSize}
diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml
index 4cf6ff64..e9195912 100644
--- a/puppet/controller-puppet.yaml
+++ b/puppet/controller-puppet.yaml
@@ -14,6 +14,10 @@ parameters:
description: The keystone auth secret.
type: string
hidden: true
+ CeilometerBackend:
+ default: 'mongodb'
+ description: The ceilometer backend type.
+ type: string
CeilometerMeteringSecret:
default: unset
description: Secret shared by the ceilometer services.
@@ -577,8 +581,15 @@ resources:
- - 'http://'
- {get_param: VirtualIP}
- ':35357/v2.0'
+ ceilometer_backend: {get_param: CeilometerBackend}
ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
ceilometer_password: {get_param: CeilometerPassword}
+ ceilometer_dsn:
+ list_join:
+ - ''
+ - - 'mysql://ceilometer:unset@'
+ - {get_param: VirtualIP}
+ - '/ceilometer'
snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
nova_password: {get_param: NovaPassword}
@@ -787,6 +798,8 @@ resources:
neutron_dsn: {get_input: neutron_dsn}
# Ceilometer
+ ceilometer_backend: {get_input: ceilometer_backend}
+ ceilometer_mysql_conn_string: {get_input: ceilometer_dsn}
ceilometer::metering_secret: {get_input: ceilometer_metering_secret}
ceilometer::rabbit_hosts: {get_input: rabbit_hosts}
ceilometer::rabbit_userid: {get_input: rabbit_username}
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index 7e7f2fb2..6e8bf5a7 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -80,17 +80,19 @@ if hiera('step') >= 2 {
}
# MongoDB
- include ::mongodb::globals
- include ::mongodb::server
- $mongo_node_ips = split(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,
+ if downcase(hiera('ceilometer_backend')) == 'mongodb' {
+ include ::mongodb::globals
+ include ::mongodb::server
+ $mongo_node_ips = split(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,
+ }
}
}
@@ -182,6 +184,16 @@ if hiera('step') >= 2 {
dbname => $heat_dsn[6],
allowed_hosts => $allowed_hosts,
}
+ if downcase(hiera('ceilometer_backend')) == 'mysql' {
+ $ceilometer_dsn = split(hiera('ceilometer_mysql_conn_string'), '[@:/?]')
+ class { 'ceilometer::db::mysql':
+ user => $ceilometer_dsn[3],
+ password => $ceilometer_dsn[4],
+ host => $ceilometer_dsn[5],
+ dbname => $ceilometer_dsn[6],
+ allowed_hosts => $allowed_hosts,
+ }
+ }
if $enable_pacemaker {
# the module ignores erlang_cookie if cluster_config is false
@@ -417,6 +429,15 @@ if hiera('step') >= 3 {
}
# Ceilometer
+ $ceilometer_backend = downcase(hiera('ceilometer_backend'))
+ case $ceilometer_backend {
+ /mysql/ : {
+ $ceilometer_database_connection = hiera('ceilometer_mysql_conn_string')
+ }
+ default : {
+ $ceilometer_database_connection = $ceilometer_mongodb_conn_string
+ }
+ }
include ::ceilometer
include ::ceilometer::api
include ::ceilometer::agent::notification
@@ -426,7 +447,7 @@ if hiera('step') >= 3 {
include ::ceilometer::expirer
include ::ceilometer::collector
class { '::ceilometer::db' :
- database_connection => $ceilometer_mongodb_conn_string,
+ database_connection => $ceilometer_database_connection,
}
class { 'ceilometer::agent::auth':
auth_url => join(['http://', hiera('controller_virtual_ip'), ':5000/v2.0']),