+
Skip to content

Conversation

doronbehar
Copy link
Contributor

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 running linien_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 a linien.service file that should be installed on the server in /usr/lib/systemd/system directory, if linien_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 using nix build. More importantly, it is now possible to cross compile a linien-server debian package using:

nix build --print-build-logs .\#linien-server-deb-armv7l-hf-multiplatform

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:

scp $(readlink $(nix build --print-out-paths --print-build-logs .\#linien-server-deb-armv7l-hf-multiplatform)) redpitaya:.

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.

@doronbehar
Copy link
Contributor Author

Oh and 3 commits here are also suggested in #353 . Will rebase when #353 is merged.

@doronbehar
Copy link
Contributor Author

@bleykauf Would you like this to be rebased to the feature/update-dependencies branch?

@bleykauf
Copy link
Collaborator

I try to follow Gitflow, so all feature/ branches should be based on the current develop branch.

Note that I most probably will not have time to dive too deep into this in the near future.

@doronbehar
Copy link
Contributor Author

doronbehar commented Aug 23, 2023 via email

@doronbehar
Copy link
Contributor Author

I'll close this, as there are too many merge conflicts, and many of the topics here are sort of fixed elsewhere.

@doronbehar doronbehar closed this Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载