diff options
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/tg_sut')
13 files changed, 0 insertions, 445 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/90-csit b/resources/tools/testbed-setup/ansible/roles/tg_sut/files/90-csit deleted file mode 100644 index 0c9036e936..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/90-csit +++ /dev/null @@ -1,80 +0,0 @@ -# change the minimum size of the hugepage pool. -# 2G VPP, 16x2G for Fullbox VM, 2G reserve -vm.nr_hugepages={{ sysctl.vm.nr_hugepages }} - -# 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 -# libraries. -# -# while most applications need less than a thousand maps, certain -# programs, particularly malloc debuggers, may consume lots of them, -# e.g., up to one or two maps per allocation. -# must be greater than or equal to (2 * vm.nr_hugepages). -vm.max_map_count={{ sysctl.vm.max_map_count }} - -# hugetlb_shm_group contains group id that is allowed to create sysv -# shared memory segment using hugetlb page. -vm.hugetlb_shm_group=0 - -# 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 -# initiate swap until the amount of free and file-backed pages is less -# than the high water mark in a zone. -vm.swappiness=0 - -# this parameter can be used to control the nmi watchdog -# (i.e. the hard lockup detector) on x86 systems. -# -# 0 - disable the hard lockup detector -# 1 - enable the hard lockup detector -# -# the hard lockup detector monitors each cpu for its ability to respond to -# timer interrupts. the mechanism utilizes cpu performance counter registers -# that are programmed to generate non-maskable interrupts (nmis) periodically -# while a cpu is busy. hence, the alternative name 'nmi watchdog'. -# -# the nmi watchdog is disabled by default if the kernel is running as a guest -# in a kvm virtual machine. this default can be overridden by adding -#kernel. nmi_watchdog=1 - -# 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) -# is greater than the calculated totalhugepagesize then set this parameter -# to current shmmax value. -kernel.shmmax=8589934592 - -# 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. -# 0 - turn the process address space randomization off. this is the -# default for architectures that do not support this feature anyways, -# and kernels that are booted with the "norandmaps" parameter. -kernel.randomize_va_space=0 - -# this parameter can be used to control the soft lockup detector. -# -# 0 - disable the soft lockup detector -# 1 - enable the soft lockup detector -# -# the soft lockup detector monitors cpus for threads that are hogging the cpus -# without rescheduling voluntarily, and thus prevent the 'watchdog/n' threads -# from running. the mechanism depends on the cpus ability to respond to timer -# interrupts which are needed for the 'watchdog/n' threads to be woken up by -# the watchdog timer function, otherwise the nmi watchdog - if enabled - can -# detect a hard lockup condition. -#kernel.soft_watchdog=0 - -# 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 -# nohz_full= boot argument, those cores are excluded by default. -# offline cores can be included in this mask, and if the core is later -# brought online, the watchdog will be started based on the mask value. -# -# typically this value would only be touched in the nohz_full case -# to re-enable cores that by default were not running the watchdog, -# if a kernel lockup was suspected on those cores. -kernel.watchdog_cpumask={{ sysctl.kernel.watchdog_cpumask }} diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/cpufrequtils b/resources/tools/testbed-setup/ansible/roles/tg_sut/files/cpufrequtils deleted file mode 100644 index 03070fefe1..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/cpufrequtils +++ /dev/null @@ -1 +0,0 @@ -GOVERNOR="performance" diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/disable-turbo-boost.service b/resources/tools/testbed-setup/ansible/roles/tg_sut/files/disable-turbo-boost.service deleted file mode 100644 index e04729de50..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/disable-turbo-boost.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Disable Turbo Boost on Intel CPU - -[Service] -ExecStart=/bin/sh -c 'for core in `cat /proc/cpuinfo | grep processor | awk \'{print $3}\'`; do sudo wrmsr -p$core 0x1a0 0x4000850089; done' -ExecStop=/bin/sh -c 'for core in `cat /proc/cpuinfo | grep processor | awk \'{print $3}\'`; do sudo wrmsr -p$core 0x1a0 0x850089; done' -RemainAfterExit=yes - -[Install] -WantedBy=sysinit.target diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/irqbalance b/resources/tools/testbed-setup/ansible/roles/tg_sut/files/irqbalance deleted file mode 100644 index 84fb5f17e2..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/irqbalance +++ /dev/null @@ -1,6 +0,0 @@ -#Configuration for the irqbalance daemon - -#Should irqbalance be enabled? -ENABLED="0" -#Balance the IRQs only once? -ONESHOT="0" diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/netplan_config b/resources/tools/testbed-setup/ansible/roles/tg_sut/files/netplan_config deleted file mode 100644 index 694bff1f4f..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/netplan_config +++ /dev/null @@ -1,12 +0,0 @@ -# This file describes the network interfaces available on your system -# For more information, see netplan(5). -network: - version: 2 - renderer: networkd - ethernets: - {{ ansible_default_ipv4["interface"] }}: - addresses: [ {{ (ansible_default_ipv4.address + '/' + ansible_default_ipv4.netmask) | ipaddr('host/prefix') }} ] - dhcp4: false - gateway4: {{ ansible_default_ipv4["gateway"] }} - nameservers: - addresses: [ {{ name_servers }} ] diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/handlers/main.yaml b/resources/tools/testbed-setup/ansible/roles/tg_sut/handlers/main.yaml deleted file mode 100644 index 8fbcb29de0..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/handlers/main.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# file roles/tg_sut/handlers/main.yaml - -- name: Restart Docker - service: - name: 'docker' - state: 'restarted' - tags: restart-docker - -- name: Reboot server - reboot: - reboot_timeout: 3600 - tags: reboot-server - -- name: Wait for server to restart - wait_for: - host: '{{ inventory_hostname }}' - search_regex: OpenSSH - port: 22 - delay: 60 - timeout: 3600 - tags: reboot-server 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 deleted file mode 100644 index 2a481335a0..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/aarch64.yaml +++ /dev/null @@ -1,50 +0,0 @@ ---- -# file: roles/tg_sut/tasks/aarch64.yaml - -- name: Configure aarch64 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'] - 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 deleted file mode 100644 index f586e871c7..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/main.yaml +++ /dev/null @@ -1,67 +0,0 @@ ---- -# file: roles/tg_sut/tasks/main.yaml - -- name: Install distribution - release - machine prerequisites - include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml' - -- name: Machine specifics - include_tasks: '{{ ansible_machine }}.yaml' - -- name: Skylake specific - import_tasks: skylake.yaml - when: cpu_microarchitecture == "skylake" - -- name: Copy netplan network config file - template: - src: 'files/netplan_config' - dest: '/etc/netplan/01-netcfg.yaml' - owner: 'root' - group: 'root' - mode: '0644' - tags: copy-interface-file - -- name: Copy CSIT sysctl file - template: - src: 'files/90-csit' - dest: '/etc/sysctl.d/90-csit.conf' - owner: 'root' - group: 'root' - mode: '0644' - tags: copy-90-csit - -- name: Copy IRQ load balancing file - copy: - src: 'files/irqbalance' - dest: '/etc/default/irqbalance' - owner: 'root' - group: 'root' - mode: '0644' - tags: copy-irq - -- name: Copy cpufrequtils file - copy: - src: 'files/cpufrequtils' - dest: '/etc/default/cpufrequtils' - owner: 'root' - group: 'root' - mode: '0644' - tags: copy-cpufrequtils - -- name: Set ondemand service to disable - service: - name: 'ondemand' - 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' - state: 'present' - line: 'vfio-pci' - tags: load-vfio-pci diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/skylake.yaml b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/skylake.yaml deleted file mode 100644 index 33e061e724..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/skylake.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -# file: roles/tg_sut/tasks/skylake.yaml - -- name: Install msr-tools - apt: - name: - - 'msr-tools' - state: 'present' - install_recommends: False - tags: install-msr - -- name: Disable Skylake Turbo-Boost by service - 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 - -- name: Disable Skylake Turbo-Boost by service on startup - service: - name: disable-turbo-boost - enabled: yes - tags: disable-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 deleted file mode 100644 index 67c6c17220..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/ubuntu_bionic.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# file: roles/tg_sut/tasks/ubuntu_bionic.yaml - -- name: Install CSIT dependencies - apt: - name: - - 'python-dev' - - 'python-virtualenv' - - 'python-pip' - - 'libpcap-dev' - - 'cpufrequtils' - - 'cgroup-bin' - - 'zlib1g-dev' - - 'apt-transport-https' - - 'ca-certificates' - - 'software-properties-common' - - 'libnuma-dev' - - 'lzop' - - 'lrzip' - state: 'present' - install_recommends: False - tags: install-csit-dependencies - -- name: Add an Apt signing key, for docker-ce repository - apt_key: - url: https://download.docker.com/linux/ubuntu/gpg - state: 'present' - tags: install-docker - -- name: Install Docker APT repository - apt_repository: - repo: '{{ docker_repository }}' - state: 'present' - update_cache: True - tags: install-docker - -- name: Install Docker - apt: - name: 'docker-{{ docker_edition }}={{ docker_apt_package_name }}' - state: 'present' - force: yes - tags: install-docker - -- name: Creates Docker service directory - file: - path: '/etc/systemd/system/docker.service.d' - state: 'directory' - -- name: Setup Docker http proxy - template: - src: 'templates/docker.service.proxy.http' - dest: '/etc/systemd/system/docker.service.d/http-proxy.conf' - owner: 'root' - group: 'root' - mode: '0644' - register: docker_register_systemd_service - when: proxy_env is defined and proxy_env.http_proxy is defined - tags: copy-docker - -- name: Setup Docker https proxy - template: - src: 'templates/docker.service.proxy.https' - dest: '/etc/systemd/system/docker.service.d/https-proxy.conf' - owner: 'root' - group: 'root' - mode: '0644' - register: docker_register_systemd_service - when: proxy_env is defined and proxy_env.https_proxy is defined - tags: copy-docker - -- name: Reload systemd daemon - command: 'systemctl daemon-reload' - notify: ['Restart Docker'] - when: (docker_register_systemd_service and - docker_register_systemd_service is changed) - tags: restart-docker - -- name: Set specific users to docker group - user: - name: '{{ item }}' - groups: 'docker' - append: True - with_items: '{{ docker_users }}' - when: docker_users - tags: set-docker - -- name: Add an Apt signing key, for Kubernetes repository - apt_key: - url: https://packages.cloud.google.com/apt/doc/apt-key.gpg - state: 'present' - tags: install-kubernetes - -- name: Install kubernetes APT repository - apt_repository: - repo: '{{ kubernetes_repository }}' - state: 'present' - update_cache: True - tags: install-kubernetes - -- name: Install Kubernetes - apt: - name: - - 'kubernetes-cni=0.6.0-00' - - 'kubeadm={{ kubernetes_apt_package_name }}' - - 'kubectl={{ kubernetes_apt_package_name }}' - - 'kubelet={{ kubernetes_apt_package_name }}' - state: 'present' - force: yes - tags: install-kubernetes - -- name: Apply kubelet parameter - lineinfile: - path: '/etc/default/kubelet' - state: 'present' - regexp: '^KUBELET_EXTRA_ARGS=*' - line: 'KUBELET_EXTRA_ARGS=--feature-gates HugePages=false' - tags: install-kubernetes 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 deleted file mode 100644 index 45d6cc31f1..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/x86_64.yaml +++ /dev/null @@ -1,47 +0,0 @@ ---- -# 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 - 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 }} numa_balancing=disable intel_pstate=disable intel_iommu=on iommu=pt nmi_watchdog=0 audit=0 nosoftlockup processor.max_cstate=1 intel_idle.max_cstate=1 hpet=disable tsc=reliable mce=off"' - notify: - - '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 - diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/templates/docker.service.proxy.http b/resources/tools/testbed-setup/ansible/roles/tg_sut/templates/docker.service.proxy.http deleted file mode 100644 index 73ceba3870..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/templates/docker.service.proxy.http +++ /dev/null @@ -1,4 +0,0 @@ -# {{ ansible_managed }} - -[Service] -Environment="{{ docker_daemon_environment_http | join('" "') }}" diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/templates/docker.service.proxy.https b/resources/tools/testbed-setup/ansible/roles/tg_sut/templates/docker.service.proxy.https deleted file mode 100644 index 1c2097eb9d..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/templates/docker.service.proxy.https +++ /dev/null @@ -1,4 +0,0 @@ -# {{ ansible_managed }} - -[Service] -Environment="{{ docker_daemon_environment_https | join('" "') }}" |