Install screen on Phy DUTs
[csit.git] / resources / tools / testbed-setup / playbooks / 01-host-setup.yaml
1 ---
2 - hosts: all
3   remote_user: testuser
4   sudo: yes
5   tasks:
6   - name: install python-apt
7     raw: apt-get update && apt-get install python-apt -y -q
8   - name: copy sudoers file
9     copy: src=files/sudoers dest=/etc/sudoers.d/testuser owner=root group=root mode=660
10   - name: copy hosts file
11     template: src=files/hosts dest=/etc/hosts owner=root group=root mode=644
12   - name: copy hostname file
13     template: src=files/hostname dest=/etc/hostname owner=root group=root mode=644
14   - name: interfaces file
15     template: src=files/interfaces dest=/etc/network/interfaces owner=root group=root mode=644
16   - name: copy grub file
17     template: src=files/grub dest=/etc/default/grub owner=root group=root mode=644
18   - name: update grub
19     command: update-grub
20   - name: copy apt sources file
21     template: src=files/apt-sources.list dest=/etc/apt/sources.list
22   - name: update repositories
23     apt: update_cache=yes
24   - name: install git
25     apt: name=git state=present
26   - name: install crudini
27     apt: name=crudini state=present
28   - name: install expect
29     apt: name=expect state=present
30   - name: install socat
31     apt: name=socat state=present
32   - name: install qemu
33     apt: name=qemu-system-x86 state=present
34 - hosts: virl
35   remote_user: testuser
36   sudo: yes
37   tasks:
38   - name: Add VIRL user
39     user: name=virl shell=/bin/bash comment="VIRL user" password="$6$mJPlK5FKLar6$xxXPP0LRhC7T1yhHtym18Z3nKZweTtfTxzi1WpvVHJ0U/Em1UWcHqfMhRApFp0rsY9jHRuL6FfeFbKPN..uDK."
40   - name: Add VIRL user to sudoers
41     copy: src=files/sudoers_virl dest=/etc/sudoers.d/virl owner=root group=root mode=660
42   - name: Set VIRL user authorized key
43     authorized_key: user=virl key="{{ lookup('file', '/home/testuser/.ssh/id_rsa.pub') }}"
44 - hosts: tg:sut
45   remote_user: testuser
46   sudo: yes
47   tasks:
48   - name: copy sysctl file
49     template: src=files/90-csit dest=/etc/sysctl.d/90-csit.conf owner=root group=root mode=644
50   - name: isolcpus and pstate parameter
51     lineinfile: dest=/etc/default/grub regexp=^GRUB_CMDLINE_LINUX= line=GRUB_CMDLINE_LINUX="\"isolcpus={{ isolcpus }} nohz_full={{ isolcpus }} rcu_nocbs={{ isolcpus }} intel_pstate=disable\""
52   - name: update grub
53     command: update-grub
54   - name: Install python-dev
55     apt: name=python-dev state=present
56   - name: Install python-virtualenv
57     apt: name=python-virtualenv state=present
58   - name: Install python pip
59     apt: name=python-pip state=present
60   - name: Install libpcap-dev
61     apt: name=libpcap-dev state=present
62   - name: Install cpufrequtils
63     apt: name=cpufrequtils state=present
64   - name: Set cpufrequtils defaults
65     copy: src=files/cpufrequtils dest=/etc/default/cpufrequtils owner=root group=root mode=0644
66   - name: Disable IRQ load balancing
67     copy: src=files/irqbalance dest=/etc/default/irqbalance owner=root group=root mode=0644
68   - name: Pinning of IRQs
69     command: for l in `ls /proc/irq`; do echo 1 | sudo tee /proc/irq/$l/smp_affinity; done
70   - name: Disable ondemand
71     service: name=ondemand enabled=no
72   - name: Install cgroup-support
73     apt: name=cgroup-bin state=present
74   - name: Install zlib1g-dev
75     apt: name=zlib1g-dev state=present
76   - name: Copy Python requirements file
77     copy: src=files/requirements.txt dest=/tmp/requirements.txt
78   - name: Install PIP requirements
79     pip: requirements=/tmp/requirements.txt
80 - hosts: tg
81   remote_user: testuser
82   sudo: yes
83   tasks:
84   - name: Install unzip
85     apt: name=unzip state=present
86 - hosts: sut
87   remote_user: testuser
88   sudo: yes
89   tasks:
90   - name: Install dkms
91     apt: name=dkms state=present
92   - name: Install pkg-config
93     apt: name=pkg-config state=present
94   - name: Install libglib2.0-dev
95     apt: name=libglib2.0-dev state=present
96   - name: Install autoconf
97     apt: name=autoconf state=present
98   - name: Install libtool
99     apt: name=libtool state=present
100   - name: Install screen
101     apt: name=screen state=present
102   - name: Disable 80-vpp.conf
103     command: ln -s /dev/null /etc/sysctl.d/80-vpp.conf

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.