-
Notifications
You must be signed in to change notification settings - Fork 2
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
Consider having the CLI manage its own Docker Compose executable #20
Comments
@BryceBeagle @apockill I'd be very interested to hear your thoughts on this 👀 |
Will this make it easier or harder to manager multiple supported versions of linux at once (e.g. Ubuntu 18.04 and Ubuntu 20.04)?
|
Would it not be easier to distribute the brainframe-cli using an official package on a PPA (and the AUR 🚀)? That way we don't need to manage the executable (the package manager does that for us) and there's no chance of breaking global packaging configuration. |
Docker Compose already provides very good compatibility with a wide variety of Linux distributions, so it hasn't been an issue when supporting multiple Linux distributions. The problem I want to solve here exists on all Linux distributions: when we deal in global state (in this case whether or not Docker Compose is installed and what version it is) we run the risk of conflicting with other systems on that computer and have to be very careful when messing with it. If we manage our own Docker Compose executable outside the user's PATH, we can upgrade it as we please and it no longer has a risk of affecting other components. |
This would mean that we're stuck with whatever Docker Compose version the Linux distribution provides us. On Ubuntu, that might be too old to do what we want, and on CentOS it definitely would be. We could ship our own upgraded Docker Compose package in our PPA, but now we're back to managing the executable and it has an effect on all applications on the user's computer that use Docker Compose. Also, now we take on the normal issue of using distribution-specific package management, in that it would be an ongoing O(n) effort for every distribution we want to support. |
Oh okay. I just assumed that since it's distributing a pyinstaller binary, they would have to distribute different ones for different systems. If it's a one-size-fits all (or most), that's awesome! |
Implemented in #25 for deb and PyPI installations, which have Docker Compose as a Python dependency. The PyInstaller version still requires an external Docker Compose binary by design. |
Currently, we model Docker Compose as a system dependency that must be installed by the user. On Ubuntu 18.04, we have the option of installing it for the user with Pip. However, as we found with some customers, this leads to a fairly clumsy experience for a few reasons.
I propose that we instead manage a Docker Compose executable outside the user's PATH that we install and upgrade automatically as necessary. We would use the PyInstalled version of Docker Compose for this, since user-facilitated upgrades are no longer a problem. This executable would be in the install path, which is
/usr/local/share/brainframe
by default. This has the following benefits:FAQ
Is it weird for one executable to manage another executable like this?
Maybe a bit, but it's not entirely unheard of. GStreamer includes this executable called
gst-plugin-scanner
that's outside the user's path and run by GStreamer to find plugins on the user's system. It's kind of like using an executable as a library.The text was updated successfully, but these errors were encountered: