Convert all class usage to relative names
Change-Id: I9c2d172c157e3874f95fc77f90017ff9cfeae94e
This commit is contained in:
parent
f289344487
commit
74fe1d927f
16
README.md
16
README.md
@ -52,19 +52,19 @@ Setup
|
||||
To utilize the ceilometer module's functionality you will need to declare multiple resources. This is not an exhaustive list of all the components needed. We recommend that you consult and understand the [core openstack](https://docs.openstack.org) documentation to assist you in understanding the available deployment options.
|
||||
|
||||
```puppet
|
||||
class { '::ceilometer':
|
||||
class { 'ceilometer':
|
||||
telemetry_secret => 'secrete',
|
||||
default_transport_url => 'rabbit://ceilometer:an_even_bigger_secret@127.0.0.1:5672',
|
||||
}
|
||||
class { '::ceilometer::keystone::auth':
|
||||
class { 'ceilometer::keystone::auth':
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::ceilometer::collector': }
|
||||
class { '::ceilometer::expirer': }
|
||||
class { '::ceilometer::agent::polling': }
|
||||
class { '::ceilometer::agent::notification': }
|
||||
class { '::ceilometer::db': }
|
||||
class { '::ceilometer::keystone::authtoken':
|
||||
class { 'ceilometer::collector': }
|
||||
class { 'ceilometer::expirer': }
|
||||
class { 'ceilometer::agent::polling': }
|
||||
class { 'ceilometer::agent::notification': }
|
||||
class { 'ceilometer::db': }
|
||||
class { 'ceilometer::keystone::authtoken':
|
||||
password => 'a_big_secret',
|
||||
auth_url => 'http://127.0.0.1:5000/',
|
||||
}
|
||||
|
@ -1,27 +1,27 @@
|
||||
class { '::ceilometer':
|
||||
class { 'ceilometer':
|
||||
telemetry_secret => 'secrete',
|
||||
default_transport_url => 'rabbit://ceilometer:an_even_bigger_secret@127.0.0.1:5672',
|
||||
}
|
||||
class { '::ceilometer::db::mysql':
|
||||
class { 'ceilometer::db::mysql':
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::ceilometer::db':
|
||||
class { 'ceilometer::db':
|
||||
database_connection => 'mysql://ceilometer:a_big_secret@127.0.0.1/ceilometer?charset=utf8',
|
||||
}
|
||||
class { '::ceilometer::keystone::auth':
|
||||
class { 'ceilometer::keystone::auth':
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::ceilometer::expirer': }
|
||||
class { '::ceilometer::agent::polling': }
|
||||
class { '::ceilometer::agent::notification': }
|
||||
class { '::ceilometer::keystone::authtoken':
|
||||
class { 'ceilometer::expirer': }
|
||||
class { 'ceilometer::agent::polling': }
|
||||
class { 'ceilometer::agent::notification': }
|
||||
class { 'ceilometer::keystone::authtoken':
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
|
||||
class { '::ceilometer::collector':
|
||||
class { 'ceilometer::collector':
|
||||
meter_dispatchers => ['gnocchi'],
|
||||
}
|
||||
class { '::ceilometer::dispatcher::gnocchi':
|
||||
class { 'ceilometer::dispatcher::gnocchi':
|
||||
filter_service_activity => false,
|
||||
filter_project => 'gnocchi_swift',
|
||||
url => 'https://gnocchi:8041',
|
||||
|
@ -4,38 +4,38 @@ node default {
|
||||
}
|
||||
|
||||
# First, install a mysql server
|
||||
class { '::mysql::server': }
|
||||
class { 'mysql::server': }
|
||||
# And create the database
|
||||
class { '::ceilometer::db::mysql':
|
||||
class { 'ceilometer::db::mysql':
|
||||
password => 'ceilometer',
|
||||
}
|
||||
|
||||
# Add the base ceilometer class & parameters
|
||||
# This class is required by ceilometer agents & api classes
|
||||
# The telemetry_secret parameter is mandatory
|
||||
class { '::ceilometer':
|
||||
class { 'ceilometer':
|
||||
telemetry_secret => 'darksecret'
|
||||
}
|
||||
|
||||
# Configure the ceilometer database
|
||||
# Only needed if ceilometer::agent::polling or ceilometer::api are declared
|
||||
class { '::ceilometer::db':
|
||||
class { 'ceilometer::db':
|
||||
}
|
||||
|
||||
# Configure ceilometer database with mongodb
|
||||
|
||||
# class { '::ceilometer::db':
|
||||
# class { 'ceilometer::db':
|
||||
# database_connection => 'mongodb://localhost:27017/ceilometer',
|
||||
# require => Class['mongodb'],
|
||||
# }
|
||||
|
||||
# Configure keystonemiddleware for ceilometer
|
||||
class { '::ceilometer::keystone::authtoken':
|
||||
class { 'ceilometer::keystone::authtoken':
|
||||
password => 'tralalayouyou'
|
||||
}
|
||||
|
||||
# Set common auth parameters used by all agents (compute/central)
|
||||
class { '::ceilometer::agent::auth':
|
||||
class { 'ceilometer::agent::auth':
|
||||
auth_url => 'http://localhost:5000/v3',
|
||||
auth_password => 'tralalerotralala'
|
||||
}
|
||||
@ -58,17 +58,17 @@ node default {
|
||||
# ipmi_namespace => true
|
||||
# }
|
||||
# As default use central and compute polling namespaces
|
||||
class { '::ceilometer::agent::polling':
|
||||
class { 'ceilometer::agent::polling':
|
||||
central_namespace => true,
|
||||
compute_namespace => true,
|
||||
ipmi_namespace => false,
|
||||
}
|
||||
|
||||
# Purge old meters
|
||||
class { '::ceilometer::expirer': }
|
||||
class { 'ceilometer::expirer': }
|
||||
|
||||
# Install notification agent
|
||||
class { '::ceilometer::agent::notification':
|
||||
class { 'ceilometer::agent::notification':
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ class ceilometer::agent::auth (
|
||||
$auth_type = 'password',
|
||||
) {
|
||||
|
||||
include ::ceilometer::deps
|
||||
include ceilometer::deps
|
||||
|
||||
if ! $auth_cacert {
|
||||
ceilometer_config { 'service_credentials/cafile': ensure => absent }
|
||||
|
@ -87,8 +87,8 @@ class ceilometer::agent::notification (
|
||||
$pipeline_publishers = ['gnocchi://'],
|
||||
) {
|
||||
|
||||
include ::ceilometer::deps
|
||||
include ::ceilometer::params
|
||||
include ceilometer::deps
|
||||
include ceilometer::params
|
||||
|
||||
ensure_resource('package', [$::ceilometer::params::agent_notification_package_name],
|
||||
{
|
||||
|
@ -67,8 +67,8 @@ class ceilometer::agent::polling (
|
||||
$polling_meters = $::ceilometer::params::polling_meters,
|
||||
) inherits ceilometer {
|
||||
|
||||
include ::ceilometer::deps
|
||||
include ::ceilometer::params
|
||||
include ceilometer::deps
|
||||
include ceilometer::params
|
||||
|
||||
if $central_namespace {
|
||||
$central_namespace_name = 'central'
|
||||
|
@ -30,7 +30,7 @@ class ceilometer::config (
|
||||
$ceilometer_api_paste_ini = {},
|
||||
) {
|
||||
|
||||
include ::ceilometer::deps
|
||||
include ceilometer::deps
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', $ceilometer_config)
|
||||
validate_legacy(Hash, 'validate_hash', $ceilometer_api_paste_ini)
|
||||
|
@ -69,7 +69,7 @@ class ceilometer::db (
|
||||
$database_idle_timeout = undef,
|
||||
) {
|
||||
|
||||
include ::ceilometer::deps
|
||||
include ceilometer::deps
|
||||
|
||||
if $database_idle_timeout {
|
||||
warning('The database_idle_timeout parameter is deprecated. Please use \
|
||||
@ -90,7 +90,7 @@ database_connection_recycle_time instead.')
|
||||
}
|
||||
|
||||
if $sync_db {
|
||||
include ::ceilometer::db::sync
|
||||
include ceilometer::db::sync
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -42,11 +42,11 @@ class ceilometer::db::mysql(
|
||||
$collate = 'utf8_general_ci',
|
||||
) {
|
||||
|
||||
include ::ceilometer::deps
|
||||
include ceilometer::deps
|
||||
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
::openstacklib::db::mysql { 'ceilometer':
|
||||
openstacklib::db::mysql { 'ceilometer':
|
||||
user => $user,
|
||||
password_hash => mysql::password($password),
|
||||
dbname => $dbname,
|
||||
|
@ -32,9 +32,9 @@ class ceilometer::db::postgresql(
|
||||
$privileges = 'ALL',
|
||||
) {
|
||||
|
||||
include ::ceilometer::deps
|
||||
include ceilometer::deps
|
||||
|
||||
::openstacklib::db::postgresql { 'ceilometer':
|
||||
openstacklib::db::postgresql { 'ceilometer':
|
||||
password_hash => postgresql_password($user, $password),
|
||||
dbname => $dbname,
|
||||
user => $user,
|
||||
|
@ -13,8 +13,8 @@ class ceilometer::db::sync(
|
||||
$extra_params = undef,
|
||||
) {
|
||||
|
||||
include ::ceilometer::deps
|
||||
include ::ceilometer::params
|
||||
include ceilometer::deps
|
||||
include ceilometer::params
|
||||
|
||||
exec { 'ceilometer-upgrade':
|
||||
command => "${::ceilometer::params::dbsync_command} ${extra_params}",
|
||||
|
@ -51,7 +51,7 @@ class ceilometer::expirer (
|
||||
$weekday = '*',
|
||||
) {
|
||||
|
||||
include ::ceilometer::params
|
||||
include ceilometer::params
|
||||
|
||||
Anchor['ceilometer::install::end'] ~> Class['ceilometer::expirer']
|
||||
|
||||
|
@ -269,8 +269,8 @@ class ceilometer(
|
||||
$host = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::ceilometer::deps
|
||||
include ::ceilometer::params
|
||||
include ceilometer::deps
|
||||
include ceilometer::params
|
||||
|
||||
group { 'ceilometer':
|
||||
ensure => present,
|
||||
|
@ -87,11 +87,11 @@ class ceilometer::keystone::auth (
|
||||
$internal_url = 'http://127.0.0.1:8777',
|
||||
) {
|
||||
|
||||
include ::ceilometer::deps
|
||||
include ceilometer::deps
|
||||
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
::keystone::resource::service_identity { 'ceilometer':
|
||||
keystone::resource::service_identity { 'ceilometer':
|
||||
configure_user => $configure_user,
|
||||
configure_user_role => $configure_user_role,
|
||||
configure_endpoint => $configure_endpoint,
|
||||
|
@ -203,7 +203,7 @@ class ceilometer::keystone::authtoken(
|
||||
$service_token_roles_required = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::ceilometer::deps
|
||||
include ceilometer::deps
|
||||
|
||||
if is_service_default($password) {
|
||||
fail('Please set password for ceilometer service user')
|
||||
|
@ -119,7 +119,7 @@ class ceilometer::logging(
|
||||
$log_date_format = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::ceilometer::deps
|
||||
include ceilometer::deps
|
||||
|
||||
oslo::log { 'ceilometer_config':
|
||||
debug => $debug,
|
||||
|
@ -4,7 +4,7 @@
|
||||
# should be considered to be constant
|
||||
#
|
||||
class ceilometer::params {
|
||||
include ::openstacklib::defaults
|
||||
include openstacklib::defaults
|
||||
|
||||
$dbsync_command = 'ceilometer-upgrade'
|
||||
$expirer_command = 'ceilometer-expirer'
|
||||
|
@ -28,8 +28,8 @@ class ceilometer::policy (
|
||||
$policy_path = '/etc/ceilometer/policy.json',
|
||||
) {
|
||||
|
||||
include ::ceilometer::deps
|
||||
include ::ceilometer::params
|
||||
include ceilometer::deps
|
||||
include ceilometer::params
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', $policies)
|
||||
|
||||
|
@ -6,12 +6,12 @@ describe 'ceilometer with mysql' do
|
||||
|
||||
it 'should work with no errors' do
|
||||
pp= <<-EOS
|
||||
include ::openstack_integration
|
||||
include ::openstack_integration::repos
|
||||
include ::openstack_integration::rabbitmq
|
||||
include ::openstack_integration::mysql
|
||||
include ::openstack_integration::keystone
|
||||
class { '::openstack_integration::ceilometer':
|
||||
include openstack_integration
|
||||
include openstack_integration::repos
|
||||
include openstack_integration::rabbitmq
|
||||
include openstack_integration::mysql
|
||||
include openstack_integration::keystone
|
||||
class { 'openstack_integration::ceilometer':
|
||||
integration_enable => false,
|
||||
}
|
||||
EOS
|
||||
|
Loading…
Reference in New Issue
Block a user