compass-core/misc/ci/test-install.sh
zhaoxinyu afba46ce6b kill dnsmasq to avoid conflict with dhcpd
libvirt start dnsmasq to provide dhcp service on virbr0,
but unfortunately it by default binds on all interfaces.
to avoid conflict with dhcpd started by cobbler later, kill all
dnsmasq since it won't be used by ci anyway.

Change-Id: I006f6c3e3493a34c4770cff0b35ee8f4b2b5293c
2014-11-21 08:28:19 -08:00

23 lines
746 B
Bash
Executable File

#!/bin/bash -x
# create a bridge named 'installation' so that compass and pxeboot vm are in the
# same l2 network.
brctl show |grep installation > /dev/null
if [[ $? -eq 0 ]] ; then
echo "bridge already exists"
else
brctl addbr installation
brctl addif installation eth1
ifconfig eth1 up
dhclient -r eth1
dhclient -r installation
dhclient installation
fi
# kill the dhcp service started by libvirt to avoid conflict with dhcpd
killall dnsmasq
source compass-core/install/install.conf.template
/bin/bash -x compass-core/install/install.sh || exit $?
echo "cache_peer 10.145.81.137 parent 3128 3130 default" >> /etc/squid/squid.conf
service squid restart
service squid status |grep running || exit $?
sleep 5