blob: 8a50ecc5d86c1a9e847fa0f420f900ebd34778f8 [file] [log] [blame]
#!/bin/bash
# Builds and uploads a debian package for Grafana config.
APPNAME=prometheus
DESCRIPTION="Prometheus monitoring and alerting."
SYSTEMD="prometheus.service webhook-proxy.service prom-proxy.service alert-proxy.service pushgateway.service"
set -x -e
# Copy files into the right locations in ${ROOT}.
copy_release_files()
{
INSTALL="fakeroot install -D --verbose --backup=none --group=root --owner=root"
INSTALL_DIR="fakeroot install -d --verbose --backup=none --group=root --owner=root"
${INSTALL} --mode=755 -T ${GOPATH}/bin/webhook_proxy ${ROOT}/usr/local/bin/webhook_proxy
${INSTALL} --mode=755 -T ./tmp/promtool ${ROOT}/usr/local/bin/promtool
${INSTALL} --mode=755 -T ${GOPATH}/bin/proxy_with_auth ${ROOT}/usr/local/bin/prom_proxy_with_auth
${INSTALL} --mode=755 -T ${GOPATH}/bin/proxy_with_auth ${ROOT}/usr/local/bin/alert_proxy_with_auth
${INSTALL} --mode=755 -T ./tmp/prometheus ${ROOT}/usr/local/bin/prometheus
${INSTALL} --mode=755 -T ./tmp/pushgateway ${ROOT}/usr/local/bin/pushgateway
${INSTALL} --mode=644 -T ./sys/prometheus.service ${ROOT}/etc/systemd/system/prometheus.service
${INSTALL} --mode=644 -T ./sys/pushgateway.service ${ROOT}/etc/systemd/system/pushgateway.service
${INSTALL} --mode=644 -T ./sys/webhook-proxy.service ${ROOT}/etc/systemd/system/webhook-proxy.service
${INSTALL} --mode=644 -T ./sys/prom-proxy.service ${ROOT}/etc/systemd/system/prom-proxy.service
${INSTALL} --mode=644 -T ./sys/alert-proxy.service ${ROOT}/etc/systemd/system/alert-proxy.service
${INSTALL_DIR} --mode=777 ${ROOT}/mnt/pd0/prometheus
}
source ../bash/release.sh