add Final Infrastructure Setup
This commit is contained in:
commit
7733dde658
174 changed files with 204949 additions and 0 deletions
48
infrastructure/ansible/test_scenarios.yml
Normal file
48
infrastructure/ansible/test_scenarios.yml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
- name: Test Network Scenarios
|
||||
hosts: localhost
|
||||
gather_facts: no
|
||||
vars:
|
||||
router_ip: "192.168.122.125"
|
||||
worker_ips:
|
||||
- "192.168.122.174"
|
||||
- "192.168.122.203"
|
||||
ssh_key: "../tf-cloud-init"
|
||||
scenarios:
|
||||
- baseline
|
||||
- slow-connection
|
||||
- high-latency
|
||||
- packet-loss
|
||||
- jitter
|
||||
test_duration: 30
|
||||
|
||||
tasks:
|
||||
- name: Run scenario tests
|
||||
loop: "{{ scenarios }}"
|
||||
loop_control:
|
||||
loop_var: scenario
|
||||
block:
|
||||
- name: Apply scenario {{ scenario }}
|
||||
command: "./apply_scenario.sh {{ router_ip }} {{ scenario }} {{ ssh_key }}"
|
||||
args:
|
||||
chdir: "{{ playbook_dir }}"
|
||||
|
||||
- name: Wait for scenario to stabilize
|
||||
pause:
|
||||
seconds: 10
|
||||
|
||||
- name: Collect metrics
|
||||
command: >
|
||||
./monitor_network.sh
|
||||
"{{ worker_ips | join(',') }}"
|
||||
"{{ ssh_key }}"
|
||||
"{{ test_duration }}"
|
||||
args:
|
||||
chdir: "{{ playbook_dir }}"
|
||||
|
||||
- name: Archive metrics
|
||||
command: >
|
||||
mv metrics_*.csv
|
||||
results/{{ scenario }}_{{ ansible_date_time.epoch }}/
|
||||
args:
|
||||
creates: "results/{{ scenario }}_{{ ansible_date_time.epoch }}/"
|
||||
Loading…
Add table
Add a link
Reference in a new issue