diff options
Diffstat (limited to 'genenetwork-development.scm')
-rw-r--r-- | genenetwork-development.scm | 80 |
1 files changed, 1 insertions, 79 deletions
diff --git a/genenetwork-development.scm b/genenetwork-development.scm index 84f0a26..d1a550c 100644 --- a/genenetwork-development.scm +++ b/genenetwork-development.scm @@ -1424,84 +1424,6 @@ gn-auth." ;; Port on which virtuoso's SPARQL endpoint is listening (define %virtuoso-sparql-port 9082) - -;; KLUDGE: There's a bug in shepherd with syslogd that has since been fixed in -;; shepherd 1.0.5. See: -;; https://lists.gnu.org/archive/html/emacs-bug-tracker/2025-03/msg00231.html -;; We can't immediately upgrade to shepherd 1.0.5 since it bumps up Python to -;; 3.11. Delete this after upgrading shepherd. -(define-record-type* <redis-configuration> - redis-configuration make-redis-configuration - redis-configuration? - (redis redis-configuration-redis ;file-like - (default redis)) - (bind redis-configuration-bind - (default "127.0.0.1")) - (port redis-configuration-port - (default 6379)) - (working-directory redis-configuration-working-directory - (default "/var/lib/redis")) - (config-file redis-configuration-config-file - (default #f))) - -(define (default-redis.conf bind port working-directory) - (mixed-text-file "redis.conf" - "bind " bind "\n" - "port " (number->string port) "\n" - "dir " working-directory "\n" - "daemonize no\n")) - -(define %redis-accounts - (list (user-group (name "redis") (system? #t)) - (user-account - (name "redis") - (group "redis") - (system? #t) - (comment "Redis server user") - (home-directory "/var/empty") - (shell (file-append shadow "/sbin/nologin"))))) - -(define redis-activation - (match-lambda - (($ <redis-configuration> redis bind port working-directory config-file) - #~(begin - (use-modules (guix build utils) - (ice-9 match)) - (let ((user (getpwnam "redis"))) - (mkdir-p #$working-directory) - (chown #$working-directory (passwd:uid user) (passwd:gid user))))))) - -(define redis-shepherd-service - (match-lambda - (($ <redis-configuration> redis bind port working-directory config-file) - (let ((config-file - (or config-file - (default-redis.conf bind port working-directory)))) - (list (shepherd-service - (provision '(redis)) - (documentation "Run the Redis daemon.") - (requirement '(user-processes)) ; Removed syslogd - (actions (list (shepherd-configuration-action config-file))) - (start #~(make-forkexec-constructor - '(#$(file-append redis "/bin/redis-server") - #$config-file) - #:user "redis" - #:group "redis")) - (stop #~(make-kill-destructor)))))))) - -(define custom-redis-service-type - (service-type - (name 'custom-redis) - (extensions - (list (service-extension shepherd-root-service-type - redis-shepherd-service) - (service-extension activation-service-type - redis-activation) - (service-extension account-service-type - (const %redis-accounts)))) - (default-value (redis-configuration)) - (description "Run a customized Redis daemon without syslogd dependency."))) - (operating-system (host-name "genenetwork-development") (timezone "UTC") @@ -1570,7 +1492,7 @@ gn-auth." (socket (forge-ip-socket (ip "127.0.0.1") (port %webhook-port))))) - (service custom-redis-service-type) + (service redis-service-type) (service virtuoso-service-type (virtuoso-configuration (number-of-buffers 4000000) |