Skip to content

Commit

Permalink
adding workaround for odd pip install location, see graphite-project/…
Browse files Browse the repository at this point in the history
  • Loading branch information
robbyt committed Mar 31, 2014
1 parent 3b750aa commit de1c2a8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
11 changes: 11 additions & 0 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

}
26 changes: 26 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
$enable_carbon_relay = false
$nginxconf_dir = '/etc/nginx/sites-available'


case $::osfamily {
'debian': {
$apache_pkg = 'apache2'
Expand All @@ -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',
Expand All @@ -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',
Expand Down

0 comments on commit de1c2a8

Please sign in to comment.