Add proper qemu-caching for source image
* Require command at slaves:
'mkdir -p "${HOME}/packer_images_cache/"'
since packer not able to do it.
* set SALT_STOPSTART_WAIT=10 for salt bootstrap
* Dd iptables to base installation
Change-Id: Icc5a50a21e848b93660aa80483b6fdd3e27de243
diff --git a/common/ubuntu_base.sh b/common/ubuntu_base.sh
index 6f314e9..da6c81d 100644
--- a/common/ubuntu_base.sh
+++ b/common/ubuntu_base.sh
@@ -32,13 +32,16 @@
apt-get update
# Useful tools
-apt-get -y install byobu curl ethtool htop iputils-ping lsof strace tcpdump tmux traceroute tree vim-nox wget
-# Install common prerequisites
-apt-get -y install apt-transport-https libmnl0 python-apt python-m2crypto python-psutil acpid
+EXTRA_PKGS="byobu curl ethtool iputils-ping lsof strace tcpdump traceroute wget iptables"
+# Pretty tools
+EXTRA_PKGS="${EXTRA_PKGS} byobu htop tmux tree vim-nox mc"
+# Common prerequisites
+EXTRA_PKGS="${EXTRA_PKGS} apt-transport-https libmnl0 python-apt python-m2crypto python-psutil acpid"
+apt-get -y install ${EXTRA_PKGS}
# Cleanup old kernels, ensure latest is installed via virtual package
if [ ! -f /tmp/no_install_kernel ]; then
- apt-get purge -y linux-image-* linux-headers-*
+ apt-get purge -y linux-image-* linux-headers-* | grep -v 'is not installed, so not removed'
apt-get install -y linux-image-virtual-lts-xenial linux-image-extra-virtual-lts-xenial
# Update grub cmdline
diff --git a/common/ubuntu_salt_bootstrap.sh b/common/ubuntu_salt_bootstrap.sh
index ad3757e..daa0bca 100644
--- a/common/ubuntu_salt_bootstrap.sh
+++ b/common/ubuntu_salt_bootstrap.sh
@@ -43,6 +43,7 @@
export EXTRA_FORMULAS=${EXTRA_FORMULAS:-"ntp aptly nginx iptables docker git maas jenkins"}
export APT_REPOSITORY=" deb [arch=amd64] ${APT_MIRANTIS_SALT_REPO} "
export APT_REPOSITORY_GPG=${APT_MIRANTIS_GPG}
+export SALT_STOPSTART_WAIT=${SALT_STOPSTART_WAIT:-10}
if [[ ! -z "${PACKER_OFFLINE_BUILD}" ]];then
echo "INFO: build in offline detected!"
export BOOTSTRAP_SALTSTACK_COM="file:///tmp/bootstrap.saltstack.com.sh"