https://github.com/voldemort/voldemort
Tip revision: f3801cfd5172bd210505a13a32ee22714e04390f authored by Arunachalam Thirupathi on 12 June 2015, 23:48:22 UTC
Releasing voldemort 1.9.17
Releasing voldemort 1.9.17
Tip revision: f3801cf
ec2-bench.sh
#!/bin/bash
#if [ $# != 3 ];
#do
# echo "USAGE: $0 "
#done
CLUSTER_SIZE=4
INSTANCE_SIZE=m1.large
GROUP_NAME=vold-bench
# create group, if it doesn't exist
ec2-add-group $GROUP_NAME -d "voldemort benchmark security group."
ec2-authorize $GROUP_NAME -P tcp -p 6666
ec2-authorize $GROUP_NAME -P tcp -p 8081
result=$(ec2-run-instances ami-2547a34c -n $CLUSTER_SIZE -g vold-bench -k gsg-keypair --instance-type $INSTANCE_SIZE --availability-zone us-east-1b)
instance_ids=$(echo $result | grep INSTANCE | awk '{print 2}')
function wait_instance_available {
echo "Waiting for instance $1 to start"
while true; do
echo -n "."
# get private dns
host=$(ec2-describe-instances $1 | grep running | awk '{print $5}')
if [ ! -z $host ]; then
echo $host
break;
fi
sleep 1
done
}
## Wait until all the instances are listed as available
public_ips_file=/tmp/vold-bench-public.txt
private_ips_file=/tmp/vold-bench-private.txt
for instance in $instance_ids;
do
wait_instance_available $instance
echo $(ec2-describe-instances $instance | awk '{print $3}') >> $public_ips_file
echo $(ec2-describe-instances $instance | awk '{print $4}') >> $public_ips_file
done
public_ips=$(ec2-describe-instances $1 | grep running | awk '{print $5}')
function check_host_booted {
while true; do
REPLY=$(ssh $SSH_OPTS "root@$1" 'echo "hello"')
if [ ! -z $REPLY ]; then
break;
fi
sleep 5
done
}