-
Notifications
You must be signed in to change notification settings - Fork 0
/
setupNetwork.sh
43 lines (26 loc) · 2.32 KB
/
setupNetwork.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
echo "Setting up the network.."
echo "Creating channel genesis block.."
# Create the channel
docker exec -e "CORE_PEER_LOCALMSPID=ManufacturerMSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/manufacturer.vlbc.com/users/[email protected]/msp" -e "CORE_PEER_ADDRESS=peer0.manufacturer.vlbc.com:7051" cli peer channel create -o orderer.vlbc.com:7050 -c crchannel -f /etc/hyperledger/configtx/crchannel.tx
sleep 5
echo "Channel genesis block created."
echo "peer0.manufacturer.vlbc.com joining the channel..."
# Join peer0.manufacturer.vlbc.com to the channel.
docker exec -e "CORE_PEER_LOCALMSPID=ManufacturerMSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/manufacturer.vlbc.com/users/[email protected]/msp" -e "CORE_PEER_ADDRESS=peer0.manufacturer.vlbc.com:7051" cli peer channel join -b crchannel.block
echo "peer0.manufacturer.vlbc.com joined the channel"
echo "peer0.dealer.vlbc.com joining the channel..."
# Join peer0.dealer.vlbc.com to the channel.
docker exec -e "CORE_PEER_LOCALMSPID=DealerMSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/dealer.vlbc.com/users/[email protected]/msp" -e "CORE_PEER_ADDRESS=peer0.dealer.vlbc.com:7051" cli peer channel join -b crchannel.block
echo "peer0.dealer.vlbc.com joined the channel"
echo "peer0.insurer.vlbc.com joining the channel..."
# Join peer0.insurer.vlbc.com to the channel.
docker exec -e "CORE_PEER_LOCALMSPID=InsurerMSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/insurer.vlbc.com/users/[email protected]/msp" -e "CORE_PEER_ADDRESS=peer0.insurer.vlbc.com:7051" cli peer channel join -b crchannel.block
sleep 5
echo "peer0.rto.vlbc.com joined the channel"
echo "peer0.rto.vlbc.com joining the channel..."
# Join peer0.rto.vlbc.com to the channel.
docker exec -e "CORE_PEER_LOCALMSPID=RTOMSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/rto.vlbc.com/users/[email protected]/msp" -e "CORE_PEER_ADDRESS=peer0.rto.vlbc.com:7051" cli peer channel join -b crchannel.block
sleep 5
echo "peer0.rto.vlbc.com joined the channel"
echo "Following is the docker network....."
docker ps