diff --git a/aws-experiment-launch/experiment/commander/main.go b/aws-experiment-launch/experiment/commander/main.go index 66bd97772..2a34c64e7 100644 --- a/aws-experiment-launch/experiment/commander/main.go +++ b/aws-experiment-launch/experiment/commander/main.go @@ -38,7 +38,6 @@ func readConfigFile() [][]string { if err != nil { log.Fatal("Failed to create local file", err) } - defer out.Close() // get remote config file resp, err := http.Get(setting.configURL) @@ -52,6 +51,7 @@ func readConfigFile() [][]string { if err != nil { log.Fatal("Failed to copy file") } + out.Close() // log config file content, err := ioutil.ReadFile(configFile) @@ -60,6 +60,7 @@ func readConfigFile() [][]string { } log.Println("Successfully downloaded config") log.Println(string(content)) + file, err := os.Open(configFile) defer file.Close() if err != nil { diff --git a/aws-experiment-launch/new-pipeline/userdata-soldier.sh b/aws-experiment-launch/new-pipeline/userdata-soldier.sh index f9b42d9bb..33873d04d 100644 --- a/aws-experiment-launch/new-pipeline/userdata-soldier.sh +++ b/aws-experiment-launch/new-pipeline/userdata-soldier.sh @@ -1,9 +1,9 @@ #!/bin/bash -yum install ruby wget -y -cd $HOME -wget http://unique-bucket-bin.s3.amazonaws.com/txgen -wget http://unique-bucket-bin.s3.amazonaws.com/soldier -wget http://unique-bucket-bin.s3.amazonaws.com/benchmark +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/benchmark -o benchmark chmod +x ./soldier chmod +x ./txgen chmod +x ./benchmark diff --git a/aws-experiment-launch/new-pipeline/utils/utils.py b/aws-experiment-launch/new-pipeline/utils/utils.py index e227e181f..762083c43 100644 --- a/aws-experiment-launch/new-pipeline/utils/utils.py +++ b/aws-experiment-launch/new-pipeline/utils/utils.py @@ -136,8 +136,8 @@ def generate_distribution_config(shard_number, client_number, ip_list, distribut return False # Create ip for clients. - client_id, leader_id, validator_id, commander_id = 0, 0, 0, 0 - validator_number = len(ip_list) - client_number - shard_number - 1 + client_id, leader_id, validator_id = 0, 0, 0 + validator_number = len(ip_list) - client_number - shard_number with open(distribution_config, "w") as fout: for i in range(len(ip_list)): ip, node_name_tag = ip_list[i].split(" ") diff --git a/aws-experiment-launch/utils/utils.py b/aws-experiment-launch/utils/utils.py index 106474fc1..1236ddb7c 100644 --- a/aws-experiment-launch/utils/utils.py +++ b/aws-experiment-launch/utils/utils.py @@ -136,15 +136,12 @@ def generate_distribution_config(shard_number, client_number, ip_list, distribut return False # Create ip for clients. - client_id, leader_id, validator_id, commander_id = 0, 0, 0, 0 - validator_number = len(ip_list) - client_number - shard_number - 1 + client_id, leader_id, validator_id= 0, 0, 0 + validator_number = len(ip_list) - client_number - shard_number with open(distribution_config, "w") as fout: for i in range(len(ip_list)): ip, node_name_tag = ip_list[i].split(" ") - if commander_id < 1: - fout.write("%s 9000 commander %d %s\n" % (ip, commander_id % shard_number, node_name_tag)) - commander_id = commander_id + 1 - elif leader_id < shard_number: + if leader_id < shard_number: fout.write("%s 9000 leader %d %s\n" % (ip, leader_id, node_name_tag)) leader_id = leader_id + 1 elif validator_id < validator_number: