Support custom Fedora repos in vagrant provider

This commit is contained in:
Ivan Shvedunov
2016-07-11 16:46:09 +03:00
parent 383d45f185
commit f72f28869a
3 changed files with 23 additions and 1 deletions

View File

@@ -28,7 +28,14 @@ function prepare-package-manager() {
echo "Prepare package manager"
# Useful if a mirror is broken or slow
echo "fastestmirror=True" >> /etc/dnf/dnf.conf
if [ -z "$CUSTOM_FEDORA_REPOSITORY_URL" ]; then
echo "fastestmirror=True" >> /etc/dnf/dnf.conf
else
# remove trailing slash from URL if it's present
CUSTOM_FEDORA_REPOSITORY_URL="${CUSTOM_FEDORA_REPOSITORY_URL%/}"
sed -i -e "/^metalink=/d" /etc/yum.repos.d/*.repo
sed -i -e "s@^#baseurl=http://download.fedoraproject.org/pub/fedora@baseurl=$CUSTOM_FEDORA_REPOSITORY_URL@" /etc/yum.repos.d/*.repo
fi
}

View File

@@ -187,6 +187,7 @@ function echo-kube-env() {
echo "OPENCONTRAIL_KUBERNETES_TAG='${OPENCONTRAIL_KUBERNETES_TAG:-}'"
echo "OPENCONTRAIL_PUBLIC_SUBNET='${OPENCONTRAIL_PUBLIC_SUBNET:-}'"
echo "E2E_STORAGE_TEST_ENVIRONMENT='${E2E_STORAGE_TEST_ENVIRONMENT:-}'"
echo "CUSTOM_FEDORA_REPOSITORY_URL='${CUSTOM_FEDORA_REPOSITORY_URL:-}'"
}
function verify-cluster {