Blob Blame History Raw
From cdd68a2c4b7e18347d8cc8a0584ba762f22bda3e Mon Sep 17 00:00:00 2001
From: Piotr Popieluch <piotr1212@gmail.com>
Date: Mon, 6 Apr 2015 11:32:19 +0200
Subject: [PATCH] amend fhs

---
 README.md            | 24 ++++++++++++------------
 carbonate/cli.py     |  2 +-
 carbonate/cluster.py |  3 ---
 carbonate/util.py    |  2 +-
 setup.py             |  3 ---
 5 files changed, 14 insertions(+), 20 deletions(-)

diff --git a/README.md b/README.md
index 50d87c6..bc33fd8 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ pip install carbonate
 ```
 ## The Config
 
-Carbonate expects a configuration file that defines the clusters in your environment. The default config file is located at `/opt/graphite/conf/carbonate.conf` or can be provided on the command line. The default cluster is named 'main'.
+Carbonate expects a configuration file that defines the clusters in your environment. The default config file is located at `/etc/carbonate.conf` or can be provided on the command line. The default cluster is named 'main'.
 
 ```
 [main]
@@ -45,7 +45,7 @@ optional arguments:
   -h, --help            show this help message and exit
   -c CONFIG_FILE, --config-file CONFIG_FILE
                         Config file to use (default:
-                        /opt/graphite/conf/carbonate.conf)
+                        /etc/carbonate.conf)
   -C CLUSTER, --cluster CLUSTER
                         Cluster name (default: main)
 ```
@@ -64,7 +64,7 @@ optional arguments:
   -h, --help            show this help message and exit
   -c CONFIG_FILE, --config-file CONFIG_FILE
                         Config file to use (default:
-                        /opt/graphite/conf/carbonate.conf)
+                        /etc/carbonate.conf)
   -C CLUSTER, --cluster CLUSTER
                         Cluster name (default: main)
   -s, --short           Only display the address, without port and cluster
@@ -82,11 +82,11 @@ optional arguments:
   -h, --help            show this help message and exit
   -c CONFIG_FILE, --config-file CONFIG_FILE
                         Config file to use (default:
-                        /opt/graphite/conf/carbonate.conf)
+                        /etc/carbonate.conf)
   -C CLUSTER, --cluster CLUSTER
                         Cluster name (default: main)
   -d STORAGE_DIR, --storage-dir STORAGE_DIR
-                        Storage dir (default: /opt/graphite/storage/whisper)
+                        Storage dir (default: /var/lib/carbon/whisper)
 ```
 
 ### carbon-sieve
@@ -101,7 +101,7 @@ optional arguments:
   -h, --help            show this help message and exit
   -c CONFIG_FILE, --config-file CONFIG_FILE
                         Config file to use (default:
-                        /opt/graphite/conf/carbonate.conf)
+                        /etc/carbonate.conf)
   -C CLUSTER, --cluster CLUSTER
                         Cluster name (default: main)
   -f METRICS_FILE, --metrics-file METRICS_FILE
@@ -127,7 +127,7 @@ optional arguments:
   -h, --help            show this help message and exit
   -c CONFIG_FILE, --config-file CONFIG_FILE
                         Config file to use (default:
-                        /opt/graphite/conf/carbonate.conf)
+                        /etc/carbonate.conf)
   -C CLUSTER, --cluster CLUSTER
                         Cluster name (default: main)
   -f METRICS_FILE, --metrics-file METRICS_FILE
@@ -136,12 +136,12 @@ optional arguments:
   -s SOURCE_NODE, --source-node SOURCE_NODE
                         Override the source for metrics data (default: None)
   -d STORAGE_DIR, --storage-dir STORAGE_DIR
-                        Storage dir (default: /opt/graphite/storage/whisper)
+                        Storage dir (default: /var/lib/carbon/whisper)
   -b BATCH_SIZE, --batch-size BATCH_SIZE
                         Batch size for the rsync job (default: 1000)
   --source-storage-dir SOURCE_STORAGE_DIR
                         Source storage dir (default:
-                        /opt/graphite/storage/whisper)
+                        /var/lib/carbon/whisper)
   --rsync-options [RSYNC_OPTIONS [RSYNC_OPTIONS ...]]
                         Pass option(s) to rsync (default: -azpS)
 ```
@@ -158,7 +158,7 @@ optional arguments:
   -h, --help            show this help message and exit
   -c CONFIG_FILE, --config-file CONFIG_FILE
                         Config file to use (default:
-                        /opt/graphite/conf/carbonate.conf)
+                        /etc/carbonate.conf)
   -C CLUSTER, --cluster CLUSTER
                         Cluster name (default: main)
   -f METRICS_FILE, --metrics-file METRICS_FILE
@@ -169,7 +169,7 @@ optional arguments:
   -p, --prepend         Prepend storage dir to file paths (default: False)
   -d STORAGE_DIR, --storage-dir STORAGE_DIR
                         Whisper storage directory to prepend when -p given
-                        (default: /opt/graphite/storage/whisper)
+                        (default: /var/lib/carbon/whisper)
 ```
 
 ### whisper-aggregate
@@ -186,7 +186,7 @@ optional arguments:
                         '-' to read from STDIN (default: -)
   -d STORAGE_DIR, --storage-dir STORAGE_DIR
                         Whisper storage directory (default:
-                        /opt/graphite/storage/whisper)
+                        /var/lib/carbon/whisper)
 ```
 
 ### whisper-fill
diff --git a/carbonate/cli.py b/carbonate/cli.py
index 5e10b88..a11e503 100644
--- a/carbonate/cli.py
+++ b/carbonate/cli.py
@@ -22,7 +22,7 @@ from .config import Config
 from .cluster import Cluster
 
 
-STORAGE_DIR = '/opt/graphite/storage/whisper'
+STORAGE_DIR = '/var/lib/carbon/whisper'
 
 
 def carbon_hosts():
diff --git a/carbonate/cluster.py b/carbonate/cluster.py
index 4f43723..1425bd5 100644
--- a/carbonate/cluster.py
+++ b/carbonate/cluster.py
@@ -1,8 +1,5 @@
 import sys
 
-# Inject the graphite libs into the system path
-sys.path.insert(0, '/opt/graphite/lib')
-
 # We're going to use carbon's libs directly to do things
 try:
     from carbon import util
diff --git a/carbonate/util.py b/carbonate/util.py
index 813629f..fa1b424 100644
--- a/carbonate/util.py
+++ b/carbonate/util.py
@@ -16,7 +16,7 @@ def common_parser(description='untitled'):
 
     parser.add_argument(
         '-c', '--config-file',
-        default='/opt/graphite/conf/carbonate.conf',
+        default='/etc/carbonate.conf',
         help='Config file to use')
 
     parser.add_argument(
diff --git a/setup.py b/setup.py
index 7017a5c..6a5d78a 100644
--- a/setup.py
+++ b/setup.py
@@ -7,9 +7,6 @@ from setuptools.command.install_scripts import install_scripts
 
 class my_install_scripts(install_scripts):
   def write_script(self, script_name, contents, mode="t", *ignored):
-    contents = re.sub("import sys",
-                      "import sys\nsys.path.append('/opt/graphite/lib')",
-                      contents)
     install_scripts.write_script(self, script_name, contents, mode="t", *ignored)
 
 
-- 
2.1.0