Make undercloud telemetry services optional and disabled

We're running ceilometer and aodh services but none of our current features
require them, and we don't document any interaction with them.

To mitigate the risk folks are using these services, I've left support in
but turned them off by default, as we don't require them & saving resources
(particularly in CI) seems more appropriate than enabling unused things.

Change-Id: Icbb49d1a4a8b4c6c713c54c53317a42f17e406f9
This commit is contained in:
Steven Hardy 2016-04-07 14:49:50 +01:00
parent 8defbe223e
commit f6ce775478
5 changed files with 57 additions and 46 deletions

View File

@ -66,6 +66,7 @@ context = {
'ENABLE_TEMPEST': os.environ.get('ENABLE_TEMPEST', 'true'),
'ENABLE_MISTRAL': os.environ.get('ENABLE_MISTRAL', 'true'),
'ENABLE_ZAQAR': os.environ.get('ENABLE_ZAQAR', 'true'),
'ENABLE_TELEMETRY': os.environ.get('ENABLE_TELEMETRY', 'false'),
'ENABLE_MONITORING': os.environ.get('ENABLE_MONITORING', 'false'),
'IPXE_DEPLOY': os.environ.get('IPXE_DEPLOY', 'true'),
'UNDERCLOUD_ADMIN_VIP': os.environ.get('UNDERCLOUD_ADMIN_VIP', ''),

View File

@ -105,13 +105,51 @@ class { '::heat::db::mysql':
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,
if str2bool(hiera('enable_telemetry', false)) {
$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,
}
include ::ceilometer::keystone::auth
include ::aodh::keystone::auth
include ::ceilometer
include ::ceilometer::api
include ::ceilometer::db
include ::ceilometer::agent::notification
include ::ceilometer::agent::central
include ::ceilometer::expirer
include ::ceilometer::collector
class { '::ceilometer::agent::auth':
auth_url => join(['http://', hiera('controller_host'), ':5000/v2.0']),
}
Cron <| title == 'ceilometer-expirer' |> { command =>
"sleep $((\$(od -A n -t d -N 3 /dev/urandom) % 86400)) && ${::ceilometer::params::expirer_command}" }
# TODO: add support for setting these to puppet-ceilometer
ceilometer_config {
'hardware/readonly_user_name': value => hiera('snmpd_readonly_user_name');
'hardware/readonly_user_password': value => hiera('snmpd_readonly_user_password');
}
# Aodh
include ::aodh
include ::aodh::api
include ::aodh::wsgi::apache
include ::aodh::evaluator
include ::aodh::notifier
include ::aodh::listener
include ::aodh::client
include ::aodh::db::sync
class { '::aodh::auth':
auth_url => join(['http://', hiera('controller_host'), ':5000/v2.0']),
}
# To manage the upgrade:
Exec['ceilometer-dbsync'] -> Exec['aodh-db-sync']
}
$ironic_dsn = split(hiera('ironic::database_connection'), '[@:/?]')
class { '::ironic::db::mysql':
@ -147,8 +185,6 @@ include ::heat::keystone::auth
include ::neutron::keystone::auth
include ::glance::keystone::auth
include ::nova::keystone::auth
include ::ceilometer::keystone::auth
include ::aodh::keystone::auth
include ::swift::keystone::auth
include ::ironic::keystone::auth
include ::ironic::keystone::auth_inspector
@ -299,45 +335,9 @@ ring_account_device { "${controller_host}:6002/1":
weight => 1,
}
# Ceilometer
include ::ceilometer
include ::ceilometer::api
include ::ceilometer::db
include ::ceilometer::agent::notification
include ::ceilometer::agent::central
include ::ceilometer::expirer
include ::ceilometer::collector
class { '::ceilometer::agent::auth':
auth_url => join(['http://', hiera('controller_host'), ':5000/v2.0']),
}
Cron <| title == 'ceilometer-expirer' |> { command =>
"sleep $((\$(od -A n -t d -N 3 /dev/urandom) % 86400)) && ${::ceilometer::params::expirer_command}" }
# TODO: add support for setting these to puppet-ceilometer
ceilometer_config {
'hardware/readonly_user_name': value => hiera('snmpd_readonly_user_name');
'hardware/readonly_user_password': value => hiera('snmpd_readonly_user_password');
}
# Apache
include ::apache
# Aodh
include ::aodh
include ::aodh::api
include ::aodh::wsgi::apache
include ::aodh::evaluator
include ::aodh::notifier
include ::aodh::listener
include ::aodh::client
include ::aodh::db::sync
class { '::aodh::auth':
auth_url => join(['http://', hiera('controller_host'), ':5000/v2.0']),
}
# To manage the upgrade:
Exec['ceilometer-dbsync'] -> Exec['aodh-db-sync']
# Heat
class { '::heat':
debug => hiera('debug'),
@ -431,7 +431,7 @@ if hiera('service_certificate', undef) {
nova_metadata => true,
swift_proxy_server => true,
heat_api => true,
ceilometer => true,
ceilometer => str2bool(hiera('enable_telemetry', false)),
ironic => true,
rabbitmq => true,
}

View File

@ -461,5 +461,6 @@ mistral::keystone_tenant: 'service'
enable_tempest: {{ENABLE_TEMPEST}}
enable_mistral: {{ENABLE_MISTRAL}}
enable_zaqar: {{ENABLE_ZAQAR}}
enable_telemetry: {{ENABLE_TELEMETRY}}
ipxe_deploy: {{IPXE_DEPLOY}}
enable_monitoring: {{ENABLE_MONITORING}}

View File

@ -209,6 +209,11 @@ _opts = [
default=True,
help=('Whether to install Zaqar services in the Undercloud.')
),
cfg.BoolOpt('enable_telemetry',
default=False,
help=('Whether to install Telemetry services '
'(ceilometer, aodh) in the Undercloud.')
),
cfg.BoolOpt('ipxe_deploy',
default=True,
help=('Whether to use iPXE for deploy by default.')

View File

@ -108,6 +108,10 @@
# Whether to install Zaqar services in the Undercloud. (boolean value)
#enable_zaqar = true
# Whether to install Telemetry services (ceilometer, aodh) in the
# Undercloud. (boolean value)
#enable_telemetry = false
# Whether to use iPXE for deploy by default. (boolean value)
#ipxe_deploy = true