Merge pull request #58 from qiang0723/master
Update 1-peer compose file and test scriptpull/59/head
commit
463c8ffd17
|
@ -48,15 +48,15 @@ services:
|
||||||
|
|
||||||
peer0.org1.example.com:
|
peer0.org1.example.com:
|
||||||
extends:
|
extends:
|
||||||
file: peer.yml
|
file: peer-base.yaml
|
||||||
service: peer
|
service: peer-base
|
||||||
container_name: peer0.org1.example.com
|
container_name: peer0.org1.example.com
|
||||||
hostname: peer0.org1.example.com
|
hostname: peer0.org1.example.com
|
||||||
environment:
|
environment:
|
||||||
- CORE_PEER_ID=peer0.org1.example.com
|
- CORE_PEER_ID=peer0.org1.example.com
|
||||||
- CORE_PEER_ADDRESS=peer0.org1:7051
|
- CORE_PEER_ADDRESS=peer0.org1:7051
|
||||||
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
|
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
|
||||||
- CORE_PEER_GOSSIP_ORGLEADER=true
|
# - CORE_PEER_GOSSIP_ORGLEADER=true
|
||||||
# - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer.example.com:7050
|
# - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer.example.com:7050
|
||||||
- CORE_PEER_LOCALMSPID=Org1MSP
|
- CORE_PEER_LOCALMSPID=Org1MSP
|
||||||
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
|
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
|
||||||
|
@ -76,8 +76,8 @@ services:
|
||||||
|
|
||||||
cli:
|
cli:
|
||||||
extends:
|
extends:
|
||||||
file: peer.yml
|
file: peer-base.yaml
|
||||||
service: peer
|
service: peer-base
|
||||||
container_name: fabric-cli
|
container_name: fabric-cli
|
||||||
hostname: cli
|
hostname: cli
|
||||||
environment:
|
environment:
|
||||||
|
@ -104,6 +104,7 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- peer0.org1.example.com
|
- peer0.org1.example.com
|
||||||
- orderer.example.com
|
- orderer.example.com
|
||||||
|
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
|
||||||
command: bash -c 'while true; do sleep 20170504; done'
|
command: bash -c 'while true; do sleep 20170504; done'
|
||||||
|
|
||||||
#networks:
|
#networks:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
CHANNEL_NAME="$1"
|
CHANNEL_NAME="$1"
|
||||||
: ${CHANNEL_NAME:="mychannel"}
|
: ${CHANNEL_NAME:="businesschannel"}
|
||||||
: ${TIMEOUT:="60"}
|
: ${TIMEOUT:="60"}
|
||||||
COUNTER=0
|
COUNTER=0
|
||||||
MAX_RETRY=5
|
MAX_RETRY=5
|
||||||
|
@ -19,7 +19,7 @@ verifyResult () {
|
||||||
}
|
}
|
||||||
|
|
||||||
createChannel() {
|
createChannel() {
|
||||||
peer channel create -o orderer.example.com:7050 -c ${CHANNEL_NAME} -f ./peer/channel-artifacts/channel.tx >&log.txt
|
peer channel create -o orderer.example.com:7050 -c ${CHANNEL_NAME} -f ./channel-artifacts/channel.tx >&log.txt
|
||||||
res=$?
|
res=$?
|
||||||
cat log.txt
|
cat log.txt
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ joinChannel () {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateAnchorPeers() {
|
updateAnchorPeers() {
|
||||||
peer channel create -o orderer.example.com:7050 -c ${CHANNEL_NAME} -f ./peer/channel-artifacts/Org1MSPanchors.tx >&log.txt
|
peer channel create -o orderer.example.com:7050 -c ${CHANNEL_NAME} -f ./channel-artifacts/Org1MSPanchors.tx >&log.txt
|
||||||
res=$?
|
res=$?
|
||||||
cat log.txt
|
cat log.txt
|
||||||
verifyResult $res "Anchor peer update failed"
|
verifyResult $res "Anchor peer update failed"
|
||||||
|
|
Loading…
Reference in New Issue