Page MenuHomeFreeBSD

[new ports] net-mgmt/rubygem-riemann-client etc.: new dependent ports to get to riemann-tools
ClosedPublic

Authored by dch on Oct 26 2018, 1:51 AM.

Details

Summary
  • net/rubygem-beefcake: protocol buffers in pure ruby
  • math/rubygem-mtrc: minimal metric aggregation library
  • net-mgmt/rubygem-riemann-client: for the Riemann event system
  • net-mgmt/rubygem-riemann-tools: send data to Riemann
  • net-mgmt/rubygem-riemann-dash: www real-time view for Riemann
  • update the "parent" net-mgmt/riemann port to 0.3.2 while we are here

portlint & poudriere matrix are happy

Test Plan

wrt moving rubygem-mtrc I see what you mean; one of the examples in the repo is a classic URL benchmarking/metrics tool, but the library is a generic metrics & histogram tool. I checked when making the port, and most of the stats/histogrammy stuff already in ports are either in math/finance or are logfile related, in sysutils & devel. So this seems like a reasonable home; I can add benchmarks as a 2nd category. Sounds reasonable?

Diff Detail

Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 20781
Build 20179: arc lint + arc unit

Event Timeline

dch created this revision.Oct 26 2018, 1:51 AM

Excellent idea!

I don't know where rimann-tools are installed, but if the location "makes sense", maybe they can stay there and we could just ship a bunch of rc scripts to manage the services?

I will be AFK for a month, so may not follow up on this, but this is a really cool initiative.

net-mgmt/rubygem-riemann-client/files/patch-riemann-client.gemspec
9

Ah yes… I started looking into this and stopped when I had to tweak the gemspec (for my testing purpose, creating a Gemfile and pulling-in the required gem as a regular user was okay).

I still think adding this to the ports tree makes some sense. This change can probably be upstreamed, but the impact would have to be known (I guess 1.0.0 introduced regressions that might have been fixed in 1.0.1 or 1.1.0 or whatever version we should put here), and the commit that adds the <= 1.0.0 does not provide any details about why:
https://github.com/riemann/riemann-ruby-client/commit/a9d38b4743ce237dd05e4c0266130de69dfeaa91

net-mgmt/rubygem-riemann-tools/files/patch-riemann-tools.gemspec
9

Same here. Isn't >= 1.8 enough? I feel this one is easier to upstream, but I might be wrong.

linimon retitled this revision from dependent ports to get to riemann-tools to new dependent ports to get to riemann-tools.Oct 29 2018, 10:00 AM
dch marked 2 inline comments as done.EditedNov 6 2018, 10:08 AM
dch updated this revision to Diff 50061.

merge PR feedback + new plist

  • poudriere 12.0-BETA3 is happy **
  • binaries for riemann-tools now live in /usr/local/bin/riemann-*
  • upstreamed patches for aging dependencies
dch marked 2 inline comments as done.Nov 6 2018, 10:10 AM
dch added inline comments.
net-mgmt/rubygem-riemann-client/files/patch-riemann-client.gemspec
9

Looks like the tests have been broken for a while, I submitted a fix upstream: https://github.com/riemann/riemann-ruby-client/pull/29

net-mgmt/rubygem-riemann-tools/files/patch-riemann-tools.gemspec
9

https://github.com/riemann/riemann-tools/pull/187 personally I only bump
the dependencies to what I've actually been able to test against, but at least for the ports tree this is also fine. We have 2.1 in ports already, as that's what's upstream.

dch marked an inline comment as done.Nov 7 2018, 2:10 PM
dch updated this revision to Diff 50119.

include via sed an upstreamed patch that cleans process name

as seen via ps we should hide sensitive parameters from casual view.
The sed command works as expected, requiring GNU sed to insert the newline.
However post-patch runs before BUILD_DEPENDS are present, so this currently
fails.

Any suggestions on an alternative?

jrm added a comment.EditedNov 7 2018, 7:43 PM

You could try adding textproc/gsed to PATCH_DEPENDS or maybe this untested snipped will allow you to do it with our sed.

post-patch:
	# hide sensitive command-line parameters from casual users
	${SED} -i -e $$'/^#!.*ruby.*/a\\\nProcess.setproctitle($$0)\n' \
	${WRKSRC}/bin/riemann-*
dch updated this revision to Diff 50148.Nov 8 2018, 12:11 AM

use jrm's powerful sed-fu to sidestep the dreaded GNU dependency

dch added a comment.Nov 8 2018, 12:12 AM

thanks, that sed goop works a treat. I'll doublecheck some more functionality tomorrow but I think this is ready to land now.

How best to commit it? 1 single svn commit, same as this arc patch, or should I do it stepwise port by port?

dch updated this revision to Diff 50359.Nov 13 2018, 11:56 AM
  • update for latest ruby versions
  • include riemann-rabbitmq and riemann-tail
  • passes poudriere 11.2R 12.0b4 on amd64 & tested a few functions
jrm added a comment.Nov 13 2018, 3:09 PM

Ideally pkg-descr would have more than one sentence. I know this is a pain when upstream doesn't bother.

