Quick and dirty script for running a Rpi tmux demos
This commit is contained in:
parent
360afe48a3
commit
5f271fd82e
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Read in variables
|
||||
set -a
|
||||
source "$(dirname "$0")/vars.sh"
|
||||
|
||||
cd $(dirname "$0")
|
||||
rm -rf data
|
||||
|
||||
tmux new-session -s 'beacon_node' -d
|
||||
|
||||
# maybe these should be moved to a user config file
|
||||
tmux set-option -g history-limit 999999
|
||||
tmux set -g mouse on
|
||||
|
||||
tmux send-keys -t 0 './start.sh' Enter
|
||||
tmux new-window -n "demo_node" "./wait_master_node.sh && ./run_node.sh $NUM_NODES"
|
||||
|
||||
tmux attach-session -d
|
||||
|
|
@ -13,8 +13,8 @@ cd $(git rev-parse --show-toplevel)
|
|||
: ${GIT_ROOT:="$($PWD_CMD)"}
|
||||
cd - &>/dev/null
|
||||
|
||||
NUM_VALIDATORS=${VALIDATORS:-1000}
|
||||
NUM_NODES=${NODES:-4}
|
||||
NUM_VALIDATORS=${VALIDATORS:-192}
|
||||
NUM_NODES=${NODES:-2}
|
||||
NUM_MISSING_NODES=${MISSING_NODES:-1}
|
||||
|
||||
SIMULATION_DIR="${SIM_ROOT}/data"
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ ! -f "${MASTER_NODE_ADDRESS_FILE}" ]; then
|
||||
echo Waiting for master node...
|
||||
while [ ! -f "${MASTER_NODE_ADDRESS_FILE}" ]; do
|
||||
sleep 0.1
|
||||
done
|
||||
fi
|
||||
|
Loading…
Reference in New Issue