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