mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Added a new option for creating channel: Running ./network.sh createChannel -bft will initiate a channel running BFT orderers. Using ./network.sh up -bft will initiate dockers for bft environment. Added option for 4 orderers. Add add_new_orderer_to_config.py which is referenced in the fabric official docs. Signed-off-by: Arkadi Piven <arkadi.piven@ibm.com> Signed-off-by: arkadipiven <arkadi7770@gmail.com>
160 lines
No EOL
6.1 KiB
YAML
160 lines
No EOL
6.1 KiB
YAML
# Copyright IBM Corp. All Rights Reserved.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
version: '3.7'
|
|
|
|
volumes:
|
|
orderer.example.com:
|
|
peer0.org1.example.com:
|
|
peer0.org2.example.com:
|
|
|
|
networks:
|
|
test:
|
|
name: fabric_test
|
|
|
|
services:
|
|
|
|
orderer.example.com:
|
|
container_name: orderer.example.com
|
|
image: hyperledger/fabric-orderer:latest
|
|
labels:
|
|
service: hyperledger-fabric
|
|
environment:
|
|
- FABRIC_LOGGING_SPEC=INFO
|
|
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
|
|
- ORDERER_GENERAL_LISTENPORT=7050
|
|
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
|
|
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
|
|
# enabled TLS
|
|
- ORDERER_GENERAL_TLS_ENABLED=true
|
|
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
|
|
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
|
|
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
|
|
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
|
|
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
|
|
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
|
|
- ORDERER_GENERAL_BOOTSTRAPMETHOD=none
|
|
- ORDERER_CHANNELPARTICIPATION_ENABLED=true
|
|
- ORDERER_ADMIN_TLS_ENABLED=true
|
|
- ORDERER_ADMIN_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
|
|
- ORDERER_ADMIN_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
|
|
- ORDERER_ADMIN_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
|
|
- ORDERER_ADMIN_TLS_CLIENTROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
|
|
- ORDERER_ADMIN_LISTENADDRESS=0.0.0.0:7053
|
|
- ORDERER_OPERATIONS_LISTENADDRESS=orderer.example.com:9443
|
|
- ORDERER_METRICS_PROVIDER=prometheus
|
|
working_dir: /root
|
|
command: orderer
|
|
volumes:
|
|
- ../organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
|
|
- ../organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls
|
|
- orderer.example.com:/var/hyperledger/production/orderer
|
|
ports:
|
|
- 7050:7050
|
|
- 7053:7053
|
|
- 9443:9443
|
|
networks:
|
|
- test
|
|
|
|
peer0.org1.example.com:
|
|
container_name: peer0.org1.example.com
|
|
image: hyperledger/fabric-peer:latest
|
|
labels:
|
|
service: hyperledger-fabric
|
|
environment:
|
|
- FABRIC_CFG_PATH=/etc/hyperledger/peercfg
|
|
- FABRIC_LOGGING_SPEC=INFO
|
|
#- FABRIC_LOGGING_SPEC=DEBUG
|
|
- CORE_PEER_TLS_ENABLED=true
|
|
- CORE_PEER_PROFILE_ENABLED=false
|
|
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
|
|
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
|
|
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
|
|
# Peer specific variables
|
|
- CORE_PEER_ID=peer0.org1.example.com
|
|
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
|
|
- CORE_PEER_LISTENADDRESS=0.0.0.0:7051
|
|
- CORE_PEER_CHAINCODEADDRESS=peer0.org1.example.com:7052
|
|
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
|
|
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051
|
|
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
|
|
- CORE_PEER_LOCALMSPID=Org1MSP
|
|
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp
|
|
- CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9444
|
|
- CORE_METRICS_PROVIDER=prometheus
|
|
- CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0org1"}
|
|
- CORE_CHAINCODE_EXECUTETIMEOUT=300s
|
|
volumes:
|
|
- ../organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com:/etc/hyperledger/fabric
|
|
- peer0.org1.example.com:/var/hyperledger/production
|
|
working_dir: /root
|
|
command: peer node start
|
|
ports:
|
|
- 7051:7051
|
|
- 9444:9444
|
|
networks:
|
|
- test
|
|
|
|
peer0.org2.example.com:
|
|
container_name: peer0.org2.example.com
|
|
image: hyperledger/fabric-peer:latest
|
|
labels:
|
|
service: hyperledger-fabric
|
|
environment:
|
|
- FABRIC_CFG_PATH=/etc/hyperledger/peercfg
|
|
- FABRIC_LOGGING_SPEC=INFO
|
|
#- FABRIC_LOGGING_SPEC=DEBUG
|
|
- CORE_PEER_TLS_ENABLED=true
|
|
- CORE_PEER_PROFILE_ENABLED=false
|
|
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
|
|
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
|
|
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
|
|
# Peer specific variables
|
|
- CORE_PEER_ID=peer0.org2.example.com
|
|
- CORE_PEER_ADDRESS=peer0.org2.example.com:9051
|
|
- CORE_PEER_LISTENADDRESS=0.0.0.0:9051
|
|
- CORE_PEER_CHAINCODEADDRESS=peer0.org2.example.com:9052
|
|
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9052
|
|
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:9051
|
|
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:9051
|
|
- CORE_PEER_LOCALMSPID=Org2MSP
|
|
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp
|
|
- CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9445
|
|
- CORE_METRICS_PROVIDER=prometheus
|
|
- CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG={"peername":"peer0org2"}
|
|
- CORE_CHAINCODE_EXECUTETIMEOUT=300s
|
|
volumes:
|
|
- ../organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com:/etc/hyperledger/fabric
|
|
- peer0.org2.example.com:/var/hyperledger/production
|
|
working_dir: /root
|
|
command: peer node start
|
|
ports:
|
|
- 9051:9051
|
|
- 9445:9445
|
|
networks:
|
|
- test
|
|
|
|
cli:
|
|
container_name: cli
|
|
image: hyperledger/fabric-tools:latest
|
|
labels:
|
|
service: hyperledger-fabric
|
|
tty: true
|
|
stdin_open: true
|
|
environment:
|
|
- GOPATH=/opt/gopath
|
|
- FABRIC_LOGGING_SPEC=INFO
|
|
- FABRIC_CFG_PATH=/etc/hyperledger/peercfg
|
|
#- FABRIC_LOGGING_SPEC=DEBUG
|
|
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
|
|
command: /bin/bash
|
|
volumes:
|
|
- ../organizations:/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations
|
|
- ../scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
|
|
depends_on:
|
|
- peer0.org1.example.com
|
|
- peer0.org2.example.com
|
|
networks:
|
|
- test |