New port: databases/go-carbon
go-carbon is a go implementation of the carbon component of the graphite project. It has support for multiple cpu's and can achieve higher concurrency. WWW: https://github.com/lomik/go-carbon PR: 226732 Submitted by: Andreas Andersson <a.andersson.thn@gmail.com>
This commit is contained in:
parent
b80e953f45
commit
576190ca7b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=465028
2
GIDs
2
GIDs
|
@ -170,7 +170,7 @@ sqlgrey:*:226:
|
|||
_hfm:*:227:
|
||||
osrm:*:228:
|
||||
kismet:*:229:
|
||||
# free: 230
|
||||
carbon:*:230:
|
||||
# free: 231
|
||||
# free: 232
|
||||
# free: 233
|
||||
|
|
2
UIDs
2
UIDs
|
@ -175,7 +175,7 @@ sqlgrey:*:226:226::0:0:SQLgrey Owner:/nonexistent:/usr/sbin/nologin
|
|||
_hfm:*:227:227::0:0:hfm daemon:/nonexistent:/usr/sbin/nologin
|
||||
osrm:*:228:228::0:0:osrm:/nonexistent:/usr/sbin/nologin
|
||||
# free: 229
|
||||
# free: 230
|
||||
carbon:*:230:230::0:0:osrm:/nonexistent:/usr/sbin/nologin
|
||||
# free: 231
|
||||
# free: 232
|
||||
# free: 233
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
SUBDIR += gigabase
|
||||
SUBDIR += gnats4
|
||||
SUBDIR += gnatsweb4
|
||||
SUBDIR += go-carbon
|
||||
SUBDIR += gomdb
|
||||
SUBDIR += gosqlite3
|
||||
SUBDIR += gqlplus
|
||||
|
|
38
databases/go-carbon/Makefile
Normal file
38
databases/go-carbon/Makefile
Normal file
|
@ -0,0 +1,38 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= go-carbon
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 0.12.0
|
||||
CATEGORIES= databases
|
||||
|
||||
MAINTAINER= a.andersson.thn@gmail.com
|
||||
COMMENT= Go implementation of carbon
|
||||
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE.md
|
||||
|
||||
BUILD_DEPENDS= go>=1.8:lang/go
|
||||
|
||||
USES= go
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= lomik
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
|
||||
USERS= carbon
|
||||
GROUPS= carbon
|
||||
|
||||
do-build:
|
||||
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC}/_vendor \
|
||||
go build --ldflags '-X main.BuildVersion=${DISTVERSION}' github.com/lomik/go-carbon
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${STAGEDIR}/var/db/go-carbon
|
||||
@${MKDIR} ${STAGEDIR}/var/log/go-carbon
|
||||
@${MKDIR} ${STAGEDIR}/${PREFIX}/etc/go-carbon
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/go-carbon ${STAGEDIR}${PREFIX}/bin/
|
||||
${INSTALL} ${WRKSRC}/deploy/go-carbon.conf ${STAGEDIR}${PREFIX}/etc/go-carbon/
|
||||
${INSTALL} ${WRKSRC}/deploy/storage-aggregation.conf ${STAGEDIR}${PREFIX}/etc/go-carbon/
|
||||
${INSTALL} ${WRKSRC}/deploy/storage-schemas.conf ${STAGEDIR}${PREFIX}/etc/go-carbon/
|
||||
|
||||
.include <bsd.port.mk>
|
3
databases/go-carbon/distinfo
Normal file
3
databases/go-carbon/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1521477973
|
||||
SHA256 (lomik-go-carbon-v0.12.0_GH0.tar.gz) = 2661492a9b0209977548ef86340f606e29630ab9d5d971bdf745d4b30495875c
|
||||
SIZE (lomik-go-carbon-v0.12.0_GH0.tar.gz) = 3035132
|
55
databases/go-carbon/files/go-carbon.in
Normal file
55
databases/go-carbon/files/go-carbon.in
Normal file
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: go-carbon
|
||||
# REQUIRE: LOGIN
|
||||
# BEFORE: securelevel
|
||||
# KEYWORD: shutdown
|
||||
|
||||
# Add the following line to /etc/rc.conf to enable `go-carbon':
|
||||
#
|
||||
# go_carbon_enable="YES"
|
||||
#
|
||||
# optional:
|
||||
#
|
||||
# go_carbon_conf (flags): Set extra flags here. More options in go-carbon(1)
|
||||
# Default is empty "".
|
||||
# go_carbon_user (user): Set user to run go-carbon.
|
||||
# Default is "carbon".
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="go-carbon"
|
||||
rcvar="go_carbon_enable"
|
||||
|
||||
: ${go_carbon_enable:="NO"}
|
||||
: ${go_carbon_user:="carbon"}
|
||||
: ${go_carbon_config:="/usr/local/etc/go-carbon/go-carbon.conf"}
|
||||
|
||||
start_cmd="go_carbon_start"
|
||||
stop_cmd="go_carbon_stop"
|
||||
status_cmd="go_carbon_status"
|
||||
procname="/usr/local/bin/go-carbon"
|
||||
pidfile="/var/run/$name.pid"
|
||||
|
||||
# read configuration and set defaults
|
||||
load_rc_config "$name"
|
||||
|
||||
go_carbon_start()
|
||||
{
|
||||
${procname} -config ${go_carbon_config} -daemon -pidfile ${pidfile}
|
||||
}
|
||||
|
||||
go_carbon_stop()
|
||||
{
|
||||
kill -TERM `cat /var/run/go-carbon.pid`
|
||||
}
|
||||
|
||||
go_carbon_status()
|
||||
{
|
||||
echo "go-carbon is running as pid" `cat /var/run/go-carbon.pid`
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
17
databases/go-carbon/files/patch-deploy_go-carbon.conf
Normal file
17
databases/go-carbon/files/patch-deploy_go-carbon.conf
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- deploy/go-carbon.conf.orig 2018-03-19 13:53:13 UTC
|
||||
+++ deploy/go-carbon.conf
|
||||
@@ -11,11 +11,11 @@ metric-interval = "1m0s"
|
||||
max-cpu = 4
|
||||
|
||||
[whisper]
|
||||
-data-dir = "/var/lib/graphite/whisper"
|
||||
+data-dir = "/var/db/go-carbon/whisper"
|
||||
# http://graphite.readthedocs.org/en/latest/config-carbon.html#storage-schemas-conf. Required
|
||||
-schemas-file = "/etc/go-carbon/storage-schemas.conf"
|
||||
+schemas-file = "/usr/local/etc/go-carbon/storage-schemas.conf"
|
||||
# http://graphite.readthedocs.org/en/latest/config-carbon.html#storage-aggregation-conf. Optional
|
||||
-aggregation-file = "/etc/go-carbon/storage-aggregation.conf"
|
||||
+aggregation-file = "/usr/local/etc/go-carbon/storage-aggregation.conf"
|
||||
# Worker threads count. Metrics sharded by "crc32(metricName) % workers"
|
||||
workers = 8
|
||||
# Limits the number of whisper update_many() calls per second. 0 - no limit
|
4
databases/go-carbon/pkg-descr
Normal file
4
databases/go-carbon/pkg-descr
Normal file
|
@ -0,0 +1,4 @@
|
|||
go-carbon is a go implementation of the carbon component of the graphite
|
||||
project. It has support for multiple cpu's and can achieve higher concurrency.
|
||||
|
||||
WWW: https://github.com/lomik/go-carbon
|
6
databases/go-carbon/pkg-plist
Normal file
6
databases/go-carbon/pkg-plist
Normal file
|
@ -0,0 +1,6 @@
|
|||
bin/%%GO_PKGNAME%%
|
||||
%%ETCDIR%%/%%GO_PKGNAME%%.conf
|
||||
%%ETCDIR%%/storage-aggregation.conf
|
||||
%%ETCDIR%%/storage-schemas.conf
|
||||
@dir(carbon,carbon,0750) /var/db/%%GO_PKGNAME%%
|
||||
@dir(carbon,carbon,0750) /var/log/%%GO_PKGNAME%%
|
Loading…
Reference in New Issue
Block a user