aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-02-15 16:16:31 +0000
committerPeter Mikus <pmikus@cisco.com>2021-02-19 11:57:30 +0000
commit7b93e96740997dab4383140a639b055e074f63c1 (patch)
tree8d54d10e65af9a6c58546fd3b36aed9cb8d174af /resources/tools/testbed-setup
parentecfe59f83a49e0dda9cead06b81339e4ea545053 (diff)
Infra: Ansible Ubuntu Focal
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I6558938fe4bbdfb5add7a361adb4a12da6b0a6dc
Diffstat (limited to 'resources/tools/testbed-setup')
-rw-r--r--resources/tools/testbed-setup/ansible/roles/ab/defaults/main.yaml7
-rw-r--r--resources/tools/testbed-setup/ansible/roles/ab/tasks/main.yaml2
-rw-r--r--resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml32
-rw-r--r--resources/tools/testbed-setup/ansible/roles/common/defaults/main.yaml48
-rw-r--r--resources/tools/testbed-setup/ansible/roles/common/handlers/main.yaml2
-rw-r--r--resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml24
-rw-r--r--resources/tools/testbed-setup/ansible/roles/csit_sut_image/tasks/main.yaml9
-rw-r--r--resources/tools/testbed-setup/ansible/roles/docker/defaults/main.yaml4
-rw-r--r--resources/tools/testbed-setup/ansible/roles/docker/handlers/main.yaml2
-rw-r--r--resources/tools/testbed-setup/ansible/roles/docker/tasks/ubuntu_bionic.yaml9
-rw-r--r--resources/tools/testbed-setup/ansible/roles/docker/tasks/ubuntu_focal.yaml30
-rw-r--r--resources/tools/testbed-setup/ansible/roles/dpdk/defaults/main.yaml14
-rw-r--r--resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml10
-rw-r--r--resources/tools/testbed-setup/ansible/roles/iperf/defaults/main.yaml10
-rw-r--r--resources/tools/testbed-setup/ansible/roles/iperf/tasks/main.yaml10
-rw-r--r--resources/tools/testbed-setup/ansible/roles/kernel/defaults/main.yaml39
-rw-r--r--resources/tools/testbed-setup/ansible/roles/kernel/handlers/main.yaml2
-rw-r--r--resources/tools/testbed-setup/ansible/roles/kernel/tasks/main.yaml7
-rw-r--r--resources/tools/testbed-setup/ansible/roles/kernel/tasks/ubuntu_bionic.yaml31
-rw-r--r--resources/tools/testbed-setup/ansible/roles/kernel/tasks/ubuntu_focal.yaml51
-rw-r--r--resources/tools/testbed-setup/ansible/roles/kernel_vm/tasks/main.yaml44
-rw-r--r--resources/tools/testbed-setup/ansible/roles/mellanox/tasks/main.yaml20
-rw-r--r--resources/tools/testbed-setup/ansible/roles/performance_tuning/defaults/main.yaml7
-rw-r--r--resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml63
-rw-r--r--resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/turbo_boost.yaml16
-rw-r--r--resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/ubuntu_bionic.yaml18
-rw-r--r--resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml18
-rw-r--r--resources/tools/testbed-setup/ansible/roles/trex/defaults/main.yaml39
-rw-r--r--resources/tools/testbed-setup/ansible/roles/trex/tasks/deploy_block.yaml14
-rw-r--r--resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml4
-rw-r--r--resources/tools/testbed-setup/ansible/roles/vpp/defaults/main.yaml25
-rw-r--r--resources/tools/testbed-setup/ansible/roles/vpp/tasks/main.yaml12
-rw-r--r--resources/tools/testbed-setup/ansible/sut.yaml6
-rw-r--r--resources/tools/testbed-setup/ansible/sut_azure.yaml4
-rw-r--r--resources/tools/testbed-setup/ansible/tg.yaml8
-rw-r--r--resources/tools/testbed-setup/ansible/tg_azure.yaml4
36 files changed, 388 insertions, 257 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/ab/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/ab/defaults/main.yaml
index 0609b06855..45b80be42d 100644
--- a/resources/tools/testbed-setup/ansible/roles/ab/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/ab/defaults/main.yaml
@@ -1,14 +1,17 @@
---
# file: roles/wrk/defaults/main.yaml
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
packages_base:
- []
packages_by_distro:
ubuntu:
- - "apache2-utils"
+ bionic:
+ - "apache2-utils"
+ focal:
+ - "apache2-utils"
packages_by_arch:
aarch64:
diff --git a/resources/tools/testbed-setup/ansible/roles/ab/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/ab/tasks/main.yaml
index 85003d583d..37e702e6df 100644
--- a/resources/tools/testbed-setup/ansible/roles/ab/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/ab/tasks/main.yaml
@@ -15,4 +15,4 @@
name: "{{ packages | flatten(levels=1) }}"
state: present
tags:
- - ab-inst-ab \ No newline at end of file
+ - ab-inst \ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml
index e5ef3c1bc1..5eb945328c 100644
--- a/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml
@@ -2,15 +2,19 @@
# file: roles/calibration/defaults/main.yaml
# Packages to install.
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
packages_base:
- []
packages_by_distro:
ubuntu:
- - "build-essential"
- - "dmidecode"
+ bionic:
+ - "build-essential"
+ - "dmidecode"
+ focal:
+ - "build-essential"
+ - "dmidecode"
packages_by_arch:
aarch64:
@@ -19,16 +23,24 @@ packages_by_arch:
- []
# Kernel version to check.
-kernel_version: "{{ kernel_version_by_distro_by_arch[ansible_distribution | lower][ansible_machine] }}"
+kernel_version: "{{ kernel_version_by_distro_by_arch[ansible_distribution | lower][ansible_distribution_release][ansible_machine] }}"
kernel_version_by_distro_by_arch:
ubuntu:
- x86_64:
- - "4.15.0-72-generic"
- - "5.3.0-1020-azure"
- - "4.15.0-1057-aws"
- aarch64:
- - "4.15.0-54-generic"
+ bionic:
+ x86_64:
+ - "4.15.0-72-generic"
+ - "5.3.0-1020-azure"
+ - "4.15.0-1057-aws"
+ aarch64:
+ - "4.15.0-54-generic"
+ focal:
+ x86_64:
+ - "5.4.0-65-generic"
+ - "5.3.0-1020-azure"
+ - "5.3.0-1017-aws"
+ aarch64:
+ - "5.4.0-65-generic"
pma_directory: "/tmp/pma_tools"
jitter_core: 7
diff --git a/resources/tools/testbed-setup/ansible/roles/common/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/common/defaults/main.yaml
index 5517b20e1f..7c2931ebec 100644
--- a/resources/tools/testbed-setup/ansible/roles/common/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/common/defaults/main.yaml
@@ -1,7 +1,7 @@
---
# file: roles/common/defaults/main.yaml
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
packages_base:
- "autoconf"
@@ -17,23 +17,35 @@ packages_base:
packages_by_distro:
ubuntu:
- - "build-essential"
- - "libpcap-dev"
- - "net-tools"
- - "python-all"
- - "python-apt"
- - "python-cffi"
- - "python-cffi-backend"
- - "python-dev"
- - "python-pip"
- - "python-setuptools"
- - "python3-all"
- - "python3-apt"
- - "python3-cffi"
- - "python3-cffi-backend"
- - "python3-dev"
- - "python3-pip"
- - "python3-setuptools"
+ bionic:
+ - "build-essential"
+ - "libpcap-dev"
+ - "net-tools"
+ - "python-all"
+ - "python-apt"
+ - "python-cffi"
+ - "python-cffi-backend"
+ - "python-dev"
+ - "python-pip"
+ - "python-setuptools"
+ - "python3-all"
+ - "python3-apt"
+ - "python3-cffi"
+ - "python3-cffi-backend"
+ - "python3-dev"
+ - "python3-pip"
+ - "python3-setuptools"
+ focal:
+ - "build-essential"
+ - "libpcap-dev"
+ - "net-tools"
+ - "python3-all"
+ - "python3-apt"
+ - "python3-cffi"
+ - "python3-cffi-backend"
+ - "python3-dev"
+ - "python3-pip"
+ - "python3-setuptools"
packages_by_arch:
aarch64:
diff --git a/resources/tools/testbed-setup/ansible/roles/common/handlers/main.yaml b/resources/tools/testbed-setup/ansible/roles/common/handlers/main.yaml
index e7327d3944..bb317e8067 100644
--- a/resources/tools/testbed-setup/ansible/roles/common/handlers/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/common/handlers/main.yaml
@@ -1,7 +1,7 @@
---
# file: roles/common/handlers/main.yaml
-- name: Reboot server
+- name: Reboot Server
reboot:
reboot_timeout: 3600
tags:
diff --git a/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml
index 5c3ba8280a..91fcd188a6 100644
--- a/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml
@@ -1,7 +1,7 @@
---
# file: roles/common/tasks/main.yaml
-- name: Add permanent proxy settings
+- name: Conf - Add permanent proxy settings
lineinfile:
path: "/etc/environment"
state: "present"
@@ -9,7 +9,7 @@
with_dict: "{{ proxy_env }}"
when: proxy_env is defined
tags:
- - set-proxy
+ - common-conf-proxy
- name: Inst - Update package cache (apt)
apt:
@@ -27,7 +27,7 @@
tags:
- common-inst-prerequisites
-- name: Install CSIT PIP requirements
+- name: Inst - CSIT PIP requirements
pip:
name:
- "ecdsa==0.13.3"
@@ -81,24 +81,24 @@
- "sphinxcontrib-serializinghtml==1.1.3"
- "urllib3==1.25.6"
tags:
- - install-pip
+ - common-inst-pip
-- name: Install CSIT PIP requirements - Pandas and SciPy workaround
+- name: Inst - CSIT PIP requirements - Pandas and SciPy workaround
pip:
name:
- "pandas==0.25.3"
- "scipy==1.5.4"
tags:
- - install-pip
+ - common-inst-pip
-- name: Install Meson (repository version is too old)
+- name: Inst - Meson (DPDK)
pip:
name:
- "meson==0.47.1"
tags:
- - install-meson
+ - common-inst-meson
-- name: Set sudoers admin
+- name: Conf - sudoers admin
lineinfile:
path: "/etc/sudoers"
state: "present"
@@ -106,9 +106,9 @@
line: "%admin ALL=(ALL) ALL"
validate: "/usr/sbin/visudo -cf %s"
tags:
- - set-sudoers
+ - common-conf-sudoers
-- name: Set sudoers sudo
+- name: Conf - sudoers nopasswd
lineinfile:
path: "/etc/sudoers"
state: "present"
@@ -116,6 +116,6 @@
line: "%sudo ALL=(ALL:ALL) NOPASSWD: ALL"
validate: "/usr/sbin/visudo -cf %s"
tags:
- - set-sudoers
+ - common-conf-sudoers
- meta: flush_handlers
diff --git a/resources/tools/testbed-setup/ansible/roles/csit_sut_image/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/csit_sut_image/tasks/main.yaml
index 7b41be8a64..8712060b48 100644
--- a/resources/tools/testbed-setup/ansible/roles/csit_sut_image/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/csit_sut_image/tasks/main.yaml
@@ -6,7 +6,8 @@
path: "/opt/csit-sut/"
state: "directory"
mode: 0755
- tags: csit-sut-image
+ tags:
+ - csit-sut-image
- name: Copy Build Items
copy:
@@ -18,10 +19,12 @@
with_items:
- Dockerfile
- supervisord.conf
- tags: csit-sut-image
+ tags:
+ - csit-sut-image
- name: Build CSIT SUT Docker Image
shell: "docker build -t csit_sut-ubuntu1804:local ."
args:
chdir: "/opt/csit-sut"
- tags: csit-sut-image \ No newline at end of file
+ tags:
+ - csit-sut-image \ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/docker/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/docker/defaults/main.yaml
index 9b182de4c4..8343558238 100644
--- a/resources/tools/testbed-setup/ansible/roles/docker/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/docker/defaults/main.yaml
@@ -21,8 +21,8 @@ docker_apt_gpg_key_state: present
# Used only for RedHat/CentOS/Fedora.
docker_yum_repo_url: https://download.docker.com/linux/{{ (ansible_distribution == "Fedora") | ternary("fedora","centos") }}/docker-{{ docker_edition }}.repo
-docker_yum_repo_enable_edge: '0'
-docker_yum_repo_enable_test: '0'
+docker_yum_repo_enable_edge: "0"
+docker_yum_repo_enable_test: "0"
docker_yum_gpg_key: https://download.docker.com/linux/centos/gpg
# A list of users who will be added to the docker group.
diff --git a/resources/tools/testbed-setup/ansible/roles/docker/handlers/main.yaml b/resources/tools/testbed-setup/ansible/roles/docker/handlers/main.yaml
index 4dfcd0b867..d89adb9a1a 100644
--- a/resources/tools/testbed-setup/ansible/roles/docker/handlers/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/docker/handlers/main.yaml
@@ -5,3 +5,5 @@
service:
name: "docker"
state: "{{ docker_restart_handler_state }}"
+ tags:
+ - docker-restart-service \ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/docker/tasks/ubuntu_bionic.yaml b/resources/tools/testbed-setup/ansible/roles/docker/tasks/ubuntu_bionic.yaml
index a4e5857dbd..8bda4fed21 100644
--- a/resources/tools/testbed-setup/ansible/roles/docker/tasks/ubuntu_bionic.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/docker/tasks/ubuntu_bionic.yaml
@@ -11,17 +11,20 @@
state: "present"
cache_valid_time: 3600
install_recommends: False
- tags: docker-inst-dependencies
+ tags:
+ - docker-inst-dependencies
- name: Conf - Add APT Key
apt_key:
url: "{{ docker_apt_gpg_key }}"
state: "{{ docker_apt_gpg_key_state }}"
- tags: docker-conf-apt
+ tags:
+ - docker-conf-apt
- name: Conf - Install APT Repository
apt_repository:
repo: "{{ docker_apt_repository }}"
state: "{{ docker_apt_repository_state }}"
update_cache: yes
- tags: docker-conf-apt
+ tags:
+ - docker-conf-apt
diff --git a/resources/tools/testbed-setup/ansible/roles/docker/tasks/ubuntu_focal.yaml b/resources/tools/testbed-setup/ansible/roles/docker/tasks/ubuntu_focal.yaml
new file mode 100644
index 0000000000..84bd1c5824
--- /dev/null
+++ b/resources/tools/testbed-setup/ansible/roles/docker/tasks/ubuntu_focal.yaml
@@ -0,0 +1,30 @@
+---
+# file: roles/docker/tasks/ubuntu_focal.yaml
+
+- name: Inst - Dependencies
+ apt:
+ name:
+ - "apt-transport-https"
+ - "ca-certificates"
+ - "gpg-agent"
+ - "software-properties-common"
+ state: "present"
+ cache_valid_time: 3600
+ install_recommends: False
+ tags:
+ - docker-inst-dependencies
+
+- name: Conf - Add APT Key
+ apt_key:
+ url: "{{ docker_apt_gpg_key }}"
+ state: "{{ docker_apt_gpg_key_state }}"
+ tags:
+ - docker-conf-apt
+
+- name: Conf - Install APT Repository
+ apt_repository:
+ repo: "{{ docker_apt_repository }}"
+ state: "{{ docker_apt_repository_state }}"
+ update_cache: yes
+ tags:
+ - docker-conf-apt
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 e43c28403b..2a8c691728 100644
--- a/resources/tools/testbed-setup/ansible/roles/dpdk/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/dpdk/defaults/main.yaml
@@ -1,15 +1,19 @@
---
# file: roles/dpdk/defaults/main.yaml
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
packages_base:
- []
packages_by_distro:
ubuntu:
- - "build-essential"
- - "libnuma-dev"
+ bionic:
+ - "build-essential"
+ - "libnuma-dev"
+ focal:
+ - "build-essential"
+ - "libnuma-dev"
packages_by_arch:
aarch64:
@@ -19,13 +23,9 @@ packages_by_arch:
dpdk_target_dir: "/opt"
dpdk_version:
- - "19.02"
- "20.02"
dpdk_url: "https://fast.dpdk.org/rel"
dpdk_build_targets:
- "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 27a5c2c9e3..46f942be93 100644
--- a/resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml
@@ -25,7 +25,7 @@
loop: "{{ dpdk_version }}"
register: "dpdk_downloaded"
tags:
- - install-dpdk
+ - dpdk-inst
- name: Extract Release Archive
unarchive:
@@ -37,7 +37,7 @@
when: "dpdk_downloaded"
register: "dpdk_extracted"
tags:
- - install-dpdk
+ - dpdk-inst
- name: Build igb_uio by default
lineinfile:
@@ -48,7 +48,7 @@
when: "dpdk_extracted"
register: "dpdk_configured"
tags:
- - install-dpdk
+ - dpdk-inst
- name: Compile Release I
become: yes
@@ -57,7 +57,7 @@
when: "dpdk_configured"
register: "dpdk_compiled"
tags:
- - install-dpdk
+ - dpdk-inst
- name: 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"
@@ -65,4 +65,4 @@
loop: "{{ dpdk_version }}"
when: "dpdk_compiled"
tags:
- - install-dpdk
+ - dpdk-inst \ No newline at end of file
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 50210660f4..07af60b63a 100644
--- a/resources/tools/testbed-setup/ansible/roles/iperf/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/iperf/defaults/main.yaml
@@ -1,15 +1,19 @@
---
# file: roles/iperf/defaults/main.yaml
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
packages_base:
- []
packages_by_distro:
ubuntu:
- - "build-essential"
- - "lib32z1"
+ bionic:
+ - "build-essential"
+ - "lib32z1"
+ focal:
+ - "build-essential"
+ - "lib32z1"
packages_by_arch:
aarch64:
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 853a00cb86..f8948cae57 100644
--- a/resources/tools/testbed-setup/ansible/roles/iperf/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/iperf/tasks/main.yaml
@@ -25,7 +25,7 @@
mode: 0644
loop: "{{ iperf_version }}"
tags:
- - install-iperf
+ - iperf-inst
- name: Extract Release Archive
unarchive:
@@ -35,7 +35,7 @@
creates: "{{ iperf_target_dir }}/iperf-{{ item }}/src"
loop: "{{ iperf_version }}"
tags:
- - install-iperf
+ - iperf-inst
- name: Compile Release I
command: "./configure"
@@ -43,7 +43,7 @@
chdir: "{{ iperf_target_dir }}/iperf-{{ item }}/"
loop: "{{ iperf_version }}"
tags:
- - install-iperf
+ - iperf-inst
- name: Compile Release II
command: "make"
@@ -51,7 +51,7 @@
chdir: "{{ iperf_target_dir }}/iperf-{{ item }}/"
loop: "{{ iperf_version }}"
tags:
- - install-iperf
+ - iperf-inst
- name: Compile Release III
command: "make install"
@@ -59,4 +59,4 @@
chdir: "{{ iperf_target_dir }}/iperf-{{ item }}/"
loop: "{{ iperf_version }}"
tags:
- - install-iperf
+ - iperf-inst \ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/kernel/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/kernel/defaults/main.yaml
index d84a163487..b9b4253622 100644
--- a/resources/tools/testbed-setup/ansible/roles/kernel/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/kernel/defaults/main.yaml
@@ -2,27 +2,42 @@
# file: roles/kernel/defaults/main.yaml
# Kernel version to install (Default to any version).
-kernel_version: "{{ kernel_version_by_distro[ansible_distribution | lower] | join(' ') }}"
+kernel_version: "{{ kernel_version_by_distro[ansible_distribution|lower][ansible_distribution_release] | join(' ') }}"
kernel_version_by_distro:
ubuntu:
- - "4.15.0-72"
+ bionic:
+ - "4.15.0-72"
+ focal:
+ - "5.4.0-65"
-kernel_packages: "{{ kernel_packages_by_distro[ansible_distribution | lower] | flatten(levels=1) }}"
+kernel_packages: "{{ kernel_packages_by_distro[ansible_distribution|lower][ansible_distribution_release] | flatten(levels=1) }}"
kernel_packages_by_distro:
ubuntu:
- - "linux-image"
- - "linux-headers"
- - "linux-modules"
- - "linux-modules-extra"
- - "linux-tools"
+ bionic:
+ - "linux-image"
+ - "linux-headers"
+ - "linux-modules"
+ - "linux-modules-extra"
+ - "linux-tools"
+ focal:
+ - "linux-image"
+ - "linux-headers"
+ - "linux-modules"
+ - "linux-modules-extra"
+ - "linux-tools"
# Packages to remove in relation to kernel upgrade.
-absent_packages: "{{ absent_packages_by_distro[ansible_distribution | lower] | flatten(levels=1) }}"
+absent_packages: "{{ absent_packages_by_distro[ansible_distribution|lower][ansible_distribution_release] | flatten(levels=1) }}"
absent_packages_by_distro:
ubuntu:
- - "amd64-microcode"
- - "intel-microcode"
- - "iucode-tool"
+ bionic:
+ - "amd64-microcode"
+ - "intel-microcode"
+ - "iucode-tool"
+ focal:
+ - "amd64-microcode"
+ - "intel-microcode"
+ - "iucode-tool" \ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/kernel/handlers/main.yaml b/resources/tools/testbed-setup/ansible/roles/kernel/handlers/main.yaml
index 3d30a0973c..963fd71756 100644
--- a/resources/tools/testbed-setup/ansible/roles/kernel/handlers/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/kernel/handlers/main.yaml
@@ -4,3 +4,5 @@
- name: Reboot Server
reboot:
reboot_timeout: 3600
+ tags:
+ - reboot-server \ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/kernel/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/kernel/tasks/main.yaml
index 4c63c709a6..431e344fb8 100644
--- a/resources/tools/testbed-setup/ansible/roles/kernel/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/kernel/tasks/main.yaml
@@ -1,8 +1,9 @@
---
# file: roles/kernel/tasks/main.yaml
-- name: Kernel - Install distribution - release
- include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml'
- tags: install-kernel
+- name: Inst - Prerequisites
+ include_tasks: "{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml"
+ tags:
+ - kernel-inst-prerequisites
- meta: flush_handlers
diff --git a/resources/tools/testbed-setup/ansible/roles/kernel/tasks/ubuntu_bionic.yaml b/resources/tools/testbed-setup/ansible/roles/kernel/tasks/ubuntu_bionic.yaml
index 3cb79352ee..349c853c11 100644
--- a/resources/tools/testbed-setup/ansible/roles/kernel/tasks/ubuntu_bionic.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/kernel/tasks/ubuntu_bionic.yaml
@@ -1,33 +1,37 @@
---
# file: roles/kernel/tasks/ubuntu_bionic.yaml
-- name: Kernel - Get Available Kernel Versions
+- name: Get Available Kernel Versions
command: "apt-cache showpkg linux-headers-*"
changed_when: false
register: apt_kernel_list
- tags: install-kernel
+ tags:
+ - kernel-inst
-- name: Kernel - Get installed packages with APT
+- name: Get installed packages with APT
command: "dpkg -l"
changed_when: false
register: apt_packages_list
- tags: install-kernel
+ tags:
+ - kernel-inst
-- name: Kernel - Set target APT kernel version
+- name: Set target APT kernel version
set_fact:
_kernel: "{{ apt_kernel_list | deb_kernel(
kernel_version, ansible_kernel) }}"
- tags: install-kernel
+ tags:
+ - kernel-inst
-- name: Kernel - Ensure Packages Versions
+- name: Ensure Packages Versions
apt:
name: "{{ apt_kernel_list | deb_kernel_pkg(
kernel_version, ansible_kernel, ansible_distribution,
ansible_architecture, item) }}"
loop: "{{ kernel_packages }}"
- tags: install-kernel
+ tags:
+ - kernel-inst
-- name: Kernel - Ensure Any Other Kernel Packages Are Removed
+- name: Ensure Any Other Kernel Packages Are Removed
apt:
name: "{{ apt_packages_list | deb_installed_kernel(
apt_kernel_list, kernel_version, ansible_kernel) }}"
@@ -35,12 +39,13 @@
purge: true
notify:
- "Reboot Server"
- tags: install-kernel
+ tags:
+ - kernel-inst
-- name: Kernel - Ensure Any Microcode Is Absent
+- name: Ensure Any Microcode Is Absent
apt:
name: "{{ absent_packages }}"
state: absent
purge: true
- tags: install-kernel
-
+ tags:
+ - kernel-inst \ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/kernel/tasks/ubuntu_focal.yaml b/resources/tools/testbed-setup/ansible/roles/kernel/tasks/ubuntu_focal.yaml
new file mode 100644
index 0000000000..9cbc4d4787
--- /dev/null
+++ b/resources/tools/testbed-setup/ansible/roles/kernel/tasks/ubuntu_focal.yaml
@@ -0,0 +1,51 @@
+---
+# file: roles/kernel/tasks/ubuntu_focal.yaml
+
+- name: Get Available Kernel Versions
+ command: "apt-cache showpkg linux-headers-*"
+ changed_when: false
+ register: apt_kernel_list
+ tags:
+ - kernel-inst
+
+- name: Get installed packages with APT
+ command: "dpkg -l"
+ changed_when: false
+ register: apt_packages_list
+ tags:
+ - kernel-inst
+
+- name: Set target APT kernel version
+ set_fact:
+ _kernel: "{{ apt_kernel_list | deb_kernel(
+ kernel_version, ansible_kernel) }}"
+ tags:
+ - kernel-inst
+
+- name: Ensure Packages Versions
+ apt:
+ name: "{{ apt_kernel_list | deb_kernel_pkg(
+ kernel_version, ansible_kernel, ansible_distribution,
+ ansible_architecture, item) }}"
+ loop: "{{ kernel_packages }}"
+ tags:
+ - kernel-inst
+
+- name: Ensure Any Other Kernel Packages Are Removed
+ apt:
+ name: "{{ apt_packages_list | deb_installed_kernel(
+ apt_kernel_list, kernel_version, ansible_kernel) }}"
+ state: absent
+ purge: true
+ notify:
+ - "Reboot Server"
+ tags:
+ - kernel-inst
+
+- name: Ensure Any Microcode Is Absent
+ apt:
+ name: "{{ absent_packages }}"
+ state: absent
+ purge: true
+ tags:
+ - kernel-inst \ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/kernel_vm/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/kernel_vm/tasks/main.yaml
index ba9426a55f..4d1b306e64 100644
--- a/resources/tools/testbed-setup/ansible/roles/kernel_vm/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/kernel_vm/tasks/main.yaml
@@ -1,7 +1,7 @@
---
# file: roles/kernel_vm/tasks/main.yaml
-- name: Kernel VM - Backup remote initramfs modules
+- name: Inst - Backup remote initramfs modules
copy:
src: "/etc/initramfs-tools/modules"
dest: "/tmp/initramfs_modules.bkp"
@@ -9,9 +9,9 @@
ignore_errors: yes
register: __initramfs_modules_backuped
tags:
- - install-kernel-image
+ - kernel-inst-image
-- name: Kernel VM - Backup remote initramfs resume config
+- name: Inst - Backup remote initramfs resume config
copy:
src: "/etc/initramfs-tools/conf.d/resume"
dest: "/tmp/initramfs-resume.bkp"
@@ -19,43 +19,43 @@
ignore_errors: yes
register: __initramfs_resume_backuped
tags:
- - install-kernel-image
+ - kernel-inst-image
-- name: Kernel VM - Update remote initramfs modules
+- name: Inst - Update remote initramfs modules
copy:
src: "../files/initramfs_modules"
dest: "/etc/initramfs-tools/modules"
tags:
- - install-kernel-image
+ - kernel-inst-image
-- name: Kernel VM - Update remote initramfs resume config
+- name: Inst - Update remote initramfs resume config
copy:
src: "../files/initramfs_resume"
dest: "/etc/initramfs-tools/conf.d/resume"
tags:
- - install-kernel-image
+ - kernel-inst-image
-- name: Kernel VM - Create target kernel dir
+- name: Inst - Create target kernel dir
file:
path: "/opt/boot"
state: "directory"
tags:
- - install-kernel-image
+ - kernel-inst-image
-- name: Kernel VM - Build initrd image
+- name: Inst - Build initrd image
shell: "update-initramfs -k {{ ansible_kernel }} -c -b /opt/boot"
tags:
- - install-kernel-image
+ - kernel-inst-image
-- name: Kernel VM - Copy corresponding kernel img
+- name: Inst - Copy corresponding kernel img
copy:
src: "/boot/vmlinuz-{{ ansible_kernel }}"
dest: "/opt/boot/vmlinuz-{{ ansible_kernel }}"
remote_src: yes
tags:
- - install-kernel-image
+ - kernel-inst-image
-- name: Kernel VM - Restore remote initramfs modules
+- name: Inst - Restore remote initramfs modules
copy:
src: "/tmp/initramfs_modules.bkp"
dest: "/etc/initramfs-tools/modules"
@@ -63,17 +63,17 @@
ignore_errors: yes
when: __initramfs_modules_backuped
tags:
- - install-kernel-image
+ - kernel-inst-image
-- name: Kernel VM - Remove remote backup initramfs modules
+- name: Inst - Remove remote backup initramfs modules
file:
path: "/tmp/initramfs_modules.bkp"
state: "absent"
when: __initramfs_modules_backuped
tags:
- - install-kernel-image
+ - kernel-inst-image
-- name: Kernel VM - Restore remote initramfs resume config
+- name: Inst - Restore remote initramfs resume config
copy:
src: "/tmp/initramfs-resume.bkp"
dest: "/etc/initramfs-tools/conf.d/resume"
@@ -81,12 +81,12 @@
ignore_errors: yes
when: __initramfs_resume_backuped
tags:
- - install-kernel-image
+ - kernel-inst-image
-- name: Kernel VM - Remove remote backup initramfs resume config
+- name: Inst - Remove remote backup initramfs resume config
file:
path: "/tmp/initramfs-resume.bkp"
state: "absent"
when: __initramfs_resume_backuped
tags:
- - install-kernel-image
+ - kernel-inst-image
diff --git a/resources/tools/testbed-setup/ansible/roles/mellanox/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/mellanox/tasks/main.yaml
index 1b81215a73..670282923a 100644
--- a/resources/tools/testbed-setup/ansible/roles/mellanox/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/mellanox/tasks/main.yaml
@@ -17,24 +17,24 @@
tags:
- mellanox-inst-prerequisites
-- name: Check Presence of Mellanox Hardware
+- name: Inst - Check Presence of Mellanox Hardware
shell: "lspci | grep Mellanox | awk '{print $1}'"
register: mellanox_pcis
failed_when: no
changed_when: no
tags:
- - install-mellanox
+ - mellanox-inst
-- name: Get OFED
+- name: Inst - Get OFED
get_url:
url: "http://content.mellanox.com/ofed/MLNX_OFED-{{ mellanox_version }}/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
dest: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
mode: 0644
when: mellanox_pcis.stdout_lines | length > 0
tags:
- - install-mellanox
+ - mellanox-inst
-- name: Extract OFED
+- name: Inst - Extract OFED
unarchive:
remote_src: true
src: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
@@ -43,25 +43,25 @@
register: mellanox_firmware_extracted
when: mellanox_pcis.stdout_lines | length > 0
tags:
- - install-mellanox
+ - mellanox-inst
-- name: Install OFED
+- name: Inst - OFED
command: "./mlnxofedinstall --with-mft --dpdk --force --upstream-libs"
args:
chdir: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}"
when: mellanox_pcis.stdout_lines | length > 0 and mellanox_firmware_extracted
tags:
- - install-mellanox
+ - mellanox-inst
- name: Switch Infiniband to Ethernet
command: "mlxconfig --yes --dev {{ item }} set LINK_TYPE_P1=2 LINK_TYPE_P2=2"
with_items: "{{ mellanox_pcis.stdout_lines }}"
tags:
- - install-mellanox
+ - mellanox-conf
- name: FIX qemu-system removal
package:
name: "qemu-system"
state: latest
tags:
- - install-mellanox
+ - mellanox-inst
diff --git a/resources/tools/testbed-setup/ansible/roles/performance_tuning/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/performance_tuning/defaults/main.yaml
index 612bc5a946..2dad931e92 100644
--- a/resources/tools/testbed-setup/ansible/roles/performance_tuning/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/performance_tuning/defaults/main.yaml
@@ -1,14 +1,17 @@
---
# file: roles/performance_tuning/defaults/main.yaml
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
packages_base:
- "cpufrequtils"
packages_by_distro:
ubuntu:
- - []
+ bionic:
+ - []
+ focal:
+ - []
packages_by_arch:
aarch64:
diff --git a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml
index 3c22892483..feef2ca3a6 100644
--- a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml
@@ -17,33 +17,28 @@
tags:
- perf-inst-prerequisites
-- name: Distribution - release - machine optimizations
- include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml'
- tags:
- - machine-optimizations
-
-- name: Configure {{ ansible_machine }} Kernel Parameters
+- name: Conf - Kernel Parameters
lineinfile:
path: "/etc/default/grub"
state: "present"
regexp: "^GRUB_CMDLINE_LINUX="
- line: "GRUB_CMDLINE_LINUX=\"{% for key, value in grub.items() %}{% if value %}{{key}}={{value}} {% else %}{{key}} {% endif %}{% endfor %}\""
+ line: "GRUB_CMDLINE_LINUX=\"{% for key, value in grub.items() %}{% if value is sameas true %}{{key}} {% else %}{{key}}={{value}} {% endif %}{% endfor %}\""
notify:
- "Update GRUB"
tags:
- - set-grub
+ - perf-conf-grub
- meta: flush_handlers
-- name: Turbo Boost
+- name: Conf - Turbo Boost
import_tasks: turbo_boost.yaml
when: >
cpu_microarchitecture == "skylake" or
cpu_microarchitecture == "cascadelake"
tags:
- - turbo-boost
+ - perf-conf-turbo-boost
-- name: Adjust nr_hugepages
+- name: Conf - Adjust nr_hugepages
# change the minimum size of the hugepage pool.
# 2G VPP, 4GB per VNF/CNF, 2G reserve
sysctl:
@@ -53,9 +48,9 @@
sysctl_file: "/etc/sysctl.d/90-csit.conf"
reload: "yes"
tags:
- - set-sysctl
+ - perf-conf-sysctl
-- name: Adjust max_map_count
+- name: Conf - Adjust max_map_count
# this file contains the maximum number of memory map areas a process
# may have. memory map areas are used as a side-effect of calling
# malloc, directly by mmap and mprotect, and also when loading shared
@@ -72,9 +67,9 @@
sysctl_file: "/etc/sysctl.d/90-csit.conf"
reload: "yes"
tags:
- - set-sysctl
+ - perf-conf-sysctl
-- name: Adjust hugetlb_shm_group
+- name: Conf - Adjust hugetlb_shm_group
# hugetlb_shm_group contains group id that is allowed to create sysv
# shared memory segment using hugetlb page.
sysctl:
@@ -84,9 +79,9 @@
sysctl_file: "/etc/sysctl.d/90-csit.conf"
reload: "yes"
tags:
- - set-sysctl
+ - perf-conf-sysctl
-- name: Adjust swappiness
+- name: Conf - Adjust swappiness
# this control is used to define how aggressive the kernel will swap
# memory pages. higher values will increase agressiveness, lower values
# decrease the amount of swap. a value of 0 instructs the kernel not to
@@ -99,9 +94,9 @@
sysctl_file: "/etc/sysctl.d/90-csit.conf"
reload: "yes"
tags:
- - set-sysctl
+ - perf-conf-sysctl
-- name: Adjust shmmax
+- name: Conf - Adjust shmmax
# shared memory max must be greator or equal to the total size of hugepages.
# for 2mb pages, totalhugepagesize = vm.nr_hugepages * 2 * 1024 * 1024
# if the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
@@ -114,9 +109,9 @@
sysctl_file: "/etc/sysctl.d/90-csit.conf"
reload: "yes"
tags:
- - set-sysctl
+ - perf-conf-sysctl
-- name: Adjust watchdog_cpumask
+- name: Conf - Adjust watchdog_cpumask
# this value can be used to control on which cpus the watchdog may run.
# the default cpumask is all possible cores, but if no_hz_full is
# enabled in the kernel config, and cores are specified with the
@@ -134,9 +129,9 @@
sysctl_file: "/etc/sysctl.d/90-csit.conf"
reload: "yes"
tags:
- - set-sysctl
+ - perf-conf-sysctl
-- name: Adjust randomize_va_space
+- name: Conf - Adjust randomize_va_space
# this option can be used to select the type of process address
# space randomization that is used in the system, for architectures
# that support this feature.
@@ -150,38 +145,38 @@
sysctl_file: "/etc/sysctl.d/90-csit.conf"
reload: "yes"
tags:
- - set-sysctl
+ - perf-conf-sysctl
-- name: Copy Cpufrequtils File
+- name: Conf - Cpufrequtils
copy:
src: "files/cpufrequtils"
dest: "/etc/default/cpufrequtils"
owner: "root"
group: "root"
- mode: "0644"
+ mode: 0644
tags:
- - copy-cpufrequtils
+ - perf-conf-cpufrequtils
-- name: Copy Irqbalance File
+- name: Conf - Irqbalance
template:
src: "files/irqbalance"
dest: "/etc/default/irqbalance"
owner: "root"
group: "root"
- mode: "0644"
+ mode: 0644
notify:
- "Update GRUB"
tags:
- - copy-irqbalance
+ - perf-conf-irqbalance
-- name: Set Ondemand Service To Disable
+- name: Conf - Set Ondemand Service To Disable
service:
name: "ondemand"
enabled: "no"
tags:
- - set-ondemand
+ - perf-conf-ondemand
-- name: Load Kernel Modules By Default
+- name: Conf - Load Kernel Modules By Default
lineinfile:
path: "/etc/modules"
state: "present"
@@ -189,6 +184,6 @@
with_items:
- "vfio-pci"
tags:
- - load-kernel-modules
+ - perf-conf-load-kernel-modules
- meta: flush_handlers
diff --git a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/turbo_boost.yaml b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/turbo_boost.yaml
index 11f0e326d9..7f69365a2d 100644
--- a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/turbo_boost.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/turbo_boost.yaml
@@ -10,7 +10,7 @@
tags:
- turbo-inst-prerequisites
-- name: Install msr-tools
+- name: Inst - msr-tools
package:
name:
- "msr-tools"
@@ -18,27 +18,27 @@
tags:
- turbo-inst-prerequisites
-- name: Load msr By Default
+- name: Conf - Load msr By Default
lineinfile:
path: "/etc/modules"
state: "present"
line: "msr"
tags:
- - turbo-boost
+ - turbo-conf-msr
-- name: Custom Startup Service Hook
+- name: Conf - Custom Startup Service Hook
copy:
src: "files/disable-turbo-boost.service"
dest: "/etc/systemd/system/disable-turbo-boost.service"
owner: "root"
group: "root"
- mode: "0644"
+ mode: 0644
tags:
- - turbo-boost
+ - turbo-conf-msr
-- name: Custom Startup Service Hook Enable
+- name: Conf - Custom Startup Service Hook Enable
service:
name: "disable-turbo-boost"
enabled: yes
tags:
- - turbo-boost
+ - turbo-conf-msr
diff --git a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/ubuntu_bionic.yaml b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/ubuntu_bionic.yaml
deleted file mode 100644
index 273ad53f25..0000000000
--- a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/ubuntu_bionic.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-# file: roles/performance_tuning/tasks/ubuntu_bionic.yaml
-
-- name: Ubuntu Bionic - Mount /tmp as tmpfs I
- copy:
- src: "/usr/share/systemd/tmp.mount"
- dest: "/etc/systemd/system/tmp.mount"
- remote_src: yes
- tags:
- - machine-optimizations
-
-- name: Ubuntu Bionic - Mount /tmp as tmpfs II
- systemd:
- name: "tmp.mount"
- daemon_reload: yes
- enabled: yes
- tags:
- - machine-optimizations
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 d7a9ed882d..4e79dabfab 100644
--- a/resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml
@@ -1,28 +1,30 @@
---
# file: roles/tg/tasks/main.yaml
-- name: TG - Copy csit-initialize-docker-tg.sh
+- name: Conf - csit-initialize-docker-tg.sh
copy:
src: "files/csit-initialize-docker-tg.sh"
dest: "/usr/local/bin/csit-initialize-docker-tg.sh"
owner: "root"
group: "root"
- mode: "744"
- when: docker_tg is defined
+ mode: 0744
+ when:
+ - docker_tg is defined
tags:
- - docker-tg
+ - tg-conf-docker
-- name: TG - Start csit-initialize-docker-tg.service
+- name: Conf - Start csit-initialize-docker-tg.service
copy:
src: "files/csit-initialize-docker-tg.service"
dest: "/etc/systemd/system/"
owner: "root"
group: "root"
- mode: "644"
+ mode: 0644
notify:
- "Start csit-initialize-docker-tg.service"
- when: docker_tg is defined
+ when:
+ - docker_tg is defined
tags:
- - docker-tg
+ - tg-conf-docker
- meta: flush_handlers
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 c3caf52d76..0fb7dd37a7 100644
--- a/resources/tools/testbed-setup/ansible/roles/trex/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/trex/defaults/main.yaml
@@ -1,23 +1,35 @@
---
# file: roles/trex/defaults/main.yaml
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
packages_base:
- []
packages_by_distro:
ubuntu:
- - "build-essential"
- - "libmnl-dev"
- - "libnuma-dev"
- - "libpcap-dev"
- - "librdmacm-dev"
- - "librdmacm1"
- - "libssl-dev"
- - "pciutils"
- - "python3-pip"
- - "zlib1g-dev"
+ bionic:
+ - "build-essential"
+ - "libmnl-dev"
+ - "libnuma-dev"
+ - "libpcap-dev"
+ - "librdmacm-dev"
+ - "librdmacm1"
+ - "libssl-dev"
+ - "pciutils"
+ - "python3-pip"
+ - "zlib1g-dev"
+ focal:
+ - "build-essential"
+ - "libmnl-dev"
+ - "libnuma-dev"
+ - "libpcap-dev"
+ - "librdmacm-dev"
+ - "librdmacm1"
+ - "libssl-dev"
+ - "pciutils"
+ - "python3-pip"
+ - "zlib1g-dev"
packages_by_arch:
aarch64:
@@ -28,11 +40,6 @@ packages_by_arch:
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
diff --git a/resources/tools/testbed-setup/ansible/roles/trex/tasks/deploy_block.yaml b/resources/tools/testbed-setup/ansible/roles/trex/tasks/deploy_block.yaml
index 1513a0a617..5a7890b071 100644
--- a/resources/tools/testbed-setup/ansible/roles/trex/tasks/deploy_block.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/trex/tasks/deploy_block.yaml
@@ -1,7 +1,7 @@
---
# file: roles/trex/tasks/deploy_block.yaml
-- name: "Get Release {{ item }}"
+- name: Get Release {{ item }}
get_url:
url: "{{ trex_url }}/v{{ item }}.tar.gz"
dest: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
@@ -9,12 +9,12 @@
mode: 0644
register: trex_downloaded
-- name: "Create Directory {{ item }}"
+- name: Create Directory {{ item }}
file:
path: "{{ trex_target_dir }}/trex-core-{{ item }}"
state: "directory"
-- name: "Extract Release {{ item }}"
+- name: Extract Release {{ item }}
unarchive:
remote_src: true
src: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
@@ -30,25 +30,25 @@
when:
- azure is defined and item == "2.73"
-- name: "Compile Release {{ item }} Part I"
+- 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"
+- 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"
+- 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"
+- name: Compile Release {{ item }} Part IV
command: "make install"
args:
chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src"
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 96a3ba5f03..d43baf909b 100644
--- a/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml
@@ -17,8 +17,8 @@
tags:
- trex-inst-prerequisites
-- name: Deploy Multiple T-Rex Versions
+- name: Inst - Multiple T-Rex Versions
include_tasks: deploy_block.yaml
loop: "{{ trex_version }}"
tags:
- - install-trex \ No newline at end of file
+ - trex-inst \ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/vpp/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/vpp/defaults/main.yaml
index 323d00cf29..7fac499307 100644
--- a/resources/tools/testbed-setup/ansible/roles/vpp/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/vpp/defaults/main.yaml
@@ -1,7 +1,7 @@
---
# file: roles/vpp/defaults/main.yaml
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
packages_base:
- "gdb"
@@ -12,13 +12,22 @@ packages_base:
packages_by_distro:
ubuntu:
- - "build-essential"
- - "libglib2.0-dev"
- - "libmbedcrypto1"
- - "libmbedtls10"
- - "libmbedx509-0"
- - "libnuma-dev"
- - "libpixman-1-dev"
+ bionic:
+ - "build-essential"
+ - "libglib2.0-dev"
+ - "libmbedcrypto1"
+ - "libmbedtls10"
+ - "libmbedx509-0"
+ - "libnuma-dev"
+ - "libpixman-1-dev"
+ focal:
+ - "build-essential"
+ - "libglib2.0-dev"
+ - "libmbedcrypto3"
+ - "libmbedtls12"
+ - "libmbedx509-0"
+ - "libnuma-dev"
+ - "libpixman-1-dev"
packages_by_arch:
aarch64:
diff --git a/resources/tools/testbed-setup/ansible/roles/vpp/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/vpp/tasks/main.yaml
index 6011917de2..ef03011b51 100644
--- a/resources/tools/testbed-setup/ansible/roles/vpp/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/vpp/tasks/main.yaml
@@ -17,19 +17,11 @@
tags:
- vpp-inst-prerequisites
-- name: Inst - VPP 19.08 PIP requirements
- pip:
- name:
- - "aenum==2.1.2"
- executable: pip2
- tags:
- - install-pip
-
-- name: Copy 80-vpp.conf
+- name: Conf - sysctl
file:
src: "/dev/null"
dest: "/etc/sysctl.d/80-vpp.conf"
state: "link"
become: yes
tags:
- - create-80-vpp
+ - vpp-conf-sysctl
diff --git a/resources/tools/testbed-setup/ansible/sut.yaml b/resources/tools/testbed-setup/ansible/sut.yaml
index f3e8c3b57b..972c56b72b 100644
--- a/resources/tools/testbed-setup/ansible/sut.yaml
+++ b/resources/tools/testbed-setup/ansible/sut.yaml
@@ -20,14 +20,12 @@
tags: kernel
- role: mellanox
tags: mellanox
+ - role: docker
+ tags: docker
- role: vpp
tags: vpp
- role: dpdk
tags: dpdk
- - role: docker
- tags: docker
- - role: kubernetes
- tags: kubernetes
- role: kernel_vm
tags: kernel_vm
- role: csit_sut_image
diff --git a/resources/tools/testbed-setup/ansible/sut_azure.yaml b/resources/tools/testbed-setup/ansible/sut_azure.yaml
index a3a24a4dcb..eb1b001ca2 100644
--- a/resources/tools/testbed-setup/ansible/sut_azure.yaml
+++ b/resources/tools/testbed-setup/ansible/sut_azure.yaml
@@ -15,14 +15,14 @@
tags: user_add
- role: common
tags: common
+ - role: docker
+ tags: docker
- role: vpp
tags: vpp
- role: azure
tags: azure
- role: iperf
tags: iperf
- - role: docker
- tags: docker
- role: dpdk
tags: dpdk
- role: cleanup
diff --git a/resources/tools/testbed-setup/ansible/tg.yaml b/resources/tools/testbed-setup/ansible/tg.yaml
index 527ccae922..3de55e62e8 100644
--- a/resources/tools/testbed-setup/ansible/tg.yaml
+++ b/resources/tools/testbed-setup/ansible/tg.yaml
@@ -20,6 +20,8 @@
tags: kernel
- role: mellanox
tags: mellanox
+ - role: docker
+ tags: docker
- role: tg
tags: tg
- role: iperf
@@ -28,8 +30,6 @@
tags: trex
- role: ab
tags: ab
- - role: docker
- tags: docker
- role: performance_tuning
tags: performance_tuning
- role: cleanup
@@ -50,6 +50,8 @@
tags: dpdk
- role: aws
tags: aws
+ - role: docker
+ tags: docker
- role: tg
tags: tg
- role: iperf
@@ -58,8 +60,6 @@
tags: trex
- role: ab
tags: ab
- - role: docker
- tags: docker
- role: cleanup
tags: cleanup
# TODO: 'Check Kernel Parameters' failing in
diff --git a/resources/tools/testbed-setup/ansible/tg_azure.yaml b/resources/tools/testbed-setup/ansible/tg_azure.yaml
index ef3201617c..3713dc845f 100644
--- a/resources/tools/testbed-setup/ansible/tg_azure.yaml
+++ b/resources/tools/testbed-setup/ansible/tg_azure.yaml
@@ -17,6 +17,8 @@
tags: common
- role: azure
tags: azure
+ - role: docker
+ tags: docker
- role: tg
tags: tg
- role: iperf
@@ -25,8 +27,6 @@
tags: trex
- role: ab
tags: ab
- - role: docker
- tags: docker
- role: cleanup
tags: cleanup
# - role: calibration