update aws scripts.

pull/37/head
Richard Liu 6 years ago
parent 8b5103bb44
commit 9c0dc622eb
  1. 4
      appspec.yml
  2. 28
      aws-scripts/run_instance.sh
  3. 4
      aws-scripts/run_instances.sh
  4. 7
      aws-scripts/setup.sh
  5. 38
      deploy_one_instance.sh

@ -9,11 +9,11 @@ hooks:
timeout: 10
runas: root
AfterInstall:
- location: aws-scripts/setup_golang.sh #setup golang
- location: aws-scripts/setup.sh
timeout: 300
runas: root
ApplicationStart:
- location: aws-scripts/run_instances.sh #send transactions to server
- location: aws-scripts/run_instance.sh
timeout: 300
runas: root
ApplicationStop:

@ -0,0 +1,28 @@
#!/bin/bash -x
echo "Run Instances" >> tmplog
sudo sysctl net.core.somaxconn=1024
sudo sysctl net.core.netdev_max_backlog=65536;
sudo sysctl net.ipv4.tcp_tw_reuse=1;
sudo sysctl -w net.ipv4.tcp_rmem='65536 873800 1534217728';
sudo sysctl -w net.ipv4.tcp_wmem='65536 873800 1534217728';
sudo sysctl -w net.ipv4.tcp_mem='65536 873800 1534217728';
./kill_node.sh
MyHOME=/home/ec2-user
source ~/.bash_profile
export GOROOT=/usr/lib/golang
export GOPATH=$MyHOME/projects
export PATH=$PATH:$GOROOT/bin
# Get my IP
wget http://169.254.169.254/latest/meta-data/public-ipv4
ip=$(head -n 1 public-ipv4)
echo "Current IP is >>>"
echo $ip
echo ">>>>"
# Run soldier
cd $GOPATH/src/harmony-benchmark
node_port=3000
./bin/soldier -ip $ip -port $node_port&

@ -1,4 +0,0 @@
#!/bin/bash -x
echo "Run Instances" >> tmplog
cd /home/ec2-user/projects/src/harmony-benchmark
./deploy_one_instance.sh global_nodes.txt

@ -18,4 +18,9 @@ export GOROOT=/usr/lib/golang
export GOPATH=$MyHOME/projects
export PATH=$PATH:$GOROOT/bin
source $MyHOME/.bash_profile
#sudo go get github.com/go-stack/stack
# build executables
cd $GOPATH/src/harmony-benchmark
go build -o bin/soldier aws-experiment-launch/experiment/soldier/main.go
go build -o bin/benchmark benchmark.go
go build -o bin/txgen client/txgen/main.go

@ -1,38 +0,0 @@
#!/bin/bash -x
##The commented suffix is for linux
##Reference: https://github.com/Zilliqa/Zilliqa/blob/master/tests/Node/test_node_simple.sh
sudo sysctl net.core.somaxconn=1024
sudo sysctl net.core.netdev_max_backlog=65536;
sudo sysctl net.ipv4.tcp_tw_reuse=1;
sudo sysctl -w net.ipv4.tcp_rmem='65536 873800 1534217728';
sudo sysctl -w net.ipv4.tcp_wmem='65536 873800 1534217728';
sudo sysctl -w net.ipv4.tcp_mem='65536 873800 1534217728';
./kill_node.sh
MyHOME=/home/ec2-user
source ~/.bash_profile
export GOROOT=/usr/lib/golang
export GOPATH=$MyHOME/projects
export PATH=$PATH:$GOROOT/bin
wget http://169.254.169.254/latest/meta-data/public-ipv4 #Calling for public IPv4
current_ip=$(head -n 1 public-ipv4)
echo "Current IP is >>>"
echo $current_ip
echo ">>>>"
python aws-scripts/preprocess_peerlist.py
FILE='isTransaction.txt'
config=$1
t=`date +"%Y%m%d-%H%M%S"`
log_folder="logs/log-$t"
if [ ! -d $log_folder ]
then
mkdir -p $log_folder
fi
if [ -f $FILE ]; then
go run ./client/txgen/main.go -config_file $config -log_folder $log_folder&
else
go run ./benchmark.go -ip $current_ip -config_file $config -log_folder $log_folder&
fi
Loading…
Cancel
Save