svn commit: r418850 - in head/sysutils: . consul-alerts consul-alerts/files
Kris Moore
kmoore at FreeBSD.org
Wed Jul 20 19:53:16 UTC 2016
Author: kmoore
Date: Wed Jul 20 19:53:14 2016
New Revision: 418850
URL: https://svnweb.freebsd.org/changeset/ports/418850
Log:
A highly available daemon to send notifications and reminders based on
Consul health checks. Including profile selection based on service,
check, or host that enables specific handlers and reminder intervals.
consul-alerts makes use of consul services to provide leader election
and automatic failover amongst multiple instances.
URL: https://github.com/AcalephStorage/consul-alerts
PR: 211253
Submitted by: John Hixson <john at pcbsd.org>
Added:
head/sysutils/consul-alerts/
head/sysutils/consul-alerts/Makefile (contents, props changed)
head/sysutils/consul-alerts/distinfo (contents, props changed)
head/sysutils/consul-alerts/files/
head/sysutils/consul-alerts/files/consul-alerts.in (contents, props changed)
head/sysutils/consul-alerts/pkg-descr (contents, props changed)
Modified:
head/sysutils/Makefile
Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile Wed Jul 20 19:28:56 2016 (r418849)
+++ head/sysutils/Makefile Wed Jul 20 19:53:14 2016 (r418850)
@@ -169,6 +169,7 @@
SUBDIR += consolehm
SUBDIR += consolekit
SUBDIR += consul
+ SUBDIR += consul-alerts
SUBDIR += contractor
SUBDIR += copytape
SUBDIR += coreutils
Added: head/sysutils/consul-alerts/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/consul-alerts/Makefile Wed Jul 20 19:53:14 2016 (r418850)
@@ -0,0 +1,52 @@
+# $FreeBSD$
+
+PORTNAME= consul-alerts
+PORTVERSION= 0.3.3
+DISTVERSIONPREFIX= v
+CATEGORIES= sysutils
+
+MAINTAINER= john at pcbsd.org
+COMMENT= Simple daemon to send notifications based on Consul health checks
+
+LICENSE= GPLv2+
+
+BUILD_DEPENDS= ${LOCALBASE}/bin/go:lang/go
+
+USES= compiler
+
+USE_GITHUB= yes
+GH_ACCOUNT= AcalephStorage
+GH_TAGNAME= v0.3.3
+
+PLIST_FILES= ${PREFIX}/bin/consul-alerts
+
+USE_RC_SUBR= consul-alerts
+
+STRIP=
+
+post-patch:
+ @${MKDIR} ${WRKSRC}/src/github.com/AcalephStorage/consul-alerts
+.for src in .buildkite .buildkite-release .gitignore .travis.yml \
+ check-handler.go consul consul-alerts.go Dockerfile \
+ event-handler.go Godeps health-handler.go leader-election.go \
+ LICENSE Makefile notifier provision README.md send-notifs.go \
+ Vagrantfile watchers.go
+ @${MV} ${WRKSRC}/${src} \
+ ${WRKSRC}/src/github.com/AcalephStorage/consul-alerts
+.endfor
+
+do-build:
+ @cd ${WRKSRC}/src/github.com/AcalephStorage/consul-alerts; \
+ ${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build -v -x \
+ -ldflags "-X main.GitDescribe=v${PORTVERSION}" -o bin/consul-alerts
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/AcalephStorage/consul-alerts/bin/consul-alerts ${STAGEDIR}${PREFIX}/bin/consul-alerts
+
+.include <bsd.port.pre.mk>
+
+.if ${COMPILER_TYPE} == clang
+BUILD_ENV= CC=clang
+.endif
+
+.include <bsd.port.post.mk>
Added: head/sysutils/consul-alerts/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/consul-alerts/distinfo Wed Jul 20 19:53:14 2016 (r418850)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1468785601
+SHA256 (AcalephStorage-consul-alerts-v0.3.3_GH0.tar.gz) = a71acd454fadd193900d484e76437f68b96d91d6331c7ddee40dc3a6f8e52706
+SIZE (AcalephStorage-consul-alerts-v0.3.3_GH0.tar.gz) = 206900
Added: head/sysutils/consul-alerts/files/consul-alerts.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/consul-alerts/files/consul-alerts.in Wed Jul 20 19:53:14 2016 (r418850)
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: consul-alerts
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# consul_alerts_enable (bool): Set to NO by default.
+# Set it to YES to enable consul-alerts
+# consul_alerts_env (string): Set environment variables used with consul-alerts
+# Default is "".
+
+. /etc/rc.subr
+
+name=consul_alerts
+rcvar=consul_alerts_enable
+
+load_rc_config $name
+
+: ${consul_alerts_enable:="NO"}
+: ${consul_alerts_env:=""}
+
+pidfile=/var/run/consul-alerts.pid
+procname="%%PREFIX%%/bin/consul-alerts"
+command="/usr/sbin/daemon"
+command_args="-f -p ${pidfile} /usr/bin/env ${consul_alerts_env} ${procname} start ${consul_alerts_args}"
+
+run_rc_command "$1"
Added: head/sysutils/consul-alerts/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/consul-alerts/pkg-descr Wed Jul 20 19:53:14 2016 (r418850)
@@ -0,0 +1,7 @@
+A highly available daemon to send notifications and reminders based on
+Consul health checks. Including profile selection based on service,
+check, or host that enables specific handlers and reminder intervals.
+consul-alerts makes use of consul services to provide leader election
+and automatic failover amongst multiple instances.
+
+URL: https://github.com/AcalephStorage/consul-alerts
More information about the svn-ports-all
mailing list