cleanup mirror-image

Change-Id: Iba39ddce46cff01e41e34b8c26970bc3cb46ff48
diff --git a/mirror-image/scripts/base.sh b/mirror-image/scripts/base.sh
index 1487f42..d23be8b 100644
--- a/mirror-image/scripts/base.sh
+++ b/mirror-image/scripts/base.sh
@@ -9,6 +9,13 @@
 
 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
+echo "APT::Install-Recommends false;" > /etc/apt/apt.conf.d/99dont_install_recommends-salt
+echo "APT::Install-Suggests false;" > /etc/apt/apt.conf.d/99dont_install_suggests-salt
+echo "Acquire::Languages none;" > /etc/apt/apt.conf.d/99dont_acquire_all_languages-salt
+echo "APT::Periodic::Update-Package-Lists 0;" > /etc/apt/apt.conf.d/99dont_update_package_list-salt
+echo "APT::Periodic::Download-Upgradeable-Packages 0;" > /etc/apt/apt.conf.d/99dont_update_download_upg_packages-salt
+echo "APT::Periodic::Unattended-Upgrade 0;" > /etc/apt/apt.conf.d/99disable_unattended_upgrade-salt
 
 sysctl -w fs.file-max=100000
 # Overwrite default mirrors
diff --git a/mirror-image/scripts/cleanup.sh b/mirror-image/scripts/cleanup.sh
index 01dd605..295d4cb 100644
--- a/mirror-image/scripts/cleanup.sh
+++ b/mirror-image/scripts/cleanup.sh
@@ -6,7 +6,8 @@
 rm -f /usr/sbin/policy-rc.d || true
 
 echo "cleaning up hostname"
-sed -i "/.*ubuntu-1604.*/d" /etc/hosts
+sed -i "/.*ubuntu.*/d" /etc/hosts
+sed -i "/.*salt.*/d" /etc/hosts
 
 echo "cleaning up guest additions"
 rm -rf VBoxGuestAdditions_*.iso VBoxGuestAdditions_*.iso.? || true
diff --git a/mirror-image/scripts/mirrors.sh b/mirror-image/scripts/mirrors.sh
index 9dd7599..23bd679 100644
--- a/mirror-image/scripts/mirrors.sh
+++ b/mirror-image/scripts/mirrors.sh
@@ -3,7 +3,7 @@
 salt-call -t 5 --retcode-passthrough --no-color state.sls docker.host
 #docker run --restart always -d -p 5000:5000 --name registry registry:2
 salt-call -t 5 --retcode-passthrough state.sls docker.client.registry
-docker system prune --all --force
+#docker system prune --all --force
 
 #aptly
 salt-call -t 5 --no-color state.sls aptly
diff --git a/mirror-image/scripts/reboot.sh b/mirror-image/scripts/reboot.sh
deleted file mode 100644
index 52adc95..0000000
--- a/mirror-image/scripts/reboot.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-pgrep -f "sshd: root@" | xargs kill -9
-reboot now
\ No newline at end of file
diff --git a/mirror-image/scripts/salt_bootstrap.sh b/mirror-image/scripts/salt_bootstrap.sh
index 9732123..8dec3ce 100644
--- a/mirror-image/scripts/salt_bootstrap.sh
+++ b/mirror-image/scripts/salt_bootstrap.sh
@@ -1,6 +1,7 @@
 #!/bin/bash -xe
 
-# CLUSTER_MODEL_REF=
+CLUSTER_MODEL_REF=${CLUSTER_MODEL_REF:-master}
+FORMULA_VERSION=${FORMULA_VERSION:-testing}
 SALTSTACK_GPG=${SALTSTACK_GPG:-"https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub"}
 SALTSTACK_REPO=${SALTSTACK_REPO:-"http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3 xenial main"}
 APT_MIRANTIS_GPG=${APT_MIRANTIS_GPG:-"http://apt.mirantis.com/public.gpg"}
@@ -27,8 +28,9 @@
 export APT_REPOSITORY=" deb [arch=amd64] ${APT_MIRANTIS_SALT_REPO} "
 export APT_REPOSITORY_GPG=${APT_MIRANTIS_GPG}
 if [[ ! -z "${PACKER_OFFLINE_BUILD}" ]];then
-  echo "offline detected!"
-  export BOOTSTRAP_SALTSTACK_COM="http://${PACKER_HTTP_ADDR}/bootstrap.saltstack.com.sh"
+  echo "INFO: build in offline detected!"
+  export BOOTSTRAP_SALTSTACK_COM="file:///tmp/bootstrap.saltstack.com.sh"
+  # extra opts will push bootstrap script NOT install upstream repos.
   export BOOTSTRAP_SALTSTACK_OPTS=${BOOTSTRAP_SALTSTACK_OPTS:- -dXr $BOOTSTRAP_SALTSTACK_VERSION }
 fi
 #