fuel-plugin-external-zabbix/pre_build_hook

57 lines
2.8 KiB
Bash
Executable File

#!/bin/bash
set -eux
ROOT="$(dirname `readlink -f $0`)"
. "${ROOT}"/functions.sh
# Puppet manifests
# Dependency for PHP-FPM
PHPFPM_TARBALL_URL="https://forgeapi.puppetlabs.com/v3/files/Slashbunny-phpfpm-0.0.8.tar.gz"
RPM_REPO="${ROOT}"/repositories/centos/
DEB_REPO="${ROOT}"/repositories/ubuntu/
mkdir -p $RPM_REPO
mkdir -p $DEB_REPO
# Downloads needed RPM or DEB packages
function download {
case "$1" in
deb) REPO=$DEB_REPO;;
rpm) REPO=$RPM_REPO;;
esac
shift
while [ $# -gt 0 ]; do
FILE=$(basename "$1")
wget -qO - $1 > "$REPO/$FILE"
shift
done
}
PHP5_VERSION="5.5.9+dfsg-1ubuntu4.20"
ZBX_VERSION="2.4.8-1+trusty"
download deb http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix/zabbix-agent_${ZBX_VERSION}_amd64.deb \
http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix/zabbix-frontend-php_${ZBX_VERSION}_all.deb \
http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix/zabbix-server-mysql_${ZBX_VERSION}_amd64.deb \
http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix/zabbix-sender_${ZBX_VERSION}_amd64.deb \
http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix/zabbix-get_${ZBX_VERSION}_amd64.deb \
http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_${PHP5_VERSION}_all.deb \
http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-mysql_${PHP5_VERSION}_amd64.deb \
http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-common_${PHP5_VERSION}_amd64.deb \
http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-gd_${PHP5_VERSION}_amd64.deb \
http://archive.ubuntu.com/ubuntu/pool/main/p/php-json/php5-json_1.3.2-2build1_amd64.deb \
http://archive.ubuntu.com/ubuntu/pool/universe/p/php5/php5-fpm_${PHP5_VERSION}_amd64.deb \
http://archive.ubuntu.com/ubuntu/pool/main/libc/libconfig-inifiles-perl/libconfig-inifiles-perl_2.82-1_all.deb \
http://archive.ubuntu.com/ubuntu/pool/universe/libs/libsmi/smistrip_0.4.8+dfsg2-8ubuntu2_all.deb \
http://archive.ubuntu.com/ubuntu/pool/multiverse/s/snmp-mibs-downloader/snmp-mibs-downloader_1.1_all.deb \
http://archive.ubuntu.com/ubuntu/pool/universe/i/iptstate/iptstate_2.2.5-1_amd64.deb \
http://archive.ubuntu.com/ubuntu/pool/universe/libi/libiksemel/libiksemel3_1.2-4.2_amd64.deb \
http://archive.ubuntu.com/ubuntu/pool/main/f/fonts-dejavu/fonts-dejavu_2.34-1ubuntu1_all.deb \
http://archive.ubuntu.com/ubuntu/pool/main/f/fonts-dejavu/ttf-dejavu-core_2.34-1ubuntu1_all.deb \
http://archive.ubuntu.com/ubuntu/pool/main/f/fonts-dejavu/fonts-dejavu-extra_2.34-1ubuntu1_all.deb
# Install puppet manifests
download_puppet_module "phpfpm" "$PHPFPM_TARBALL_URL"