Remove unused views
[releng/builder.git] / jenkins-init-scripts / ubuntu-docker-ovs.sh
1 #!/bin/bash
2
3 # make sure we don't require tty for sudo operations
4 cat <<EOF >/etc/sudoers.d/89-jenkins-user-defaults
5 Defaults:jenkins !requiretty
6 jenkins     ALL = NOPASSWD: ALL
7 EOF
8
9 # Add 'hostname' into /etc/hosts during node spinup time to avoid sudo returning
10 # an 'unable to resolve host' message or some Java API's returning an unknown
11 # host exception. The workaround on adding "myhostname" into /etc/nss-switch.conf
12 # does not work on Ubuntu flavours.
13 sed -i "/127.0.0.1/s/$/\t$(hostname)/" /etc/hosts
14
15 # Do the final install of OVS that the has to be done at boot time for
16 # some reason due to how the snapshots keep behaving.
17 dpkg --install /root/openvswitch-datapath-dkms* && \
18 dpkg --install /root/openvswitch-{common,switch}*
19
20 # add user jenkins to docker group
21 /usr/sbin/usermod -a -G docker jenkins
22
23 # pull docker images
24 docker pull alagalah/odlpoc_ovs230
25
26 # vim: sw=2 ts=2 sts=2 et :