From b07de81c45a10d75c91c448e6138449d946d33b5 Mon Sep 17 00:00:00 2001 From: qiang0723 Date: Mon, 12 Jun 2017 15:12:16 +0800 Subject: [PATCH] Update 1-peer compose file and test script --- hyperledger/1.0/docker-compose-1peer.yaml | 11 ++++++----- hyperledger/1.0/scripts/test_1peer.sh | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/hyperledger/1.0/docker-compose-1peer.yaml b/hyperledger/1.0/docker-compose-1peer.yaml index 3ac7b5c0..314cf5bd 100644 --- a/hyperledger/1.0/docker-compose-1peer.yaml +++ b/hyperledger/1.0/docker-compose-1peer.yaml @@ -48,15 +48,15 @@ services: peer0.org1.example.com: extends: - file: peer.yml - service: peer + file: peer-base.yaml + service: peer-base container_name: peer0.org1.example.com hostname: peer0.org1.example.com environment: - CORE_PEER_ID=peer0.org1.example.com - CORE_PEER_ADDRESS=peer0.org1: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_LOCALMSPID=Org1MSP - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt @@ -76,8 +76,8 @@ services: cli: extends: - file: peer.yml - service: peer + file: peer-base.yaml + service: peer-base container_name: fabric-cli hostname: cli environment: @@ -104,6 +104,7 @@ services: depends_on: - peer0.org1.example.com - orderer.example.com + working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: bash -c 'while true; do sleep 20170504; done' #networks: diff --git a/hyperledger/1.0/scripts/test_1peer.sh b/hyperledger/1.0/scripts/test_1peer.sh index fa93f7b1..e9806f23 100644 --- a/hyperledger/1.0/scripts/test_1peer.sh +++ b/hyperledger/1.0/scripts/test_1peer.sh @@ -1,7 +1,7 @@ #!/bin/bash CHANNEL_NAME="$1" -: ${CHANNEL_NAME:="mychannel"} +: ${CHANNEL_NAME:="businesschannel"} : ${TIMEOUT:="60"} COUNTER=0 MAX_RETRY=5 @@ -19,7 +19,7 @@ verifyResult () { } 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=$? cat log.txt @@ -53,7 +53,7 @@ joinChannel () { } 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=$? cat log.txt verifyResult $res "Anchor peer update failed"