Permalink
Browse files

create a graphite user that owns all the graphite-related stuff

  • Loading branch information...
1 parent c7ac829 commit fed6c58e4f4fb287ea0924f0e6e153e47ccb647d @jamesgolick committed Dec 11, 2010
Showing with 27 additions and 0 deletions.
  1. +9 −0 SPECS/carbon.spec
  2. +9 −0 SPECS/graphite-web.spec
  3. +9 −0 SPECS/whisper.spec
View
@@ -8,15 +8,24 @@ Group: Monitoring
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-buildroot
requires: python python-twisted
+Requires(pre): shadow-utils
%description
Graphite's metric collector.
+%pre
+getent group graphite > /dev/null || groupadd -r graphite
+getent passwd graphite > /dev/null || \
+ useradd -r -g graphite -d /opt/graphite -s /sbin/nologin \
+ -c "User for graphite/carbon/whisper." graphite
+exit 0
+
%prep
%setup -q
%install
python setup.py install --root $RPM_BUILD_ROOT
%files
+%defattr(-,graphite,graphite)
/opt/graphite/*
View
@@ -7,16 +7,25 @@ License: GPL
Group: Monitoring
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-buildroot
+Requires(pre): shadow-utils
requires: python pycairo python-ldap python-django python-simplejson mod_python python-memcached python-sqlite2 rrdtool-python
%description
Graphite web interface.
+%pre
+getent group graphite > /dev/null || groupadd -r graphite
+getent passwd graphite > /dev/null || \
+ useradd -r -g graphite -d /opt/graphite -s /sbin/nologin \
+ -c "User for graphite/carbon/whisper." graphite
+exit 0
+
%prep
%setup -q
%install
python setup.py install --root $RPM_BUILD_ROOT
%files
+%defattr(-,graphite,graphite)
/opt/graphite/*
View
@@ -7,8 +7,16 @@ License: GPL
Group: Monitoring
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-buildroot
+Requires(pre): shadow-utils
requires: python
+%pre
+getent group graphite > /dev/null || groupadd -r graphite
+getent passwd graphite > /dev/null || \
+ useradd -r -g graphite -d /opt/graphite -s /sbin/nologin \
+ -c "User for graphite/carbon/whisper." graphite
+exit 0
+
%prep
%setup -q
@@ -19,6 +27,7 @@ Whisper metrics database.
python setup.py install --root $RPM_BUILD_ROOT
%files
+%defattr(-,graphite,graphite)
/usr/bin/rrd2whisper.py
/usr/bin/rrd2whisper.pyc
/usr/bin/rrd2whisper.pyo

0 comments on commit fed6c58

Please sign in to comment.