Closed jdoss closed 3 weeks ago
Hi @jdoss! The packaging actually does put the binary into /usr/bin
but then creates a symlink from /opt/nomad/plugins/nomad-driver-podman
to /usr/bin/nomad-driver-podman
. This is so that users get a "just works" install experience in the normal case - the default configuration looks for plugins in that plugins directory.
https://github.com/hashicorp/nomad-driver-podman/blob/main/.release/linux/postinst#L3-L4
I think we'd be open to changes to make sure the package is at least usable on more distros, but that out-of-the-box experience is our top priority, on Ubuntu and RHEL nodes.
Doh!! I always flub reading ln
. My bad! Thanks for explaining the reasoning behind doing the symlink. That is helpful context.
First off thanks for getting packages going for this plugin. That is awesome.
I am a bit late to this party but can this package not write the binary to /opt and just write it to /usr/bin/ instead like the nomad packages do?
If one uses Fedora CoreOS layering like I do to ship OS updates to servers /opt is excluded from this process. Also, I am unsure if if running this out of /opt would have any impacts with SELinux enabled systems.
Unless I am missing something, storing the binary in /opt doesn't really gain us anything other than putting it in a non standard place on the system which is unexpected for most users. I do see that this follows the same pattern that is used in https://github.com/hashicorp/nomad-driver-exec2/pull/25/files so maybe that is just SOP for packaging plugins for Nomad. I'd advocate to store plugin binaries in the standard spot for binaries on a Linux system when shipping them with distro package managers.