(define (make-dir-parents dir-path) (unless (access? dir-path F_OK) (make-dir-parents (dirname dir-path)) (mkdir dir-path))) (register-services (make #:docstring "Cardano preview network ssh tunnel, node & psql" #:provides '(preview-ssh) #:start (make-forkexec-constructor (list "ssh" "-NTv" "-o" "ServerAliveInterval=60" "-o" "ExitOnForwardFailure=yes" "-o" "StreamLocalBindUnlink=yes" "-L" "/tmp/alina-pr.socket:/run/cardano-node-preview/socket" "-L" "54321:localhost:5432" "-R" "3004:localhost:3004" ;; Push to VPS vasil the block producer on 3005 "cardano@alina") #:log-file "/tmp/preview-ssh.log") #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C #:respawn? #t)) (register-services (make #:docstring "Cardano preview wallet" #:provides '(preview-wallet) #:start (make-forkexec-constructor (list "cardano-wallet" ;;(string-append (getenv "HOME") "/.cabal/bin/cardano-wallet") "serve" "--port" "8091" "--node-socket" "/tmp/alina-pr.socket" "--database" (string-append (getenv "HOME") "/test-cardano/preview/wallet") "--testnet" (string-append (getenv "HOME") "/dev/archlinux-ansible/roles/cardano/files/preview/byron-genesis.json")) #:log-file (string-append (getenv "HOME") "/test-cardano/preview/log/wallet.log")) #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C #:requires '(preview-ssh))) (register-services (make #:docstring "Cardano Main network ssh tunnel" #:provides '(mainnet-ssh) #:start (make-forkexec-constructor (list "ssh" "-NTv" "-o" "ServerAliveInterval=60" "-o" "ExitOnForwardFailure=yes" "-o" "StreamLocalBindUnlink=yes" "-L" "/tmp/alinamn.socket:/run/cardano-node-mainnet/socket" "-L" "54320:localhost:5432" "cardano@nina") #:log-file "/tmp/mainnet-ssh.log") #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C #:respawn? #t)) (register-services (make #:docstring "Mainnet wallet" #:provides '(mainnet-wallet) #:start (make-forkexec-constructor (list ;;(string-append (getenv "HOME") "/.cabal/bin/cardano-wallet") "cardano-wallet" "serve" "+RTS" "-T" "-RTS" "--node-socket" "/tmp/alinamn.socket" "--database" (string-append (getenv "HOME") "/test-cardano/main/wallet") "--mainnet") #:log-file (string-append (getenv "HOME") "/test-cardano/main/log/wallet.log")) #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C #:requires '(mainnet-ssh))) (register-services (make #:docstring "Vasil devnet block producer" #:provides '(vasil-bp) #:start (make-forkexec-constructor (list ;;(string-append (getenv "HOME") "/.cabal/bin/cardano-wallet") "/home/titan/dev/cardano/cardano-node/dist-newstyle/build/x86_64-linux/ghc-8.10.7/cardano-node-1.35.0/x/cardano-node/build/cardano-node/cardano-node" "run" "+RTS" "-N2" "-A16m" "-qg" "-qb" "-RTS" "--database-path" (string-append (getenv "HOME") "/test-cardano/dev-vasil/bp-node") "--socket-path" (string-append (getenv "HOME") "/test-cardano/dev-vasil/bp-vasil.socket") "--port" "3005" "--config" (string-append (getenv "HOME") "/dev/cardano/cardano-world/docs/environments/vasil-dev/config-bp.json") "--topology" (string-append (getenv "HOME") "/dev/cardano/cardano-world/docs/environments/vasil-dev/block-producer-topology.json") "--shelley-kes-key" (string-append (getenv "HOME") "/dev/cardano/emacs-wallet/keys/demo/kes.skey") "--shelley-vrf-key" (string-append (getenv "HOME") "/dev/cardano/emacs-wallet/keys/demo/vrf.skey") "--shelley-operational-certificate" (string-append (getenv "HOME") "/dev/cardano/emacs-wallet/keys/demo/node.cert") ) #:environment-variables (list (string-append "LD_LIBRARY_PATH=" (getenv "HOME") "/.local/lib")) #:log-file (string-append (getenv "HOME") "/test-cardano/dev-vasil/log/bp-node.log")) #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C #:requires '(preview-ssh) #:respawn? #t)) (register-services (make #:docstring "Vasil db sync" #:provides '(vasil-db-sync) #:start (make-forkexec-constructor (list "/home/titan/dev/cardano/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.10.7/cardano-db-sync-13.0.0/build/cardano-db-sync/cardano-db-sync" "--config" (string-append (getenv "HOME") "/dev/cardano/cardano-world/docs/environments/vasil-dev/db-sync-config.json") "--socket-path" (string-append (getenv "HOME") "/test-cardano/dev-vasil/bp-vasil.socket") "--state-dir" (string-append (getenv "HOME") "/test-cardano/dev-vasil/ledger-state") "--schema-dir" (string-append (getenv "HOME") "/dev/cardano/cardano-db-sync/schema") ) #:environment-variables (list (string-append "PGPASSFILE=" (getenv "HOME") "/test-cardano/config/pgpass-vasil")) #:log-file (string-append (getenv "HOME") "/test-cardano/dev-vasil/log/db-sync.log")) #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C #:requires '(vasil-bp) #:respawn? #t)) (register-services (make #:docstring "Cardano Vasil cncli sync" #:provides '(vasil-cncli-sync) #:start (make-forkexec-constructor (list "cncli" "sync" "--host" "127.0.0.1" "--port" "3005" "--network-magic" "9" "--db" (string-append (getenv "HOME") "/test-cardano/dev-vasil/blocklog.db") ) #:log-file (string-append (getenv "HOME") "/test-cardano/dev-vasil/log/cncli.log")) #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C #:requires '(vasil-bp)))