- # $enabled: should the service be enabled
- # Optional. Defaults to true
- # $keystone_host: keystone's admin endpoint IP/Host
- # Optional. Defaults to 127.0.0.1
- # $keystone_port: keystone's admin endpoint port
- # Optional. Defaults to 35357
- # $keystone_protocol: http/https
+# Installs & configure the ceilometer api service
+#
+# == Parameters
- # $keytone_user: user to authenticate with
++# [*enabled*]
++# should the service be enabled. Optional. Defaults to true
++#
++# [*keystone_host*]
++# keystone's admin endpoint IP/Host. Optional. Defaults to 127.0.0.1
++#
++# [*keystone_port*]
++# keystone's admin endpoint port. Optional. Defaults to 35357
++#
++# [*keystone_protocol*] http/https
+# Optional. Defaults to https
- # $keystone_tenant: tenant to authenticate with
++#
++# [*keytone_user*] user to authenticate with
+# Optional. Defaults to ceilometer
- # $keystone_password: password to authenticate with
++#
++# [*keystone_tenant*] tenant to authenticate with
+# Optional. Defaults to services
++#
++# [*keystone_password*] password to authenticate with
+# Mandatory.
+ #
class ceilometer::api (
$enabled = true,
$keystone_host = '127.0.0.1',
- # $password: password to connect to the database
- # Mandatory.
- # $dbname: name of the database
- # Optional. Defaults to ceilometer.
- # $user: user to connect to the database
- # Optional. Defaults to ceilometer.
- # $host: the default source host user is allowed to connect from
+# The ceilometer::db::mysql class creates a MySQL database for ceilometer.
+# It must be used on the MySQL server
+#
+# == Parameters
+#
- # $allowed_hosts: other hosts the user is allowd to connect from
++# [*password*]
++# password to connect to the database. Mandatory.
++#
++# [*dbname*]
++# name of the database. Optional. Defaults to ceilometer.
++#
++# [*user*]
++# user to connect to the database. Optional. Defaults to ceilometer.
++#
++# [*host*]
++# the default source host user is allowed to connect from.
+# Optional. Defaults to 'localhost'
- # $charset: the database charset
- # Optional. Defaults to 'latin1'
-
++#
++# [*allowed_hosts*]
++# other hosts the user is allowd to connect from.
+# Optional. Defaults to undef.
++#
++# [*charset*]
++# the database charset. Optional. Defaults to 'latin1'
+ #
class ceilometer::db::mysql(
- $password,
+ $password = false,
$dbname = 'ceilometer',
$user = 'ceilometer',
$host = 'localhost',
+ # == Class: ceilometer::keystone::auth
#
- # Sets up ceilometer users, service and endpoint
+ # Configures Ceilometer user, service and endpoint in Keystone.
#
- # == Parameters:
+ # === Parameters
#
- # $password: ceilometer user's password
- # Mandatory
- # $email: ceilometer user's email
- # Optional.
- # $auth_name: username
- # Optional. Defaults to 'ceilometer'.
- # $service_type: type of service to create.
- # Optional. Defaults to 'metering'.
- # $public_address: Public address for endpoint.
- # Optional. Defaults to 127.0.0.1.
- # $admin_address: Admin address for endpoint.
- # Optional. Defaults to 127.0.0.1.
- # $internal_address: Internal address for endpoint.
- # Optional. Defaults to 127.0.0.1.
- # $port: Port for endpoint. Needs to match ceilometer api service port.
- # Optional. Defaults to 8777.
- # $region: Region where endpoint is set.
- # Optional. Defaults to 'RegionOne'.
- # $tenant: Service tenant name.
- # Optional. Defaults to 'services'.
- # $public_protocol: http/https.
- # Optional. Defaults to 'http'.
- # $configure_endpoint: should the endpoint be created in keystone ?
- # Optional. Defaults to true
+ # [*password*]
+ # Password for Ceilometer user. Required.
#
- class ceilometer::keystone::auth(
- $password = false,
+ # [*email*]
+ # Email for Ceilometer user. Optional. Defaults to 'ceilometer@localhost'.
+ #
+ # [*auth_name*]
+ # Username for Ceilometer service. Optional. Defaults to 'ceilometer'.
+ #
+ # [*configure_endpoint*]
+ # Should Ceilometer endpoint be configured? Optional. Defaults to 'true'.
+ #
+ # [*service_type*]
+ # Type of service. Optional. Defaults to 'metering'.
+ #
+ # [*public_address*]
+ # Public address for endpoint. Optional. Defaults to '127.0.0.1'.
+ #
+ # [*admin_address*]
+ # Admin address for endpoint. Optional. Defaults to '127.0.0.1'.
+ #
+ # [*internal_address*]
+ # Internal address for endpoint. Optional. Defaults to '127.0.0.1'.
+ #
+ # [*port*]
+ # Port for endpoint. Optional. Defaults to '8777'.
+ #
+ # [*region*]
+ # Region for endpoint. Optional. Defaults to 'RegionOne'.
+ #
+ # [*tenant*]
+ # Tenant for Ceilometer user. Optional. Defaults to 'services'.
+ #
+ # [*protocol*]
+ # Protocol for public endpoint. Optional. Defaults to 'http'.
+ #
+ class ceilometer::keystone::auth (
- $password,
++ $password = false,
$email = 'ceilometer@localhost',
$auth_name = 'ceilometer',
- $configure_endpoint = true,
$service_type = 'metering',
$public_address = '127.0.0.1',
$admin_address = '127.0.0.1',
$port = '8777',
$region = 'RegionOne',
$tenant = 'services',
- $public_protocol = 'http'
+ $public_protocol = 'http',
+ $admin_protocol = 'http',
+ $internal_protocol = 'http',
+ $configure_endpoint = true
) {
- Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| title == 'ceilometer-api' |>
+ validate_string($password)
+
+ Keystone_user_role["${auth_name}@${tenant}"] ~>
- Service <| name == 'ceilometer' |>
++ Service <| name == 'ceilometer-api' |>
keystone_user { $auth_name:
ensure => present,