Deploy Gnocchi, TDBaaS in OpenStack
* Deploy Gnocchi services * Create default archive policy and archive policy rule * Configure Aodh with Gnocchi which is used to evaluate the alarms for threshold Note: Tempest does not fully support Gnocchi yet. * test_alarming_api will work (Aodh) with Gnocchi * test_telemetry_notification_api will not work (Ceilometer) with Gnocchi. That's why we don't configure Ceilometer to use Gnocchi dispatcher. Depends-On: I4ed26d3e294e82c383afc443914b0d7bb1906e46 Depends-On: Ib818b5ae4fa301c6c496fe800ae45c9b0a73222c Change-Id: I32e5f80e4eb8a5cd8fc07798aaf6d710332fcdda
This commit is contained in:
parent
80fb925031
commit
6a0a79dff2
@ -40,6 +40,7 @@ scenario](#All-In-One).
|
|||||||
| cinder | X | | X |
|
| cinder | X | | X |
|
||||||
| ceilometer | X | | |
|
| ceilometer | X | | |
|
||||||
| aodh | X | | |
|
| aodh | X | | |
|
||||||
|
| gnocchi | X | | |
|
||||||
| heat | | X | |
|
| heat | | X | |
|
||||||
| swift | | X | |
|
| swift | | X | |
|
||||||
| sahara | | X | |
|
| sahara | | X | |
|
||||||
|
@ -24,6 +24,7 @@ include ::openstack_integration::nova
|
|||||||
include ::openstack_integration::cinder
|
include ::openstack_integration::cinder
|
||||||
include ::openstack_integration::ceilometer
|
include ::openstack_integration::ceilometer
|
||||||
include ::openstack_integration::aodh
|
include ::openstack_integration::aodh
|
||||||
|
include ::openstack_integration::gnocchi
|
||||||
include ::openstack_integration::trove
|
include ::openstack_integration::trove
|
||||||
include ::openstack_integration::provision
|
include ::openstack_integration::provision
|
||||||
|
|
||||||
|
@ -14,6 +14,13 @@ class openstack_integration::aodh {
|
|||||||
require => Class['::rabbitmq'],
|
require => Class['::rabbitmq'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# gnocchi is not packaged in Ubuntu Cloud Archive
|
||||||
|
# https://bugs.launchpad.net/cloud-archive/+bug/1535740
|
||||||
|
if $::osfamily == 'RedHat' {
|
||||||
|
$gnocchi_url = 'http://127.0.0.1:8041'
|
||||||
|
} else {
|
||||||
|
$gnocchi_url = undef
|
||||||
|
}
|
||||||
class { '::aodh':
|
class { '::aodh':
|
||||||
rabbit_userid => 'aodh',
|
rabbit_userid => 'aodh',
|
||||||
rabbit_password => 'an_even_bigger_secret',
|
rabbit_password => 'an_even_bigger_secret',
|
||||||
@ -21,6 +28,7 @@ class openstack_integration::aodh {
|
|||||||
debug => true,
|
debug => true,
|
||||||
rabbit_host => '127.0.0.1',
|
rabbit_host => '127.0.0.1',
|
||||||
database_connection => 'mysql+pymysql://aodh:aodh@127.0.0.1/aodh?charset=utf8',
|
database_connection => 'mysql+pymysql://aodh:aodh@127.0.0.1/aodh?charset=utf8',
|
||||||
|
gnocchi_url => $gnocchi_url,
|
||||||
}
|
}
|
||||||
class { '::aodh::db::mysql':
|
class { '::aodh::db::mysql':
|
||||||
password => 'aodh',
|
password => 'aodh',
|
||||||
|
43
manifests/gnocchi.pp
Normal file
43
manifests/gnocchi.pp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
class openstack_integration::gnocchi {
|
||||||
|
|
||||||
|
# gnocchi is not packaged in Ubuntu Cloud Archive
|
||||||
|
# https://bugs.launchpad.net/cloud-archive/+bug/1535740
|
||||||
|
if $::osfamily == 'RedHat' {
|
||||||
|
class { '::gnocchi':
|
||||||
|
verbose => true,
|
||||||
|
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':
|
||||||
|
password => 'a_big_secret',
|
||||||
|
}
|
||||||
|
class { '::gnocchi::api':
|
||||||
|
enabled => true,
|
||||||
|
keystone_password => 'a_big_secret',
|
||||||
|
keystone_identity_uri => 'http://127.0.0.1:35357/',
|
||||||
|
keystone_auth_uri => 'http://127.0.0.1:35357/',
|
||||||
|
service_name => 'httpd',
|
||||||
|
}
|
||||||
|
include ::apache
|
||||||
|
class { '::gnocchi::wsgi::apache':
|
||||||
|
ssl => false,
|
||||||
|
}
|
||||||
|
class { '::gnocchi::client': }
|
||||||
|
class { '::gnocchi::db::sync': }
|
||||||
|
class { '::gnocchi::metricd': }
|
||||||
|
class { '::gnocchi::storage': }
|
||||||
|
class { '::gnocchi::storage::file': }
|
||||||
|
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',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -20,6 +20,25 @@ class openstack_integration::provision {
|
|||||||
}
|
}
|
||||||
Keystone_user_role['admin@openstack'] -> Exec['manage_m1.micro_nova_flavor']
|
Keystone_user_role['admin@openstack'] -> Exec['manage_m1.micro_nova_flavor']
|
||||||
|
|
||||||
|
# https://bugs.launchpad.net/gnocchi/+bug/1538872
|
||||||
|
if defined (Package['gnocchi']) {
|
||||||
|
exec { 'manage_gnocchi_high_policy':
|
||||||
|
path => '/usr/bin:/bin:/usr/sbin:/sbin',
|
||||||
|
provider => shell,
|
||||||
|
command => "gnocchi ${os_auth_options} archive-policy create -d granularity:1s,points:86400 -d granularity:1m,points:43200 -d granularity:1h,points:8760 high",
|
||||||
|
unless => "gnocchi ${os_auth_options} archive-policy list | grep high",
|
||||||
|
}
|
||||||
|
exec { 'manage_gnocchi_high_policy_rule':
|
||||||
|
path => '/usr/bin:/bin:/usr/sbin:/sbin',
|
||||||
|
provider => shell,
|
||||||
|
command => "gnocchi ${os_auth_options} archive-policy-rule create -a high -m '*' default",
|
||||||
|
unless => "gnocchi ${os_auth_options} archive-policy-rule list | grep default",
|
||||||
|
}
|
||||||
|
Keystone_user_role['admin@openstack'] -> Exec['manage_gnocchi_high_policy']
|
||||||
|
Exec['manage_gnocchi_high_policy'] -> Service['ceilometer-collector']
|
||||||
|
Exec['manage_gnocchi_high_policy'] -> Exec ['manage_gnocchi_high_policy_rule']
|
||||||
|
}
|
||||||
|
|
||||||
neutron_network { 'public':
|
neutron_network { 'public':
|
||||||
tenant_name => 'openstack',
|
tenant_name => 'openstack',
|
||||||
router_external => true,
|
router_external => true,
|
||||||
|
Loading…
Reference in New Issue
Block a user