Bug 201682 - [NEW PORT] www/grafana2: Dashboard and graph editor for Graphite, InfluxDB & OpenTSDB
Summary: [NEW PORT] www/grafana2: Dashboard and graph editor for Graphite, InfluxDB & ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kurt Jaeger
URL: http://grafana.org
Keywords: feature, patch, patch-ready
Depends on:
Blocks:
 
Reported: 2015-07-18 22:23 UTC by Thomas Bartelmess
Modified: 2015-12-11 06:25 UTC (History)
8 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
shar (40.37 KB, text/plain)
2015-07-18 22:23 UTC, Thomas Bartelmess
no flags Details
add grafana user/group (782 bytes, patch)
2015-07-18 22:23 UTC, Thomas Bartelmess
thomas: maintainer-approval+
Details | Diff
poudriere log (15.05 KB, text/plain)
2015-07-18 22:24 UTC, Thomas Bartelmess
no flags Details
shar (40.52 KB, text/plain)
2015-07-18 23:31 UTC, Thomas Bartelmess
no flags Details
grafana2.shar (40.48 KB, application/x-shar)
2015-11-17 07:27 UTC, loic.blot
no flags Details
grafana2.shar (40.42 KB, application/x-shar)
2015-11-17 07:52 UTC, loic.blot
no flags Details
shar archive (59.36 KB, text/plain)
2015-11-21 21:15 UTC, Thomas Bartelmess
no flags Details
poudriere log (15.18 KB, text/plain)
2015-11-21 21:17 UTC, Thomas Bartelmess
no flags Details
shar archive (67.33 KB, application/x-shar)
2015-11-22 04:45 UTC, Thomas Bartelmess
thomas: maintainer-approval+
Details
poudriere log (15.17 KB, text/plain)
2015-11-22 04:46 UTC, Thomas Bartelmess
no flags Details
add grafana user/group (838 bytes, patch)
2015-11-22 13:34 UTC, Thomas Bartelmess
thomas: maintainer-approval+
Details | Diff
Shar archive (66.69 KB, text/plain)
2015-11-27 15:48 UTC, Thomas Bartelmess
thomas: maintainer-approval+
Details
poudriere log (14.87 KB, text/plain)
2015-11-27 15:49 UTC, Thomas Bartelmess
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bartelmess 2015-07-18 22:23:18 UTC
Created attachment 158952 [details]
shar

There is already a port for Grafana (www/grafana). However since Grafana 2 is very different from an administration perspective (just a bunch HTML/CSS/JS files for Grafana 1 vs an own web server with authentication) I think it makes a sense to keep www/grafana around, and have this new port www/grafana2 as an alternative.
Comment 1 Thomas Bartelmess 2015-07-18 22:23:44 UTC
Created attachment 158953 [details]
add grafana user/group
Comment 2 Thomas Bartelmess 2015-07-18 22:24:29 UTC
Created attachment 158954 [details]
poudriere log
Comment 3 Thomas Bartelmess 2015-07-18 23:31:20 UTC
Created attachment 158957 [details]
shar
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-12 08:29:47 UTC
Nice work Thomas, thanks for your submission.

PORTREVISION can be removed (since new port)

Directories dont respect hier(7):

GRAFANADATADIR=	${PREFIX}/var/db/grafana/ -> /var/db/${PORTNAME}
GRAFANALOGDIR=	${PREFIX}/var/log/grafana/ -> /var/log/${PORTNAME}
GRAFANAPIDDIR=	${PREFIX}/var/run/grafana/ -> /var/run/${PORTNAME}

Since grafana (1.x) exists, check CONFLICTS, and make sure dirs are unique (not shared)

Turn the following into OPTIONS helpers (See Mk/bsd.options.mk)

.if ${PORT_OPTIONS:MPRECOMPILEDCSSJS}
MASTER_SITES+=	http://files.bartelmess.io/public/:static_assets
DISTFILES+=	grafana-static-2.0.1.tar.gz:static_assets
.endif

.if ${PORT_OPTIONS:MCOMPILECSSJS}
BUILD_DEPENDS+=	npm>=0:${PORTSDIR}/www/npm
.endif

Eg: <OPTION>_FOO= value
Comment 5 loic.blot 2015-11-17 07:26:35 UTC
Very good job thomas, i fix the points mentionned below
Comment 6 loic.blot 2015-11-17 07:27:37 UTC
Created attachment 163234 [details]
grafana2.shar

grafana2.shar from thomas with fixed paths
Comment 7 loic.blot 2015-11-17 07:52:18 UTC
Created attachment 163236 [details]
grafana2.shar

Fix a path problem at build
Comment 8 loic.blot 2015-11-17 07:57:46 UTC
Refixed
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-17 13:45:52 UTC
@Loic, we need updated confirmation that the changes pass QA (portlint, poudriere)

And also (since you're not the original author of this issue) we need Thomas to obsolete his original attachments in favour of yours.

This should leave one attachment (shar) for the new port + any extras if you would like to attach QA logs.
Comment 10 loic.blot 2015-11-17 13:50:51 UTC
No problem @Kubilay, i only would help :)
Thomas, can you upgrade to 2.5, this 2.0.2 version is outdated and has some anoying interface bugs ? 
Thanks !
Comment 11 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-17 14:00:43 UTC
(In reply to loic.blot from comment #10)

And it's greatly appreciated :)
Comment 12 Thomas Bartelmess 2015-11-21 21:15:25 UTC
Created attachment 163386 [details]
shar archive

Sorry for being unresponsive here. I've updated it to 2.5.0 and fixed a few things in the makefile.
Comment 13 Thomas Bartelmess 2015-11-21 21:17:49 UTC
Created attachment 163387 [details]
poudriere log
Comment 14 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-22 02:14:40 UTC
Thanks Thomas,

USE_RC_SUBR=	grafana

Might be better as grafana2

Please also set maintainer-approval to + on any attachments you want to approve as maintainer (including those you attach)
Comment 15 Thomas Bartelmess 2015-11-22 04:45:36 UTC
Created attachment 163407 [details]
shar archive

New shar archive. Using grafana2 as rc name.
Comment 16 Thomas Bartelmess 2015-11-22 04:46:17 UTC
Created attachment 163408 [details]
poudriere log
Comment 17 Thomas Bartelmess 2015-11-22 04:47:28 UTC
Thanks for the Feedback Kubilay,

I've changed the name of the service to grafana2, including the config file. (/usr/local/etc/grafana2.conf)
Thanks.
Comment 18 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-22 04:48:50 UTC
Thanks Thomas, im assuming attachment 158953 [details] is still relevant and needs no changes? If so, please add maintainer-approval to that too
Comment 19 Thomas Bartelmess 2015-11-22 04:55:47 UTC
(In reply to Kubilay Kocak from comment #18)
Yes the user/group are still needed
Comment 20 loic.blot 2015-11-22 08:57:15 UTC
grafana UID & GID conflicts with _rmilter UID GID
Comment 21 Thomas Bartelmess 2015-11-22 13:34:53 UTC
Created attachment 163418 [details]
add grafana user/group

Now using 904 as UID/GID
Comment 22 Johannes Jost Meixner freebsd_committer freebsd_triage 2015-11-25 12:46:28 UTC
Passes poudriere testport, but the shar archive attached on 2015-11-22 04:45 UTC has a bit of a mess within files/ subdir.

I'm assuming you want files/grafana2.in and files/grafana2.conf.in.

The option to compile JS/CSS on the system the port is being built in
is a bit spurious, in that `npm install` fetches things outside of
the fetch-stage. This isn't the right way to go about it, a better way
would be to download all things during fetch-stage manually,
and then compile JS/CSS things that have been downloaded previously.

Alternatively, COMPILE_JS_CSS could be removed completely.
Comment 23 Thomas Bartelmess 2015-11-26 17:20:02 UTC
(In reply to Johannes Jost Meixner from comment #22)
I think I'd go for removing the option. Generating the CSS needs quite a few dependencies, with probably is not worth it.
Comment 24 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-27 03:16:17 UTC
So what's needed now to progress this issue?
Comment 25 Thomas Bartelmess 2015-11-27 15:47:24 UTC
(In reply to Kubilay Kocak from comment #24)
I've updated the port and removed the option generate the javascript/css as part of the build process.
Comment 26 Thomas Bartelmess 2015-11-27 15:48:43 UTC
Created attachment 163583 [details]
Shar archive
Comment 27 Thomas Bartelmess 2015-11-27 15:49:11 UTC
Created attachment 163584 [details]
poudriere log
Comment 28 Thomas Bartelmess 2015-11-29 13:28:19 UTC
(In reply to Kubilay Kocak from comment #24)
Is anything needed from me to progress this?
Comment 29 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-30 01:05:44 UTC
(In reply to Thomas Bartelmess from comment #28)

All good at your end Thomas.
Comment 30 loic.blot 2015-12-09 09:24:57 UTC
(In reply to Kubilay Kocak from comment #29)
Can this port be included in ports tree now ? :)
Comment 31 Kurt Jaeger freebsd_committer freebsd_triage 2015-12-11 04:04:34 UTC
Testing@work
Comment 32 commit-hook freebsd_committer freebsd_triage 2015-12-11 06:25:10 UTC
A commit references this bug:

Author: pi
Date: Fri Dec 11 06:24:56 UTC 2015
New revision: 403502
URL: https://svnweb.freebsd.org/changeset/ports/403502

Log:
  New port: www/grafana2

  Grafana is an open source, feature rich metrics dashboard
  and graph editor for Graphite, InfluxDB & OpenTSDB.

  WWW: https://github.com/grafana/grafana

  PR:		201682
  Submitted by:	Thomas Bartelmess <thomas@bartelmess.io>, loic.blot@unix-experience.fr
  Reviewed by:	koobs

Changes:
  head/GIDs
  head/UIDs
  head/www/Makefile
  head/www/grafana2/
  head/www/grafana2/Makefile
  head/www/grafana2/distinfo
  head/www/grafana2/files/
  head/www/grafana2/files/grafana2.conf.in
  head/www/grafana2/files/grafana2.in
  head/www/grafana2/pkg-descr
  head/www/grafana2/pkg-plist
Comment 33 Kurt Jaeger freebsd_committer freebsd_triage 2015-12-11 06:25:42 UTC
Committed, thanks for your patience!