Possibility to detach ceilometer from controllers
Adds the possibility to use external (non-controllers) keystone, db, rabbitmq, etc for ceilometer services. Partial blueprint: detach-components-from-controllers Change-Id: I670ac5c535b43bb2d8cf95209e3a9ea772d1dd6c Co-Authored-By: Aleksandr Didenko <adidenko@mirantis.com>
This commit is contained in:
parent
8f461c2264
commit
7b060f0b36
@ -6,6 +6,9 @@
|
||||
|
||||
class openstack::ceilometer (
|
||||
$keystone_password = 'ceilometer_pass',
|
||||
$keystone_user = 'ceilometer',
|
||||
$keystone_tenant = 'services',
|
||||
$keystone_region = 'RegionOne',
|
||||
$metering_secret = 'ceilometer',
|
||||
$verbose = false,
|
||||
$use_syslog = false,
|
||||
@ -52,6 +55,9 @@ class openstack::ceilometer (
|
||||
class { '::ceilometer::agent::auth':
|
||||
auth_url => "http://${keystone_host}:5000/v2.0",
|
||||
auth_password => $keystone_password,
|
||||
auth_region => $keystone_region,
|
||||
auth_tenant_name => $keystone_tenant,
|
||||
auth_user => $keystone_user,
|
||||
}
|
||||
|
||||
class { '::ceilometer::client': }
|
||||
@ -90,7 +96,9 @@ class openstack::ceilometer (
|
||||
# The keystone_password parameter is mandatory
|
||||
class { '::ceilometer::api':
|
||||
keystone_host => $keystone_host,
|
||||
keystone_user => $keystone_user,
|
||||
keystone_password => $keystone_password,
|
||||
keystone_tenant => $keystone_tenant,
|
||||
host => $host,
|
||||
port => $port,
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ $verbose = hiera('verbose', true)
|
||||
$debug = hiera('debug', false)
|
||||
$use_syslog = hiera('use_syslog', true)
|
||||
$syslog_log_facility = hiera('syslog_log_facility_ceilometer', 'LOG_LOCAL0')
|
||||
$amqp_hosts = hiera('amqp_hosts')
|
||||
$rabbit_hash = hiera('rabbit_hash')
|
||||
$management_vip = hiera('management_vip')
|
||||
|
||||
@ -15,8 +14,17 @@ $default_ceilometer_hash = {
|
||||
'metering_secret' => 'ceilometer',
|
||||
}
|
||||
|
||||
$ceilometer_hash = hiera('ceilometer', $default_ceilometer_hash)
|
||||
if hiera('amqp_hosts', false) {
|
||||
$amqp_hosts = hiera('amqp_hosts')
|
||||
} else {
|
||||
$amqp_nodes = hiera('amqp_nodes')
|
||||
$amqp_port = hiera('amqp_port', '5673')
|
||||
$amqp_hosts = inline_template("<%= @amqp_nodes.map {|x| x + ':' + @amqp_port}.join ',' %>")
|
||||
}
|
||||
|
||||
$region = hiera('region', 'RegionOne')
|
||||
$ceilometer_hash = hiera_hash('ceilometer', $default_ceilometer_hash)
|
||||
$ceilometer_region = pick($ceilometer_hash['region'], $region)
|
||||
$ceilometer_enabled = $ceilometer_hash['enabled']
|
||||
$amqp_password = $rabbit_hash['password']
|
||||
$amqp_user = $rabbit_hash['user']
|
||||
@ -33,6 +41,9 @@ if ($ceilometer_enabled) {
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $amqp_user,
|
||||
amqp_password => $amqp_password,
|
||||
keystone_user => $ceilometer_hash['user'],
|
||||
keystone_tenant => $ceilometer_hash['tenant'],
|
||||
keystone_region => $ceilometer_region,
|
||||
keystone_host => $service_endpoint,
|
||||
keystone_password => $ceilometer_user_password,
|
||||
on_compute => true,
|
||||
|
@ -1,15 +1,12 @@
|
||||
notice('MODULAR: ceilometer/controller.pp')
|
||||
|
||||
$verbose = hiera('verbose', true)
|
||||
$debug = hiera('debug', false)
|
||||
$use_syslog = hiera('use_syslog', true)
|
||||
$syslog_log_facility = hiera('syslog_log_facility_ceilometer', 'LOG_LOCAL0')
|
||||
$nodes_hash = hiera('nodes')
|
||||
$storage_hash = hiera('storage')
|
||||
if hiera('amqp_hosts', false) {
|
||||
$amqp_hosts = hiera('amqp_hosts')
|
||||
$rabbit_hash = hiera('rabbit_hash')
|
||||
$management_vip = hiera('management_vip')
|
||||
$internal_address = hiera('internal_address')
|
||||
} else {
|
||||
$amqp_nodes = hiera('amqp_nodes')
|
||||
$amqp_port = hiera('amqp_port', '5673')
|
||||
$amqp_hosts = inline_template("<%= @amqp_nodes.map {|x| x + ':' + @amqp_port}.join ',' %>")
|
||||
}
|
||||
|
||||
$default_ceilometer_hash = {
|
||||
'enabled' => false,
|
||||
@ -18,15 +15,29 @@ $default_ceilometer_hash = {
|
||||
'metering_secret' => 'ceilometer',
|
||||
}
|
||||
|
||||
$verbose = hiera('verbose', true)
|
||||
$debug = hiera('debug', false)
|
||||
$use_syslog = hiera('use_syslog', true)
|
||||
$syslog_log_facility = hiera('syslog_log_facility_ceilometer', 'LOG_LOCAL0')
|
||||
$nodes_hash = hiera('nodes')
|
||||
$storage_hash = hiera('storage')
|
||||
$rabbit_hash = hiera_hash('rabbit_hash')
|
||||
$management_vip = hiera('management_vip')
|
||||
$internal_address = hiera('internal_address')
|
||||
$mongo_roles = hiera('mongo_roles', 'mongo')
|
||||
$region = hiera('region', 'RegionOne')
|
||||
$ceilometer_hash = hiera_hash('ceilometer', $default_ceilometer_hash)
|
||||
$ceilometer_region = pick($ceilometer_hash['region'], $region)
|
||||
|
||||
|
||||
$default_mongo_hash = {
|
||||
'enabled' => false,
|
||||
}
|
||||
|
||||
$ceilometer_hash = hiera('ceilometer', $default_ceilometer_hash)
|
||||
$mongo_hash = hiera('mongo', $default_mongo_hash)
|
||||
$mongo_hash = hiera_hash('mongo', $default_mongo_hash)
|
||||
|
||||
if $mongo_hash['enabled'] and $ceilometer_hash['enabled'] {
|
||||
$exteranl_mongo_hash = hiera('external_mongo')
|
||||
$exteranl_mongo_hash = hiera_hash('external_mongo')
|
||||
$ceilometer_db_user = $exteranl_mongo_hash['mongo_user']
|
||||
$ceilometer_db_password = $exteranl_mongo_hash['mongo_password']
|
||||
$ceilometer_db_dbname = $exteranl_mongo_hash['mongo_db_name']
|
||||
@ -47,9 +58,9 @@ $swift_rados_backend = $storage_hash['objects_ceph']
|
||||
$amqp_password = $rabbit_hash['password']
|
||||
$amqp_user = $rabbit_hash['user']
|
||||
$rabbit_ha_queues = true
|
||||
$service_endpoint = $management_vip
|
||||
$service_endpoint = hiera('service_endpoint', $management_vip)
|
||||
$api_bind_address = $internal_address
|
||||
$ha_mode = true
|
||||
$ha_mode = pick($ceilometer_hash['ha_mode'], true)
|
||||
|
||||
if $ceilometer_hash['enabled'] {
|
||||
if $external_mongo {
|
||||
@ -60,8 +71,8 @@ if $ceilometer_hash['enabled'] {
|
||||
$mongo_replicaset = undef
|
||||
}
|
||||
} else {
|
||||
$mongo_hosts = mongo_hosts($nodes_hash)
|
||||
if size(mongo_hosts($nodes_hash, 'array', 'mongo')) > 1 {
|
||||
$mongo_hosts = mongo_hosts($nodes_hash, 'string', $mongo_roles )
|
||||
if size(mongo_hosts($nodes_hash, 'array', $mongo_roles)) > 1 {
|
||||
$mongo_replicaset = 'ceilometer'
|
||||
} else {
|
||||
$mongo_replicaset = undef
|
||||
@ -90,6 +101,9 @@ if ($ceilometer_enabled) {
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
keystone_host => $service_endpoint,
|
||||
keystone_password => $ceilometer_user_password,
|
||||
keystone_user => $ceilometer_hash['user'],
|
||||
keystone_tenant => $ceilometer_hash['tenant'],
|
||||
keystone_region => $ceilometer_region,
|
||||
host => $api_bind_address,
|
||||
ha_mode => $ha_mode,
|
||||
on_controller => true,
|
||||
|
Loading…
Reference in New Issue
Block a user