mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
This change fixes a set of related issues. It fixes the use of the cli timeout setting. It is now merely about the maximum time spent waiting for a response. The e2e script is no longer run from docker-compose but by calling docker exec from byfn.sh and docker-compose now merely has the cli waiting/sleeping for 1000 seconds. This not only allows starting the network without automatically running the e2e script, it also allows byfn.sh to properly end when the e2e script ends rather than hang. It also makes the tutorial simpler. The time the cli container waits/sleeps cannot be changed other than by editing the config file but this shouldn't be a problem. This change also fixes the log output of the e2e script so that peers are consistantly being referenced as in peerX.orgY. In addition, this changes the usage of byfn.sh so that the -m parameter is no longer needed. One merely needs to type "./byfn.sh up" rather than "./byfn.sh -m up". The old way is still supported though, for human backward compatibility. ;-) And by default the answer to the prompt for continuation is "y" so the user can simply continue with a hit of the return key. Change-Id: I3e2409d81018f97ec9306ce6e1ae916d8fe18fec Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
84 lines
2.7 KiB
YAML
84 lines
2.7 KiB
YAML
# Copyright IBM Corp. All Rights Reserved.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
version: '2'
|
|
|
|
networks:
|
|
byfn:
|
|
|
|
services:
|
|
|
|
orderer.example.com:
|
|
extends:
|
|
file: base/docker-compose-base.yaml
|
|
service: orderer.example.com
|
|
container_name: orderer.example.com
|
|
networks:
|
|
- byfn
|
|
|
|
peer0.org1.example.com:
|
|
container_name: peer0.org1.example.com
|
|
extends:
|
|
file: base/docker-compose-base.yaml
|
|
service: peer0.org1.example.com
|
|
networks:
|
|
- byfn
|
|
|
|
peer1.org1.example.com:
|
|
container_name: peer1.org1.example.com
|
|
extends:
|
|
file: base/docker-compose-base.yaml
|
|
service: peer1.org1.example.com
|
|
networks:
|
|
- byfn
|
|
|
|
peer0.org2.example.com:
|
|
container_name: peer0.org2.example.com
|
|
extends:
|
|
file: base/docker-compose-base.yaml
|
|
service: peer0.org2.example.com
|
|
networks:
|
|
- byfn
|
|
|
|
peer1.org2.example.com:
|
|
container_name: peer1.org2.example.com
|
|
extends:
|
|
file: base/docker-compose-base.yaml
|
|
service: peer1.org2.example.com
|
|
networks:
|
|
- byfn
|
|
|
|
cli:
|
|
container_name: cli
|
|
image: hyperledger/fabric-tools
|
|
tty: true
|
|
environment:
|
|
- GOPATH=/opt/gopath
|
|
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
|
- CORE_LOGGING_LEVEL=DEBUG
|
|
- CORE_PEER_ID=cli
|
|
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
|
|
- CORE_PEER_LOCALMSPID=Org1MSP
|
|
- CORE_PEER_TLS_ENABLED=true
|
|
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
|
|
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
|
|
- CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
|
|
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
|
|
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
|
|
command: /bin/bash -c 'sleep 1000'
|
|
volumes:
|
|
- /var/run/:/host/var/run/
|
|
- ./../chaincode/:/opt/gopath/src/github.com/chaincode
|
|
- ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
|
|
- ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
|
|
- ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
|
|
depends_on:
|
|
- orderer.example.com
|
|
- peer0.org1.example.com
|
|
- peer1.org1.example.com
|
|
- peer0.org2.example.com
|
|
- peer1.org2.example.com
|
|
networks:
|
|
- byfn
|