mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-25 19:15:10 +00:00
updated nanonet network.sh with smartbft orderer type
Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
This commit is contained in:
parent
d340f62b03
commit
fd3cf67a49
2 changed files with 23 additions and 23 deletions
|
|
@ -68,22 +68,15 @@ networkStart() {
|
||||||
./orderer1.sh ${ORDERER_TYPE} > ./logs/orderer1.log 2>&1 &
|
./orderer1.sh ${ORDERER_TYPE} > ./logs/orderer1.log 2>&1 &
|
||||||
./orderer2.sh ${ORDERER_TYPE} > ./logs/orderer2.log 2>&1 &
|
./orderer2.sh ${ORDERER_TYPE} > ./logs/orderer2.log 2>&1 &
|
||||||
./orderer3.sh ${ORDERER_TYPE} > ./logs/orderer3.log 2>&1 &
|
./orderer3.sh ${ORDERER_TYPE} > ./logs/orderer3.log 2>&1 &
|
||||||
if [ "$ORDERER_TYPE" = "smartbft" ]; then
|
|
||||||
./orderer4.sh ${ORDERER_TYPE} > ./logs/orderer4.log 2>&1 &
|
# start one additional orderer for smartbft consensus
|
||||||
fi
|
if [ "$ORDERER_TYPE" = "smartbft" ]; then
|
||||||
|
./orderer4.sh ${ORDERER_TYPE} > ./logs/orderer4.log 2>&1 &
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Waiting ${CLI_DELAY}s..."
|
echo "Waiting ${CLI_DELAY}s..."
|
||||||
sleep ${CLI_DELAY}
|
sleep ${CLI_DELAY}
|
||||||
|
|
||||||
if [ "$ORDERER_TYPE" = "smartbft" ]; then
|
|
||||||
../bin/osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:9443
|
|
||||||
../bin/osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:9444
|
|
||||||
../bin/osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:9445
|
|
||||||
../bin/osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:9446
|
|
||||||
echo "smartbft orderers cluster should be up now..."
|
|
||||||
wait
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Starting peers..."
|
echo "Starting peers..."
|
||||||
./peer1.sh > ./logs/peer1.log 2>&1 &
|
./peer1.sh > ./logs/peer1.log 2>&1 &
|
||||||
./peer2.sh > ./logs/peer2.log 2>&1 &
|
./peer2.sh > ./logs/peer2.log 2>&1 &
|
||||||
|
|
@ -94,19 +87,26 @@ fi
|
||||||
sleep ${CLI_DELAY}
|
sleep ${CLI_DELAY}
|
||||||
|
|
||||||
if [ "${CREATE_CHANNEL}" = "true" ]; then
|
if [ "${CREATE_CHANNEL}" = "true" ]; then
|
||||||
echo "Creating channel (peer1)..."
|
if [ "$ORDERER_TYPE" = "smartbft" ]; then
|
||||||
. ./peer1admin.sh && ./create_channel.sh
|
echo "Joining orderers to channel..."
|
||||||
|
../bin/osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:9443
|
||||||
|
../bin/osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:9444
|
||||||
|
../bin/osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:9445
|
||||||
|
../bin/osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:9446
|
||||||
|
else
|
||||||
|
echo "Creating channel (peer1)..."
|
||||||
|
. ./peer1admin.sh && ./create_channel.sh
|
||||||
|
|
||||||
echo "Joining channel (peer2)..."
|
echo "Joining channel (peer2)..."
|
||||||
. ./peer2admin.sh && ./join_channel.sh
|
. ./peer2admin.sh && ./join_channel.sh
|
||||||
|
|
||||||
echo "Joining channel (peer3)..."
|
echo "Joining channel (peer3)..."
|
||||||
. ./peer3admin.sh && ./join_channel.sh
|
. ./peer3admin.sh && ./join_channel.sh
|
||||||
|
|
||||||
echo "Joining channel (peer4)..."
|
echo "Joining channel (peer4)..."
|
||||||
. ./peer4admin.sh && ./join_channel.sh
|
. ./peer4admin.sh && ./join_channel.sh
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Fabric network running. Use Ctrl-C to stop."
|
echo "Fabric network running. Use Ctrl-C to stop."
|
||||||
|
|
||||||
wait
|
wait
|
||||||
|
|
@ -141,7 +141,7 @@ while [ $# -ge 1 ] ; do
|
||||||
CLI_DELAY="$2"
|
CLI_DELAY="$2"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-c )
|
-o )
|
||||||
ORDERER_TYPE="$2"
|
ORDERER_TYPE="$2"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ fi
|
||||||
export ORDERER_FILELEDGER_LOCATION="${PWD}"/data/orderer4
|
export ORDERER_FILELEDGER_LOCATION="${PWD}"/data/orderer4
|
||||||
export ORDERER_CONSENSUS_WALDIR="${PWD}"/data/orderer4/etcdraft/wal
|
export ORDERER_CONSENSUS_WALDIR="${PWD}"/data/orderer4/etcdraft/wal
|
||||||
export ORDERER_CONSENSUS_SNAPDIR="${PWD}"/data/orderer4/etcdraft/wal
|
export ORDERER_CONSENSUS_SNAPDIR="${PWD}"/data/orderer4/etcdraft/wal
|
||||||
export ORDERER_OPERATIONS_LISTENADDRESS=127.0.0.1:8446
|
export ORDERER_OPERATIONS_LISTENADDRESS=127.0.0.1:8450
|
||||||
export ORDERER_ADMIN_LISTENADDRESS=127.0.0.1:9446
|
export ORDERER_ADMIN_LISTENADDRESS=127.0.0.1:9446
|
||||||
|
|
||||||
# start orderer
|
# start orderer
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue