scenario001: rework telemetry services
Ubuntu and Redhat/Centos doesn't have all telemetry packages. Instead of checking everywhere if we are on Ubuntu or Redhat/Centos, this change uses a boolean 'enable_telemetry_legacy'. If true, ::openstack_integration::ceilometer will configure ceilometer with legacy services/configuration (without panko/gnocchi). If false, Gnocchi and Panko backend is used. scenario001 set it to true for Ubuntu and false for Redhat/Centos. This centralize the kind of ceilometer deployement in one place. This change also drops the now useless collector configuration and configure the notification agent correctly instead. Change-Id: If229829975d4f25ca0a2a3c6c93e674204d71dc2
This commit is contained in:
parent
de97ef305a
commit
047dbb7280
@ -16,17 +16,16 @@
|
||||
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
$ipv6 = false
|
||||
# panko and vitrage are not packaged yet in debian/ubuntu
|
||||
$enable_panko = false
|
||||
$enable_vitrage = false
|
||||
$enable_redis = false
|
||||
$ipv6 = false
|
||||
# panko, gnocchi and vitrage are not packaged yet in debian/ubuntu
|
||||
# https://bugs.launchpad.net/cloud-archive/+bug/1535740
|
||||
$enable_vitrage = false
|
||||
$enable_legacy_telemetry = true
|
||||
}
|
||||
'RedHat': {
|
||||
$ipv6 = true
|
||||
$enable_panko = true
|
||||
$enable_vitrage = true
|
||||
$enable_redis = true
|
||||
$ipv6 = true
|
||||
$enable_vitrage = true
|
||||
$enable_legacy_telemetry = false
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily (${::osfamily})")
|
||||
@ -61,26 +60,26 @@ class { '::openstack_integration::nova':
|
||||
class { '::openstack_integration::cinder':
|
||||
backend => 'rbd',
|
||||
}
|
||||
include ::openstack_integration::ceilometer
|
||||
class { '::openstack_integration::ceilometer':
|
||||
enable_legacy_telemetry => $enable_legacy_telemetry
|
||||
}
|
||||
include ::openstack_integration::aodh
|
||||
if $enable_vitrage {
|
||||
include ::openstack_integration::vitrage
|
||||
}
|
||||
if $enable_redis {
|
||||
include ::openstack_integration::redis
|
||||
}
|
||||
include ::openstack_integration::gnocchi
|
||||
include ::openstack_integration::ceph
|
||||
include ::openstack_integration::provision
|
||||
if $enable_panko {
|
||||
if ! $enable_legacy_telemetry {
|
||||
include ::openstack_integration::redis
|
||||
include ::openstack_integration::gnocchi
|
||||
include ::openstack_integration::panko
|
||||
}
|
||||
|
||||
class { '::openstack_integration::tempest':
|
||||
cinder => true,
|
||||
gnocchi => true,
|
||||
gnocchi => ! $enable_legacy_telemetry,
|
||||
ceilometer => true,
|
||||
aodh => true,
|
||||
panko => $enable_panko,
|
||||
panko => ! $enable_legacy_telemetry,
|
||||
vitrage => $enable_vitrage,
|
||||
}
|
||||
|
@ -1,4 +1,13 @@
|
||||
class openstack_integration::ceilometer {
|
||||
# Configure the Ceilometer service
|
||||
#
|
||||
# [*enable_legacy_telemetry*]
|
||||
# (optional) Define if we use the legacy ceilometer database/service instead
|
||||
# of Gnocchi and Panko
|
||||
# Default to false.
|
||||
#
|
||||
class openstack_integration::ceilometer (
|
||||
$enable_legacy_telemetry = false
|
||||
){
|
||||
|
||||
include ::openstack_integration::config
|
||||
include ::openstack_integration::params
|
||||
@ -38,53 +47,66 @@ class openstack_integration::ceilometer {
|
||||
memcached_servers => $::openstack_integration::config::memcached_servers,
|
||||
debug => true,
|
||||
}
|
||||
class { '::ceilometer::db::mysql':
|
||||
password => 'ceilometer',
|
||||
}
|
||||
class { '::ceilometer::db':
|
||||
database_connection => 'mysql+pymysql://ceilometer:ceilometer@127.0.0.1/ceilometer?charset=utf8',
|
||||
}
|
||||
|
||||
class { '::ceilometer::keystone::auth':
|
||||
public_url => "${::openstack_integration::config::base_url}:8777",
|
||||
internal_url => "${::openstack_integration::config::base_url}:8777",
|
||||
admin_url => "${::openstack_integration::config::base_url}:8777",
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::ceilometer::keystone::authtoken':
|
||||
password => 'a_big_secret',
|
||||
user_domain_name => 'Default',
|
||||
project_domain_name => 'Default',
|
||||
auth_url => $::openstack_integration::config::keystone_admin_uri,
|
||||
auth_uri => $::openstack_integration::config::keystone_auth_uri,
|
||||
memcached_servers => $::openstack_integration::config::memcached_servers,
|
||||
}
|
||||
class { '::ceilometer::api':
|
||||
enabled => true,
|
||||
service_name => 'httpd',
|
||||
}
|
||||
include ::apache
|
||||
class { '::ceilometer::wsgi::apache':
|
||||
bind_host => $::openstack_integration::config::ip_for_url,
|
||||
ssl => $::openstack_integration::config::ssl,
|
||||
ssl_key => "/etc/keystone/ssl/private/${::fqdn}.pem",
|
||||
ssl_cert => $::openstack_integration::params::cert_path,
|
||||
workers => '2',
|
||||
public_url => "${::openstack_integration::config::base_url}:8777",
|
||||
internal_url => "${::openstack_integration::config::base_url}:8777",
|
||||
admin_url => "${::openstack_integration::config::base_url}:8777",
|
||||
password => 'a_big_secret',
|
||||
configure_endpoint => $enable_legacy_telemetry,
|
||||
}
|
||||
|
||||
# Panko is not yet packaged in ubuntu repos
|
||||
if $::osfamily == 'RedHat' {
|
||||
$event_dispatcher = 'panko'
|
||||
if $enable_legacy_telemetry {
|
||||
class { '::ceilometer::db::mysql':
|
||||
password => 'ceilometer',
|
||||
}
|
||||
class { '::ceilometer::db':
|
||||
database_connection => 'mysql+pymysql://ceilometer:ceilometer@127.0.0.1/ceilometer?charset=utf8',
|
||||
}
|
||||
class { '::ceilometer::keystone::authtoken':
|
||||
password => 'a_big_secret',
|
||||
user_domain_name => 'Default',
|
||||
project_domain_name => 'Default',
|
||||
auth_url => $::openstack_integration::config::keystone_admin_uri,
|
||||
auth_uri => $::openstack_integration::config::keystone_auth_uri,
|
||||
memcached_servers => $::openstack_integration::config::memcached_servers,
|
||||
}
|
||||
class { '::ceilometer::api':
|
||||
enabled => true,
|
||||
service_name => 'httpd',
|
||||
}
|
||||
include ::apache
|
||||
class { '::ceilometer::wsgi::apache':
|
||||
bind_host => $::openstack_integration::config::ip_for_url,
|
||||
ssl => $::openstack_integration::config::ssl,
|
||||
ssl_key => "/etc/keystone/ssl/private/${::fqdn}.pem",
|
||||
ssl_cert => $::openstack_integration::params::cert_path,
|
||||
workers => '2',
|
||||
}
|
||||
|
||||
class { '::ceilometer::expirer': }
|
||||
|
||||
$sample_pipeline_publishers = ['database://']
|
||||
$event_pipeline_publishers = ['database://']
|
||||
} else {
|
||||
$event_dispatcher = undef
|
||||
# We use Gnocchi/Panko instead of local database
|
||||
class { '::ceilometer::db::sync':
|
||||
extra_params => '--skip-metering-database',
|
||||
}
|
||||
# Ensure Gnocchi and creads are ready before running ceilometer-upgrade
|
||||
Service['httpd'] -> Exec['ceilometer-upgrade']
|
||||
Class['ceilometer::agent::auth'] -> Exec['ceilometer-upgrade']
|
||||
Class['ceilometer::keystone::auth'] -> Exec['ceilometer-upgrade']
|
||||
Class['gnocchi::keystone::auth'] -> Exec['ceilometer-upgrade']
|
||||
|
||||
$sample_pipeline_publishers = ['gnocchi://']
|
||||
$event_pipeline_publishers = ['gnocchi://', 'panko://']
|
||||
}
|
||||
|
||||
class { '::ceilometer::collector':
|
||||
collector_workers => '2',
|
||||
event_dispatcher => $event_dispatcher,
|
||||
}
|
||||
class { '::ceilometer::expirer': }
|
||||
class { '::ceilometer::agent::notification':
|
||||
notification_workers => '2',
|
||||
notification_workers => '2',
|
||||
pipeline_publishers => $sample_pipeline_publishers,
|
||||
event_pipeline_publishers => $event_pipeline_publishers,
|
||||
}
|
||||
class { '::ceilometer::agent::polling': }
|
||||
class { '::ceilometer::agent::auth':
|
||||
|
@ -3,71 +3,66 @@ class openstack_integration::gnocchi {
|
||||
include ::openstack_integration::config
|
||||
include ::openstack_integration::params
|
||||
|
||||
# gnocchi is not packaged in Ubuntu Cloud Archive
|
||||
# https://bugs.launchpad.net/cloud-archive/+bug/1535740
|
||||
if $::osfamily == 'RedHat' {
|
||||
if $::openstack_integration::config::ssl {
|
||||
openstack_integration::ssl_key { 'gnocchi':
|
||||
notify => Service['httpd'],
|
||||
require => Package['gnocchi'],
|
||||
}
|
||||
Exec['update-ca-certificates'] ~> Service['httpd']
|
||||
}
|
||||
|
||||
if $::openstack_integration::config::ssl {
|
||||
openstack_integration::ssl_key { 'gnocchi':
|
||||
notify => Service['httpd'],
|
||||
require => Package['gnocchi'],
|
||||
}
|
||||
Exec['update-ca-certificates'] ~> Service['httpd']
|
||||
}
|
||||
|
||||
class { '::gnocchi':
|
||||
debug => true,
|
||||
database_connection => 'mysql+pymysql://gnocchi:gnocchi@127.0.0.1/gnocchi?charset=utf8',
|
||||
}
|
||||
class { '::gnocchi::db::mysql':
|
||||
password => 'gnocchi',
|
||||
}
|
||||
class { '::gnocchi::keystone::auth':
|
||||
public_url => "${::openstack_integration::config::base_url}:8041",
|
||||
internal_url => "${::openstack_integration::config::base_url}:8041",
|
||||
admin_url => "${::openstack_integration::config::base_url}:8041",
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::gnocchi::keystone::authtoken':
|
||||
password => 'a_big_secret',
|
||||
user_domain_name => 'Default',
|
||||
project_domain_name => 'Default',
|
||||
auth_url => $::openstack_integration::config::keystone_admin_uri,
|
||||
auth_uri => $::openstack_integration::config::keystone_auth_uri,
|
||||
memcached_servers => $::openstack_integration::config::memcached_servers,
|
||||
}
|
||||
class { '::gnocchi::api':
|
||||
enabled => true,
|
||||
service_name => 'httpd',
|
||||
sync_db => true,
|
||||
}
|
||||
include ::apache
|
||||
class { '::gnocchi::wsgi::apache':
|
||||
bind_host => $::openstack_integration::config::ip_for_url,
|
||||
ssl => $::openstack_integration::config::ssl,
|
||||
ssl_key => "/etc/gnocchi/ssl/private/${::fqdn}.pem",
|
||||
ssl_cert => $::openstack_integration::params::cert_path,
|
||||
workers => 2,
|
||||
}
|
||||
class { '::gnocchi::client': }
|
||||
class { '::gnocchi::metricd': }
|
||||
class { '::gnocchi::storage':
|
||||
coordination_url => $::openstack_integration::config::tooz_url,
|
||||
}
|
||||
class { '::gnocchi::storage::ceph':
|
||||
ceph_username => 'openstack',
|
||||
ceph_keyring => '/etc/ceph/ceph.client.openstack.keyring',
|
||||
}
|
||||
# make sure ceph pool exists before running gnocchi (dbsync & services)
|
||||
Exec['create-gnocchi'] -> Exec['gnocchi-db-sync']
|
||||
class { '::gnocchi::statsd':
|
||||
archive_policy_name => 'high',
|
||||
flush_delay => '100',
|
||||
# random datas:
|
||||
resource_id => '07f26121-5777-48ba-8a0b-d70468133dd9',
|
||||
user_id => 'f81e9b1f-9505-4298-bc33-43dfbd9a973b',
|
||||
project_id => '203ef419-e73f-4b8a-a73f-3d599a72b18d',
|
||||
}
|
||||
class { '::gnocchi':
|
||||
debug => true,
|
||||
database_connection => 'mysql+pymysql://gnocchi:gnocchi@127.0.0.1/gnocchi?charset=utf8',
|
||||
}
|
||||
class { '::gnocchi::db::mysql':
|
||||
password => 'gnocchi',
|
||||
}
|
||||
class { '::gnocchi::keystone::auth':
|
||||
public_url => "${::openstack_integration::config::base_url}:8041",
|
||||
internal_url => "${::openstack_integration::config::base_url}:8041",
|
||||
admin_url => "${::openstack_integration::config::base_url}:8041",
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::gnocchi::keystone::authtoken':
|
||||
password => 'a_big_secret',
|
||||
user_domain_name => 'Default',
|
||||
project_domain_name => 'Default',
|
||||
auth_url => $::openstack_integration::config::keystone_admin_uri,
|
||||
auth_uri => $::openstack_integration::config::keystone_auth_uri,
|
||||
memcached_servers => $::openstack_integration::config::memcached_servers,
|
||||
}
|
||||
class { '::gnocchi::api':
|
||||
enabled => true,
|
||||
service_name => 'httpd',
|
||||
sync_db => true,
|
||||
}
|
||||
include ::apache
|
||||
class { '::gnocchi::wsgi::apache':
|
||||
bind_host => $::openstack_integration::config::ip_for_url,
|
||||
ssl => $::openstack_integration::config::ssl,
|
||||
ssl_key => "/etc/gnocchi/ssl/private/${::fqdn}.pem",
|
||||
ssl_cert => $::openstack_integration::params::cert_path,
|
||||
workers => 2,
|
||||
}
|
||||
class { '::gnocchi::client': }
|
||||
class { '::gnocchi::metricd': }
|
||||
class { '::gnocchi::storage':
|
||||
coordination_url => $::openstack_integration::config::tooz_url,
|
||||
}
|
||||
class { '::gnocchi::storage::ceph':
|
||||
ceph_username => 'openstack',
|
||||
ceph_keyring => '/etc/ceph/ceph.client.openstack.keyring',
|
||||
}
|
||||
# make sure ceph pool exists before running gnocchi (dbsync & services)
|
||||
Exec['create-gnocchi'] -> Exec['gnocchi-db-sync']
|
||||
class { '::gnocchi::statsd':
|
||||
archive_policy_name => 'high',
|
||||
flush_delay => '100',
|
||||
# random datas:
|
||||
resource_id => '07f26121-5777-48ba-8a0b-d70468133dd9',
|
||||
user_id => 'f81e9b1f-9505-4298-bc33-43dfbd9a973b',
|
||||
project_id => '203ef419-e73f-4b8a-a73f-3d599a72b18d',
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user