aboutsummaryrefslogtreecommitdiff
path: root/scripts/deploy/app/run.yml
diff options
context:
space:
mode:
authorDeterminant <tederminant@gmail.com>2020-08-30 00:15:08 -0400
committerDeterminant <tederminant@gmail.com>2020-08-30 00:15:08 -0400
commitd5bf357c8010bb1219d04ede14ce699b409e93c5 (patch)
tree042e6bc94994b899c9b31b7816648b557271a3f5 /scripts/deploy/app/run.yml
parentdc28778f9c10d8128abfcf4fea7339c69bd6074d (diff)
fix the connection issue with --notls flag on; WIP: deployment example
Diffstat (limited to 'scripts/deploy/app/run.yml')
-rw-r--r--scripts/deploy/app/run.yml40
1 files changed, 40 insertions, 0 deletions
diff --git a/scripts/deploy/app/run.yml b/scripts/deploy/app/run.yml
new file mode 100644
index 0000000..260d611
--- /dev/null
+++ b/scripts/deploy/app/run.yml
@@ -0,0 +1,40 @@
+---
+# available vars:
+# last_state -- the content of state.json
+# nid -- host_idx (with 0 as default)
+# ngroup -- the group of nodes involved in the build
+# testbed -- the remote path of run_id
+
+- vars:
+ conf_dir: "{{ (testbed, hs_conf_dir) | path_join }}"
+ log_dir: "{{ (testbed, hs_log_dir) | path_join }}"
+ block:
+ - name: create testbed dirs
+ block:
+ - file:
+ path: "{{ conf_dir }}"
+ state: directory
+ - file:
+ path: "{{ log_dir }}"
+ state: directory
+ - name: copy the base conf file
+ copy:
+ src: "{{ (lookup('env','run_path'), hs_base_conf) | path_join }}"
+ dest: "{{ (conf_dir, 'hotstuff.conf') | path_join }}"
+ mode: '0644'
+ - name: copy per node conf files
+ copy:
+ src: "{{ (lookup('env','run_path'), extra_conf) | path_join }}"
+ dest: "{{ (conf_dir, (extra_conf | basename)) | path_join }}"
+ mode: '0644'
+ when: extra_conf | default('') | length > 0
+ - name: start the hotstuff replica
+ hotstuff_app:
+ bin: "{{ replica_bin | default('~/libhotstuff/examples/hotstuff_app') }}"
+ log_dir: "{{ log_dir }}"
+ cwd: "{{ conf_dir }}"
+ conf: "{{ extra_conf | basename }}"
+ tls: false
+ environment:
+ PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin
+ register: spawn_results