aboutsummaryrefslogtreecommitdiff
path: root/scripts/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/deploy')
-rw-r--r--scripts/deploy/app/build.yml2
-rw-r--r--scripts/deploy/app/reset.yml1
-rw-r--r--scripts/deploy/app/run.yml2
-rw-r--r--scripts/deploy/clients.txt16
-rwxr-xr-xscripts/deploy/gen_all.sh2
-rw-r--r--scripts/deploy/gen_inventory.py4
-rw-r--r--scripts/deploy/group_vars/all.yml15
-rw-r--r--scripts/deploy/group_vars/clients.yml4
-rw-r--r--scripts/deploy/replicas.txt4
9 files changed, 42 insertions, 8 deletions
diff --git a/scripts/deploy/app/build.yml b/scripts/deploy/app/build.yml
index 2a0c24c..af6774e 100644
--- a/scripts/deploy/app/build.yml
+++ b/scripts/deploy/app/build.yml
@@ -10,7 +10,7 @@
- file:
path: "{{ (hs_repo_dir, 'build') | path_join }}"
state: absent
- - command: cmake -DCMAKE_BUID_TYPE=Release -DHOTSTUFF_PROTO_LOG=OFF -DCMAKE_CXX_FLAGS={{ hs_flags | default('') }}
+ - command: cmake -DCMAKE_BUID_TYPE=Release -DHOTSTUFF_PROTO_LOG=OFF "-DCMAKE_CXX_FLAGS='{{ hs_flags | default('') }}'"
args:
chdir: "{{ hs_repo_dir }}"
environment:
diff --git a/scripts/deploy/app/reset.yml b/scripts/deploy/app/reset.yml
index 1b80b27..f1c2873 100644
--- a/scripts/deploy/app/reset.yml
+++ b/scripts/deploy/app/reset.yml
@@ -7,6 +7,7 @@
- name: reset hotstuff
vars:
+ conf_dir: "{{ (testbed, hs_conf_dir) | path_join }}"
log_dir: "{{ (testbed, hs_log_dir) | path_join }}"
block:
- name: remove confs
diff --git a/scripts/deploy/app/run.yml b/scripts/deploy/app/run.yml
index 260d611..14a2eb1 100644
--- a/scripts/deploy/app/run.yml
+++ b/scripts/deploy/app/run.yml
@@ -34,7 +34,7 @@
log_dir: "{{ log_dir }}"
cwd: "{{ conf_dir }}"
conf: "{{ extra_conf | basename }}"
- tls: false
+ tls: "{{ hs_tls | default(false) }}"
environment:
PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin
register: spawn_results
diff --git a/scripts/deploy/clients.txt b/scripts/deploy/clients.txt
new file mode 100644
index 0000000..000cd7a
--- /dev/null
+++ b/scripts/deploy/clients.txt
@@ -0,0 +1,16 @@
+18.225.36.80
+18.225.36.80
+18.225.36.80
+18.225.36.80
+18.225.36.80
+18.225.36.80
+18.225.36.80
+18.225.36.80
+3.17.180.6
+3.17.180.6
+3.17.180.6
+3.17.180.6
+3.17.180.6
+3.17.180.6
+3.17.180.6
+3.17.180.6
diff --git a/scripts/deploy/gen_all.sh b/scripts/deploy/gen_all.sh
index 295bf99..cd592cf 100755
--- a/scripts/deploy/gen_all.sh
+++ b/scripts/deploy/gen_all.sh
@@ -8,4 +8,4 @@
python3 ./gen_inventory.py --prefix 'hotstuff.gen' > nodes.ini
awk '{print $2}' replicas.txt > replicas_inter.txt
-python ../gen_conf.py --ips replicas_inter.txt --iter 1 --prefix 'hotstuff.gen' --keygen ../../hotstuff-keygen --tls-keygen ../../hotstuff-tls-keygen
+python3 ../gen_conf.py --ips replicas_inter.txt --iter 1 --prefix 'hotstuff.gen' --keygen ../../hotstuff-keygen --tls-keygen ../../hotstuff-tls-keygen --block-size 400
diff --git a/scripts/deploy/gen_inventory.py b/scripts/deploy/gen_inventory.py
index 23af205..151bf45 100644
--- a/scripts/deploy/gen_inventory.py
+++ b/scripts/deploy/gen_inventory.py
@@ -31,4 +31,6 @@ if __name__ == "__main__":
print("\n[clients]")
for (i, ip) in enumerate(clients):
- print("client{} ansible_host={} cid={}".format(i, ip, i))
+ host_idx = host_idx_count.setdefault(pub_ip, 0)
+ host_idx_count[pub_ip] += 1
+ print("client{} ansible_host={} host_idx={} cid={}".format(i, ip, host_idx, i))
diff --git a/scripts/deploy/group_vars/all.yml b/scripts/deploy/group_vars/all.yml
index d9e9a44..13d720f 100644
--- a/scripts/deploy/group_vars/all.yml
+++ b/scripts/deploy/group_vars/all.yml
@@ -1,15 +1,22 @@
---
## basic config
+# NOTE: change to your aws ec2 key file here
+ansible_ssh_private_key_file: ~/.ssh/ted-aws-key2.pem
+
+# the rest of config works for Ubuntu 18.04 image on Amazon EC2
+
ansible_connection: ssh
ansible_user: ubuntu
-# change to your aws ec2 key file here
-ansible_ssh_private_key_file: ~/.ssh/ted-aws-key2.pem
# remote directory that keeps the work directory for the running app
testbed_prefix: "/home/ubuntu/testbed"
+# must use Python 3
+ansible_python_interpreter: /usr/bin/python3
-## app specific config
+## build config
+hs_flags: "-g -DHOTSTUFF_ENABLE_BENCHMARK"
+## app config
# process name that is used by killall in reset
bin_name: hotstuff-app
# binary path (remote)
@@ -22,3 +29,5 @@ hs_local_repo_dir: "../../"
hs_conf_dir: "conf"
hs_log_dir: "log"
hs_base_conf: "./hotstuff.gen.conf"
+# enable/disable TLS encrpytion for inter-replica communication
+hs_tls: false
diff --git a/scripts/deploy/group_vars/clients.yml b/scripts/deploy/group_vars/clients.yml
index 5c5afd8..57e13ff 100644
--- a/scripts/deploy/group_vars/clients.yml
+++ b/scripts/deploy/group_vars/clients.yml
@@ -1,4 +1,6 @@
---
bin_name: "hotstuff-client"
-max_iter: 100000
+# total number of commands
+max_iter: 200000
+# number of concurrently outstanding requests (commands)
max_async: 175
diff --git a/scripts/deploy/replicas.txt b/scripts/deploy/replicas.txt
new file mode 100644
index 0000000..eee8b20
--- /dev/null
+++ b/scripts/deploy/replicas.txt
@@ -0,0 +1,4 @@
+3.131.95.69 172.31.21.137
+18.221.35.19 172.31.29.43
+18.217.161.193 172.31.25.133
+18.191.48.38 172.31.25.71