Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate fpm to nfpm #3911

Merged
merged 3 commits into from
Jan 25, 2023
Merged

Migrate fpm to nfpm #3911

merged 3 commits into from
Jan 25, 2023

Conversation

bubu11e
Copy link
Collaborator

@bubu11e bubu11e commented Jan 10, 2023

What this PR does

This PR migrate Grafana Mimir packaging solution from FPM to NFPM in three steps:

  • Migrating the tooling to NFPM with as less as possible of changes to the builded packages
  • Rationalize packages dependencies using NFPM capabilities and a bit of templating to avoid divergences between deb and rpm packaging.
  • Create packages for other mimir binaries like mimirtool or mimir-continous-test

Other Grafana projects already uses NFPM like Loki.

Which issue(s) this PR fixes or relates to

Fixes #2986

More details

You will find a packages attached to this PR to test yourself.
deb_packages.tar.gz
rpm_packages.tar.gz

@bubu11e bubu11e requested a review from a team as a code owner January 10, 2023 10:49
@bubu11e bubu11e force-pushed the migrate_fpm_to_nfpm branch 5 times, most recently from 3eb393e to 941ac0a Compare January 16, 2023 08:52
@56quarters
Copy link
Contributor

The CHANGELOG has just been cut to prepare for the next Mimir release. Please rebase main and eventually move the CHANGELOG entry added / updated in this PR to the top of the CHANGELOG document. Thanks!

@bubu11e
Copy link
Collaborator Author

bubu11e commented Jan 23, 2023

The CHANGELOG has just been cut to prepare for the next Mimir release. Please rebase main and eventually move the CHANGELOG entry added / updated in this PR to the top of the CHANGELOG document. Thanks!

Hi, its done. Thanks

@pracucci
Copy link
Collaborator

Hi @bubu11e! Thanks for working on this and sorry for the late reply. The main struggle we (maintainers) have reviewing this PR is that we don't use these packages at Grafana Labs and we have no hands-on experience with them.

So my question is: which manual testing did you do on the new packages? Have you installed them and can you confirm Mimir gets successfully installed?

Thanks!

@bubu11e
Copy link
Collaborator Author

bubu11e commented Jan 25, 2023

Hi @bubu11e! Thanks for working on this and sorry for the late reply. The main struggle we (maintainers) have reviewing this PR is that we don't use these packages at Grafana Labs and we have no hands-on experience with them.

So my question is: which manual testing did you do on the new packages? Have you installed them and can you confirm Mimir gets successfully installed?

Thanks!

Hi,

I did install both packages (debian and rpm) on architecture x86_64 and checked that Mimir was installed and started. I do not have hardware to test other architecture but i assume it would work as the package is built the same way.

Regards,

Grafana Loki make use of NFPM for it's packaging, this commit migrate mimir packaging FPM to NFPM in order to
simplify packaging and have a similar solution for both technologies.

NFPM is supposed to be simpler than FPM.

This commit remove a dependencie to docker image: grafana/fpm
This commit add a dependencie to the following docker images:
- bitnami/jsonnet
- goreleaser/nfpm

Signed-off-by: julien.girard <julien.girard@ovhcloud.com>
Both Debian packages and Redhat packages have their own dependencies which are very similar.
By using a templating solution (envsubst) we are able to merge those dependencies into one
which will lead to easier evolutions in the futur.

Envsubst is the recommended templating solution by NFPM maintainers.
See: https://nfpm.goreleaser.com/configuration/#templating
We prefer using envsubst over jsonnet as with the first, file keeps their
format and therefore are elligible check solution as shellcheck...

This commit add a dependencie to the docker image: bhgedigital/envsubst

Signed-off-by: julien.girard <julien.girard@ovhcloud.com>
As for the new NFPM build procedure, it is way more simpler to add packages for other binaries.
This commit implements deb and rpm packages for:
- metaconvert
- mimirtool
- query-tee
- mimir-continous-test

Signed-off-by: julien.girard <julien.girard@ovhcloud.com>
@pracucci
Copy link
Collaborator

That's enough for me, thanks! Going to merge it and thanks 🤗

@pracucci pracucci merged commit cc04dbd into grafana:main Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move rpm/deb Mimir package builds from fpm to nfpm
3 participants