Skip to content

Instantly share code, notes, and snippets.

@kkc
Forked from caged/graphite.md
Last active December 27, 2015 17:49
Show Gist options
  • Save kkc/7365634 to your computer and use it in GitHub Desktop.
Save kkc/7365634 to your computer and use it in GitHub Desktop.

install graphite (http://graphite.wikidot.com) on AWS ubuntu 12.04. Fix py2cairo installation problem on virtualenv environment. Please fork and fix if you find an error.

Install Cairo

sudo apt-get install libcairo2-dev

Instally py2cairo

#git clone git://git.cairographics.org/git/py2cairo
wget http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2
tar xvjf py2cairo-1.10.0.tar.bz2 && cd py2cairo-1.10.0
./waf configure --prefix=/path/to/virtualenv
./waf build
./waf install

Install Graphite and Dependencies

pip install 'Twisted<12.0'
pip install carbon
pip install whisper
pip install django
pip install django-tagging
pip install graphite-web

Create default database

cd /opt/graphite/webapp/graphite
python manage.py syncdb
sudo chown -R nobody:nobody /opt/graphite/storage/

Move example configs

cd /opt/graphite/conf
cp storage-schemas.conf.example storage-schemas.conf
cp carbon.conf.example carbon.conf

Carbon scripts are installed in /usr/local/share/python. Need to symlink

mkdir /opt/graphite/bin
ln -s /usr/local/share/python/carbon-cache.py bin

Start carbon

python ./bin/carbon-cache.py start

Start Graphite

python /usr/local/share/python/run-graphite-devel-server.py /opt/graphite

Hope like hell it works

http://localhost:8080

If it works correclty you should see a black image with "No Data" in the Graphite Composer. If you see a broken image, it's probably something to do with py2cairo and cairo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment