aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-08-14 12:30:06 +0000
committerDave Wallace <dwallacelf@gmail.com>2019-08-14 14:32:02 +0000
commit37a9451377f7239365b5af778b8072d1585a2d2a (patch)
tree2e413a56bf65012245c46efc950e97515bce74fd /resources/tools/testbed-setup
parentbe39339d5bf121d718623885d05848e50d466347 (diff)
Move: WRK installation into ansible
- Remove ability to install from framework. - Control via ansible with other dependencies. Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I5fd0ca18b4f76c30b6c28b4dcd15e538e01cb315
Diffstat (limited to 'resources/tools/testbed-setup')
-rw-r--r--resources/tools/testbed-setup/ansible/inventories/lf_inventory/group_vars/all.yaml6
-rw-r--r--resources/tools/testbed-setup/ansible/inventories/sample_inventory/group_vars/all.yaml9
-rw-r--r--resources/tools/testbed-setup/ansible/inventories/sample_inventory/host_vars/1.1.1.1.yaml1
-rw-r--r--resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml4
-rw-r--r--resources/tools/testbed-setup/ansible/roles/tg/tasks/ubuntu_bionic.yaml1
-rw-r--r--resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml33
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