From 0fb35d0b7c318563397bfe502c6e51997219bea0 Mon Sep 17 00:00:00 2001 From: KyleKlenk <kyle.c.klenk@gmail.com> Date: Fri, 22 Sep 2023 08:34:42 -0600 Subject: [PATCH] started setting up ansible scripts --- tests/ansible/hosts | 5 ++++ tests/ansible/start_simulation.yml | 44 ++++++++++++++++++++++++++++++ tests/input/config_test.toml | 4 +-- 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 tests/ansible/hosts create mode 100644 tests/ansible/start_simulation.yml diff --git a/tests/ansible/hosts b/tests/ansible/hosts new file mode 100644 index 0000000..9c5e36f --- /dev/null +++ b/tests/ansible/hosts @@ -0,0 +1,5 @@ +[server] +simlab03.usask.ca + +[client] +richardson.usask.ca \ No newline at end of file diff --git a/tests/ansible/start_simulation.yml b/tests/ansible/start_simulation.yml new file mode 100644 index 0000000..2193604 --- /dev/null +++ b/tests/ansible/start_simulation.yml @@ -0,0 +1,44 @@ +- name: Start server + hosts: server + become: no + + vars: + server: simlab03.usask.ca + config_file: /code/openCARP-Actors/tests/input/config_test.toml + server_host_dir: /home/kck540/Cardiac-Projects/openCARP-Actors + container_dir : /code/openCARP-Actors + + tasks: + - name: Start server + command: + chdir: /home/kck540/Cardiac-Projects + cmd: screen -L -dmS server bash -c 'apptainer exec --bind /home/kck540/Cardiac-Projects/openCARP-Actors:/code/openCARP-Actors openCARP-actors.sif openCARP -c {{ config_file }} -s -p 4444' + + - name: Wait for server to start + wait_for: + host: simlab03.usask.ca + port: 4444 + timeout: 60 + +- name: Start cleints + hosts: client + become: no + + vars: + server: simlab03.usask.ca + config_file: /code/openCARP-Actors/tests/input/config_test.toml + server_host_dir: /home/kck540/Cardiac-Projects/openCARP-Actors + container_dir : /code/openCARP-Actors + + tasks: + - name: Clone repository + git: + repo: https://git.cs.usask.ca/numerical_simulations_lab/cardiac/openCARP-Actors.git + dest: /home/kck540/Cardiac/openCARP-Actors + + - name: Start Client + command: + chdir: /home/kck540/Cardiac + cmd: screen -L -dmS client bash -c 'apptainer exec --bind /home/kck540/Cardiac/openCARP-Actors:/code/openCARP-Actors openCARP-actors.sif openCARP -c {{ config_file }} -p 4444' + + diff --git a/tests/input/config_test.toml b/tests/input/config_test.toml index 16cb298..5f438c7 100644 --- a/tests/input/config_test.toml +++ b/tests/input/config_test.toml @@ -14,6 +14,6 @@ s2_args = ['openCARP', '+F', '/code/openCARP-Actors/tests/input/s2.par'] s2_min = 100.0 s2_max = 500.0 s2_interval_min = 245 -s2_interval_max = 250 -s2_interval_increment = 5 +s2_interval_max = 255 +s2_interval_increment = 1 # skip_S1 = true # If True we use S1_max as the stimulus strength for S1 in the S2 simulation. -- GitLab