netdata / netdata-portage-overlay

The gentoo portage overlay repo for Netdata
GNU General Public License v2.0
1 stars 3 forks source link

Add ebuilds for go.d plugin. #3

Open Ferroin opened 5 years ago

Ferroin commented 5 years ago

For reasons of practicality, it makes more sense on Gentoo to have a separate ebuild for Netdata's Go plugin and depend conditionally on that ebuild than ti does to just bundle the plugin into the Netdata ebuild.

References https://github.com/netdata/netdata/issues/5979

paulkatsoulakis commented 5 years ago

For reasons of practicality, it makes more sense on Gentoo to have a separate ebuild for Netdata's Go plugin and depend conditionally on that ebuild than ti does to just bundle the plugin into the Netdata ebuild.

We had similar discussions when deciding around .RPM and .DEB packaging process. We ended up agreeing that for the time being, go.d plugin makes no sense without netdata.

That practically means that for the moment it should be bundled as part of netdata software. I think we could do the same thing here, copy over the script process that fetches the designated go.d version and places it at the right spot

Ferroin commented 5 years ago

We ended up agreeing that for the time being, go.d plugin makes no sense without netdata.

This is what package managers are for. It's trivially solved by just making the go.d plugin package depend on the Netdata package directly, at which point the package manager will make sure that it can't be installed without installing Netdata.

Put simply, not everyone is going to want the go.d plugin, and those who do probably don't want to spend time rebuilding all of Netdata if they update their Go environment (which will force a rebuild of all the Go packages on the system).

I think we could do the same thing here, copy over the script process that fetches the designated go.d version and places it at the right spot

First, we shouldn't be downloading the pre-built plugin, we should be building it locally (that's part of the point of Gentoo).

Second, handling that in the main Netdata ebuild is probably going to be significantly more complicated than just having a separate ebuild.

paulkatsoulakis commented 5 years ago

yep you have a good point, it should be a separate ebuild indeed

Ferroin commented 5 years ago

As indicated in the tags, I'm probably going to need some help on this one. I have essentially zero experience with Go (literally, my only experience with it is using Syncthing, which is written in Go), so if the Go-related parts of the ebuild need debugging, I'm probably going to be mostly useless.

That said, I'm kind of planning on waiting on this until #2 and #5 are done, as well as some further fine-tuning of the core ebuild.

nakermann1973 commented 4 years ago

I have a sample ebuild which successfully installs the go plugin, and I am using it locally.

It simple copies bin/godplugin to a fixed /usr/libexec/netdata/plugins.d location, and the config files to /usr/lib64/netdata/conf.d.

You can probably use this as a base to build a proper ebuild for this package.

netdata-go-plugin-0.18.0.ebuild.txt