Update /etc/hosts in yardstick cloud image
[yardstick.git] / tools / ubuntu-server-cloudimg-modify.sh
index 41d654a..bdf96ba 100755 (executable)
@@ -25,6 +25,18 @@ fi
 # iperf3 only available for trusty in backports
 grep trusty /etc/apt/sources.list && \
     echo "deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse" >> /etc/apt/sources.list
+
+# Workaround for building on CentOS (apt-get is not working with http sources)
+# sed -i 's/http/ftp/' /etc/apt/sources.list
+
+# Force apt to use ipv4 due to build problems on LF POD.
+echo 'Acquire::ForceIPv4 "true";' > /etc/apt/apt.conf.d/99force-ipv4
+
+# Add hostname to /etc/hosts.
+cat <<EOF >/etc/cloud/cloud.cfg.d/10_etc_hosts.cfg
+manage_etc_hosts: True
+EOF
+
 apt-get update
 apt-get install -y \
     fio \
@@ -32,6 +44,8 @@ apt-get install -y \
     linux-tools-common \
     linux-tools-generic \
     lmbench \
+    netperf \
+    rt-tests \
     stress
 
 # restore symlink