Skip to content

Commit

Permalink
can start the setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
jbsv committed Mar 27, 2024
1 parent c416c7c commit b0d9ff2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions server/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ echo -e "Create a tmux window 'smc' in the session ${S}"
tmux new-window -t ${S} -n smc

./start_chain.sh -t ${L}
#./start_registry.sh -t ${L}
#./start_smc.sh -t ${L}
./start_registry.sh -t ${L}
./start_smc.sh -t ${L}
#tmux send-keys -t ${S}:smc.0 "./publish_roster.sh" C-m

# attach to session
Expand Down
8 changes: 5 additions & 3 deletions server/scripts/start_smc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ do
proxy=$((PROXY + i))
echo -e "${GREEN}creating node #${i} on port ${p}${NC}"
# session s, window 0, panes 1 to N
tmux send-keys -t ${S}:${W}.${i} "LLVL=${L} LOGF=./${W}${i}.log smccli --config /tmp/${W}${i} start --listen tcp://127.0.0.1:${p} --proxyaddr 127.0.0.1:${proxy}" C-m
tmux send-keys -t ${S}:${W}.${i} "LLVL=${L} LOGF=./${W}${i}.log smccli --config /tmp/${W}${i} \
start --listen tcp://127.0.0.1:${p} --proxyaddr localhost:${proxy} --public grpc://localhost:${p} \
--routing tree --noTLS" C-m
sleep 0.5
i=$((i + 1));
done
Expand All @@ -64,12 +66,12 @@ echo -e "${GREEN}[CONNECT]${NC} ${N} nodes and exchange certificates"
i=2;
p=$((P + 1))
sleep 1
smccli --config /tmp/${W}1 minogrpc token
TOKEN=$(smccli --config /tmp/${W}1 minogrpc token)
while [ ${i} -le ${N} ]
do
sleep 1
tmux send-keys -t "${MASTERPANE}" "smccli --config /tmp/${W}${i} minogrpc join --address //127.0.0.1:${p} ${TOKEN}" C-m
tmux send-keys -t "${MASTERPANE}" "smccli --config /tmp/${W}${i} minogrpc join \
--address grpc://127.0.0.1:${p} ${TOKEN}" C-m
sleep 1
i=$((i + 1));
done
Expand Down
4 changes: 2 additions & 2 deletions server/scripts/teardown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ S=hbt # session name

echo -e "${GREEN}[TMUX tear down]${NC}"

#./stop_registry.sh
#./stop_smc.sh
./stop_registry.sh
./stop_smc.sh
./stop_chain.sh

tmux kill-session -t ${S}
Expand Down

0 comments on commit b0d9ff2

Please sign in to comment.