T-Rex: 2.82, core pin, 8 workers
[csit.git] / resources / tools / testbed-setup / ansible / roles / trex / tasks / main.yaml
1 ---
2 # file: roles/trex/tasks/main.yaml
3
4 - name: T-Rex - Distribution - Release - Machine Prerequisites
5   package:
6     name: "{{ packages | flatten(levels=1) }}"
7     state: latest
8     update_cache: true
9   tags:
10     - install-dependencies
11
12 - name: T-Rex - Get Release Archive
13   get_url:
14     url: "{{ trex_url }}/v{{ item }}.tar.gz"
15     dest: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
16     validate_certs: False
17     mode: 0644
18   loop: "{{ trex_version }}"
19   register: trex_downloaded
20   tags:
21     - install-trex
22
23 - name: T-Rex - Ensure Directory Exists
24   file:
25     path: "{{ trex_target_dir }}/trex-core-{{ item }}"
26     state: "directory"
27   loop: "{{ trex_version }}"
28   tags:
29     - install-trex
30
31 - name: T-Rex - Extract Release Archive
32   unarchive:
33     remote_src: true
34     src: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
35     dest: "{{ trex_target_dir }}/"
36     creates: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
37   loop: "{{ trex_version }}"
38   register: trex_extracted
39   tags:
40     - install-trex
41
42 - name: T-Rex - Azure patch I
43   patch:
44     src: "files/t-rex.patch"
45     basedir: "{{ trex_target_dir }}/trex-core-{{ item }}"
46     strip: 1
47   loop: "{{ trex_version }}"
48   when:
49     - azure is defined and "{{ item }}" == "2.73"
50   tags:
51     - install-trex
52
53 - name: T-Rex - Compile Release I
54   command: "./b configure"
55   args:
56       chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
57   loop: "{{ trex_version }}"
58   when: trex_extracted
59   tags:
60     - install-trex
61
62 - name: T-Rex - Compile Release II
63   command: "./b build"
64   args:
65       chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
66   loop: "{{ trex_version }}"
67   when: trex_extracted
68   tags:
69     - install-trex
70
71 - name: T-Rex - Compile Release III
72   command: "make -j 16"
73   args:
74       chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src"
75   loop: "{{ trex_version }}"
76   when: trex_extracted
77   tags:
78     - install-trex
79
80 - name: T-Rex - Compile Release IV
81   command: "make install"
82   args:
83       chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src"
84   loop: "{{ trex_version }}"
85   when: trex_extracted
86   tags:
87     - install-trex