From e4f02773264d97e011ca93a9ad6e6a742b21c7b3 Mon Sep 17 00:00:00 2001 From: zabaniz Date: Sat, 7 Sep 2024 06:10:54 +0300 Subject: [PATCH] Makefile, add deploy-tmux and deploy-screen --- Makefile | 15 ++++++++++++++- docs/installing.md | 6 ++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7d5f5abb..51d55af3 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ haveno-apps: refresh-deps: ./gradlew --write-verification-metadata sha256 && ./gradlew build --refresh-keys --refresh-dependencies -x test -x checkstyleMain -x checkstyleTest -deploy: +deploy-screen: # create a new screen session named 'localnet' screen -dmS localnet # deploy each node in its own named screen window @@ -43,6 +43,19 @@ deploy: # give time to start sleep 5 +deploy-tmux: + # Start a new tmux session named 'localnet' (detached) + tmux new-session -d -s localnet -n main "make seednode-local" + # Split the window into panes and run each node in its own pane + tmux split-window -h -t localnet "make user1-desktop-local" # Split horizontally for user1 + tmux split-window -v -t localnet:0.0 "make user2-desktop-local" # Split vertically on the left for user2 + tmux split-window -v -t localnet:0.1 "make arbitrator-desktop-local" # Split vertically on the right for arbitrator + tmux select-layout -t localnet tiled + # give time to start + sleep 5 + # Attach to the tmux session + tmux attach-session -t localnet + .PHONY: build seednode localnet # Local network diff --git a/docs/installing.md b/docs/installing.md index dcf9c81d..3edb2f23 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -95,9 +95,11 @@ If you are a developer who wants to test Haveno in a more controlled way, follow #### Deploy -If you are a *screen* user, simply run `make deploy`. This command will open all needed Haveno instances (seednode, user1, user2, arbitrator) using *screen*. +If you are a *screen* user, simply run `make deploy-screen`. This command will open all needed Haveno instances (seednode, user1, user2, arbitrator) using *screen*. -If you don't use *screen*, open 4 terminal windows and run in each one of them: +If you are a *tmux* user, simply run `make deploy-tmux`. This command will open all needed Haveno instances (seednode, user1, user2, arbitrator) using *tmux* and attach them to splitted view. + +If you don't use *screen* or *tmux*, open 4 terminal windows and run in each one of them: 1. `make seednode-local` 2. `make user1-desktop-local` or if you want to run user1 as a daemon: `make user1-daemon-local`