Blob Blame History Raw
From a5bdc82eb81f892b4970e21e63711a9538f27673 Mon Sep 17 00:00:00 2001
From: Piotr Popieluch <piotr1212@gmail.com>
Date: Sat, 1 Oct 2016 14:07:44 +0200
Subject: [PATCH] Amend default filesystem locations

---
 conf/graphite.wsgi.example                |  2 +-
 setup.py                                  |  2 +-
 webapp/graphite/local_settings.py.example | 11 +++++++++++
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/conf/graphite.wsgi.example b/conf/graphite.wsgi.example
index 84ac302..04e4e6f 100755
--- a/conf/graphite.wsgi.example
+++ b/conf/graphite.wsgi.example
@@ -1,4 +1,4 @@
 import sys
-sys.path.append('/opt/graphite/webapp')
+sys.path.append('/usr/share/graphite/webapp')
 
 from graphite.wsgi import application
diff --git a/setup.py b/setup.py
index 263389b..6aa7679 100644
--- a/setup.py
+++ b/setup.py
@@ -93,7 +93,7 @@ try:
       package_data={'graphite' :
         ['templates/*', 'local_settings.py.example']},
       scripts=glob('bin/*'),
-      data_files=webapp_content.items() + storage_dirs + conf_files + examples,
+      data_files=webapp_content.items(),
       install_requires=['Django>=1.8,<1.9.99', 'django-tagging==0.4.3', 'pytz', 'pyparsing', 'cairocffi', 'urllib3', 'scandir'],
       classifiers=[
           'Intended Audience :: Developers',
diff --git a/webapp/graphite/local_settings.py.example b/webapp/graphite/local_settings.py.example
index 3b773cb..3b12291 100644
--- a/webapp/graphite/local_settings.py.example
+++ b/webapp/graphite/local_settings.py.example
@@ -80,6 +80,7 @@
 # Change only GRAPHITE_ROOT if your install is merely shifted from /opt/graphite
 # to somewhere else
 #GRAPHITE_ROOT = '/opt/graphite'
+GRAPHITE_ROOT = '/usr/share/graphite'
 
 # Most installs done outside of a separate tree such as /opt/graphite will
 # need to change these settings. Note that the default settings for each
@@ -89,6 +90,11 @@
 #STATIC_ROOT = '/opt/graphite/static'
 #LOG_DIR = '/opt/graphite/storage/log/webapp'
 #INDEX_FILE = '/opt/graphite/storage/index'     # Search index file
+CONF_DIR = '/etc/graphite-web'
+STORAGE_DIR = '/var/lib/graphite-web'
+LOG_DIR = '/var/log/graphite-web/'
+INDEX_FILE = '/var/lib/graphite-web/index'
+WEBAPP_DIR = '/usr/share/graphite/webapp'
 
 # To further or fully customize the paths, modify the following. Note that the
 # default settings for each of these are relative to CONF_DIR and STORAGE_DIR
@@ -96,6 +102,8 @@
 ## Webapp config files
 #DASHBOARD_CONF = '/opt/graphite/conf/dashboard.conf'
 #GRAPHTEMPLATES_CONF = '/opt/graphite/conf/graphTemplates.conf'
+DASHBOARD_CONF = '/etc/graphite-web/dashboard.conf'
+GRAPHTEMPLATES_CONF = '/etc/graphite-web/graphTemplates.conf'
 
 ## Data directories
 #
@@ -107,6 +115,9 @@
 #
 # Data directories using the "Standard" metrics finder (i.e. not Ceres)
 #STANDARD_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables
+WHISPER_DIR = '/var/lib/carbon/whisper'
+RRD_DIR = '/var/lib/carbon/rrd'
+DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables
 
 
 #####################################
-- 
2.7.4