From owner-svn-ports-head@freebsd.org Wed Jul 20 19:53:16 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BDF5B9EB3B; Wed, 20 Jul 2016 19:53:16 +0000 (UTC) (envelope-from kmoore@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D62B1B1A; Wed, 20 Jul 2016 19:53:15 +0000 (UTC) (envelope-from kmoore@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6KJrFLV077442; Wed, 20 Jul 2016 19:53:15 GMT (envelope-from kmoore@FreeBSD.org) Received: (from kmoore@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6KJrEHl077436; Wed, 20 Jul 2016 19:53:14 GMT (envelope-from kmoore@FreeBSD.org) Message-Id: <201607201953.u6KJrEHl077436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kmoore set sender to kmoore@FreeBSD.org using -f From: Kris Moore Date: Wed, 20 Jul 2016 19:53:14 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r418850 - in head/sysutils: . consul-alerts consul-alerts/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2016 19:53:16 -0000 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 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@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 + +.if ${COMPILER_TYPE} == clang +BUILD_ENV= CC=clang +.endif + +.include 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