-
-
Save athirn/2956087 to your computer and use it in GitHub Desktop.
Setup Ubuntu 12.04 EC2 server with StatsD/Bucky/Graphite - see http://github.com/anuaimi/puppet_graphite for latest
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
sudo apt-get update | |
sudo apt-get install -y g++ curl libssl-dev apache2-utils make | |
sudo apt-get install -y git-core | |
# download the Node source, compile and install it | |
cd /opt | |
sudo git clone https://github.com/joyent/node.git | |
cd node | |
sudo git checkout v0.6 | |
sudo ./configure | |
sudo make | |
sudo make install | |
# Install Bucky - https://github.com/cloudant/bucky | |
sudo apt-get install -y python-pip | |
sudo pip install bucky | |
# TODO setup Bucky for receiving Collectd info | |
# Install Forever | |
sudo npm install -g forever | |
# clone the statsd project | |
cd /opt | |
sudo git clone https://github.com/etsy/statsd.git | |
# download everything for graphite | |
sudo mkdir graphite | |
cd graphite/ | |
sudo wget "http://launchpad.net/graphite/0.9/0.9.9/+download/whisper-0.9.9.tar.gz" | |
sudo wget "http://launchpad.net/graphite/0.9/0.9.9/+download/carbon-0.9.9.tar.gz" | |
sudo wget "http://launchpad.net/graphite/0.9/0.9.9/+download/graphite-web-0.9.9.tar.gz" | |
sudo tar xzvf whisper-0.9.9.tar.gz | |
sudo tar xzvf carbon-0.9.9.tar.gz | |
sudo tar xzvf graphite-web-0.9.9.tar.gz | |
# install whisper - Graphite's DB system | |
cd whisper-0.9.9 | |
sudo python setup.py install | |
cd .. | |
# install carbon - the Graphite back-end | |
cd carbon-0.9.9 | |
sudo python setup.py install | |
cd /opt/graphite/conf | |
sudo cp carbon.conf.example carbon.conf | |
# copy the example schema configuration file, and then configure the schema | |
# see: http://graphite.wikidot.com/getting-your-data-into-graphite | |
sudo cp storage-schemas.conf.example storage-schemas.conf | |
# install other graphite dependencies | |
sudo apt-get install -y python-cairo python-django memcached python-memcache python-ldap python-twisted apache2 libapache2-mod-wsgi libapache2-mod-python | |
sudo pip install django-tagging | |
cd /opt/graphite/graphite-web-0.9.9 | |
sudo python setup.py install | |
# copy the graphite vhost example to available sites, edit it to you satisfaction, then link it from sites-enabled | |
sudo cp examples/example-graphite-vhost.conf /etc/apache2/sites-available/graphite.conf | |
sudo cp conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi | |
sudo a2ensite graphite.conf | |
sudo a2dissite default | |
sudo apache2ctl restart | |
# I had to create these log files manually | |
cd /opt/graphite/storage/log/webapp | |
sudo touch info.log | |
sudo chmod 777 info.log | |
sudo touch exception.log | |
sudo chmod 777 exception.log | |
sudo mkdir -p /etc/httpd/wsgi | |
# make sure to change ownership of the storage folder to the Apache user/group - mine was www-data | |
sudo chown -R www-data:www-data /opt/graphite/storage/ | |
cd /opt/graphite/webapp/graphite | |
# copy the local_settings example file to creating the app's settings | |
# this is where both carbon federation and authentication is configured | |
sudo cp local_settings.py.example local_settings.py | |
# run syncdb to setup the db and prime the authentication model (if you're using the DB model) | |
sudo python manage.py syncdb | |
# start the carbon cache | |
cd /opt/graphite/bin | |
sudo python carbon-cache.py start | |
# copy the the statsd config example to create the config file | |
# unless you used non-default ports for some other feature of the system, the defaults in the config file are fine | |
cd /opt/statsd | |
sudo cp exampleConfig.js local.js | |
# start statsd | |
sudo node stats.js local.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment