View | Details | Raw Unified | Return to bug 217650
Collapse All | Expand All

(-)b/www/py-graphite-api/Makefile (-12 / +54 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	graphite-api
4
PORTNAME=	graphite-api
5
PORTVERSION=	1.1.2
5
PORTVERSION=	1.1.3
6
CATEGORIES=	www python
6
CATEGORIES=	www python
7
MASTER_SITES=	CHEESESHOP
7
MASTER_SITES=	CHEESESHOP
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
Lines 13-29 COMMENT= Graphite-web, without the interface - just the rendering HTTP API Link Here
13
LICENSE=	APACHE20
13
LICENSE=	APACHE20
14
14
15
RUN_DEPENDS=	\
15
RUN_DEPENDS=	\
16
			${PYTHON_PKGNAMEPREFIX}pytz>0:devel/py-pytz \
16
		${PYTHON_PKGNAMEPREFIX}pytz>0:devel/py-pytz \
17
			${PYTHON_PKGNAMEPREFIX}Flask>=0.10.1:www/py-flask \
17
		${PYTHON_PKGNAMEPREFIX}Flask>=0.10.1:www/py-flask \
18
			${PYTHON_PKGNAMEPREFIX}Flask-Cache>=0.13.1:www/py-flask-cache \
18
		${PYTHON_PKGNAMEPREFIX}Flask-Cache>=0.13.1:www/py-flask-cache \
19
			${PYTHON_PKGNAMEPREFIX}tzlocal>=1.1.1:devel/py-tzlocal \
19
		${PYTHON_PKGNAMEPREFIX}tzlocal>=1.1.1:devel/py-tzlocal \
20
			${PYTHON_PKGNAMEPREFIX}structlog>=16.0.0:devel/py-structlog \
20
		${PYTHON_PKGNAMEPREFIX}structlog>=16.0.0:devel/py-structlog \
21
			${PYTHON_PKGNAMEPREFIX}pyparsing>=2.0.0:devel/py-pyparsing \
21
		${PYTHON_PKGNAMEPREFIX}pyparsing>=2.0.0:devel/py-pyparsing \
22
			${PYTHON_PKGNAMEPREFIX}yaml>3.1:devel/py-yaml \
22
		${PYTHON_PKGNAMEPREFIX}yaml>3.1:devel/py-yaml \
23
			${PYTHON_PKGNAMEPREFIX}cairocffi>=0.7.2:graphics/py-cairocffi \
23
		${PYTHON_PKGNAMEPREFIX}cairocffi>=0.7.2:graphics/py-cairocffi \
24
			${PYTHON_PKGNAMEPREFIX}gunicorn>=19.4.1:www/py-gunicorn \
24
		${PYTHON_PKGNAMEPREFIX}gunicorn>=19.4.1:www/py-gunicorn \
25
			xorg-fonts-truetype>=0:x11-fonts/xorg-fonts-truetype
25
		xorg-fonts-truetype>=0:x11-fonts/xorg-fonts-truetype
26
26
27
USES=		python
27
USES=		python
28
USE_PYTHON=	autoplist distutils
28
USE_PYTHON=	distutils
29
30
GRAPHITEAPI_APP=	graphiteapi
31
32
SUB_FILES=	pkg-message
33
SUB_LIST=	PORTNAME=${PORTNAME} \
34
		PREFIX=${PREFIX} \
35
		GRAPHITEAPI_APP=${GRAPHITEAPI_APP} \
36
		GRAPHITEAPI_USER=${GRAPHITEAPI_USER} \
37
		GRAPHITEAPI_GROUP=${GRAPHITEAPI_GROUP} \
38
		GRAPHITEAPI_LOGDIR=${GRAPHITEAPI_LOGDIR} \
39
		GRAPHITEAPI_TMPDIR=${GRAPHITEAPI_TMPDIR} \
40
		GRAPHITEAPI_PIDFILE=${GRAPHITEAPI_PIDFILE}
41
42
PLIST_SUB=	PORTNAME=${PORTNAME} \
43
		PORTVERSION=${PORTVERSION} \
44
		PREFIX=${PREFIX} \
45
		GRAPHITEAPI_APP=${GRAPHITEAPI_APP} \
46
		GRAPHITEAPI_USER=${GRAPHITEAPI_USER} \
47
		GRAPHITEAPI_GROUP=${GRAPHITEAPI_GROUP} \
48
		GRAPHITEAPI_LOGDIR=${GRAPHITEAPI_LOGDIR} \
49
		GRAPHITEAPI_TMPDIR=${GRAPHITEAPI_TMPDIR} \
50
		GRAPHITEAPI_PIDFILE=${GRAPHITEAPI_PIDFILE}
51
52
GRAPHITEAPI_USER?=	carbon
53
GRAPHITEAPI_GROUP?=	carbon
54
55
LOCALSTATEDIR=	/var
56
USE_RC_SUBR=	${GRAPHITEAPI_APP}
57
58
GRAPHITEAPI_LOGDIR=	${LOCALSTATEDIR}/log/${GRAPHITEAPI_APP}
59
GRAPHITEAPI_TMPDIR=	${LOCALSTATEDIR}/run/${GRAPHITEAPI_APP}
60
GRAPHITEAPI_PIDFILE=	${LOCALSTATEDIR}/run/${GRAPHITEAPI_APP}/${GRAPHITEAPI_APP}.pid
61
62
post-install:
63
	${MKDIR} \
64
	    ${STAGEDIR}${ETCDIR} \
65
	    ${STAGEDIR}${GRAPHITEAPI_TMPDIR} \
66
	    ${STAGEDIR}${GRAPHITEAPI_LOGDIR}
67
	${INSTALL_DATA} \
68
	    ${FILESDIR}/${GRAPHITEAPI_APP}.yaml.sample \
69
	    ${STAGEDIR}${ETCDIR}/${GRAPHITEAPI_APP}.yaml.sample
70
29
.include <bsd.port.mk>
71
.include <bsd.port.mk>
(-)b/www/py-graphite-api/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (graphite-api-1.1.2.tar.gz) = bfd112cdc7ef1812429afc8b481bda38fb12d85bbabdd098be2c60e55cce1cca
1
TIMESTAMP = 1489008094
2
SIZE (graphite-api-1.1.2.tar.gz) = 74846
2
SHA256 (graphite-api-1.1.3.tar.gz) = f72718124510065be75c53bf49bd69c16cdb13ca31431add77282c0f7c5933e3
3
SIZE (graphite-api-1.1.3.tar.gz) = 75501
(-)b/www/py-graphite-api/files/graphiteapi.in (+52 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
# PROVIDE: graphiteapi
7
# REQUIRE: LOGIN DAEMON NETWORKING
8
# KEYWORD: shutdown
9
10
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
11
# to enable this service:
12
#
13
# graphiteapi_enable    (bool):   Set to NO by default.
14
# Set it to YES to enable graphiteapi.
15
#
16
# graphiteapi_user      (string): optional username to run daemon under
17
# graphiteapi_group     (string): optional groupname to run daemon under
18
# graphiteapi_address   (string): optional IP:PORT tuple to bind to
19
# graphiteapi_config    (string): optional full path for yaml config file
20
# graphiteapi_flags     (string): optional flags to pass through to gunicorn
21
22
. /etc/rc.subr
23
24
name="%%GRAPHITEAPI_APP%%"
25
rcvar="%%GRAPHITEAPI_APP%%_enable"
26
27
# defaults
28
: ${graphiteapi_enable:="NO"}
29
: ${graphiteapi_user="%%GRAPHITEAPI_USER%%"}
30
: ${graphiteapi_group="%%GRAPHITEAPI_GROUP%%"}
31
: ${graphiteapi_address="127.0.0.1:5600"}
32
: ${graphiteapi_config="%%ETCDIR%%/%%GRAPHITEAPI_APP%%.yaml"}
33
: ${graphiteapi_flags="--workers 4"}
34
35
# daemon
36
command="%%PREFIX%%/bin/gunicorn"
37
required_files="${graphiteapi_config}"
38
command_args="graphite_api.app:app"
39
command_args="${command_args} --user ${graphiteapi_user} --group ${graphiteapi_group}"
40
command_args="${command_args} --bind ${graphiteapi_address}"
41
command_args="${command_args} --env TZ=UTC"
42
command_args="${command_args} --env GRAPHITE_API_CONFIG=${graphiteapi_config}"
43
command_args="${command_args} --pid %%GRAPHITEAPI_PIDFILE%%"
44
command_args="${command_args} --worker-tmp-dir %%GRAPHITEAPI_TMPDIR%%"
45
command_args="${command_args} --error-logfile %%GRAPHITEAPI_LOGDIR%%/error.log"
46
command_args="${command_args} --access-logfile %%GRAPHITEAPI_LOGDIR%%/access.log"
47
48
# support SIGHUP to reload configuration file
49
extra_commands="reload"
50
51
load_rc_config $name
52
run_rc_command "$1"
(-)b/www/py-graphite-api/files/graphiteapi.yaml.sample (+24 lines)
Added Link Here
1
# This configuration should be sufficient if you run graphite's carbon daemon
2
# using the default setup from databases/py-carbon. For detailed information
3
# see http://graphite-api.readthedocs.io/en/latest/configuration.html
4
---
5
search_index: /var/db/carbon/index
6
finders:
7
    - graphite_api.finders.whisper.WhisperFinder
8
functions:
9
    - graphite_api.functions.SeriesFunctions
10
    - graphite_api.functions.PieFunctions
11
whisper:
12
    directories:
13
        - /var/db/carbon/whisper/
14
carbon:
15
    hosts:
16
        - 127.0.0.1:7002
17
    timeout: 5
18
    retry_delay: 15
19
    carbon_prefix: carbon
20
    replication_factor: 1
21
time_zone: UTC
22
allowed_origins:
23
    - localhost.localdomain
24
(-)b/www/py-graphite-api/files/pkg-message.in (+3 lines)
Added Link Here
1
To complete your installation, copy %%ETCDIR%%/%%GRAPHITEAPI_APP%%.yaml.sample to
2
%%ETCDIR%%/%%GRAPHITEAPI_APP%%.yaml and edit it as required, particularly ensuring
3
your CORS allowed_origins are correct.
(-)b/www/py-graphite-api/pkg-descr (-1 / +1 lines)
Lines 2-7 Graphite-API Link Here
2
2
3
This is a minimalistic API server that replicates the behavior of Graphite-web,
3
This is a minimalistic API server that replicates the behavior of Graphite-web,
4
pruned and simplified as much code as possible while keeping the basic
4
pruned and simplified as much code as possible while keeping the basic
5
functionality.
5
functionality. Optional caching is available using www/py-flask-cache.
6
6
7
WWW: https://github.com/brutasse/graphite-api
7
WWW: https://github.com/brutasse/graphite-api
(-)b/www/py-graphite-api/pkg-plist (+69 lines)
Added Link Here
1
@sample %%ETCDIR%%/%%GRAPHITEAPI_APP%%.yaml.sample %%ETCDIR%%/%%GRAPHITEAPI_APP%%.yaml
2
@dir(%%GRAPHITEAPI_USER%%,%%GRAPHITEAPI_GROUP%%,0750) %%GRAPHITEAPI_TMPDIR%%
3
@dir(%%GRAPHITEAPI_USER%%,%%GRAPHITEAPI_GROUP%%,0750) %%GRAPHITEAPI_LOGDIR%%
4
%%PYTHON_SITELIBDIR%%/graphite_api/__init__.py
5
%%PYTHON_SITELIBDIR%%/graphite_api/__init__.pyc
6
%%PYTHON_SITELIBDIR%%/graphite_api/__init__.pyo
7
%%PYTHON_SITELIBDIR%%/graphite_api/_vendor/__init__.py
8
%%PYTHON_SITELIBDIR%%/graphite_api/_vendor/__init__.pyc
9
%%PYTHON_SITELIBDIR%%/graphite_api/_vendor/__init__.pyo
10
%%PYTHON_SITELIBDIR%%/graphite_api/_vendor/whisper.py
11
%%PYTHON_SITELIBDIR%%/graphite_api/_vendor/whisper.pyc
12
%%PYTHON_SITELIBDIR%%/graphite_api/_vendor/whisper.pyo
13
%%PYTHON_SITELIBDIR%%/graphite_api/app.py
14
%%PYTHON_SITELIBDIR%%/graphite_api/app.pyc
15
%%PYTHON_SITELIBDIR%%/graphite_api/app.pyo
16
%%PYTHON_SITELIBDIR%%/graphite_api/carbonlink.py
17
%%PYTHON_SITELIBDIR%%/graphite_api/carbonlink.pyc
18
%%PYTHON_SITELIBDIR%%/graphite_api/carbonlink.pyo
19
%%PYTHON_SITELIBDIR%%/graphite_api/config.py
20
%%PYTHON_SITELIBDIR%%/graphite_api/config.pyc
21
%%PYTHON_SITELIBDIR%%/graphite_api/config.pyo
22
%%PYTHON_SITELIBDIR%%/graphite_api/encoders.py
23
%%PYTHON_SITELIBDIR%%/graphite_api/encoders.pyc
24
%%PYTHON_SITELIBDIR%%/graphite_api/encoders.pyo
25
%%PYTHON_SITELIBDIR%%/graphite_api/finders/__init__.py
26
%%PYTHON_SITELIBDIR%%/graphite_api/finders/__init__.pyc
27
%%PYTHON_SITELIBDIR%%/graphite_api/finders/__init__.pyo
28
%%PYTHON_SITELIBDIR%%/graphite_api/finders/whisper.py
29
%%PYTHON_SITELIBDIR%%/graphite_api/finders/whisper.pyc
30
%%PYTHON_SITELIBDIR%%/graphite_api/finders/whisper.pyo
31
%%PYTHON_SITELIBDIR%%/graphite_api/functions.py
32
%%PYTHON_SITELIBDIR%%/graphite_api/functions.pyc
33
%%PYTHON_SITELIBDIR%%/graphite_api/functions.pyo
34
%%PYTHON_SITELIBDIR%%/graphite_api/intervals.py
35
%%PYTHON_SITELIBDIR%%/graphite_api/intervals.pyc
36
%%PYTHON_SITELIBDIR%%/graphite_api/intervals.pyo
37
%%PYTHON_SITELIBDIR%%/graphite_api/middleware.py
38
%%PYTHON_SITELIBDIR%%/graphite_api/middleware.pyc
39
%%PYTHON_SITELIBDIR%%/graphite_api/middleware.pyo
40
%%PYTHON_SITELIBDIR%%/graphite_api/node.py
41
%%PYTHON_SITELIBDIR%%/graphite_api/node.pyc
42
%%PYTHON_SITELIBDIR%%/graphite_api/node.pyo
43
%%PYTHON_SITELIBDIR%%/graphite_api/readers.py
44
%%PYTHON_SITELIBDIR%%/graphite_api/readers.pyc
45
%%PYTHON_SITELIBDIR%%/graphite_api/readers.pyo
46
%%PYTHON_SITELIBDIR%%/graphite_api/render/__init__.py
47
%%PYTHON_SITELIBDIR%%/graphite_api/render/__init__.pyc
48
%%PYTHON_SITELIBDIR%%/graphite_api/render/__init__.pyo
49
%%PYTHON_SITELIBDIR%%/graphite_api/render/attime.py
50
%%PYTHON_SITELIBDIR%%/graphite_api/render/attime.pyc
51
%%PYTHON_SITELIBDIR%%/graphite_api/render/attime.pyo
52
%%PYTHON_SITELIBDIR%%/graphite_api/render/datalib.py
53
%%PYTHON_SITELIBDIR%%/graphite_api/render/datalib.pyc
54
%%PYTHON_SITELIBDIR%%/graphite_api/render/datalib.pyo
55
%%PYTHON_SITELIBDIR%%/graphite_api/render/glyph.py
56
%%PYTHON_SITELIBDIR%%/graphite_api/render/glyph.pyc
57
%%PYTHON_SITELIBDIR%%/graphite_api/render/glyph.pyo
58
%%PYTHON_SITELIBDIR%%/graphite_api/render/grammar.py
59
%%PYTHON_SITELIBDIR%%/graphite_api/render/grammar.pyc
60
%%PYTHON_SITELIBDIR%%/graphite_api/render/grammar.pyo
61
%%PYTHON_SITELIBDIR%%/graphite_api/search.py
62
%%PYTHON_SITELIBDIR%%/graphite_api/search.pyc
63
%%PYTHON_SITELIBDIR%%/graphite_api/search.pyo
64
%%PYTHON_SITELIBDIR%%/graphite_api/storage.py
65
%%PYTHON_SITELIBDIR%%/graphite_api/storage.pyc
66
%%PYTHON_SITELIBDIR%%/graphite_api/storage.pyo
67
%%PYTHON_SITELIBDIR%%/graphite_api/utils.py
68
%%PYTHON_SITELIBDIR%%/graphite_api/utils.pyc
69
%%PYTHON_SITELIBDIR%%/graphite_api/utils.pyo

Return to bug 217650