Blob Blame History Raw
From 2f3bcf7f272f1a69c9b7465e74845be9643c9377 Mon Sep 17 00:00:00 2001
From: Jamie Nguyen <j@jamielinux.com>
Date: Wed, 1 Oct 2014 14:49:09 +0100
Subject: [PATCH] Amend default filesystem locations

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

diff --git a/conf/graphite.wsgi.example b/conf/graphite.wsgi.example
index 0527f53..fcb7a41 100755
--- a/conf/graphite.wsgi.example
+++ b/conf/graphite.wsgi.example
@@ -1,6 +1,6 @@
 import os
 import sys
-sys.path.append('/opt/graphite/webapp')
+sys.path.append('/usr/share/graphite/webapp')
 
 try:
     from importlib import import_module
diff --git a/setup.py b/setup.py
index 78d2b20..4dc0ce0 100644
--- a/setup.py
+++ b/setup.py
@@ -87,7 +87,7 @@
       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(),
       **setup_kwargs
     )
 finally:
diff --git a/webapp/graphite/local_settings.py.example b/webapp/graphite/local_settings.py.example
index 73a0c57..d6f9857 100644
--- a/webapp/graphite/local_settings.py.example
+++ b/webapp/graphite/local_settings.py.example
@@ -54,7 +54,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 only
 # need to change these three settings. Note that the default settings for each
@@ -62,6 +62,9 @@
 #CONF_DIR = '/opt/graphite/conf'
 #STORAGE_DIR = '/opt/graphite/storage'
 #CONTENT_DIR = '/opt/graphite/webapp/content'
+CONF_DIR = '/etc/graphite-web'
+STORAGE_DIR = '/var/lib/graphite-web'
+CONTENT_DIR = '/usr/share/graphite/webapp/content'
 
 # 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
@@ -69,6 +72,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
 # NOTE: If any directory is unreadable in DATA_DIRS it will break metric browsing
@@ -77,7 +82,11 @@
 #DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables
 #LOG_DIR = '/opt/graphite/storage/log/webapp'
 #INDEX_FILE = '/opt/graphite/storage/index'  # Search index file
-
+WHISPER_DIR = '/var/lib/carbon/whisper'
+RRD_DIR = '/var/lib/carbon/rrd'
+DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables
+LOG_DIR = '/var/log/graphite-web/'
+INDEX_FILE = '/var/lib/graphite-web/index'  # Search index file
 
 #####################################
 # Email Configuration #
-- 
1.9.3