Merge "Add gnocchi support on undercloud"
This commit is contained in:
@@ -143,6 +143,8 @@ class { '::heat::db::mysql':
|
||||
allowed_hosts => $allowed_hosts,
|
||||
}
|
||||
if str2bool(hiera('enable_telemetry', true)) {
|
||||
|
||||
# Ceilometer
|
||||
$ceilometer_dsn = split(hiera('ceilometer::db::database_connection'), '[@:/?]')
|
||||
class { '::ceilometer::db::mysql':
|
||||
user => $ceilometer_dsn[3],
|
||||
@@ -162,6 +164,7 @@ if str2bool(hiera('enable_telemetry', true)) {
|
||||
include ::ceilometer::expirer
|
||||
include ::ceilometer::collector
|
||||
include ::ceilometer::agent::auth
|
||||
include ::ceilometer::dispatcher::gnocchi
|
||||
|
||||
Cron <| title == 'ceilometer-expirer' |> { command =>
|
||||
"sleep $((\$(od -A n -t d -N 3 /dev/urandom) % 86400)) && ${::ceilometer::params::expirer_command}" }
|
||||
@@ -184,7 +187,33 @@ if str2bool(hiera('enable_telemetry', true)) {
|
||||
include ::aodh::auth
|
||||
# To manage the upgrade:
|
||||
Exec['ceilometer-dbsync'] -> Exec['aodh-db-sync']
|
||||
|
||||
# Gnocchi
|
||||
$gnocchi_dsn = split(hiera('gnocchi::db::database_connection'), '[@:/?]')
|
||||
class { '::gnocchi::db::mysql':
|
||||
user => $gnocchi_dsn[3],
|
||||
password => $gnocchi_dsn[4],
|
||||
host => $gnocchi_dsn[5],
|
||||
dbname => $gnocchi_dsn[6],
|
||||
allowed_hosts => $allowed_hosts,
|
||||
}
|
||||
include ::gnocchi
|
||||
include ::gnocchi::api
|
||||
include ::gnocchi::wsgi::apache
|
||||
include ::gnocchi::client
|
||||
include ::gnocchi::db::sync
|
||||
include ::gnocchi::storage
|
||||
include ::gnocchi::metricd
|
||||
include ::gnocchi::statsd
|
||||
$gnocchi_backend = downcase(hiera('gnocchi_backend', 'swift'))
|
||||
case $gnocchi_backend {
|
||||
'swift': { include ::gnocchi::storage::swift }
|
||||
'file': { include ::gnocchi::storage::file }
|
||||
'rbd': { include ::gnocchi::storage::ceph }
|
||||
default: { fail('Unrecognized gnocchi_backend parameter.') }
|
||||
}
|
||||
}
|
||||
|
||||
$ironic_dsn = split(hiera('ironic::database_connection'), '[@:/?]')
|
||||
class { '::ironic::db::mysql':
|
||||
user => $ironic_dsn[3],
|
||||
|
||||
@@ -288,6 +288,13 @@ ceilometer::keystone::auth::internal_url: {{UNDERCLOUD_ENDPOINT_CEILOMETER_INTER
|
||||
ceilometer::keystone::auth::admin_url: {{UNDERCLOUD_ENDPOINT_CEILOMETER_ADMIN}}
|
||||
ceilometer::keystone::auth::password: {{UNDERCLOUD_CEILOMETER_PASSWORD}}
|
||||
ceilometer::keystone::auth::region: "%{hiera('keystone_region')}"
|
||||
# gnocchi dispatcher config
|
||||
ceilometer::collector::meter_dispatcher: 'gnocchi'
|
||||
ceilometer::dispatcher::gnocchi::url: {{UNDERCLOUD_ENDPOINT_GNOCCHI_INTERNAL}}
|
||||
ceilometer::dispatcher::gnocchi::filter_project: 'service'
|
||||
ceilometer::dispatcher::gnocchi::archive_policy: 'low'
|
||||
ceilometer::dispatcher::gnocchi::resources_definition_file: 'gnocchi_resources.yaml'
|
||||
|
||||
|
||||
# Aodh
|
||||
aodh::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}}
|
||||
@@ -310,6 +317,31 @@ aodh::keystone::auth::admin_url: {{UNDERCLOUD_ENDPOINT_AODH_ADMIN}}
|
||||
aodh::keystone::auth::password: {{UNDERCLOUD_AODH_PASSWORD}}
|
||||
aodh::keystone::auth::region: "%{hiera('keystone_region')}"
|
||||
|
||||
|
||||
# Gnocchi
|
||||
gnocchi_backend: 'file'
|
||||
gnocchi::wsgi::apache::ssl: false
|
||||
gnocchi::wsgi::apache::bind_host: {{LOCAL_IP}}
|
||||
gnocchi::api::service_name: 'httpd'
|
||||
gnocchi::api::host: {{LOCAL_IP}}
|
||||
gnocchi::keystone::authtoken::password: {{UNDERCLOUD_GNOCCHI_PASSWORD}}
|
||||
gnocchi::keystone::authtoken::auth_uri: "%{hiera('keystone_auth_uri')}"
|
||||
gnocchi::keystone::authtoken::auth_url: "%{hiera('keystone_identity_uri')}"
|
||||
gnocchi::db::mysql::password: {{UNDERCLOUD_GNOCCHI_PASSWORD}}
|
||||
gnocchi::db::database_connection: mysql+pymysql://gnocchi:{{UNDERCLOUD_GNOCCHI_PASSWORD}}@{{LOCAL_IP}}/gnocchi
|
||||
gnocchi::db::sync::extra_opts: '--create-legacy-resource-types'
|
||||
gnocchi::storage::swift::swift_user: 'service:gnocchi'
|
||||
gnocchi::storage::swift::swift_auth_version: 2
|
||||
gnocchi::storage::swift::swift_authurl: "%{hiera('keystone_auth_uri')}"
|
||||
gnocchi::storage::swift::swift_key: {{UNDERCLOUD_GNOCCHI_PASSWORD}}
|
||||
#Gnocchi statsd
|
||||
gnocchi::statsd::resource_id: '0a8b55df-f90f-491c-8cb9-7cdecec6fc26'
|
||||
gnocchi::statsd::user_id: '27c0d3f8-e7ee-42f0-8317-72237d1c5ae3'
|
||||
gnocchi::statsd::project_id: '6c38cd8d-099a-4cb2-aecf-17be688e8616'
|
||||
gnocchi::statsd::flush_delay: 10
|
||||
gnocchi::statsd::archive_policy_name: 'low'
|
||||
|
||||
|
||||
# Nova
|
||||
nova::default_transport_url: "rabbit://{{UNDERCLOUD_RABBIT_USERNAME}}:{{UNDERCLOUD_RABBIT_PASSWORD}}@{{LOCAL_IP}}//"
|
||||
nova::notification_driver: messaging
|
||||
@@ -585,6 +617,7 @@ tripleo::haproxy::swift_proxy_server: true
|
||||
tripleo::haproxy::heat_api: true
|
||||
tripleo::haproxy::ceilometer: "%{hiera('enable_telemetry')}"
|
||||
tripleo::haproxy::aodh: "%{hiera('enable_telemetry')}"
|
||||
tripleo::haproxy::gnocchi: "%{hiera('enable_telemetry')}"
|
||||
tripleo::haproxy::ironic: true
|
||||
tripleo::haproxy::ironic_inspector: true
|
||||
tripleo::haproxy::rabbitmq: true
|
||||
@@ -618,6 +651,7 @@ swift::proxy::cors_allow_origin: '*'
|
||||
# service tenant
|
||||
ceilometer::keystone::authtoken::project_name: 'service'
|
||||
aodh::keystone::authtoken::project_name: 'service'
|
||||
gnocchi::keystone::authtoken::project_name: 'service'
|
||||
cinder::keystone::authtoken::project_name: 'service'
|
||||
heat::keystone::authtoken::project_name: 'service'
|
||||
glance::api::authtoken::project_name: 'service'
|
||||
|
||||
@@ -291,7 +291,7 @@ class TestGenerateEnvironment(BaseTestCase):
|
||||
env = undercloud._generate_environment('.')
|
||||
endpoint_vars = {k: v for (k, v) in env.items()
|
||||
if k.startswith('UNDERCLOUD_ENDPOINT')}
|
||||
self.assertEqual(42, len(endpoint_vars))
|
||||
self.assertEqual(45, len(endpoint_vars))
|
||||
# Spot check one service
|
||||
self.assertEqual('http://192.168.24.1:5000',
|
||||
env['UNDERCLOUD_ENDPOINT_KEYSTONE_PUBLIC'])
|
||||
|
||||
@@ -362,6 +362,10 @@ _auth_opts = [
|
||||
help=('Aodh service password. '
|
||||
'If left unset, one will be automatically generated.')
|
||||
),
|
||||
cfg.StrOpt('undercloud_gnocchi_password',
|
||||
help=('Gnocchi service password. '
|
||||
'If left unset, one will be automatically generated.')
|
||||
),
|
||||
cfg.StrOpt('undercloud_ceilometer_password',
|
||||
help=('Ceilometer service password. '
|
||||
'If left unset, one will be automatically generated.')
|
||||
@@ -707,6 +711,10 @@ def _generate_endpoints(instack_env):
|
||||
'%s://%s:%d',
|
||||
{'host': public_host, 'port': 8042, 'ssl_port': 13042},
|
||||
{'host': internal_host, 'port': 8042}),
|
||||
('gnocchi',
|
||||
'%s://%s:%d',
|
||||
{'host': public_host, 'port': 8041, 'ssl_port': 13041},
|
||||
{'host': internal_host, 'port': 8041}),
|
||||
('mistral',
|
||||
'%s://%s:%d/v2',
|
||||
{'host': public_host, 'port': 8989, 'ssl_port': 13989},
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
# Whether to install Zaqar services in the Undercloud. (boolean value)
|
||||
#enable_zaqar = true
|
||||
|
||||
# Whether to install Telemetry services (ceilometer, aodh) in the
|
||||
# Whether to install Telemetry services (ceilometer, aodh, gnocchi) in the
|
||||
# Undercloud. (boolean value)
|
||||
#enable_telemetry = true
|
||||
|
||||
@@ -230,6 +230,10 @@
|
||||
# generated. (string value)
|
||||
#undercloud_aodh_password = <None>
|
||||
|
||||
# Gnocchi service password. If left unset, one will be automatically
|
||||
# generated. (string value)
|
||||
#undercloud_gnocchi_password = <None>
|
||||
|
||||
# Ceilometer service password. If left unset, one will be
|
||||
# automatically generated. (string value)
|
||||
#undercloud_ceilometer_password = <None>
|
||||
|
||||
Reference in New Issue
Block a user