Systemd support, optional, non default, declarative only installation support, and Nix flakes support #354
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello @bleykauf
In the past we talked about using Systemd instead of
screen
for managing the server. This PR suggest a way to accomplish that, while still making most regular users happy with the deployment experience. No changes were made to the README.md yet.1st commit:
linien-gui: Allow to avoid imperative installations via env
I added a simple
os.getenv
check that allows running the GUI in a way that will disallow runninglinien_install_requirements.sh
on the server.2nd commit:
server: Use systemd .service file instead of screen
I removed the
linien_{start,stop}_server.sh
scripts, in favor of alinien.service
file that should be installed on the server in/usr/lib/systemd/system
directory, iflinien_install_requirements.sh
was executed, or if an advanced user has installed that file there themselves (Using Nix for instance, see next commit).3rd commit:
Add nix files & relax rpyc dep versions
I wrote nix files (their main file is
flake.nix
) that defines the Nix packages that can be built usingnix build
. More importantly, it is now possible to cross compile alinien-server
debian package using:BE CAREFUL, it takes a long time and a lot of CPU and memory. But eventually, you should be able to copy that
deb
file to your redpitaya using:This debian package has all of the dependencies needed for linien, and it doesn't depend on anything installed on the target redpitaya besides systemd - an example of the power of Nix.
Lastly, I encountered some issues with the rpyc 5.0 dependency. As I mentioned in linien-org/pyrp3#10 . The Nix installation takes care of avoiding that, but ideally this should be removed from the relevant
setup.py
files.