Skip to content

Instantly share code, notes, and snippets.

@constantine-nikolaou
Forked from collegeman/setup-statsd.sh
Created September 9, 2012 15:08
Show Gist options
  • Select an option

  • Save constantine-nikolaou/3684920 to your computer and use it in GitHub Desktop.

Select an option

Save constantine-nikolaou/3684920 to your computer and use it in GitHub Desktop.

Revisions

  1. constantine-nikolaou revised this gist Sep 9, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@ sudo python setup.py install
    popd
    # install carbon - the Graphite back-end
    cd carbon-0.9.10
    python setup.py install
    sudo python setup.py install
    cd /opt/graphite/conf
    cp carbon.conf.example carbon.conf
    # copy the example schema configuration file, and then configure the schema
    @@ -42,7 +42,7 @@ sudo apt-get install python-ldap
    sudo apt-get install python-twisted
    sudo apt-get install apache2 libapache2-mod-python
    cd ~/graphite/graphite-web-0.9.10
    python setup.py install
    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 example-graphite-vhost.conf /etc/apache2/sites-available/graphite.conf
    sudo ln -s /etc/apache2/sites-available/graphite.conf /etc/apache2/sites-enabled/graphite.conf
  2. constantine-nikolaou revised this gist Sep 9, 2012. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -44,9 +44,9 @@ sudo apt-get install apache2 libapache2-mod-python
    cd ~/graphite/graphite-web-0.9.10
    python setup.py install
    # copy the graphite vhost example to available sites, edit it to you satisfaction, then link it from sites-enabled
    cp example-graphite-vhost.conf /etc/apache2/sites-available/graphite.conf
    ln -s /etc/apache2/sites-available/graphite.conf /etc/apache2/sites-enabled/graphite.conf
    apache2ctl restart
    sudo cp example-graphite-vhost.conf /etc/apache2/sites-available/graphite.conf
    sudo ln -s /etc/apache2/sites-available/graphite.conf /etc/apache2/sites-enabled/graphite.conf
    sudo apache2ctl restart
    # I had to create these log files manually
    /opt/graphite/storage/log/webapp
    touch info.log
    @@ -55,10 +55,10 @@ touch exception.log
    chmod 777 exception.log
    # 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
    sudo 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
    cp local_settings.py.example local_settings.py
    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
  3. constantine-nikolaou revised this gist Sep 9, 2012. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -15,18 +15,18 @@ git clone https://github.com/etsy/statsd.git
    # download everything for graphite
    mkdir graphite
    cd graphite/
    wget "http://launchpad.net/graphite/trunk/0.9.6/+download/carbon-0.9.6.tar.gz"
    wget "http://launchpad.net/graphite/trunk/0.9.6/+download/whisper-0.9.6.tar.gz"
    wget "http://launchpad.net/graphite/trunk/0.9.6/+download/graphite-web-0.9.6.tar.gz"
    tar xzvf whisper-0.9.6.tar.gz
    tar xzvf carbon-0.9.6.tar.gz
    tar xzvf graphite-web-0.9.6.tar.gz
    wget "https://launchpad.net/graphite/0.9/0.9.10/+download/carbon-0.9.10.tar.gz"
    wget "https://launchpad.net/graphite/0.9/0.9.10/+download/whisper-0.9.10.tar.gz"
    wget "https://launchpad.net/graphite/0.9/0.9.10/+download/graphite-web-0.9.10.tar.gz"
    tar xzvf whisper-0.9.10.tar.gz
    tar xzvf carbon-0.9.10.tar.gz
    tar xzvf graphite-web-0.9.10.tar.gz
    # install whisper - Graphite's DB system
    cd whisper-0.9.6
    cd whisper-0.9.10
    sudo python setup.py install
    popd
    # install carbon - the Graphite back-end
    cd carbon-0.9.6
    cd carbon-0.9.10
    python setup.py install
    cd /opt/graphite/conf
    cp carbon.conf.example carbon.conf
    @@ -41,7 +41,7 @@ sudo apt-get install python-memcache
    sudo apt-get install python-ldap
    sudo apt-get install python-twisted
    sudo apt-get install apache2 libapache2-mod-python
    cd ~/graphite/graphite-web-0.9.6
    cd ~/graphite/graphite-web-0.9.10
    python setup.py install
    # copy the graphite vhost example to available sites, edit it to you satisfaction, then link it from sites-enabled
    cp example-graphite-vhost.conf /etc/apache2/sites-available/graphite.conf
  4. @collegeman collegeman revised this gist Apr 19, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -62,7 +62,7 @@ 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
    /opt/graphite/bin/carbon-cache.py start
    cd /opt/graphite/bin/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 ~/statsd
  5. @collegeman collegeman created this gist Mar 9, 2011.
    71 changes: 71 additions & 0 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,71 @@
    # install git
    sudo apt-get install g++ curl libssl-dev apache2-utils
    sudo apt-get install git-core
    # download the Node source, compile and install it
    git clone https://github.com/joyent/node.git
    cd node
    ./configure
    make
    sudo make install
    # install the Node package manager for later use
    curl http://npmjs.org/install.sh | sudo sh
    npm install express
    # clone the statsd project
    git clone https://github.com/etsy/statsd.git
    # download everything for graphite
    mkdir graphite
    cd graphite/
    wget "http://launchpad.net/graphite/trunk/0.9.6/+download/carbon-0.9.6.tar.gz"
    wget "http://launchpad.net/graphite/trunk/0.9.6/+download/whisper-0.9.6.tar.gz"
    wget "http://launchpad.net/graphite/trunk/0.9.6/+download/graphite-web-0.9.6.tar.gz"
    tar xzvf whisper-0.9.6.tar.gz
    tar xzvf carbon-0.9.6.tar.gz
    tar xzvf graphite-web-0.9.6.tar.gz
    # install whisper - Graphite's DB system
    cd whisper-0.9.6
    sudo python setup.py install
    popd
    # install carbon - the Graphite back-end
    cd carbon-0.9.6
    python setup.py install
    cd /opt/graphite/conf
    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
    cp storage-schemas.conf.example storage-schemas.conf
    # install other graphite dependencies
    sudo apt-get install python-cairo
    sudo apt-get install python-django
    sudo apt-get install memcached
    sudo apt-get install python-memcache
    sudo apt-get install python-ldap
    sudo apt-get install python-twisted
    sudo apt-get install apache2 libapache2-mod-python
    cd ~/graphite/graphite-web-0.9.6
    python setup.py install
    # copy the graphite vhost example to available sites, edit it to you satisfaction, then link it from sites-enabled
    cp example-graphite-vhost.conf /etc/apache2/sites-available/graphite.conf
    ln -s /etc/apache2/sites-available/graphite.conf /etc/apache2/sites-enabled/graphite.conf
    apache2ctl restart
    # I had to create these log files manually
    /opt/graphite/storage/log/webapp
    touch info.log
    chmod 777 info.log
    touch exception.log
    chmod 777 exception.log
    # 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
    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
    /opt/graphite/bin/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 ~/statsd
    cp exampleConfig.js local.js
    # start statsd
    node stats.js local.js