Skip to content

Instantly share code, notes, and snippets.

@jeremyd
Created March 10, 2014 08:28
Show Gist options
  • Save jeremyd/9461410 to your computer and use it in GitHub Desktop.
Save jeremyd/9461410 to your computer and use it in GitHub Desktop.
clustersense_bootstrap_basic.sh
#!/bin/bash
NODE_NAME=$(hostname -s)
FQDN=$(hostname -f)
NODE_IP=$(dig $FQDN +short)
# Fill this in with the host running Zookeeper.
ZOOKEEPER_HOST=$ZK_IP
echo NODE_NAME: $NODE_NAME
echo FQDN: $FQDN
echo NODE_IP: $NODE_IP
wget https://s3.amazonaws.com/clustersense/raring/23/clustersense.key.txt
sudo apt-key add clustersense.key.txt
cat <<EOF> /etc/apt/sources.list.d/clustersense.list
deb [arch=amd64] https://s3.amazonaws.com/clustersense/precise/23/ precise main
EOF
apt-get update
apt-get install -y clustersense
cat <<EOT> /etc/clustersense/config.yml
node_id: $NODE_NAME
node_ip: $NODE_IP
port: '4001'
registry_host: $ZOOKEEPER_HOST
EOT
cat <<EOI> /etc/clustersense/reelweb.yml
node_id: reelweb
reelweb_ip: 0.0.0.0
node_ip: $NODE_IP
port: '3998'
registry_host: $ZOOKEEPER_HOST
EOI
clustersense --enable --agent basic
start clustersense_basic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment