Refactor,update images
* Switch ubuntu|salt-stack to fetch from mirror.mirantis.com/proposed
* ubuntu-16-04 - add openstack builder[inactive stub]
* add info.sh - and enable it in mirror and ubuntu16
* Drop mcp salt repos - we don't use them for build
* switch to release-20180306 ubuntu cloud image
Change-Id: Ic45db3fd2579262b055ecdc54b27a16a837c2dd4
diff --git a/common/ubuntu_base.sh b/common/ubuntu_base.sh
index bae5120..aafae3a 100644
--- a/common/ubuntu_base.sh
+++ b/common/ubuntu_base.sh
@@ -4,9 +4,13 @@
## Base packages and setup
export DEBIAN_FRONTEND=noninteractive
-echo "exit 101" > /usr/sbin/policy-rc.d
+echo -e '#!/bin/sh\nexit 101' > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
+# Configure apt. Please refer to
+# https://github.com/Mirantis/reclass-system-salt-model/blob/master/linux/system/single/debian.yml
+# and keep those structures with same naming convention - to prevent
+# misconfiguration between base system and salt state.
echo "Acquire::CompressionTypes::Order gz;" >/etc/apt/apt.conf.d/99compression-workaround-salt
echo "Acquire::EnableSrvRecords false;" >/etc/apt/apt.conf.d/99enablesrvrecords-false
echo "Acquire::http::Pipeline-Depth 0;" > /etc/apt/apt.conf.d/99aws-s3-mirrors-workaround-salt
@@ -30,7 +34,7 @@
# 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
+apt-get -y install apt-transport-https libmnl0 python-apt python-m2crypto python-psutil acpid
# Cleanup old kernels, ensure latest is installed via virtual package
if [ ! -f /tmp/no_install_kernel ]; then
diff --git a/common/ubuntu_cleanup.sh b/common/ubuntu_cleanup.sh
index 857c7d9..f043e26 100644
--- a/common/ubuntu_cleanup.sh
+++ b/common/ubuntu_cleanup.sh
@@ -1,4 +1,5 @@
#!/bin/bash -xe
+
apt-get -y autoremove --purge
apt-get -y clean
rm -rf /var/lib/apt/lists/*
@@ -24,4 +25,8 @@
rm -f /etc/salt/minion_id || true
echo "cleaning up resolvconf"
-sed -i '/172\.18\.208\.44/d' /etc/resolvconf/resolv.conf.d/base
\ No newline at end of file
+sed -i '/172\.18\.208\.44/d' /etc/resolvconf/resolv.conf.d/base
+
+# Clear\drop cache's
+sync
+echo 3 > /proc/sys/vm/drop_caches
diff --git a/common/ubuntu_info.sh b/common/ubuntu_info.sh
new file mode 100644
index 0000000..903c121
--- /dev/null
+++ b/common/ubuntu_info.sh
@@ -0,0 +1,5 @@
+#!/bin/bash -xe
+
+# Save some basic debug information.
+
+dpkg-query -W -f='${Package}=${Version}\n' >> /var/log/vcp_initial_pkgs.log