Last active
December 19, 2015 10:19
-
-
Save stephen-mw/5939175 to your computer and use it in GitHub Desktop.
OpenTSDB Server Installation Bootstrap
This file contains hidden or 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 | |
set -e | |
# Installs Hbase and OpenTSDB to /opt | |
# Will start OpenTSDB listening on 0.0.0.0:4242 | |
apt-get install -y vim git-core autoconf openjdk-7-jdk gnuplot-nox make | |
export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::") | |
pushd /opt | |
wget http://apache.cs.utah.edu/hbase/stable/hbase-0.94.9.tar.gz . | |
tar xvf hbase-0.94.9.tar.gz | |
rm hbase-0.94.9.tar.gz | |
mv hbase-0.94.9 hbase | |
pushd hbase | |
mkdir data | |
hbase_rootdir=/opt/hbase | |
iface=lo`uname | sed -n s/Darwin/0/p` | |
cat >conf/hbase-site.xml <<EOF | |
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<configuration> | |
<property> | |
<name>hbase.rootdir</name> | |
<value>file:///$hbase_rootdir/hbase-\${user.name}/hbase</value> | |
</property> | |
<property> | |
<name>hbase.zookeeper.dns.interface</name> | |
<value>$iface</value> | |
</property> | |
<property> | |
<name>hbase.regionserver.dns.interface</name> | |
<value>$iface</value> | |
</property> | |
<property> | |
<name>hbase.master.dns.interface</name> | |
<value>$iface</value> | |
</property> | |
</configuration> | |
EOF | |
./bin/start-hbase.sh | |
popd | |
# Opentsdb | |
git clone git://github.com/OpenTSDB/opentsdb.git | |
pushd opentsdb | |
./build.sh | |
env COMPRESSION=NONE HBASE_HOME=/opt/hbase ./src/create_table.sh | |
mkdir data | |
export tsdtmp=/opt/opentsdb/data | |
echo "Server now listening on port 4242" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment