|
|
@ -3,21 +3,19 @@ yum install ruby -y |
|
|
|
cd /home/ec2-user/ |
|
|
|
cd /home/ec2-user/ |
|
|
|
curl http://unique-bucket-bin.s3.amazonaws.com/txgen -o txgen |
|
|
|
curl http://unique-bucket-bin.s3.amazonaws.com/txgen -o txgen |
|
|
|
curl http://unique-bucket-bin.s3.amazonaws.com/soldier -o soldier |
|
|
|
curl http://unique-bucket-bin.s3.amazonaws.com/soldier -o soldier |
|
|
|
curl http://unique-bucket-bin.s3.amazonaws.com/commander -o commander |
|
|
|
|
|
|
|
curl http://unique-bucket-bin.s3.amazonaws.com/benchmark -o benchmark |
|
|
|
curl http://unique-bucket-bin.s3.amazonaws.com/benchmark -o benchmark |
|
|
|
curl http://unique-bucket-bin.s3.amazonaws.com/kill_node.sh -o kill_node.sh |
|
|
|
|
|
|
|
chmod +x ./soldier |
|
|
|
chmod +x ./soldier |
|
|
|
chmod +x ./txgen |
|
|
|
chmod +x ./txgen |
|
|
|
chmod +x ./benchmark |
|
|
|
chmod +x ./benchmark |
|
|
|
chmod +x ./commander |
|
|
|
|
|
|
|
chmod +x ./kill_node.sh |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Get My IP |
|
|
|
# Get My IP |
|
|
|
ip=`curl http://169.254.169.254/latest/meta-data/public-ipv4` |
|
|
|
ip=`curl http://169.254.169.254/latest/meta-data/public-ipv4` |
|
|
|
|
|
|
|
|
|
|
|
SOLDIER_PORT=9000 |
|
|
|
NODE_PORT=9000 |
|
|
|
# Kill existing soldier |
|
|
|
SOLDIER_PORT=1$NODE_PORT |
|
|
|
|
|
|
|
# Kill existing soldier/node |
|
|
|
fuser -k -n tcp $SOLDIER_PORT |
|
|
|
fuser -k -n tcp $SOLDIER_PORT |
|
|
|
|
|
|
|
fuser -k -n tcp $NODE_PORT |
|
|
|
|
|
|
|
|
|
|
|
# Run soldier |
|
|
|
# Run soldier |
|
|
|
./soldier -ip $ip -port $SOLDIER_PORT > soldier_log 2>&1 & |
|
|
|
./soldier -ip $ip -port $NODE_PORT > soldier_log 2>&1 & |