I think the logs look better when each port is committed individually, but I will leave that up to you.

net-mgmt/rubygem-riemann-client/Makefile
9

Remove .

10–11

Are there two blank lines here?

22

Belongs in USES block above.

net-mgmt/rubygem-riemann-rabbitmq/Makefile
20

Belongs in USES block above.

net-mgmt/rubygem-riemann-tail/Makefile
21

Belongs in USES block above.

net-mgmt/rubygem-riemann-tools/Makefile
21

Belongs in USES block above.

net/rubygem-beefcake/Makefile
17

Belongs in USES block above.

linimon retitled this revision from new dependent ports to get to riemann-tools to [new ports] net-mgmt/rubygem-riemann-client etc.: new dependent ports to get to riemann-tools.Jan 15 2019, 8:26 PM
dch marked 7 inline comments as done.Mar 22 2019, 5:25 PM

dealt with in next rev

dch updated this revision to Diff 55355.Mar 22 2019, 5:35 PM

tidy up stray ends and add riemann-dashboard gem

romain accepted this revision.May 16 2019, 7:41 AM

This looks great!

This revision is now accepted and ready to land.May 16 2019, 7:41 AM
dch updated this revision to Diff 57747.May 23 2019, 4:45 AM

adjust pkg-plist and move www files to /usr/local/share

This revision now requires review to proceed.May 23 2019, 4:45 AM
jrm added a comment.May 23 2019, 2:04 PM

For the longer descriptions in pkg-descr, see 3.2.1. pkg-descr of the Porter's Handbook. In particular, it says, "...the content of pkg-descr must be longer than the COMMENT line from the Makefile. It must explain in more depth what the port is all about."

math/Makefile
800

Looking at (what seem to me to be) similar applications in the tree, benchmarks or devel might be more appropriate categories.

math/rubygem-mtrc/pkg-descr
2

It looks like upstream has a bit more information now, so more than one sentence here should not be a problem. How about this?

Mtrc (short for metric) is a small library to accumulate metrics and extract basic statistics from them. It can be used to latency profile Rack applications.

net-mgmt/rubygem-riemann-client/pkg-descr
2

More here? What is the Riemann event system?

net-mgmt/rubygem-riemann-dash/pkg-descr
1 ↗(On Diff #57747)

More here?

net-mgmt/rubygem-riemann-rabbitmq/pkg-descr
2

More here?

net-mgmt/rubygem-riemann-tail/pkg-descr
2

More here?

net-mgmt/rubygem-riemann-tools/pkg-descr
2

More here?

romain added inline comments.May 23 2019, 3:26 PM
net-mgmt/rubygem-riemann-client/pkg-descr
2

Maybe the COMMENT in the Makefile can be adjusted with for net-mgmt/riemann so that users who are not aware of "Riemann" can recognize it is a port and cd to it to have more information.

AFAICR, the client does not currently support TLS connexions, maybe this is useful information to add here?

Ruby client library for the Riemann event system. For now, only UDP and TCP transports are supported. TLS transport is currently unsupported.

(with the risk that someone submits a patch for adding TLS support (there is a stale PR for it) and we forgot to update this line.

net-mgmt/rubygem-riemann-dash/pkg-descr
1 ↗(On Diff #57747)

Web UI using javascript and websockets for building customized views of the Riemann index.

net-mgmt/rubygem-riemann-rabbitmq/pkg-descr
2

AFAIAC, I would just trim the with ruby which is an implementation detail…

net-mgmt/rubygem-riemann-tail/pkg-descr
2

AFAIAC, I would just trim the with ruby which is an implementation detail…

net-mgmt/rubygem-riemann-tools/pkg-descr
2

We can probably add a list here. Just make it clear that the list is not exhaustive. e.g.

Collection of utilities which submit events to Riemann for household services, including:

  • apache
  • haproxy
  • memcached
  • nginx
  • ntp
  • varnish
  • ...
dch edited the summary of this revision. (Show Details)May 23 2019, 8:59 PM
dch edited the test plan for this revision. (Show Details)
dch updated this revision to Diff 57804.May 23 2019, 9:35 PM
  • describe all the packages
  • find Romain's comments after I did most of the describing
dch updated this revision to Diff 57806.May 23 2019, 9:50 PM
  • describe all the packages
  • update category for math/rubygem-mtrc
  • portlint -AC all fine
  • poudriere ok across 11.2, 12.0 for amd64|i386|aarch64, current for amd64
  • \o/ might as well add net-mgmt/riemann: update to 0.3.2 while we are here
dch marked 11 inline comments as done.May 23 2019, 9:52 PM
dch added inline comments.
math/Makefile
800

see comment above - imo best where it is

dch edited the summary of this revision. (Show Details)May 23 2019, 9:53 PM
dch edited the test plan for this revision. (Show Details)
romain accepted this revision.May 23 2019, 10:07 PM

w00t! Awesome!

This revision is now accepted and ready to land.May 23 2019, 10:07 PM
dch marked an inline comment as done.May 24 2019, 6:45 AM
This revision was automatically updated to reflect the committed changes.