Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,10 @@ Default is `undef` (string) The provider of the django package that should be in

Default is true (Bool). Should packages be installed via pip

#####`gr_python_binary`

Default is 'python' (string). Can be set to a fully-qualify path or an alternative binary name.

#####`gr_disable_webapp_cache`

Default is false (Bool). Should the caching of the webapp be disabled. This helps with some
Expand Down
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

# first init of user db for graphite
exec { 'Initial django db creation':
command => 'python manage.py syncdb --noinput',
command => "${::graphite::gr_python_binary} manage.py syncdb --noinput",
cwd => $graphite_web_managepy_location,
refreshonly => true,
require => $syncdb_require,
Expand Down
2 changes: 1 addition & 1 deletion manifests/config_apache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
mode => '0755',
}
exec { 'fix graphite race condition':
command => 'python /tmp/fix-graphite-race-condition.py',
command => "${::graphite::gr_python_binary} /tmp/fix-graphite-race-condition.py",
cwd => $graphite::graphiteweb_webapp_dir_REAL,
environment => 'DJANGO_SETTINGS_MODULE=graphite.settings',
user => $graphite::config::gr_web_user_REAL,
Expand Down
2 changes: 1 addition & 1 deletion manifests/config_gunicorn.pp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
mode => '0755',
}
exec { 'fix graphite race condition':
command => 'python /tmp/fix-graphite-race-condition.py',
command => "${::graphite::gr_python_binary} /tmp/fix-graphite-race-condition.py",
cwd => $graphite::graphiteweb_webapp_dir_REAL,
environment => 'DJANGO_SETTINGS_MODULE=graphite.settings',
user => $graphite::config::gr_web_user_REAL,
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@
$gr_django_provider = $::graphite::params::django_provider,
$gr_pip_install = true,
$gr_manage_python_packages = true,
$gr_python_binary = $::graphite::params::python_binary,
$gr_disable_webapp_cache = false,
$gr_carbonlink_query_bulk = undef,
$gr_carbonlink_hosts_timeout = '1.0',
Expand Down
3 changes: 3 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
$django_ver = '1.5'
$django_source = undef
$django_provider = 'pip'
$python_binary = 'python'

$install_prefix = '/opt/'

# variables to workaround unusual graphite install target:
# https://github.com/graphite-project/carbon/issues/86
Expand Down
2 changes: 1 addition & 1 deletion templates/etc/init.d/Debian/carbon-aggregator.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Description: Enables Graphites carbon-aggregator data aggregation engine
### END INIT INFO

PYTHON_CMD='python -W ignore'
PYTHON_CMD='<%= scope.lookupvar('graphite::gr_python_binary') %> -W ignore'
CARBON_DAEMON="aggregator"
GRAPHITE_DIR="<%= scope.lookupvar('graphite::base_dir_REAL') %>"
STOP_COUNTER=12 # 12 times 5s -> 60 secs
Expand Down
2 changes: 1 addition & 1 deletion templates/etc/init.d/Debian/carbon-cache.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Description: Enables Graphites carbon-cache data cache engine
### END INIT INFO

PYTHON_CMD='python -W ignore'
PYTHON_CMD='<%= scope.lookupvar('graphite::gr_python_binary') %> -W ignore'
CARBON_DAEMON="cache"
GRAPHITE_DIR="<%= scope.lookupvar('graphite::base_dir_REAL') %>"
STOP_COUNTER=12 # 12 times 5s -> 60 secs
Expand Down
2 changes: 1 addition & 1 deletion templates/etc/init.d/Debian/carbon-relay.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Description: Enables Graphites carbon-relay
### END INIT INFO

PYTHON_CMD='python -W ignore'
PYTHON_CMD='<%= scope.lookupvar('graphite::gr_python_binary') %> -W ignore'
CARBON_DAEMON="relay"
GRAPHITE_DIR="<%= scope.lookupvar('graphite::base_dir_REAL') %>"
STOP_COUNTER=12 # 12 times 5s -> 60 secs
Expand Down
2 changes: 1 addition & 1 deletion templates/etc/init.d/RedHat/carbon-aggregator.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Source function library.
. /etc/rc.d/init.d/functions

PYTHON_CMD='python -W ignore'
PYTHON_CMD='<%= scope.lookupvar('graphite::gr_python_binary') %> -W ignore'
CARBON_DAEMON="aggregator"
GRAPHITE_DIR="<%= scope.lookupvar('graphite::base_dir_REAL') %>"
PIDFILE_DIR="<%= scope.lookupvar('graphite::storage_dir_REAL') %>"
Expand Down
2 changes: 1 addition & 1 deletion templates/etc/init.d/RedHat/carbon-cache.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Source function library.
. /etc/rc.d/init.d/functions

PYTHON_CMD='python -W ignore'
PYTHON_CMD='<%= scope.lookupvar('graphite::gr_python_binary') %> -W ignore'
CARBON_DAEMON="cache"
GRAPHITE_DIR="<%= scope.lookupvar('graphite::base_dir_REAL') %>"
PIDFILE_DIR="<%= scope.lookupvar('graphite::storage_dir_REAL') %>"
Expand Down
2 changes: 1 addition & 1 deletion templates/etc/init.d/RedHat/carbon-relay.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Source function library.
. /etc/rc.d/init.d/functions

PYTHON_CMD='python -W ignore'
PYTHON_CMD='<%= scope.lookupvar('graphite::gr_python_binary') %> -W ignore'
CARBON_DAEMON="relay"
GRAPHITE_DIR="<%= scope.lookupvar('graphite::base_dir_REAL') %>"
PIDFILE_DIR="<%= scope.lookupvar('graphite::storage_dir_REAL') %>"
Expand Down