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'
- 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
- 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
- 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
---
# 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
- 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:
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'
---
# 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
- 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
---
# 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'
- '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
-