Skip to content

Support building Linux distribution packages #93

Description

@SuperQ

It would be useful to add a packages command that would build deb and rpm format packages for various Linux distributions.

We could use native packaging utilties, or something fpm.

Activity

  1. brian-brazil commented on Mar 9, 2018

    @brian-brazil
    Contributor

    I'm wary of this. Building a package that works on your own systems is easy. Building packages that work on the myriad of variants of distros out there and the support that comes from that variation is not.

  2. pete-leese commented on Mar 9, 2018

    @pete-leese

    I think it would certainly be an advantage for the project to release packages for a number of reasons and any fears can easily be alleviated.

    • Makes Prometheus more accessible to the masses (easier to install and update)
    • installation / setup Consistency

    Ubuntu & Debian
    Standalone Linux Binaries
    Redhat & Centos

    I don't think support should be any greater than that to be honest and would limit to .deb .rpm - once the first generic package has been created then subsequent upgrade will fall in-line so there will be little in terms of variance.

    I am certainly more than happy to help test and feedback, but this is defiantly a good thing.

    Thanks.

    Pete

  3. brian-brazil commented on Mar 9, 2018

    @brian-brazil
    Contributor

    @VR6Pete I don't think you appreciate the nature of the variation. At the simplest, what if some distros are using SysV init, others systmed and some upstart? Different distros put things in different places with different policies, and that's before you even get to per-site variations.

    If you want Debian packages for example, Debian already have those and they follow their policies.

  4. pete-leese commented on Mar 9, 2018

    @pete-leese

    I have been packaging software for over 10 years so know exactly the type of challenges you can face, but simply cannot dismiss it on that basis, and you have to start somewhere so to speak and many other vendors have dealt with this type of issue and have released working binaries.

    A good starting point would be to look at how Grafana have done - I don't think the wheel needs to be re-invented here.

    https://grafana.com/grafana/download/

  5. brian-brazil commented on Mar 9, 2018

    @brian-brazil
    Contributor

    It's not a matter of releasing working binaries, it's about working packages.

    I would not consider Grafana an example of good packaging, as they still have to get service management right.

  6. SuperQ commented on Mar 9, 2018

    @SuperQ
    MemberAuthor

    @brian-brazil The Debian package builder, for example, automatically handles various init systems, this is pretty easy to deal with these days.

  7. SuperQ commented on Mar 9, 2018

    @SuperQ
    MemberAuthor

    The problem with Debian is they don't follow our vendoring, or our release cycle very closely. I would much prefer to provide our own packages, so users can follow our release cycle more easily.

  8. pete-leese commented on Mar 10, 2018

    @pete-leese

    Many other projects generate nightly builds in a number of package formats successfully, I wouldn’t be too concerned.

  9. fredbcode commented on Sep 19, 2019

    @fredbcode

    Yes very useful, I'm using the latest grafana version with an old Prometheus
    Continuous Integration to be facilitated (very) by packages

  10. SuperQ commented on Jan 20, 2020

    @SuperQ
    MemberAuthor

    This might be easier to integrate: https://github.com/goreleaser/nfpm#usage-as-lib

  11. self-assigned this
    on May 26, 2020
  12. roidelapluie commented on May 26, 2020

    @roidelapluie
    Member

    I am willing to work on this.

  13. mario-pranjic commented on Nov 28, 2020

    @mario-pranjic

    Count me in for debian related packaging.

  14. bitfehler commented on Nov 30, 2022

    @bitfehler

    Just my two cents: this seem ill-advised to me. Such code would be best kept in distributions, as they are the ones who make the ultimate decisions about how to package things. For example, many distros have their own re-usable code for e.g. "a rust app", or "an npm module" or such. So the best that could be done is to provide a uniform way to build exporters (essentially done, but of course ongoing), so that distributions can build such a re-usable module for exporters. But there might always be exceptions, and they should ultimately be handled at distribution level.

  15. SuperQ commented on Nov 30, 2022

    @SuperQ
    MemberAuthor

    The problem is distributions definitely can't keep up with the pace of of our development. Also they make questionable choices like re-packaging all dependencies, ignoring the go.mod files. This has caused several bugs, for example Debian included an incorrect procfs package version for the node_exporter. This caused a couple of bugs that were fixed to be released into stable.

  16. bitfehler commented on Dec 1, 2022

    @bitfehler

    I don't see how any of that would change by providing a way to build packages. The distributions that make questionable choices will still make those and not package what you provide. If you just provide packages for download, people will stick to old versions (because their package manager doesn't update them) - another cause for unnecessary bug reports. If you really intend to run a package repository, I would tip my hat, but that is a pretty substantial amount of work.

    Also, what exactly would be the scope here? Which distributions? Which derivatives? Which versions? etc...

  17. SuperQ commented on Dec 1, 2022

    @SuperQ
    MemberAuthor

    We planned to combine our packages with distribution publishing via something like packagecloud.

  18. jsirianni commented on Dec 21, 2023

    @jsirianni

    I think Linux package support would be a great addition, even if it means they are served from the releases page. Installing Prometheus onto a systemd based server by hand is not fun.

    I was able to implement a solution today for a personal project. Using Goreleaser, but I am sure Promu can be extended to support building linux packages with the nFPM package that Goreleaser uses.

    My example is a basic distribution agnostic solution with inspec (cinc) tests for install and uninstall.

    If anyone is interested, ill leave this PR open.

  19. SuperQ commented on Dec 22, 2023

    @SuperQ
    MemberAuthor

    Thanks. I think the main issue is that your implementation adds a lot of boiler plate. We have something like 50 exporter repos that are downstream from promu. Not to mention any non-official exporters that use our build system.

    We want to be able to produce packages with the minimum amount of downstream work possible.

  20. conallob commented on Dec 10, 2024

    @conallob

    Is this effort still ongoing? If not, could i help?

    For reference, https://github.com/Shopify/toxiproxy shows a goreleaser github config doesn't need to include a huge amount of boilerplate.

  21. jkroepke commented on Feb 3, 2025

    @jkroepke
    Member

    This might be easier to integrate: goreleaser/nfpm#usage-as-lib

    @SuperQ Is there any reason or benefit of continue maintain and adding functionally to promu, instead using goreleaser?

    Aside from unix packages (I'm use it here) , goreleaser also supports building container images without a Dockerfile (here) and sign them (ref). It supports building via go proxy conditionally, resulting into a working go_build_info metric for exporters.

    I understand, that there is a lot of downstream work to migrate. However it may reduce overall maintainer work and keeping the focus on our core solutions.

    I expect, that switch to goreleaser would enrich the maintainer experience in each downstream project as well.

  22. SuperQ commented on Feb 3, 2025

    @SuperQ
    MemberAuthor

    We actually discussed migrating to goreleaser a while back. I'm generally in favor.

    There were some missing features at the time. Mostly around supporting our Makefile workflows and CGO that is use in a few places like node_exporter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions