diff options
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/tg_sut')
5 files changed, 23 insertions, 102 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/aarch64.yaml b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/aarch64.yaml index 2a481335a0..433ccc0eb6 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/aarch64.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/aarch64.yaml @@ -1,50 +1,12 @@ --- # file: roles/tg_sut/tasks/aarch64.yaml -- name: Configure aarch64 kernel parameters +- name: Configure {{ ansible_machine }} kernel parameters lineinfile: path: '/etc/default/grub' state: 'present' regexp: '^GRUB_CMDLINE_LINUX=' line: 'GRUB_CMDLINE_LINUX="isolcpus={{ grub.isolcpus }} nohz_full={{ grub.nohz_full }} rcu_nocbs={{ grub.rcu_nocbs }} intel_iommu=on nmi_watchdog=0 audit=0 nosoftlockup processor.max_cstate=1"' - notify: ['Update GRUB'] + notify: + - 'Update GRUB' tags: set-grub - -- name: Install SciPy dependencies - apt: - name: - - 'gfortran' - - 'libblas-dev' - - 'liblapack-dev' - state: 'present' - install_recommends: False - tags: install-pip - -- name: Install CSIT PIP requirements without SciPy - pip: - name: - - 'docopt==0.6.2' - - 'ecdsa==0.13' - - 'enum34==1.1.2' - - 'ipaddress==1.0.16' - - 'paramiko==1.16.0' - - 'pexpect==4.6.0' - - 'pycrypto==2.6.1' - - 'pykwalify==1.5.0' - - 'pypcap==1.1.5' - - 'python-dateutil==2.4.2' - - 'PyYAML==3.11' - - 'requests==2.9.1' - - 'robotframework==2.9.2' - - 'scapy==2.3.1' - - 'scp==0.10.2' - - 'six==1.12.0' - - 'dill==0.2.8.2' - - 'numpy==1.14.5' - tags: install-pip - -- name: Install CSIT PIP requirements - SciPy workaround - pip: - name: - - 'scipy==1.1.0' - tags: install-pip diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/main.yaml index bb8c67660a..41985a367c 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/main.yaml @@ -7,14 +7,14 @@ - name: Machine specifics include_tasks: '{{ ansible_machine }}.yaml' - tags: [ disable-turbo-boost, set-grub, install-pip ] + tags: set-grub -- name: Turbo boost specific +- name: Turbo boost import_tasks: turbo_boost.yaml when: > cpu_microarchitecture == "skylake" or cpu_microarchitecture == "cascadelake" - tags: [ install-msr, disable-turbo-boost ] + tags: turbo-boost - name: Copy CSIT sysctl file template: @@ -49,12 +49,6 @@ enabled: 'no' tags: set-ondemand -- name: Install VPP PIP requirements - pip: - name: - - 'aenum==2.1.2' - tags: install-pip - - name: Load vfio-pci by default lineinfile: path: '/etc/modules' diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/turbo_boost.yaml b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/turbo_boost.yaml index 1002792aa8..2fa704cdb0 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/turbo_boost.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/turbo_boost.yaml @@ -1,25 +1,33 @@ --- # file: roles/tg_sut/tasks/turbo_boost.yaml -- name: Install msr-tools +- name: Turbo boost - Install msr-tools apt: name: - 'msr-tools' state: 'present' + cache_valid_time: 3600 install_recommends: False - tags: install-msr + tags: turbo-boost -- name: Disable Turbo-Boost by service +- name: Turbo boost - Load msr by default + lineinfile: + path: '/etc/modules' + state: 'present' + line: 'msr' + tags: turbo-boost + +- name: Turbo boost - 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' - tags: disable-turbo-boost + tags: turbo-boost -- name: Disable Turbo-Boost by service on startup +- name: Turbo boost - Custom startup service hook enable service: - name: disable-turbo-boost + name: 'disable-turbo-boost' enabled: yes - tags: disable-turbo-boost + tags: turbo-boost diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/ubuntu_bionic.yaml b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/ubuntu_bionic.yaml index a8c2266201..fed589c432 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/ubuntu_bionic.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/ubuntu_bionic.yaml @@ -4,20 +4,11 @@ - name: Install CSIT dependencies apt: name: - - 'python-dev' - - 'virtualenv' - - 'python-pip' - - 'libpcap-dev' - - 'cpufrequtils' - - 'cgroup-bin' - - 'zlib1g-dev' - 'apt-transport-https' - 'ca-certificates' - 'software-properties-common' - - 'libnuma-dev' - - 'lzop' - - 'lrzip' state: 'present' + cache_valid_time: 3600 install_recommends: False tags: install-csit-dependencies diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/x86_64.yaml b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/x86_64.yaml index 45d6cc31f1..5b705eacb8 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/x86_64.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/x86_64.yaml @@ -1,14 +1,7 @@ --- # file: roles/tg_sut/tasks/x86_64.yaml -- name: Load msr by default - lineinfile: - path: '/etc/modules' - state: 'present' - line: 'msr' - tags: disable-turbo-boost - -- name: Configure x86_64 kernel parameters +- name: Configure {{ ansible_machine }} kernel parameters lineinfile: path: '/etc/default/grub' state: 'present' @@ -18,30 +11,3 @@ - 'Update GRUB' - 'Reboot server' tags: set-grub - -- meta: flush_handlers - -- name: Install CSIT PIP requirements - pip: - name: - - 'docopt==0.6.2' - - 'ecdsa==0.13' - - 'enum34==1.1.2' - - 'ipaddress==1.0.16' - - 'paramiko==1.16.0' - - 'pexpect==4.6.0' - - 'pycrypto==2.6.1' - - 'pykwalify==1.5.0' - - 'pypcap==1.1.5' - - 'python-dateutil==2.4.2' - - 'PyYAML==3.11' - - 'requests==2.9.1' - - 'robotframework==2.9.2' - - 'scapy==2.3.1' - - 'scp==0.10.2' - - 'six==1.12.0' - - 'dill==0.2.8.2' - - 'numpy==1.14.5' - - 'scipy==1.1.0' - tags: install-pip - |