gnocchi: use redis as coordination url

Currently gnocchi metricd is really slow making some tests timeout,
because the tooz backend is mysql.

And the futur autoscaling will reach the max connections of mysql
by creating many tooz locks.

This change switches to redis, this is one of the recommended backend to
use (mysql is not).

Change-Id: Iae81848e883f74b7f8f8f4cad58c2168e01b7321
This commit is contained in:
Mehdi Abaakouk 2017-05-03 16:08:56 +02:00
parent 95f575bf0d
commit de97ef305a
7 changed files with 23 additions and 1 deletions

View File

@ -238,3 +238,7 @@ mod 'corosync',
:git => 'https://github.com/voxpupuli/puppet-corosync',
:ref => 'v5.0.0'
mod 'redis',
:git => 'https://github.com/arioch/puppet-redis',
:ref => '1.2.4'

View File

@ -71,6 +71,7 @@ scenario](#all-in-one).
| vitrage | X | | | | |
| watcher | | | | X | |
| bgpvpn-api | | | | X | |
| redis | X | | | | |
When the Jenkins slave is created, the *run_tests.sh* script will be executed.
This script will execute *install_modules.sh* that prepare /etc/puppet/modules

View File

@ -20,3 +20,4 @@ saz/puppet-memcached
stankevich/puppet-python
theforeman/puppet-dns
voxpupuli/puppet-corosync
arioch/puppet-redis

View File

@ -20,11 +20,13 @@ case $::osfamily {
# panko and vitrage are not packaged yet in debian/ubuntu
$enable_panko = false
$enable_vitrage = false
$enable_redis = false
}
'RedHat': {
$ipv6 = true
$enable_panko = true
$enable_vitrage = true
$enable_redis = true
}
default: {
fail("Unsupported osfamily (${::osfamily})")
@ -64,6 +66,9 @@ 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

View File

@ -32,12 +32,14 @@ class openstack_integration::config (
# different: https://bugs.launchpad.net/swift/+bug/1610064
$memcached_servers = ["inet6:[${host}]:11211"]
$swift_memcached_servers = ["[${host}]:11211"]
$tooz_url = "redis://[${host}]:6379"
} else {
$host = '127.0.0.1'
$rabbit_env = {}
$ip_version = '4'
$memcached_servers = ["${host}:11211"]
$swift_memcached_servers = $memcached_servers
$tooz_url = "redis://${host}:6379"
}
# in URL, brackets are needed

View File

@ -51,7 +51,9 @@ class openstack_integration::gnocchi {
}
class { '::gnocchi::client': }
class { '::gnocchi::metricd': }
class { '::gnocchi::storage': }
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',

7
manifests/redis.pp Normal file
View File

@ -0,0 +1,7 @@
class openstack_integration::redis {
include ::openstack_integration::config
class { '::redis':
bind => $::openstack_integration::config::host
}
}