Skip to content

Instantly share code, notes, and snippets.

@EntilZha
Created July 2, 2014 22:34
Show Gist options
  • Save EntilZha/dcea1ad24d126105d9c3 to your computer and use it in GitHub Desktop.
Save EntilZha/dcea1ad24d126105d9c3 to your computer and use it in GitHub Desktop.
install_graphite_server
if [[ ! -f "/opt/graphite/bin/carbon-cache.py" ]]; then
wget -qNP /tmp https://github.com/downloads/graphite-project/whisper/whisper-0.9.10.tar.gz
tar -C /tmp -zxf /tmp/whisper-0.9.10.tar.gz
cd /tmp/whisper-0.9.10
python setup.py install
wget -qNP /tmp https://github.com/downloads/graphite-project/carbon/carbon-0.9.10.tar.gz
tar -C /tmp -zxf /tmp/carbon-0.9.10.tar.gz
cd /tmp/carbon-0.9.10
python setup.py install
rm -rf /opt/graphite/storage
mkdir /mnt/graphite_storage
chown www-data:www-data /mnt/graphite_storage
ln -s /mnt/graphite_storage /opt/graphite/storage
fi
@EntilZha
Copy link
Author

EntilZha commented Jul 2, 2014

tar (child): /tmp/whisper-0.9.10.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
/tmp/install_graphite_server: line 4: cd: /tmp/whisper-0.9.10: No such file or directory
python: can't open file 'setup.py': [Errno 2] No such file or directory
tar (child): /tmp/carbon-0.9.10.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
/tmp/install_graphite_server: line 9: cd: /tmp/carbon-0.9.10: No such file or directory
python: can't open file 'setup.py': [Errno 2] No such file or directory
ln: failed to create symbolic link `/opt/graphite/storage': No such file or directory

@EntilZha
Copy link
Author

EntilZha commented Jul 2, 2014

  * 2014-07-02 19:59:23 executing `rubber:graphite:server:install'
    servers: ["snowgeek.snowgeek.org"]
 ** sftp upload #<StringIO:0x007f9dc3e90058> -> /tmp/install_graphite_server
    [snowgeek.snowgeek.org] /tmp/install_graphite_server
    [snowgeek.snowgeek.org] done
  * sftp upload complete
  * executing "sudo -p 'sudo password: '  bash -l /tmp/install_graphite_server"
    servers: ["snowgeek.snowgeek.org"]
    [snowgeek.snowgeek.org] executing command
 ** [out :: snowgeek.snowgeek.org] tar (child):
 ** [out :: snowgeek.snowgeek.org] /tmp/0.9.10.tar.gz: Cannot open
 ** [out :: snowgeek.snowgeek.org] : No such file or directory
 ** [out :: snowgeek.snowgeek.org]
 ** [out :: snowgeek.snowgeek.org] tar (child):
 ** [out :: snowgeek.snowgeek.org] Error is not recoverable: exiting now
 ** [out :: snowgeek.snowgeek.org]
 ** [out :: snowgeek.snowgeek.org] tar:
 ** [out :: snowgeek.snowgeek.org] Child returned status 2
 ** [out :: snowgeek.snowgeek.org]
 ** [out :: snowgeek.snowgeek.org] tar:
 ** [out :: snowgeek.snowgeek.org] Error is not recoverable: exiting now
 ** [out :: snowgeek.snowgeek.org]
    command finished in 1845ms
failed: "/bin/bash -l -c 'sudo -p '\\''sudo password: '\\''  bash -l /tmp/install_graphite_server'" on snowgeek.snowgeek.org

@EntilZha
Copy link
Author

EntilZha commented Jul 2, 2014

cat /tmp/install_graphite_server

function error_exit { exit 99; }; trap error_exit ERR
          if [[ ! -f "/opt/graphite/bin/carbon-cache.py" ]]; then
            wget -qNP /tmp https://github.com/graphite-project/whisper/archive/0.9.10.tar.gz -O whisper-0.9.10.tar.gz
            tar -C /tmp -zxf /tmp/0.9.10.tar.gz
            cd /tmp/0.9.10
            python setup.py install

            wget -qNP /tmp https://github.com/graphite-project/carbon/archive/0.9.10.tar.gz -O carbon-0.9.10.tar.gz
            tar -C /tmp -zxf /tmp/0.9.10.tar.gz
            cd /tmp/0.9.10
            python setup.py install

            rm -rf /opt/graphite/storage
            mkdir /mnt/graphite_storage
            chown www-data:www-data /mnt/graphite_storage
            ln -s /mnt/graphite_storage /opt/graphite/storage
          fi

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