Run multiple instances from same workspace
* Support running leader and validators from multiple machines using the same NFS mounted workspace. * Changes to setup, leader and validator scripts
This commit is contained in:
committed by
Greg Fitzgerald
parent
3dbbb398df
commit
9209f9acde
@ -6,5 +6,13 @@ export RUST_LOG=${RUST_LOG:-solana=info}
|
|||||||
set -x
|
set -x
|
||||||
[[ $(uname) = Linux ]] && sudo sysctl -w net.core.rmem_max=26214400
|
[[ $(uname) = Linux ]] && sudo sysctl -w net.core.rmem_max=26214400
|
||||||
|
|
||||||
|
IPADDR="$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')"
|
||||||
|
|
||||||
|
if [ -z "$IPADDR" ]; then
|
||||||
|
IPADDR="$(ifconfig | grep 'inet '| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $2}')"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp leader-$IPADDR.json leader.json
|
||||||
|
|
||||||
cargo run --release --bin solana-fullnode -- \
|
cargo run --release --bin solana-fullnode -- \
|
||||||
-l leader.json < genesis.log tx-*.log > tx-"$(date -u +%Y%m%d%k%M%S%N)".log
|
-l leader.json < genesis.log tx-*.log > tx-"$(date -u +%Y%m%d%k%M%S%N)".log
|
||||||
|
@ -5,5 +5,11 @@ TOKENS=${1:-1000000000}
|
|||||||
cargo run --release --bin solana-mint-demo <<<"${TOKENS}" > mint-demo.json
|
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-genesis-demo < mint-demo.json > genesis.log
|
||||||
|
|
||||||
cargo run --release --bin solana-fullnode-config -- -d > leader.json
|
IPADDR="$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')"
|
||||||
cargo run --release --bin solana-fullnode-config -- -b 9000 -d > validator.json
|
|
||||||
|
if [ -z "$IPADDR" ]; then
|
||||||
|
IPADDR="$(ifconfig | grep 'inet '| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $2}')"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cargo run --release --bin solana-fullnode-config -- -d > leader-$IPADDR.json
|
||||||
|
cargo run --release --bin solana-fullnode-config -- -b 9000 -d > validator-$IPADDR.json
|
||||||
|
@ -16,5 +16,11 @@ rsync -v "$LEADER"/{mint-demo.json,leader.json,genesis.log,tx-*.log} . || exit $
|
|||||||
# if RUST_LOG is unset, default to info
|
# if RUST_LOG is unset, default to info
|
||||||
export RUST_LOG=${RUST_LOG:-solana=info}
|
export RUST_LOG=${RUST_LOG:-solana=info}
|
||||||
|
|
||||||
|
IPADDR="$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')"
|
||||||
|
|
||||||
|
if [ -z "$IPADDR" ]; then
|
||||||
|
IPADDR="$(ifconfig | grep 'inet '| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $2}')"
|
||||||
|
fi
|
||||||
|
|
||||||
cargo run --release --bin solana-fullnode -- \
|
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
|
||||||
|
Reference in New Issue
Block a user