Revert "Switching bootstrap to local repos"
This reverts commit d4d068771f1351c3919ee2c8e9c2fb236afe2df7.
Change-Id: I17fc72f0789a6d0edd1e9a505ab419420c2d41ce
diff --git a/bootstrap.sh b/bootstrap.sh
index a8124a0..c59db0b 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -52,10 +52,8 @@
test -e /etc/lsb-release && eval $(cat /etc/lsb-release)
which lsb_release && DISTRIB_CODENAME=${DISTRIB_CODENAME:-$(lsb_release -cs)}
#
-export MCP_SALT_REPO=${MCP_SALT_REPO:-deb [arch=amd64] http://apt.mirantis.com/${DISTRIB_CODENAME} ${DISTRIB_REVISION:-stable} salt}
-export APT_REPOSITORY=${APT_REPOSITORY:-${MCP_SALT_REPO}}
-export MCP_SALT_REPO_KEY=${MCP_SALT_REPO_KEY:-http://apt.mirantis.com/public.gpg}
-export APT_REPOSITORY_GPG=${APT_REPOSITORY_GPG:-${MCP_SALT_REPO_KEY}}
+export APT_REPOSITORY=${APT_REPOSITORY:- deb [arch=amd64] http://apt.mirantis.com/${DISTRIB_CODENAME} ${DISTRIB_REVISION:-stable} salt}
+export APT_REPOSITORY_GPG=${APT_REPOSITORY_GPG:-http://apt.mirantis.com/public.gpg}
# reclass
export RECLASS_ADDRESS=${RECLASS_ADDRESS:-https://github.com/salt-formulas/openstack-salt.git} # https/git
export RECLASS_BRANCH=${RECLASS_BRANCH:-master}
@@ -89,7 +87,6 @@
export SA_IGNORE_ERROR_SALT_MASTER_ENV=${SA_IGNORE_ERROR_SALT_MASTER_ENV:-False}
# saltstack
-#
BOOTSTRAP_SALTSTACK=${BOOTSTRAP_SALTSTACK:-True}
BOOTSTRAP_SALTSTACK_COM=${BOOTSTRAP_SALTSTACK_COM:-"https://bootstrap.saltstack.com"}
BOOTSTRAP_SALTSTACK_VERSION=${BOOTSTRAP_SALTSTACK_VERSION:- stable 2017.7 }
@@ -97,7 +94,7 @@
# TODO add 'r' option by default
# Currently, without 'r' option, upstream saltstack repos will be used. Otherwise
# local one should be used, from http://apt.mirantis.com/ or whatever.
-BOOTSTRAP_SALTSTACK_OPTS=${BOOTSTRAP_SALTSTACK_OPTS:- -dXr $BOOTSTRAP_SALTSTACK_VERSION }
+BOOTSTRAP_SALTSTACK_OPTS=${BOOTSTRAP_SALTSTACK_OPTS:- -dX $BOOTSTRAP_SALTSTACK_VERSION }
SALT_SOURCE=${SALT_SOURCE:-pkg}
# SECURITY
@@ -153,11 +150,15 @@
configure_pkg_repo()
{
+
case $PLATFORM_FAMILY in
debian)
if [ -n "$APT_REPOSITORY_PPA" ]; then
which add-apt-repository || $SUDO apt-get install -y software-properties-common
$SUDO add-apt-repository -y ppa:${APT_REPOSITORY_PPA}
+ else
+ echo -e "$APT_REPOSITORY " | $SUDO tee /etc/apt/sources.list.d/mcp_salt.list >/dev/null
+ curl -sL $APT_REPOSITORY_GPG | $SUDO apt-key add -
fi
$SUDO apt-get clean
$SUDO apt-get update