The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/aws-experiment-launch/userdata-soldier.sh

32 lines
1.4 KiB

#!/bin/bash
yum install ruby -y
cd /home/ec2-user/
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/commander -o commander
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 ./txgen
chmod +x ./benchmark
chmod +x ./commander
chmod +x ./kill_node.sh
echo "* soft nproc 65535" | sudo tee -a /etc/security/limits.conf
echo "* hard nproc 65535" | sudo tee -a /etc/security/limits.conf
echo "* soft nofile 65535" | sudo tee -a /etc/security/limits.conf
echo "* hard nofile 65535" | sudo tee -a /etc/security/limits.conf
echo "root soft nproc 65535" | sudo tee -a /etc/security/limits.conf
echo "root hard nproc 65535" | sudo tee -a /etc/security/limits.conf
echo "root soft nofile 65535" | sudo tee -a /etc/security/limits.conf
echo "root hard nofile 65535" | sudo tee -a /etc/security/limits.conf
echo "session required pam_limits.so" | sudo tee -a /etc/pam.d/common-session
# Get My IP
ip=`curl http://169.254.169.254/latest/meta-data/public-ipv4`
SOLDIER_PORT=9000
# Kill existing soldier
fuser -k -n tcp $SOLDIER_PORT
# Run soldier
./soldier -ip $ip -port $SOLDIER_PORT > soldier_log 2>&1 &