diff options
author | Peter Mikus <pmikus@cisco.com> | 2018-05-19 15:15:29 +0200 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2018-05-30 09:49:59 +0000 |
commit | 3a14297dca576dd7e2c9f09d84bf0f5cf58c1938 (patch) | |
tree | 56de2207a8260d2204f6ce3bc7dbadcfb6e96417 /resources/tools/testbed-setup/playbooks/01-host-setup.yaml | |
parent | 8bb12f5b902cf42c623172c562b4f2752489bc13 (diff) |
CSIT-1070 Update Ansible structure
Change-Id: I9adab174f0c15f4c05a93f61b17714fa6542ea5d
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/tools/testbed-setup/playbooks/01-host-setup.yaml')
-rw-r--r-- | resources/tools/testbed-setup/playbooks/01-host-setup.yaml | 181 |
1 files changed, 0 insertions, 181 deletions
diff --git a/resources/tools/testbed-setup/playbooks/01-host-setup.yaml b/resources/tools/testbed-setup/playbooks/01-host-setup.yaml deleted file mode 100644 index 90a5ad7899..0000000000 --- a/resources/tools/testbed-setup/playbooks/01-host-setup.yaml +++ /dev/null @@ -1,181 +0,0 @@ ---- -- hosts: all - remote_user: testuser - sudo: yes - tasks: - - name: copy sudoers file - copy: src=files/sudoers dest=/etc/sudoers.d/testuser owner=root group=root mode=660 - - name: copy hosts file - template: src=files/hosts dest=/etc/hosts owner=root group=root mode=644 - - name: copy hostname file - template: src=files/hostname dest=/etc/hostname owner=root group=root mode=644 - - name: copy grub file - template: src=files/grub dest=/etc/default/grub owner=root group=root mode=644 - - name: update grub - command: update-grub - - name: copy apt sources file - template: src=files/apt-sources.list dest=/etc/apt/sources.list - - name: install python-apt - raw: apt-get update && apt-get install python-apt -y -q - - name: update repositories - apt: update_cache=yes - - name: install git - apt: name=git state=present - - name: install crudini - apt: name=crudini state=present - - name: install expect - apt: name=expect state=present - - name: install socat - apt: name=socat state=present - - name: install qemu - apt: name=qemu-system-x86 state=present - - name: Install packages to allow apt to use a repository over HTTPS - apt: name=apt-transport-https state=present -- hosts: virl - remote_user: testuser - sudo: yes - tasks: - - name: interfaces file - template: src=files/interfaces_virl dest=/etc/network/interfaces owner=root group=root mode=644 - - name: Add VIRL user - user: name=virl shell=/bin/bash comment="VIRL user" password="$6$mJPlK5FKLar6$xxXPP0LRhC7T1yhHtym18Z3nKZweTtfTxzi1WpvVHJ0U/Em1UWcHqfMhRApFp0rsY9jHRuL6FfeFbKPN..uDK." - - name: Add VIRL user to sudoers - copy: src=files/sudoers_virl dest=/etc/sudoers.d/virl owner=root group=root mode=660 - - name: Add post up for additional address - copy: src=files/ifup dest=/etc/network/if-up.d/virl owner=root group=root mode=755 - - name: Set VIRL user authorized key - authorized_key: user=virl key="{{ lookup('file', '/home/testuser/.ssh/id_rsa.pub') }}" - - name: install bridge-utils - apt: name=bridge-utils state=present - - name: Old interface naming - command: ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules - - name: update init for old interface naming - command: update-initramfs -u - - name: QEMU log garbage collector - cron: minute="0" hour="0" - name="QEMU log garbage collector" - job="find /var/log/libvirt/qemu -type f -mtime +14 -name 'instance*.log' -delete" - - name: VPP deb package garbage collector - cron: minute="0" hour="0" - name="VPP deb package garbage collector" - job="find /tmp -type f -atime +14 -name '*.deb' -delete" - - name: VPP rpm package garbage collector - cron: minute="0" hour="0" - name="VPP rpm package garbage collector" - job="find /tmp -type f -atime +14 -name '*.rpm' -delete" - - name: NFS scratch dir garbage collector - cron: minute="0" hour="0" - name="NFS scratch dir garbage collector" - job="find /nfs/scratch/ -type d -mtime +1 -name 'session-*' -exec rm -r '{}' \\;" -- hosts: tg:sut - remote_user: testuser - sudo: yes - tasks: - - name: interfaces file - template: src=files/interfaces_physical dest=/etc/network/interfaces owner=root group=root mode=644 - - name: copy sysctl file - template: src=files/90-csit dest=/etc/sysctl.d/90-csit.conf owner=root group=root mode=644 - - name: isolcpus and pstate parameter - lineinfile: dest=/etc/default/grub regexp=^GRUB_CMDLINE_LINUX= line=GRUB_CMDLINE_LINUX="\"isolcpus={{ isolcpus }} nohz_full={{ isolcpus }} rcu_nocbs={{ isolcpus }} intel_pstate=disable\"" - - name: update grub - command: update-grub - - name: Install python-dev - apt: name=python-dev state=present - - name: Install python-virtualenv - apt: name=python-virtualenv state=present - - name: Install python pip - apt: name=python-pip state=present - - name: Install libpcap-dev - apt: name=libpcap-dev state=present - - name: Install cpufrequtils - apt: name=cpufrequtils state=present - - name: Set cpufrequtils defaults - copy: src=files/cpufrequtils dest=/etc/default/cpufrequtils owner=root group=root mode=0644 - - name: Disable IRQ load balancing - copy: src=files/irqbalance dest=/etc/default/irqbalance owner=root group=root mode=0644 - - name: Disable ondemand - service: name=ondemand enabled=no - - name: Install cgroup-support - apt: name=cgroup-bin state=present - - name: Install zlib1g-dev - apt: name=zlib1g-dev state=present - - name: Copy Python requirements file - copy: src=files/requirements.txt dest=/tmp/requirements.txt - - name: Install PIP requirements - pip: requirements=/tmp/requirements.txt - - name: Install libnuma-dev - apt: name=libnuma-dev state=present - - name: IRQ pinning - lineinfile: - dest: /etc/rc.local - insertbefore: '^exit 0' - line: 'for l in `ls /proc/irq`; do echo 1 | sudo tee /proc/irq/$l/smp_affinity; done' - - name: RCU pinning - lineinfile: - dest: /etc/rc.local - insertbefore: '^exit 0' - line: 'for i in `pgrep rcu[^c]` ; do sudo taskset -pc 0 $i ; done' - - name: CPU writeback mask - lineinfile: - dest: /etc/rc.local - insertbefore: '^exit 0' - line: 'echo 1 | sudo tee /sys/bus/workqueue/devices/writeback/cpumask' -- hosts: tg - remote_user: testuser - sudo: yes - tasks: - - name: Install unzip - apt: name=unzip state=present -- hosts: sut - remote_user: testuser - sudo: yes - tasks: - - name: Install dkms - apt: name=dkms state=present - - name: Install pkg-config - apt: name=pkg-config state=present - - name: Install libglib2.0-dev - apt: name=libglib2.0-dev state=present - - name: Install autoconf - apt: name=autoconf state=present - - name: Install libtool - apt: name=libtool state=present - - name: Install screen - apt: name=screen state=present - - name: Install libmbedcrypto0 - apt: name=libmbedcrypto0 state=present - - name: Install libmbedtls10 - apt: name=libmbedtls10 state=present - - name: Install libmbedx509-0 - apt: name=libmbedx509-0 state=present - - name: Install lxc - apt: name=lxc state=present - - name: Disable 80-vpp.conf - file: - src: /dev/null - dest: /etc/sysctl.d/80-vpp.conf - state: link - - name: Install java - apt: name=openjdk-8-jdk state=present - - name: Add Docker's official GPG key - apt_key: - url: "https://download.docker.com/linux/ubuntu/gpg" - state: present - - name: Add Docker's stable repository - apt_repository: - repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable - state: present - - name: Install Docker CE - apt: name=docker-ce state=present - - name: Add Kubernetes's official GPG key - apt_key: - url: "https://packages.cloud.google.com/apt/doc/apt-key.gpg" - state: present - - name: Add Kubernetes's stable repository - apt_repository: - repo: deb http://apt.kubernetes.io/ kubernetes-xenial main - state: present - - name: Install Kubernetes kubelet - apt: name=kubelet state=present - - name: Install Kubernetes kubeadm - apt: name=kubeadm state=present
\ No newline at end of file |