#/usr/bin/env bash PACKAGE="small" DATASET="base64-1.9.1" NET="7df94bc3-6a9f-4c88-8f80-7a8f4086b79d" case $1 in setup) cat </dev/null >/dev/null do sleep 1 echo -n '.' done echo " done." for i in 2 3 4 5 do cat </dev/null >/dev/null do sleep 1 echo -n '.' done echo " done." done for i in 1 2 3 4 5 do IP=`fifo vms get riak$i | json networks[0].ip` echo "Node $i: $IP." done ;; status) for i in 1 2 3 4 5 do IP=`fifo vms get riak$i | json networks[0].ip` echo -n "Node $i: $IP " if curl http://${IP}:8098 2>/dev/null >/dev/null then echo "up" else echo "down" fi done ;; up) fifo vms start riak$2 ;; down) fifo vms stop riak$2 ;; delete) for i in 1 2 3 4 5 do fifo vms delete riak$i done ;; *) cat < - powers up cluster node down - shuts down cluster node EOF esac