-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtrex-run.yaml
56 lines (52 loc) · 3.13 KB
/
trex-run.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
- include: suite/trex.yml
- import_playbook: ansible-nfv/playbooks/packet_gen/trex/performance_scenario.yml
vars:
discover_instance_external_ip: True
dut_compute: "{{ testpmd_compute.split('.')[0] }}"
bind_dpdk_nics: True
launch_testpmd: False
trex_instance_config: True
launch_trex: True
binary_search: False
cloud_resources: create
forward_mode: "{{ hostvars[groups['undercloud'][0]]['forward_mode']| default('mac') }}"
trex_set_vlan: "{{ hostvars[groups['undercloud'][0]]['trex_set_vlan']|default('True') }}"
trex_process_threads: "{{ hostvars[groups['undercloud'][0]]['trex_process_threads'] }}"
testpmd_lcores: "{{ hostvars[groups['undercloud'][0]]['testpmd_lcores']| default('1,2,3,4,5,6,7,8,9') }}"
trex_lcores: "{{ hostvars[groups['undercloud'][0]]['trex_lcores']|default('1,2,3,4,5,6,7,8,9') }}"
testpmd_socket_mem: "{{ hostvars[groups['undercloud'][0]]['testpmd_socket_mem']|default('7168') }}"
hugepages_count: "{{ hostvars[groups['undercloud'][0]]['hugepages_count']| default('8') }}"
trex_platform: "{{ hostvars[groups['undercloud'][0]]['trex_platform'] }}"
dut_group: "{% if hostvars[groups['undercloud'][0]]['dut_group'] is defined%} {{hostvars[groups['undercloud'][0]]['dut_group']}}{% elif 'dpdk' in dut_type %}dpdk_dut{% else %}sriov_dut{% endif %}"
dut_type: "{{ hostvars[groups['undercloud'][0]]['dut_type'] }}"
when: not (trex_vm is defined and testpmd_vm is defined )
- import_playbook: add_instance.yml
vars:
dut_group: "{% if hostvars[groups['undercloud'][0]]['dut_group'] is defined%} {{hostvars[groups['undercloud'][0]]['dut_group']}}{% elif 'dpdk' in dut_type %}dpdk_dut{% else %}sriov_dut{% endif %}"
dut_type: "{{ hostvars[groups['undercloud'][0]]['dut_type'] }}"
venv_path: "/tmp/ansible_venv"
when: trex_vm is defined or testpmd_vm is defined
- import_playbook: ansible-nfv/playbooks/packet_gen/trex/performance_scenario.yml
vars:
discover_instance_external_ip: True
dut_compute: "{{ testpmd_compute.split('.')[0] }}"
bind_dpdk_nics: False
launch_testpmd: True
trex_instance_config: False
launch_trex: False
binary_search: True
cloud_resources: external
pmd_lb_pretest: True
pmd_lb: 'ovs'
pmd_lb_pretest_sec: '90'
trex_set_vlan: "{{ hostvars[groups['undercloud'][0]]['trex_set_vlan'] |default('True')}}"
forward_mode: "{{ hostvars[groups['undercloud'][0]]['forward_mode'] | default('mac')}}"
trex_process_threads: "{{ hostvars[groups['undercloud'][0]]['trex_process_threads'] }}"
testpmd_lcores: "{{ hostvars[groups['undercloud'][0]]['testpmd_lcores']| default('1,2,3,4,5,6,7,8,9') }}"
trex_lcores: "{{ hostvars[groups['undercloud'][0]]['trex_lcores'] |default('1,2,3,4,5,6,7,8,9')}}"
testpmd_socket_mem: "{{ hostvars[groups['undercloud'][0]]['testpmd_socket_mem'] |default('7168') }}"
hugepages_count: "{{ hostvars[groups['undercloud'][0]]['hugepages_count'] | default('8')}}"
trex_platform: "{{ hostvars[groups['undercloud'][0]]['trex_platform'] }}"
dut_group: "{{ hostvars[groups['undercloud'][0]]['dut_group'] }}"
dut_type: "{{ hostvars[groups['undercloud'][0]]['dut_type'] }}"