Add ability to override Murano hook var's

Change-Id: I941f5c876acca3f062a0532410c406be766291cb
This commit is contained in:
iberezovskiy 2016-07-05 15:49:17 +03:00 committed by Aleksey Zvyagintsev
parent 820ce09d16
commit 4010d8077a
2 changed files with 13 additions and 6 deletions

View File

@ -24,6 +24,7 @@ DEB_REPO="${ROOT}"/repositories/ubuntu/
function download_package {
local package_type=$1
local url=$2
local wget_lvl=${3:-4}
if [[ "$package_type" == 'deb' ]]; then
REPO=$DEB_REPO
elif [[ "$package_type" == 'rpm' ]]; then
@ -32,7 +33,7 @@ function download_package {
echo "Invalid package type: $1"
fi
wget -P "$REPO" -A "$package_type" -nd -r -l 1 "$url"
wget -P "$REPO" -A "$package_type" -nd -r -l ${wget_lvl} "$url"
}
# Download official Puppet module and store it in the local directory

View File

@ -3,11 +3,17 @@ set -eux
. "$(dirname "$(readlink -f "$0")")"/functions.sh
MURANO_REF="stable/mitaka"
MURANO_PACKAGE_RELEASE='9.0'
MURANO_TARBALL_URL="https://github.com/openstack/puppet-murano/archive/${MURANO_REF}.tar.gz"
MURANO_PACKAGE_URL="http://mirror.fuel-infra.org/mos-repos/ubuntu/${MURANO_PACKAGE_RELEASE}/pool/main/m/murano/"
MURANO_REF=${MURANO_REF:-'stable/mitaka'}
MURANO_PACKAGE_RELEASE=${MURANO_PACKAGE_RELEASE:-'9.0'}
MURANO_TARBALL_URL=${MURANO_TARBALL_URL:-"https://github.com/openstack/puppet-murano/archive/${MURANO_REF}.tar.gz"}
download_package 'deb' ${MURANO_PACKAGE_URL}
# Add murano packages and some dependencies
MURANO_PACKAGES_URLS_DEFAULT="http://mirror.fuel-infra.org/extras/murano-plugin-repos/ubuntu/${MURANO_PACKAGE_RELEASE}/pool/main/"
MURANO_PACKAGES_URLS=${MURANO_PACKAGES_URLS:-${MURANO_PACKAGES_URLS_DEFAULT}}
for url in ${MURANO_PACKAGES_URLS}; do
download_package 'deb' "${url}"
done
download_puppet_module "murano" ${MURANO_TARBALL_URL}