import sys
sys.path.insert(
- 0, u"/opt/trex-core-2.82/scripts/automation/trex_control_plane/interactive/"
+ 0, u"/opt/trex-core-2.86/scripts/automation/trex_control_plane/interactive/"
)
from trex.astf.api import *
import time
sys.path.insert(
- 0, u"/opt/trex-core-2.82/scripts/automation/trex_control_plane/interactive/"
+ 0, u"/opt/trex-core-2.86/scripts/automation/trex_control_plane/interactive/"
)
from trex.astf.api import *
from collections import OrderedDict # Needed to parse xstats representation.
sys.path.insert(
- 0, u"/opt/trex-core-2.82/scripts/automation/trex_control_plane/interactive/"
+ 0, u"/opt/trex-core-2.86/scripts/automation/trex_control_plane/interactive/"
)
from trex.astf.api import *
import sys
sys.path.insert(
- 0, u"/opt/trex-core-2.82/scripts/automation/trex_control_plane/interactive/"
+ 0, u"/opt/trex-core-2.86/scripts/automation/trex_control_plane/interactive/"
)
from trex.stl.api import *
import time
sys.path.insert(
- 0, u"/opt/trex-core-2.82/scripts/automation/trex_control_plane/interactive/"
+ 0, u"/opt/trex-core-2.86/scripts/automation/trex_control_plane/interactive/"
)
from trex.stl.api import *
from collections import OrderedDict # Needed to parse xstats representation.
sys.path.insert(
- 0, u"/opt/trex-core-2.82/scripts/automation/trex_control_plane/interactive/"
+ 0, u"/opt/trex-core-2.86/scripts/automation/trex_control_plane/interactive/"
)
from trex.stl.api import *
"""
self.framesize = kwargs[u"framesize"]
self._pcap_dir = kwargs.get(
- u"pcap_dir",u"/opt/trex-core-2.82/scripts/avl"
+ u"pcap_dir",u"/opt/trex-core-2.86/scripts/avl"
)
return self.create_profile()
DOCKER_SUT_IMAGE_UBUNTU_ARM = u"csit_sut-ubuntu1804:local"
# TRex install directory
- TREX_INSTALL_DIR = u"/opt/trex-core-2.82"
+ TREX_INSTALL_DIR = u"/opt/trex-core-2.86"
# TODO: Find the right way how to use it in trex profiles
# TRex pcap files directory
trex_target_dir: "/opt"
trex_url: "https://github.com/cisco-system-traffic-generator/trex-core/archive/"
trex_version:
+ # rls1908
- "2.54"
+ # rls2001
+ # rls2005
- "2.73"
+ # rls2009
- "2.82"
+ # rls2101
+ - "2.86"
--- /dev/null
+---
+# file: roles/trex/tasks/deploy_block.yaml
+
+- name: "Get Release {{ item }}"
+ get_url:
+ url: "{{ trex_url }}/v{{ item }}.tar.gz"
+ dest: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
+ validate_certs: False
+ mode: 0644
+ register: trex_downloaded
+
+- name: "Create Directory {{ item }}"
+ file:
+ path: "{{ trex_target_dir }}/trex-core-{{ item }}"
+ state: "directory"
+
+- name: "Extract Release {{ item }}"
+ unarchive:
+ remote_src: true
+ src: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
+ dest: "{{ trex_target_dir }}/"
+ creates: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
+ register: trex_extracted
+
+- name: Patch Azure
+ patch:
+ src: "files/t-rex.patch"
+ basedir: "{{ trex_target_dir }}/trex-core-{{ item }}"
+ strip: 1
+ when:
+ - azure is defined and item == "2.73"
+
+- name: "Compile Release {{ item }} Part I"
+ command: "./b configure"
+ args:
+ chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
+ when: trex_extracted.changed
+
+- name: "Compile Release {{ item }} Part II"
+ command: "./b build"
+ args:
+ chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
+ when: trex_extracted.changed
+
+- name: "Compile Release {{ item }} Part III"
+ command: "make -j 16"
+ args:
+ chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src"
+ when: trex_extracted.changed
+
+- name: "Compile Release {{ item }} Part IV"
+ command: "make install"
+ args:
+ chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src"
+ when: trex_extracted.changed
\ No newline at end of file
---
# file: roles/trex/tasks/main.yaml
-- name: T-Rex - Distribution - Release - Machine Prerequisites
+- name: Install Distribution - Release - Machine Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
tags:
- install-dependencies
-- name: T-Rex - Get Release Archive
- get_url:
- url: "{{ trex_url }}/v{{ item }}.tar.gz"
- dest: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
- validate_certs: False
- mode: 0644
+- name: Deploy Multiple T-Rex Versions
+ include_tasks: deploy_block.yaml
loop: "{{ trex_version }}"
- register: trex_downloaded
tags:
- - install-trex
-
-- name: T-Rex - Ensure Directory Exists
- file:
- path: "{{ trex_target_dir }}/trex-core-{{ item }}"
- state: "directory"
- loop: "{{ trex_version }}"
- tags:
- - install-trex
-
-- name: T-Rex - Extract Release Archive
- unarchive:
- remote_src: true
- src: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
- dest: "{{ trex_target_dir }}/"
- creates: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
- loop: "{{ trex_version }}"
- register: trex_extracted
- tags:
- - install-trex
-
-- name: T-Rex - Azure patch I
- patch:
- src: "files/t-rex.patch"
- basedir: "{{ trex_target_dir }}/trex-core-{{ item }}"
- strip: 1
- loop: "{{ trex_version }}"
- when:
- - azure is defined and "{{ item }}" == "2.73"
- tags:
- - install-trex
-
-- name: T-Rex - Compile Release I
- command: "./b configure"
- args:
- chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
- loop: "{{ trex_version }}"
- when: trex_extracted
- tags:
- - install-trex
-
-- name: T-Rex - Compile Release II
- command: "./b build"
- args:
- chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
- loop: "{{ trex_version }}"
- when: trex_extracted
- tags:
- - install-trex
-
-- name: T-Rex - Compile Release III
- command: "make -j 16"
- args:
- chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src"
- loop: "{{ trex_version }}"
- when: trex_extracted
- tags:
- - install-trex
-
-- name: T-Rex - Compile Release IV
- command: "make install"
- args:
- chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src"
- loop: "{{ trex_version }}"
- when: trex_extracted
- tags:
- - install-trex
+ - install-trex
\ No newline at end of file
tags: baremetal
- role: common
tags: common
- - role: tg
- tags: tg
- role: kernel
tags: kernel
- role: mellanox
tags: mellanox
+ - role: tg
+ tags: tg
- role: iperf
tags: iperf
- role: trex
tags: trex
+ - role: ab
+ tags: ab
- role: docker
tags: docker
- role: performance_tuning
tags: cleanup
- role: calibration
tags: calibration
- - role: ab
- tags: ab
tags: iperf
- role: trex
tags: trex
+ - role: ab
+ tags: ab
- role: docker
tags: docker
- role: cleanup
tags: iperf
- role: trex
tags: trex
+ - role: ab
+ tags: ab
- role: docker
tags: docker
- role: cleanup