
coordination_url[1] and metric_processing_delay[2] under storage section are both deprecated, so deprecate parameters under gnocchi::storage and migrate these parameters to appropriate classes, gnocchi and gnocchi::metricd . [1]70b9ca427b
[2]72fdba704d
Change-Id: I88dff282df4ce477e543dd2fcf5052a9ac472b84
62 lines
1.5 KiB
Puppet
62 lines
1.5 KiB
Puppet
# == Class: gnocchi
|
|
#
|
|
# Full description of class gnocchi here.
|
|
#
|
|
# === Parameters
|
|
#
|
|
# [*package_ensure*]
|
|
# (optional) The state of gnocchi packages
|
|
# Defaults to 'present'
|
|
#
|
|
# [*database_connection*]
|
|
# (optional) Connection url for the gnocchi database.
|
|
# Defaults to undef.
|
|
#
|
|
# [*coordination_url*]
|
|
# (optional) The url to use for distributed group membership coordination.
|
|
# Defaults to $::os_service_default.
|
|
#
|
|
# [*purge_config*]
|
|
# (optional) Whether to set only the specified config options
|
|
# in the gnocchi config.
|
|
# Defaults to false.
|
|
#
|
|
class gnocchi (
|
|
$package_ensure = 'present',
|
|
$database_connection = undef,
|
|
$coordination_url = $::os_service_default,
|
|
$purge_config = false,
|
|
) inherits gnocchi::params {
|
|
|
|
include gnocchi::deps
|
|
include gnocchi::db
|
|
|
|
package { 'gnocchi':
|
|
ensure => $package_ensure,
|
|
name => $::gnocchi::params::common_package_name,
|
|
tag => ['openstack', 'gnocchi-package'],
|
|
}
|
|
|
|
resources { 'gnocchi_config':
|
|
purge => $purge_config,
|
|
}
|
|
|
|
$coordination_url_real = pick($::gnocchi::storage::coordination_url, $coordination_url)
|
|
$storage_package_ensure = pick($::gnocchi::storage::package_ensure, $package_ensure)
|
|
|
|
if $coordination_url_real {
|
|
|
|
gnocchi_config {
|
|
'DEFAULT/coordination_url' : value => $coordination_url_real;
|
|
}
|
|
|
|
if ($coordination_url_real =~ /^redis/ ) {
|
|
ensure_resource('package', 'python-redis', {
|
|
ensure => $storage_package_ensure,
|
|
name => $::gnocchi::params::redis_package_name,
|
|
tag => 'openstack',
|
|
})
|
|
}
|
|
}
|
|
}
|