Correct graphite paths.

Some paths were not set correctly in graphite config files.

Fix up permissions in /var/lib/graphite.

Use 'service', but don't ensure it's running.

Change-Id: I363319473a332c16687e16887bfe83e1468c8ece
Reviewed-on: https://review.openstack.org/17617
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
James E. Blair 2012-12-06 17:58:21 +00:00 committed by Jenkins
parent 469dfc8c76
commit af41d6d35e
4 changed files with 24 additions and 40 deletions

View File

@ -31,7 +31,8 @@ class graphite(
path => '/bin:/usr/bin',
refreshonly => true,
subscribe => Vcsrepo['/opt/graphite-web'],
require => Exec['install_carbon'],
require => [Exec['install_carbon'],
File['/var/lib/graphite/storage']]
}
vcsrepo { '/opt/carbon':
@ -47,7 +48,8 @@ class graphite(
path => '/bin:/usr/bin',
refreshonly => true,
subscribe => Vcsrepo['/opt/carbon'],
require => Exec['install_whisper'],
require => [Exec['install_whisper'],
File['/var/lib/graphite/storage']]
}
vcsrepo { '/opt/whisper':
@ -80,9 +82,14 @@ class graphite(
file { '/var/lib/graphite':
ensure => directory,
}
file { '/var/lib/graphite/storage':
ensure => directory,
owner => 'www-data',
group => 'www-data',
require => Package['apache2'],
require => [Package['apache2'],
File['/var/lib/graphite']]
}
file { '/var/log/graphite':
@ -188,46 +195,22 @@ class graphite(
source => 'puppet:///modules/graphite/statsd.default'
}
file { ['/etc/rc0.d/K10carbon-cache',
'/etc/rc1.d/K10carbon-cache',
'/etc/rc2.d/S90carbon-cache',
'/etc/rc3.d/S90carbon-cache',
'/etc/rc4.d/S90carbon-cache',
'/etc/rc5.d/S90carbon-cache',
'/etc/rc6.d/K10carbon-cache']:
ensure => link,
target => '/etc/init.d/carbon-cache',
require => File['/etc/init.d/carbon-cache'],
}
exec { 'carbon-cache-start':
command => '/etc/init.d/carbon-cache start',
require => [File['/etc/init.d/carbon-cache'],
service { 'carbon-cache':
name => 'carbon-cache',
enable => true,
hasrestart => true,
require => [File['/etc/init.d/carbon-cache'],
File['/etc/graphite/carbon.conf'],
Exec['install_carbon']],
subscribe => File['/etc/init.d/carbon-cache'],
refreshonly => true,
}
file { ['/etc/rc0.d/K10statsd',
'/etc/rc1.d/K10statsd',
'/etc/rc2.d/S90statsd',
'/etc/rc3.d/S90statsd',
'/etc/rc4.d/S90statsd',
'/etc/rc5.d/S90statsd',
'/etc/rc6.d/K10statsd']:
ensure => link,
target => '/etc/init.d/statsd',
require => File['/etc/init.d/statsd'],
}
exec { 'statsd-start':
command => '/etc/init.d/statsd start',
require => [File['/etc/init.d/statsd'],
service { 'statsd':
name => 'statsd',
enable => true,
hasrestart => true,
require => [File['/etc/init.d/statsd'],
File['/etc/statsd/config.js'],
Vcsrepo['/opt/statsd']],
subscribe => File['/etc/init.d/statsd'],
refreshonly => true,
}
}

View File

@ -23,10 +23,11 @@
#
# For FHS style directory structures, use:
#
STORAGE_DIR = /var/lib/graphite/
STORAGE_DIR = /var/lib/graphite/storage/
CONF_DIR = /etc/graphite/
LOG_DIR = /var/log/graphite/
PID_DIR = /var/run/
LOCAL_DATA_DIR = /var/lib/graphite/storage/whisper/
#
#LOCAL_DATA_DIR = /opt/graphite/storage/whisper/

View File

@ -25,7 +25,7 @@
WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
WSGIProcessGroup graphite
WSGIApplicationGroup %{GLOBAL}
SetEnv GRAPHITE_STORAGE_DIR /var/lib/graphite
SetEnv GRAPHITE_STORAGE_DIR /var/lib/graphite/storage
WSGIImportScript /etc/graphite/graphite.wsgi process-group=graphite application-group=%{GLOBAL}
# XXX You will need to create this file! There is a graphite.wsgi.example

View File

@ -1,3 +1,3 @@
STORAGE_DIR = '/var/lib/graphite/'
STORAGE_DIR = '/var/lib/graphite/storage/'
CONF_DIR = '/etc/graphite/'
LOG_DIR = '/var/log/graphite/'