pull/41/head
Richard Liu 6 years ago
commit 52ba30ff5d
  1. 3
      aws-experiment-launch/experiment/commander/main.go
  2. 10
      aws-experiment-launch/new-pipeline/userdata-soldier.sh
  3. 4
      aws-experiment-launch/new-pipeline/utils/utils.py
  4. 9
      aws-experiment-launch/utils/utils.py

@ -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 {

@ -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

@ -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(" ")

@ -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:

Loading…
Cancel
Save