1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
12 # installs required packages
13 # must be run from inside the image (either chrooted or running)
20 # /etc/resolv.conf is a symbolic link to /run, restore at end
22 echo "nameserver $nameserver_ip" > /etc/resolv.conf
23 echo "nameserver 8.8.8.8" >> /etc/resolv.conf
24 echo "nameserver 8.8.4.4" >> /etc/resolv.conf
27 # iperf3 only available for trusty in backports
28 grep trusty /etc/apt/sources.list && \
29 echo "deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse" >> /etc/apt/sources.list
31 # Workaround for building on CentOS (apt-get is not working with http sources)
32 # sed -i 's/http/ftp/' /etc/apt/sources.list
34 # Force apt to use ipv4 due to build problems on LF POD.
35 echo 'Acquire::ForceIPv4 "true";' > /etc/apt/apt.conf.d/99force-ipv4
37 # Add hostname to /etc/hosts.
38 # Allow console access via pwd
39 cat <<EOF >/etc/cloud/cloud.cfg.d/10_etc_hosts.cfg
40 manage_etc_hosts: True
42 chpasswd: { expire: False }
63 git clone https://github.com/kdlucas/byte-unixbench.git /opt/tempT
64 make --directory /opt/tempT/UnixBench/
67 git clone https://github.com/beefyamoeba5/ramspeed.git /opt/tempT2
68 cd /opt/tempT2/ramspeed-2.6.0
72 git clone https://github.com/beefyamoeba5/cachestat.git /opt/tempT/Cachestat
75 ln -sf /run/resolvconf/resolv.conf /etc/resolv.conf