diff --git a/manifests/install.pp b/manifests/install.pp index 68b14902..2fcc333f 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -71,6 +71,17 @@ }-> package{'whisper': ensure => $::graphite::params::whisperVersion, + }-> + + # workaround for unusual graphite install target: + # https://github.com/graphite-project/carbon/issues/86 + file { $::graphite::params::carbin_pip_hack_source : + ensure => link, + target => $::graphite::params::carbin_pip_hack_target, + }-> + file { $::graphite::params::gweb_pip_hack_source : + ensure => link, + target => $::graphite::params::gweb_pip_hack_target, } } diff --git a/manifests/params.pp b/manifests/params.pp index 630b584d..3b2cecdf 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -27,6 +27,7 @@ $enable_carbon_relay = false $nginxconf_dir = '/etc/nginx/sites-available' + case $::osfamily { 'debian': { $apache_pkg = 'apache2' @@ -38,6 +39,13 @@ $apache_dir = '/etc/apache2' $web_user = 'www-data' $python_dev_pkg = 'python-dev' + + # see https://github.com/graphite-project/carbon/issues/86 + $carbin_pip_hack_source = "/usr/lib/python2.7/dist-packages/carbon-${carbonVersion}-py2.7.egg-info" + $carbin_pip_hack_target = "/opt/graphite/lib/carbon-${carbonVersion}-py2.7.egg-info" + $gweb_pip_hack_source = "/usr/lib/python2.7/dist-packages/graphite_web-${carbonVersion}-py2.7.egg-info" + $gweb_pip_hack_source = "/opt/graphite/webapp/graphite_web-${carbonVersion}-py2.7.egg-info " + $graphitepkgs = [ 'python-cairo', 'python-twisted', @@ -59,6 +67,24 @@ $apache_dir = '/etc/httpd' $web_user = 'apache' $python_dev_pkg = 'python-devel' + + # see https://github.com/graphite-project/carbon/issues/86 + case $::lsbmajdistrelease { + '6': { + $carbin_pip_hack_source = "/usr/lib/python2.6/site-packages/carbon-${carbonVersion}-py2.6.egg-info" + $carbin_pip_hack_target = "/opt/graphite/lib/carbon-${carbonVersion}-py2.6.egg-info" + $gweb_pip_hack_source = "/usr/lib/python2.6/site-packages/graphite_web-${graphiteVersion}-py2.6.egg-info " + $gweb_pip_hack_target = "/opt/graphite/webapp/carbon-${graphiteVersion}-py2.6.egg-info" + } + '7': { + $carbin_pip_hack_source = "/usr/lib/python2.7/site-packages/carbon-${carbonVersion}-py2.7.egg-info" + $carbin_pip_hack_target = "/opt/graphite/lib/carbon-${carbonVersion}-py2.7.egg-info" + $gweb_pip_hack_source = "/usr/lib/python2.7/site-packages/graphite_web-${graphiteVersion}-py2.7.egg-info " + $gweb_pip_hack_target = "/opt/graphite/webapp/carbon-${graphiteVersion}-py2.7.egg-info" + } + default: {fail('Unsupported Redhat release')} + } + $graphitepkgs = [ 'pycairo', 'Django14',