From 8c6fd7803f087b2ccbe579852a7f2fc38a67ba13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Thu, 23 Sep 2021 19:43:35 +0200 Subject: Trying out shepherd to manage services Cardano alonzo purple network and wallet --- config/shepherd/init.d/cardano.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 config/shepherd/init.d/cardano.scm (limited to 'config') diff --git a/config/shepherd/init.d/cardano.scm b/config/shepherd/init.d/cardano.scm new file mode 100644 index 0000000..4e73046 --- /dev/null +++ b/config/shepherd/init.d/cardano.scm @@ -0,0 +1,32 @@ +(let ((config-dir (string-append (getenv "HOME") "/.guix-profile/etc/conf/cardano/")) + (db-dir (string-append (getenv "HOME") "/test-cardano/purple/"))) + (mkdir db-dir) + (register-services + (make + #:docstring "Alonzo Purple test network" + #:provides '(alonzo-purple-node) + #:start (make-forkexec-constructor + (list "cardano-node" "run" + "--database-path" db-dir + "--socket-path" (string-append db-dir "socket") + "--port" "3005" + "--config" (string-append config-dir "alonzo-purple-config.json") + "--topology" (string-append config-dir "alonzo-purple-topology.json")) + #:log-file (string-append db-dir "/log/alonzo.log") + ) + #:stop (make-kill-destructor) + #:respawn? #t)) + + (register-services + (make + #:docstring "Alonzo Purple wallet" + #:provides '(alonzo-wallet) + #:start (make-forkexec-constructor + (list (string-append (getenv "HOME") "/.cabal/bin/cardano-wallet") + "serve" + "--node-socket" (string-append db-dir "socket") + "--database" "/home/titan/dev/cardano/cardano-wallet/waldb" + "--testnet" (string-append config-dir "alonzo-purple-byron-genesis.json")) + #:log-file (string-append db-dir "/log/alonzo-wallet.log")) + #:stop (make-kill-destructor) + #:requires '(alonzo-purple-node)))) -- cgit v1.2.3