Add extra repo
* extra repo required to get latest
reclass package.
* TODO: unhardcode repo url
Change-Id: I4c0ec3cf8455eae5854def5fc21229042c942224
Related-Bug: PROD-23373 (PROD:23373)
diff --git a/common/ubuntu_salt_bootstrap.sh b/common/ubuntu_salt_bootstrap.sh
index 446ead9..c802a4a 100644
--- a/common/ubuntu_salt_bootstrap.sh
+++ b/common/ubuntu_salt_bootstrap.sh
@@ -16,11 +16,15 @@
GIT_SALT_FORMULAS_SCRIPTS=${GIT_SALT_FORMULAS_SCRIPTS:-"https://github.com/salt-formulas/salt-formulas-scripts"}
GIT_SALT_FORMULAS_SCRIPTS_REF=${GIT_SALT_FORMULAS_SCRIPTS_REF:-master}
+function process_repos(){
+# TODO: those should be unhardcoded and re-writed to mirror.mirantis.com logic
wget -O - ${SALTSTACK_GPG} | sudo apt-key add -
wget -O - ${APT_MIRANTIS_GPG} | apt-key add -
echo "deb [arch=amd64] ${SALTSTACK_REPO}" > /etc/apt/sources.list.d/mcp_saltstack.list
-# This Pin-Priority fil should be always aligned with
+echo "deb [arch=amd64] http://mirror.mirantis.com/${FORMULA_VERSION}/extra/xenial xenial main" > /etc/apt/sources.list.d/mcp_extra.list
+# This Pin-Priority fix should be always aligned with
# https://github.com/Mirantis/reclass-system-salt-model/blob/master/linux/system/repo/mcp/apt_mirantis/saltstack.yml
+# saltstack
cat <<EOF >> /etc/apt/preferences.d/mcp_saltstack
Package: libsodium18
Pin: release o=SaltStack
@@ -30,8 +34,17 @@
Pin: release o=SaltStack
Pin-Priority: 1100
EOF
+# reclass
+cat <<EOF >> /etc/apt/preferences.d/mcp_extra
+Package: *
+Pin: release o=Mirantis
+Pin-Priority: 1100
+EOF
+}
+
+process_repos
apt-get update
-apt-get install git-core -y
+apt-get install git-core reclass -y
for g_host in ${CLUSTER_MODEL} ${GIT_SALT_FORMULAS_SCRIPTS} ; do
_tmp_host=$(echo ${g_host} | awk -F/ '{print $3}')