diff options
Diffstat (limited to 'resources/tools')
9 files changed, 99 insertions, 122 deletions
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 6bb4d4614e..3e7e5a00fa 100644 --- a/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml @@ -67,6 +67,36 @@ include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml' tags: [ install-csit-dependencies, copy-apt-sources ] +- 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' + - 'aenum==2.1.2' + tags: install-pip + +- name: Install CSIT PIP requirements - SciPy workaround + pip: + name: + - 'scipy==1.1.0' + tags: install-pip + - name: Set sudoers admin lineinfile: path: '/etc/sudoers' diff --git a/resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu_bionic.yaml b/resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu_bionic.yaml index 31872e035f..d5e8cb1d52 100644 --- a/resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu_bionic.yaml +++ b/resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu_bionic.yaml @@ -10,15 +10,43 @@ - name: Install CSIT dependencies apt: name: + - 'autoconf' + - 'build-essential' + - 'cgroup-bin' + - 'dkms' + - 'python-all' - 'python-apt' + - 'python-cffi' + - 'python-cffi-backend' + - 'python-dev' + - 'python-pip' - 'python-setuptools' - - 'git' - - 'crudini' - - 'expect' - - 'socat' + - 'python3-all' + - 'python3-apt' + - 'python3-cffi' + - 'python3-cffi-backend' + - 'python3-dev' + - 'python3-pip' + - 'python3-setuptools' - 'qemu-system' - - 'build-essential' + - 'socat' + - 'virtualenv' + - 'unzip' + - 'zlib1g-dev' + state: 'present' + cache_valid_time: 3600 + install_recommends: False + tags: install-csit-dependencies + +- name: Install CSIT dependencies - aarch64 SciPy + apt: + name: + - 'gfortran' + - 'libblas-dev' + - 'liblapack-dev' state: 'present' cache_valid_time: 3600 install_recommends: False + when: > + ansible_machine == 'aarch64' tags: install-csit-dependencies diff --git a/resources/tools/testbed-setup/ansible/roles/sut/tasks/ubuntu_bionic.yaml b/resources/tools/testbed-setup/ansible/roles/sut/tasks/ubuntu_bionic.yaml index b562ec1158..087b97f121 100644 --- a/resources/tools/testbed-setup/ansible/roles/sut/tasks/ubuntu_bionic.yaml +++ b/resources/tools/testbed-setup/ansible/roles/sut/tasks/ubuntu_bionic.yaml @@ -4,26 +4,22 @@ - name: Install CSIT dependencies apt: name: - - 'dkms' - - 'pkg-config' + - 'cpufrequtils' + - 'gdb' - 'libglib2.0-dev' - - 'autoconf' - - 'libtool' - - 'screen' - 'libmbedcrypto1' - 'libmbedtls10' - 'libmbedx509-0' + - 'libnuma-dev' + - 'libpcap-dev' + - 'libpixman-1-dev' + - 'libtool' - 'lxc' - 'openjdk-8-jdk' - - 'libpixman-1-dev' - - 'python-cffi' - - 'python-cffi-backend' - - 'python3-cffi' - - 'python3-cffi-backend' - - 'libnuma-dev' - - 'lzop' - - 'lrzip' + - 'pkg-config' + - 'screen' state: 'present' + cache_valid_time: 3600 install_recommends: False tags: install-csit-dependencies 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 d56c843158..90703ed2d9 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 @@ -4,9 +4,11 @@ - name: Install CSIT dependencies apt: name: - - 'unzip' - - 'zlib1g-dev' + - 'cpufrequtils' + - 'libnuma-dev' + - 'libpcap-dev' - 'libssl-dev' 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/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 - |