Last active
January 12, 2017 18:22
-
-
Save nicwaller/b63d67a8571dee39df16e564d47e35b1 to your computer and use it in GitHub Desktop.
[CURRENTLY NOT WORKING] Install Graphite in a virtualenv on macOS Sierra (10.12)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install Graphite | |
mkdir graphite && cd graphite | |
virtualenv venv | |
venv/bin/pip install Django==1.8 django-tagging | |
# You might need to do this instead: venv/bin/pip install --user Django==1.8 | |
venv/bin/pip install carbon whisper graphite-web Twisted==15.2 | |
# Configure Graphite | |
pushd venv/conf | |
cp carbon.conf.example carbon.conf | |
cp storage-schemas.conf.example storage-schemas.conf | |
popd | |
# Configure Graphite webapp | |
#pushd venv/webapp | |
#cp local_settings.py.example local_settings.py | |
## You may want to customize the database backend in local_settings.py | |
#popd | |
# Augh why is the virtualenv install so terrible | |
cp venv/lib/python2.7/site-packages/opt/graphite/webapp/graphite/local_settings.py{.example,} | |
venv/bin/python venv/lib/python2.7/site-packages/opt/graphite/webapp/graphite/manage.py syncdb | |
# Graphite doesn't play nice with virtualenv, so fix some paths | |
mv venv/lib/python2.7/site-packages/opt/graphite/lib/carbon venv/lib/python2.7/site-packages | |
mv venv/lib/python2.7/site-packages/opt/graphite/lib/twisted/plugins/carbon_* venv/lib/python2.7/site-packages/twisted/plugins/ | |
# Start the Graphite backend (carbon-cache) | |
venv/bin/python venv/bin/carbon-cache.py start | |
# carbon-cache.py automatically daemonizes. You can send start/stop/status to it. | |
# Start the Graphite frontend (graphite-web) | |
# You have to activate the virtualenv so that PATH is set correctly for Django | |
source venv/bin/activate | |
export PYTHONPATH=venv/lib/python2.7/site-packages/opt/graphite/webapp | |
python venv/bin/run-graphite-devel-server.py venv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment