Use modified Heka package

This package includes a fix that avoids flooding logs in case the
output buffers are full.

Change-Id: I43db2fe1e5d2e9f2de9f35c576451fd6a04eed31
Closes-Bug: #1562148
This commit is contained in:
Simon Pasquier 2016-06-09 17:55:56 +02:00
parent 790a6661a2
commit ef564156a4
2 changed files with 20 additions and 11 deletions

View File

@ -20,19 +20,22 @@ MODULES_DIR="${ROOT}"/deployment_scripts/puppet/modules
RPM_REPO="${ROOT}"/repositories/centos/
DEB_REPO="${ROOT}"/repositories/ubuntu/
function get_package_path {
FILE=$(basename "$1")
if [[ "$1" == *.deb ]]; then
echo "$DEB_REPO"/"$FILE"
elif [[ "$1" == *.rpm ]]; then
echo "$RPM_REPO"/"$FILE"
else
echo "Invalid URL for $1"
exit 1
fi
}
# Download RPM or DEB packages and store them in the local repository directory
function download_packages {
while [ $# -gt 0 ]; do
if [[ "$1" == *.deb ]]; then
REPO=$DEB_REPO
elif [[ "$1" == *.rpm ]]; then
REPO=$RPM_REPO
else
echo "Invalid URL for download_package(): $1"
fi
FILE=$(basename "$1")
wget -qO - "$1" > "$REPO"/"$FILE"
wget -qO - "$1" > "$(get_package_path "$1")"
shift
done
}
@ -44,3 +47,7 @@ function download_puppet_module {
wget -qO- "$2" | tar -C "${MODULES_DIR}/$1" --strip-components=1 -xz
}
function check_md5sum {
FILE="$(get_package_path "$1")"
echo "$2 $FILE" | md5sum --check --strict
}

View File

@ -19,7 +19,7 @@ SAHARA_TARBALL_URL="https://forgeapi.puppetlabs.com/v3/files/openstack-sahara-7.
OPENSTACKLIB_TARBALL_URL="https://forgeapi.puppetlabs.com/v3/files/openstack-openstacklib-7.0.0.tar.gz"
download_packages \
https://github.com/mozilla-services/heka/releases/download/v${HEKA_VERSION}/heka_${HEKA_VERSION}_amd64.deb \
https://github.com/elemoine/heka/releases/download/ratelimit-1/heka_${HEKA_VERSION}_amd64.deb \
http://mirrors.kernel.org/ubuntu/pool/main/f/fonts-dejavu/fonts-dejavu-core_2.34-1ubuntu1_all.deb \
http://mirrors.kernel.org/ubuntu/pool/main/f/fontconfig/fontconfig-config_2.11.0-0ubuntu4.1_all.deb \
http://mirrors.kernel.org/ubuntu/pool/main/f/fontconfig/libfontconfig1_2.11.0-0ubuntu4.1_amd64.deb \
@ -44,6 +44,8 @@ download_packages \
http://mirrors.kernel.org/ubuntu/pool/universe/c/collectd/collectd_5.4.0-3ubuntu2_amd64.deb \
http://mirrors.kernel.org/ubuntu/pool/main/libd/libdbi-drivers/libdbd-mysql_0.9.0-2ubuntu2_amd64.deb
check_md5sum heka_${HEKA_VERSION}_amd64.deb 69514d94173181a8d1dcab769062fdac
download_puppet_module "collectd" "${COLLECTD_TARBALL_URL}"
download_puppet_module "apache" "${APACHE_TARBALL_URL}"
download_puppet_module "stdlib" "${STDLIB_TARBALL_URL}"