diff options
Diffstat (limited to 'resources/tools/testbed-setup/ansible')
6 files changed, 54 insertions, 0 deletions
diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/group_vars/all.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/group_vars/all.yaml index 907f5aff40..40d7544476 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/group_vars/all.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/group_vars/all.yaml @@ -51,6 +51,12 @@ dpdk: aarch64: "arm64-armv8a" x86_64: "x86_64-native" +# WRK settings. +wrk: + target_dir: '/opt' + version: '4.0.2' + url: 'https://github.com/wg/wrk/archive' + # Calibration settings. jitter: directory: '/tmp/pma_tools' diff --git a/resources/tools/testbed-setup/ansible/inventories/sample_inventory/group_vars/all.yaml b/resources/tools/testbed-setup/ansible/inventories/sample_inventory/group_vars/all.yaml index a8e6d0f3a5..484e6ddb4b 100644 --- a/resources/tools/testbed-setup/ansible/inventories/sample_inventory/group_vars/all.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/sample_inventory/group_vars/all.yaml @@ -47,6 +47,15 @@ dpdk: target_dir: '/opt' version: 'dpdk-19.02' url: 'https://fast.dpdk.org/rel' + build_targets: + aarch64: "arm64-armv8a" + x86_64: "x86_64-native" + +# WRK settings. +wrk: + target_dir: '/opt' + version: '4.0.2' + url: 'https://github.com/wg/wrk/archive' # Calibration settings. jitter: diff --git a/resources/tools/testbed-setup/ansible/inventories/sample_inventory/host_vars/1.1.1.1.yaml b/resources/tools/testbed-setup/ansible/inventories/sample_inventory/host_vars/1.1.1.1.yaml index 1cc3e5eaa2..058f7f3ba0 100644 --- a/resources/tools/testbed-setup/ansible/inventories/sample_inventory/host_vars/1.1.1.1.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/sample_inventory/host_vars/1.1.1.1.yaml @@ -15,3 +15,4 @@ sysctl: inventory_ipmi_hostname: 'x.x.x.x' cobbler_profile: 'ubuntu-18.04.2-server-x86_64' +cpu_microarchitecture: "skylake" diff --git a/resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml index f3f5d85aa1..24f433f9b9 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml @@ -3,3 +3,7 @@ - name: Install distribution - release - machine prerequisites include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml' + +- name: Install WRK + include_tasks: 'wrk.yaml' + tags: install-wrk diff --git a/resources/tools/testbed-setup/ansible/roles/tg/tasks/ubuntu_bionic.yaml b/resources/tools/testbed-setup/ansible/roles/tg/tasks/ubuntu_bionic.yaml index 27b8b7248e..95a47b0917 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg/tasks/ubuntu_bionic.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg/tasks/ubuntu_bionic.yaml @@ -5,6 +5,7 @@ apt: name: - 'unzip' + - 'libssl-dev' state: 'present' install_recommends: False tags: install-csit-dependencies diff --git a/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml b/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml new file mode 100644 index 0000000000..1da45fb4b4 --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml @@ -0,0 +1,33 @@ +--- +# file: roles/tg/tasks/wrk.yaml + +- name: Download WRK release archive + get_url: + url: '{{ wrk.url }}/{{ wrk.version }}.tar.gz' + dest: '{{ wrk.target_dir }}/{{ wrk.version }}.tar.gz' + mode: 0644 + register: 'linux__wrk_downloaded' + tags: install-wrk + +- name: Extract WRK release archive + become: yes + unarchive: + src: '{{ wrk.target_dir }}/{{ wrk.version }}.tar.gz' + dest: '{{ wrk.target_dir }}/wrk-{{ wrk.version }}' + remote_src: yes + when: 'linux__wrk_downloaded' + register: 'linux__wrk_extracted' + tags: install-wrk + +- name: Compile WRK release + become: yes + shell: 'cd {{ wrk.target_dir }}/wrk-{{ wrk.version }}; make' + when: 'linux__wrk_extracted' + register: 'linux__wrk_compiled' + tags: install-wrk + +- name: Move WRK binary + become: yes + command: 'mv {{ wrk.target_dir }}/wrk-{{ wrk.version }}/wrk /usr/local/bin/' + when: 'linux__wrk_compiled' + tags: install-wrk |