summaryrefslogtreecommitdiffstats
path: root/sites/elchstats.nsupdate.info/graphite.journal.txt
blob: 777f4650497cc7449407bdd4108ecdff557d5c42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#?/bin/sh
set -euf
# from http://graphite.wikidot.com/installation

git clone https://github.com/graphite-project/graphite-web.git
git clone https://github.com/graphite-project/carbon.git
git clone https://github.com/graphite-project/whisper.git

pacman -S python2 gcc pkg-config cairo python2-pip
for i in whisper carbon graphite-web;do
  cd $i
  pip2 install -r requirements.txt||:
  python2 setup.py install
  cd -
done
cd /opt/graphite/conf
cp carbon.conf.example carbon.conf
# edit carbon.conf, fix max writes per second, max adds per minute
cp storage-schemas.conf.example storage-schemas.conf

# edit storage-schemas.conf, fix storage time
cd /opt/graphite/webapp/graphite
cp local_settings.py.example local_settings.py
# change SECRET_KEY
PYTHONPATH=/opt/graphite/webapp django-admin.py syncdb --settings=graphite.settings
# push in the texts

useradd -m graphite -d /opt/graphite -r
chown -R graphite /opt/graphite
cd  _here_
cp carbon.service /opt/systemd/system/
systemctl enable carbon
systemctl start carbon
cp graphite-web.service /opt/systemd/system/
systemctl enable graphite-web
systemctl start graphite-web