Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Run multiple instances from same workspace #410

Merged
merged 2 commits into from
Jun 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions multinode-demo/leader.sh
Original file line number Diff line number Diff line change
@@ -6,5 +6,9 @@ export RUST_LOG=${RUST_LOG:-solana=info}
set -x
[[ $(uname) = Linux ]] && sudo sysctl -w net.core.rmem_max=26214400

IPADDR="$(ifconfig | awk '/inet (addr)?/ {print $2}' | cut -d: -f2 | grep -v '127.0.0.1')"

cp leader-"$IPADDR".json leader.json

cargo run --release --bin solana-fullnode -- \
-l leader.json < genesis.log tx-*.log > tx-"$(date -u +%Y%m%d%k%M%S%N)".log
6 changes: 4 additions & 2 deletions multinode-demo/setup.sh
Original file line number Diff line number Diff line change
@@ -5,5 +5,7 @@ TOKENS=${1:-1000000000}
cargo run --release --bin solana-mint-demo <<<"${TOKENS}" > mint-demo.json
cargo run --release --bin solana-genesis-demo < mint-demo.json > genesis.log

cargo run --release --bin solana-fullnode-config -- -d > leader.json
cargo run --release --bin solana-fullnode-config -- -b 9000 -d > validator.json
IPADDR="$(ifconfig | awk '/inet (addr)?/ {print $2}' | cut -d: -f2 | grep -v '127.0.0.1')"

cargo run --release --bin solana-fullnode-config -- -d > leader-"$IPADDR".json
cargo run --release --bin solana-fullnode-config -- -b 9000 -d > validator-"$IPADDR".json
4 changes: 3 additions & 1 deletion multinode-demo/validator.sh
Original file line number Diff line number Diff line change
@@ -16,5 +16,7 @@ rsync -v "$LEADER"/{mint-demo.json,leader.json,genesis.log,tx-*.log} . || exit $
# if RUST_LOG is unset, default to info
export RUST_LOG=${RUST_LOG:-solana=info}

IPADDR="$(ifconfig | awk '/inet (addr)?/ {print $2}' | cut -d: -f2 | grep -v '127.0.0.1')"

cargo run --release --bin solana-fullnode -- \
-l validator.json -v leader.json < genesis.log tx-*.log
-l validator-"$IPADDR".json -v leader.json < genesis.log tx-*.log