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/ubuntu-16.04/scripts/salt.sh b/ubuntu-16.04/scripts/salt.sh
index dd13dfd..2ddedc4 100644
--- a/ubuntu-16.04/scripts/salt.sh
+++ b/ubuntu-16.04/scripts/salt.sh
@@ -1,16 +1,19 @@
#!/bin/bash -xe
-# Add apt repository
-echo "deb [arch=amd64] http://apt.mirantis.com/xenial/ nightly salt" > /etc/apt/sources.list.d/mcp_salt.list
-echo "deb [arch=amd64] http://apt.mirantis.com/xenial/ nightly extra" > /etc/apt/sources.list.d/mcp_extra.list
-curl -sf http://apt.mirantis.com/public.gpg | apt-key add -
+SALTSTACK_REPO=${SALTSTACK_REPO:-"deb [arch=amd64] https://mirror.mirantis.com/stable/saltstack-2016.3/xenial/ xenial main"}
+SALTSTACK_GPG=${SALTSTACK_GPG:-"https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub"}
-wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
-echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3 xenial main" >/etc/apt/sources.list.d/saltstack.list
+wget -O - ${SALTSTACK_GPG} | sudo apt-key add -
+echo "${SALTSTACK_REPO}" > /etc/apt/sources.list.d/saltstack.list
+
+# We expect issues with GPG,related to our mirrors - so temporary disable check.
+echo "APT::Get::AllowUnauthenticated true;" > /etc/apt/apt.conf.d/99allow_unauthenticated
+
apt-get update
apt-get -y install salt-minion
mkdir -m700 -p /etc/salt/pki/minion
-echo "
+
+cat <<EOF >> /etc/salt/minion.d/minion.conf
max_event_size: 100000000
acceptance_wait_time_max: 60
acceptance_wait_time: 10
@@ -18,4 +21,8 @@
recon_default: 1000
recon_max: 60000
recon_randomize: True
-auth_timeout: 60" >> /etc/salt/minion
+auth_timeout: 60
+EOF
+
+rm -vf /etc/apt/apt.conf.d/99allow_unauthenticated
+rm -vf /etc/apt/sources.list.d/saltstack.list