update for new pipeline

pull/39/head
Richard Liu 6 years ago
parent e1faab5b95
commit cc0bd15353
  1. 2
      aws-experiment-launch/experiment/commander/main.go
  2. 2
      aws-experiment-launch/experiment/soldier/main.go
  3. 20
      aws-experiment-launch/spot-instance/userdata.sh

@ -35,7 +35,7 @@ func readConfigFile() [][]string {
file, err := os.Open(setting.configFile)
defer file.Close()
if err != nil {
log.Fatal("Failed to read config file", setting.configFile,
log.Fatal("Failed to read config file ", setting.configFile,
"\nNOTE: The config path should be relative to commander.")
}
fscanner := bufio.NewScanner(file)

@ -300,7 +300,7 @@ func getMyConfig(myIP string, myPort string, config *[][]string) []string {
// ./soldier -ip=xx -port=xx
func main() {
ip := flag.String("ip", "127.0.0.1", "IP of the node.")
port := flag.String("port", "3000", "port of the node.")
port := flag.String("port", "9000", "port of the node.")
flag.Parse()
setting.ip = *ip

@ -1,8 +1,14 @@
#!/bin/bash
REGION=$(curl 169.254.169.254/latest/meta-data/placement/availability-zone/ | sed 's/[a-z]$//')
yum -y update
yum install -y ruby
cd /home/ec2-user
curl -O https://aws-codedeploy-$REGION.s3.amazonaws.com/latest/install
chmod +x ./install
./install auto
curl http://54.186.246.9:8080/soldier -o soldier
chmod +x ./soldier
curl http://54.186.246.9:8080/benchmark -o benchmark
chmod +x ./benchmark
curl http://54.186.246.9:8080/txgen -o txgen
chmod +x ./txgen
# Get My IP
wget http://169.254.169.254/latest/meta-data/public-ipv4
ip=$(head -n 1 public-ipv4)
# Run soldier
node_port=9000
./soldier -ip $ip -port $node_port > soldier_log 2>&1 &
Loading…
Cancel
Save