aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2020-02-28 15:26:06 +0000
committerPeter Mikus <pmikus@cisco.com>2020-03-10 11:11:31 +0000
commit6db8aec19b0109f9efcef189d32ddaac8c469370 (patch)
tree9fc1c42a1460f3e8bff7af20fc833d2b2a2d0a11 /resources
parent6daa2d791f0e0d41b73668ef3ee233e58987dc37 (diff)
Ansible: LTS support
- There is currently no other way to support multiple version of playbooks. Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I2ade4a57d726b793e422996e83bf767ac4315488
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/Constants.py2
-rw-r--r--resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml3
-rw-r--r--resources/tools/testbed-setup/ansible/roles/dpdk/defaults/main.yaml12
-rw-r--r--resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml36
-rw-r--r--resources/tools/testbed-setup/ansible/roles/iperf/defaults/main.yaml3
-rw-r--r--resources/tools/testbed-setup/ansible/roles/iperf/tasks/main.yaml47
-rw-r--r--resources/tools/testbed-setup/ansible/roles/trex/defaults/main.yaml5
-rw-r--r--resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml61
-rw-r--r--resources/tools/testbed-setup/ansible/roles/vpp/defaults/main.yaml (renamed from resources/tools/testbed-setup/ansible/roles/sut/defaults/main.yaml)0
-rw-r--r--resources/tools/testbed-setup/ansible/roles/vpp/tasks/main.yaml (renamed from resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml)0
-rw-r--r--resources/tools/testbed-setup/ansible/roles/wrk/defaults/main.yaml3
-rw-r--r--resources/tools/testbed-setup/ansible/roles/wrk/tasks/main.yaml35
-rw-r--r--resources/tools/testbed-setup/ansible/sut.yaml4
-rw-r--r--resources/tools/testbed-setup/ansible/sut_aws.yaml4
-rw-r--r--resources/tools/testbed-setup/ansible/sut_azure.yaml4
15 files changed, 136 insertions, 83 deletions
diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py
index 9a58ed1a17..97514750a8 100644
--- a/resources/libraries/python/Constants.py
+++ b/resources/libraries/python/Constants.py
@@ -179,7 +179,7 @@ class Constants:
QEMU_VM_IMAGE = u"/var/lib/vm/vhost-nested.img"
# QEMU VM DPDK path
- QEMU_VM_DPDK = u"/opt/dpdk-stable-19.08.2"
+ QEMU_VM_DPDK = u"/opt/dpdk-20.02"
# Docker container SUT image
DOCKER_SUT_IMAGE_UBUNTU = u"snergster/csit-sut:latest"
diff --git a/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml
index eb97f0beb1..dc789a7ec4 100644
--- a/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml
@@ -1,6 +1,9 @@
---
# file: roles/calibration/tasks/main.yaml
+- name: Print Ansible facts
+ debug: var=ansible_facts
+
- name: Calibration - Install Distribution - Release - Machine Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
diff --git a/resources/tools/testbed-setup/ansible/roles/dpdk/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/dpdk/defaults/main.yaml
index d56b967b97..e43c28403b 100644
--- a/resources/tools/testbed-setup/ansible/roles/dpdk/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/dpdk/defaults/main.yaml
@@ -18,8 +18,14 @@ packages_by_arch:
- []
dpdk_target_dir: "/opt"
-dpdk_version: "19.08.2"
+dpdk_version:
+ - "19.02"
+ - "20.02"
dpdk_url: "https://fast.dpdk.org/rel"
dpdk_build_targets:
- aarch64: "arm64-armv8a"
- x86_64: "x86_64-native"
+ "19.02":
+ aarch64: "arm64-armv8a-linuxapp-gcc"
+ x86_64: "x86_64-native-linuxapp-gcc"
+ "20.02":
+ aarch64: "arm64-armv8a-linux-gcc"
+ x86_64: "x86_64-native-linux-gcc"
diff --git a/resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml
index 753ebec50c..8ece4af7c6 100644
--- a/resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml
@@ -11,35 +11,39 @@
- name: DPDK - Download Release Archive
get_url:
- url: "{{ dpdk_url }}/dpdk-{{ dpdk_version }}.tar.xz"
- dest: "{{ dpdk_target_dir }}/dpdk-{{ dpdk_version }}.tar.xz"
+ url: "{{ dpdk_url }}/dpdk-{{ item }}.tar.xz"
+ dest: "{{ dpdk_target_dir }}/dpdk-{{ item }}.tar.xz"
mode: 0644
- register: "linux__dpdk_downloaded"
+ loop: "{{ dpdk_version }}"
+ register: "dpdk_downloaded"
tags:
- install-dpdk
-- name: Extract DPDK release archive
+- name: DPDK - Extract Release Archive
unarchive:
remote_src: true
- src: "{{ dpdk_target_dir }}/dpdk-{{ dpdk_version }}.tar.xz"
+ src: "{{ dpdk_target_dir }}/dpdk-{{ item }}.tar.xz"
dest: "{{ dpdk_target_dir }}/"
- creates: "{{ dpdk_target_dir }}/dpdk-stable-{{ dpdk_version }}"
- when: "linux__dpdk_downloaded"
- register: "linux__dpdk_extracted"
+ creates: "{{ dpdk_target_dir }}/dpdk-{{ item }}"
+ loop: "{{ dpdk_version }}"
+ when: "dpdk_downloaded"
+ register: "dpdk_extracted"
tags:
- install-dpdk
-- name: Compile DPDK release
+- name: DPDK - Compile Release I
become: yes
- command: "make install T={{ dpdk_build_targets[ansible_machine] }}-linux-gcc DESTDIR={{ dpdk_target_dir }}/dpdk-stable-{{ dpdk_version }} chdir={{ dpdk_target_dir }}/dpdk-stable-{{ dpdk_version }}"
- when: "linux__dpdk_extracted"
- register: "linux__dpdk_compiled"
+ command: "make install T={{ dpdk_build_targets[item][ansible_machine] }} DESTDIR={{ dpdk_target_dir }}/dpdk-{{ item }} chdir={{ dpdk_target_dir }}/dpdk-{{ item }}"
+ loop: "{{ dpdk_version }}"
+ when: "dpdk_extracted"
+ register: "dpdk_compiled"
tags:
- install-dpdk
-- name: Link igb_uio module
- shell: "ln -fs {{ dpdk_target_dir }}/dpdk-stable-{{ dpdk_version }}/{{ dpdk_build_targets[ansible_machine] }}-linux-gcc/kmod/igb_uio.ko /lib/modules/`uname -r`/igb_uio.ko && depmod -a"
+- name: DPDK - Link igb_uio Module
+ shell: "ln -fs {{ dpdk_target_dir }}/dpdk-{{ item }}/{{ dpdk_build_targets[item][ansible_machine] }}/kmod/igb_uio.ko /lib/modules/`uname -r`/igb_uio.ko && depmod -a"
ignore_errors: "yes"
- when: "linux__dpdk_compiled"
+ loop: "{{ dpdk_version }}"
+ when: "dpdk_compiled"
tags:
- - link-igb_uio-module
+ - install-dpdk
diff --git a/resources/tools/testbed-setup/ansible/roles/iperf/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/iperf/defaults/main.yaml
index 9639c93a4d..50210660f4 100644
--- a/resources/tools/testbed-setup/ansible/roles/iperf/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/iperf/defaults/main.yaml
@@ -18,4 +18,5 @@ packages_by_arch:
- []
iperf_target_dir: "/opt"
-iperf_version: "3.7"
+iperf_version:
+ - "3.7"
diff --git a/resources/tools/testbed-setup/ansible/roles/iperf/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/iperf/tasks/main.yaml
index e77fdbcae3..db9b104c36 100644
--- a/resources/tools/testbed-setup/ansible/roles/iperf/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/iperf/tasks/main.yaml
@@ -1,7 +1,7 @@
---
# file: roles/iperf/tasks/main.yaml
-- name: iPerf Install - Install Distribution - Release - Machine Prerequisites
+- name: iPerf - Install Distribution - Release - Machine Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
@@ -9,32 +9,45 @@
tags:
- install-dependencies
-- name: iPerf Install - Get Release Archive
+- name: iPerf - Get Release Archive
get_url:
- url: "https://downloads.es.net/pub/iperf/iperf-{{ iperf_version }}.tar.gz"
- dest: "{{ iperf_target_dir }}/iperf-{{ iperf_version }}.tar.gz"
+ url: "https://downloads.es.net/pub/iperf/iperf-{{ item }}.tar.gz"
+ dest: "{{ iperf_target_dir }}/iperf-{{ item }}.tar.gz"
mode: 0644
+ loop: "{{ iperf_version }}"
tags:
- install-iperf
-- name: iPerf Install - Ensure Directory Exists
- file:
- path: "{{ iperf_target_dir }}/iperf-{{ iperf_version }}"
- state: "directory"
- tags:
- - install-iperf
-
-- name: iPerf Install - Extract Release Archive
+- name: iPerf - Extract Release Archive
unarchive:
remote_src: true
- src: "{{ iperf_target_dir }}/iperf-{{ iperf_version }}.tar.gz"
+ src: "{{ iperf_target_dir }}/iperf-{{ item }}.tar.gz"
dest: "{{ iperf_target_dir }}/"
- creates: "{{ iperf_target_dir }}/iperf-{{ iperf_version }}/src"
+ creates: "{{ iperf_target_dir }}/iperf-{{ item }}/src"
+ loop: "{{ iperf_version }}"
+ tags:
+ - install-iperf
+
+- name: iPerf - Compile Release I
+ command: "./configure"
+ args:
+ chdir: "{{ iperf_target_dir }}/iperf-{{ item }}/"
+ loop: "{{ iperf_version }}"
+ tags:
+ - install-iperf
+
+- name: iPerf - Compile Release II
+ command: "make"
+ args:
+ chdir: "{{ iperf_target_dir }}/iperf-{{ item }}/"
+ loop: "{{ iperf_version }}"
tags:
- install-iperf
-- name: iPerf Install - Compile Release I
- shell: |
- cd "{{ iperf_target_dir }}/iperf-{{ iperf_version }}/" && ./configure && make && make install
+- name: iPerf - Compile Release III
+ command: "make install"
+ args:
+ chdir: "{{ iperf_target_dir }}/iperf-{{ item }}/"
+ loop: "{{ iperf_version }}"
tags:
- install-iperf
diff --git a/resources/tools/testbed-setup/ansible/roles/trex/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/trex/defaults/main.yaml
index 0daa913cfc..79a77bc558 100644
--- a/resources/tools/testbed-setup/ansible/roles/trex/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/trex/defaults/main.yaml
@@ -26,4 +26,7 @@ packages_by_arch:
- []
trex_target_dir: "/opt"
-trex_version: "2.73"
+trex_url: "https://github.com/cisco-system-traffic-generator/trex-core/archive/"
+trex_version:
+ - "2.54"
+ - "2.73"
diff --git a/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml
index 11f51ddeac..d8f35cbc17 100644
--- a/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml
@@ -1,7 +1,7 @@
---
# file: roles/trex/tasks/main.yaml
-- name: T-Rex Install - Install Distribution - Release - Machine Prerequisites
+- name: T-Rex - Distribution - Release - Machine Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
@@ -9,52 +9,79 @@
tags:
- install-dependencies
-- name: T-Rex Install - Get Release Archive
+- name: T-Rex - Get Release Archive
get_url:
- url: "https://github.com/cisco-system-traffic-generator/trex-core/archive/v{{ trex_version }}.tar.gz"
- dest: "{{ trex_target_dir }}/trex-core-{{ trex_version }}.tar.gz"
+ url: "{{ trex_url }}/v{{ item }}.tar.gz"
+ dest: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
+ validate_certs: False
mode: 0644
+ loop: "{{ trex_version }}"
register: trex_downloaded
tags:
- install-trex
-- name: T-Rex Install - Ensure Directory Exists
+- name: T-Rex - Ensure Directory Exists
file:
- path: "{{ trex_target_dir }}/trex-core-{{ trex_version }}"
+ path: "{{ trex_target_dir }}/trex-core-{{ item }}"
state: "directory"
- register: trex_dir_created
+ loop: "{{ trex_version }}"
tags:
- install-trex
-- name: T-Rex Install - Extract Release Archive
+- name: T-Rex - Extract Release Archive
unarchive:
remote_src: true
- src: "{{ trex_target_dir }}/trex-core-{{ trex_version }}.tar.gz"
+ src: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
dest: "{{ trex_target_dir }}/"
- creates: "{{ trex_target_dir }}/trex-core-{{ trex_version }}/linux_dpdk/"
- when: trex_dir_created
+ creates: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
+ loop: "{{ trex_version }}"
register: trex_extracted
tags:
- install-trex
-- name: T-Rex Install - Azure patch I
+- name: T-Rex - Azure patch I
patch:
src: "files/t-rex.patch"
- basedir: "{{ trex_target_dir }}/trex-core-{{ trex_version }}"
+ basedir: "{{ trex_target_dir }}/trex-core-{{ item }}"
strip: 1
+ loop: "{{ trex_version }}"
when:
- azure is defined
tags:
- install-trex
-- name: T-Rex Install - Compile Release I
- raw: "cd {{ trex_target_dir }}/trex-core-{{ trex_version }}/linux_dpdk/; ./b configure; ./b build"
+- 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 Install - Compile Release II
- raw: "cd {{ trex_target_dir }}/trex-core-{{ trex_version }}/scripts/ko/src; make; make install"
+- 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"
+ 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
diff --git a/resources/tools/testbed-setup/ansible/roles/sut/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/vpp/defaults/main.yaml
index 327d8b7456..327d8b7456 100644
--- a/resources/tools/testbed-setup/ansible/roles/sut/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/vpp/defaults/main.yaml
diff --git a/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/vpp/tasks/main.yaml
index 5d02225abc..5d02225abc 100644
--- a/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/vpp/tasks/main.yaml
diff --git a/resources/tools/testbed-setup/ansible/roles/wrk/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/wrk/defaults/main.yaml
index d40ea6a9ce..2d378487df 100644
--- a/resources/tools/testbed-setup/ansible/roles/wrk/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/wrk/defaults/main.yaml
@@ -17,4 +17,5 @@ packages_by_arch:
- []
wrk_target_dir: "/opt"
-wrk_version: "4.0.2"
+wrk_version:
+ - "4.0.2"
diff --git a/resources/tools/testbed-setup/ansible/roles/wrk/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/wrk/tasks/main.yaml
index c2e42aa3f1..163044de43 100644
--- a/resources/tools/testbed-setup/ansible/roles/wrk/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/wrk/tasks/main.yaml
@@ -1,7 +1,7 @@
---
# file: roles/wrk/tasks/main.yaml
-- name: WRK Install - Install Distribution - Release - Machine Prerequisites
+- name: WRK - Install Distribution - Release - Machine Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
@@ -9,45 +9,40 @@
tags:
- install-dependencies
-- name: WRK Install - Get Release Archive
+- name: WRK - Get Release Archive
get_url:
- url: "https://github.com/wg/wrk/archive/{{ wrk_version }}.tar.gz"
- dest: "{{ wrk_target_dir }}/{{ wrk_version }}.tar.gz"
+ url: "https://github.com/wg/wrk/archive/{{ item }}.tar.gz"
+ dest: "{{ wrk_target_dir }}/wrk-{{ item }}.tar.gz"
mode: 0644
+ loop: "{{ wrk_version }}"
register: wrk_downloaded
tags:
- install-wrk
-- name: WRK Install - Ensure Directory Exists
- file:
- path: "{{ wrk_target_dir }}/wrk-{{ wrk_version }}"
- state: "directory"
- register: wrk_dir_created
- tags:
- - install-wrk
-
-- name: WRK Install - Extract Release Archive
+- name: WRK - Extract Release Archive
unarchive:
remote_src: true
- src: "{{ wrk_target_dir }}/{{ wrk_version }}.tar.gz"
+ src: "{{ wrk_target_dir }}/wrk-{{ item }}.tar.gz"
dest: "{{ wrk_target_dir }}/"
- creates: "{{ wrk_target_dir }}/wrk-{{ wrk_version }}/src"
- when: wrk_dir_created
+ creates: "{{ wrk_target_dir }}/wrk-{{ item }}/src"
+ loop: "{{ wrk_version }}"
register: wrk_extracted
tags:
- install-wrk
-- name: WRK Install - Compile Release
+- name: WRK - Compile Release I
command: "make"
args:
- chdir: "{{ wrk_target_dir }}/wrk-{{ wrk_version }}"
+ chdir: "{{ wrk_target_dir }}/wrk-{{ item }}"
+ loop: "{{ wrk_version }}"
when: wrk_extracted
register: wrk_compiled
tags:
- install-wrk
-- name: WRK Install - Copy Binary
- command: "cp {{ wrk_target_dir }}/wrk-{{ wrk_version }}/wrk /usr/local/bin/"
+- name: WRK - Copy Binary
+ command: "cp {{ wrk_target_dir }}/wrk-{{ item }}/wrk /usr/local/bin/"
+ loop: "{{ wrk_version }}"
when: wrk_compiled
tags:
- install-wrk
diff --git a/resources/tools/testbed-setup/ansible/sut.yaml b/resources/tools/testbed-setup/ansible/sut.yaml
index 67caadd99a..c44dfe816f 100644
--- a/resources/tools/testbed-setup/ansible/sut.yaml
+++ b/resources/tools/testbed-setup/ansible/sut.yaml
@@ -10,8 +10,8 @@
tags: common
- role: vexx_hosts
tags: vexx_hosts
- - role: sut
- tags: sut
+ - role: vpp
+ tags: vpp
- role: dpdk
tags: dpdk
- role: docker
diff --git a/resources/tools/testbed-setup/ansible/sut_aws.yaml b/resources/tools/testbed-setup/ansible/sut_aws.yaml
index 4340aa1111..5b2fc8d3e1 100644
--- a/resources/tools/testbed-setup/ansible/sut_aws.yaml
+++ b/resources/tools/testbed-setup/ansible/sut_aws.yaml
@@ -9,8 +9,8 @@
tags: user_add
- role: common
tags: common
- - role: sut
- tags: sut
+ - role: vpp
+ tags: vpp
- role: dpdk
tags: dpdk
- role: aws
diff --git a/resources/tools/testbed-setup/ansible/sut_azure.yaml b/resources/tools/testbed-setup/ansible/sut_azure.yaml
index 950287b8d8..669e4097c6 100644
--- a/resources/tools/testbed-setup/ansible/sut_azure.yaml
+++ b/resources/tools/testbed-setup/ansible/sut_azure.yaml
@@ -9,8 +9,8 @@
tags: user_add
- role: common
tags: common
- - role: sut
- tags: sut
+ - role: vpp
+ tags: vpp
- role: azure
tags: azure
- role: iperf