From b0e6178ef550af97f52120d26cd0c4e7d5426e5e Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sat, 2 Dec 2023 14:37:02 -0600 Subject: Working on lizardfs --- topics/octopus/lizardfs/README.gmi | 13 ++++++++ topics/systems/shepherd.gmi | 68 +++++++++++++++++--------------------- 2 files changed, 44 insertions(+), 37 deletions(-) diff --git a/topics/octopus/lizardfs/README.gmi b/topics/octopus/lizardfs/README.gmi index 078a628..3a07505 100644 --- a/topics/octopus/lizardfs/README.gmi +++ b/topics/octopus/lizardfs/README.gmi @@ -115,3 +115,16 @@ lizardfs-admin reload-config octopus01 9421 ``` It has not yet been tested to see how much this affects reading and writing to the HDDs or SSDs while this change is in effect. + +# Adding a node to the pool + +``` +addgroup -gid 600 lizardfs +adduser -uid 600 -gid 600 lizardfs +``` + +In password + +``` +lizardfs:x:600:600:Lizard,,,:/var/lib/lizardfs:/bin/sbin/nologin +``` diff --git a/topics/systems/shepherd.gmi b/topics/systems/shepherd.gmi index 9cf1ed4..60e7d14 100644 --- a/topics/systems/shepherd.gmi +++ b/topics/systems/shepherd.gmi @@ -1,29 +1,52 @@ # Shepherd -## Tags +Here we record information on running shepherd (on Debian). + +# Tags * assigned: pjotrp, efraimf * type: documentation * keywords: system, shepherd * status: wip -* priority: unclear +* priority: normal + +# Issues + +* [ ] Currently guix system is started up using sudo as a shepherd user. This may be resolved in time when we start to use full Guix solutions -## Quick overview +# Quick overview -Shepherd runs in systemd as a shepherd user +On Debian the GNU shepherd can run in systemd as a 'shepherd' user because we typically run (system) containers that have root inside them. ``` systemctl status user-shepherd.service ``` -## Description +the systemd file can therefore look like: + +``` +[Unit] +Description=Launch user shepherd daemon +Wants=guix-daemon.service + +[Service] +Type=simple +ExecStart=/var/guix/profiles/per-user/shepherd/guix-profile/bin/shepherd +User=shepherd +Group=shepherd +LimitNOFILE=8000 + +[Install] +WantedBy=multi-user.target +``` + +One advantage of using a normal user is that it is easy to test configurations as a different user on the same machine! -On Debian based systems we run shepherd as a shepherd user. The service gets started up through systemd. There is currently a systemd service to automatically start shepherd on system boot-up. A copy of the service lives in the shepherd-service repository. -The process for deploying the services: +The process for deploying the services after creating the shepherd user is ``` symlink shepherd-services/shepherd to $HOME/.config/shepherd @@ -43,33 +66,4 @@ su shepherd /home/shepherd/.guix-profile/bin/herd status ``` -Adding a bash alias, such as "alias herd-herd='sudo -u shepherd -/home/shepherd/.guix-profile/bin/herd'", will make it easier to -interact with shepherd without needing to switch to the shepherd -user. The logs for the various shepherd services are located in -/home/shepherd/logs/ but are not yet timestamped. The log for shepherd -itself is in /home/shepherd/.config/shepherd/shepherd.log. There is -not yet a way to change this from a config file. - - -``` -[Unit] -Description=Launch user shepherd daemon -Wants=guix-daemon.service - -[Service] -Type=oneshot -ExecStart=/var/guix/profiles/per-user/shepherd/guix-profile/bin/shepherd --socket=/home/shepherd/.config/shepherd/shepherd.sock -User=shepherd -Group=shepherd - -[Install] -WantedBy=multi-user.target -``` - -=> https://git.genenetwork.org/efraim/shepherd-services Running shepherd services - -## Notes - -This seems to be documentation, and not necessarily a task, issue or enhancement to be worked on. -It is a topic. +Adding a bash alias, such as "alias herd-herd='sudo -u shepherd /home/shepherd/.guix-profile/bin/herd'", will make it easier to interact with shepherd without needing to switch to the shepherd user. The logs for the various shepherd services are located in /home/shepherd/logs/ but are not yet timestamped. The log for shepherd itself is in /home/shepherd/.config/shepherd/shepherd.log. There is not yet a way to change this from a config file. -- cgit v1.2.3