mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Augment the fabric-samples first-network sample to include an option to choose etcd/raft as consensus-type. Extend the -o flag so that it allows users to choose between the solo, kafka, or etcdraft consensus-type for the ordering service. Use three orderer nodes. Change-Id: Ibc4c3564220466aef0a87baee4a2d594e5554a62 Signed-off-by: Yoav Tock <tock@il.ibm.com>
50 lines
2.1 KiB
YAML
50 lines
2.1 KiB
YAML
# Copyright IBM Corp. All Rights Reserved.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
version: '2'
|
|
|
|
services:
|
|
peer-base:
|
|
image: hyperledger/fabric-peer:$IMAGE_TAG
|
|
environment:
|
|
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
|
# the following setting starts chaincode containers on the same
|
|
# bridge network as the peers
|
|
# https://docs.docker.com/compose/networking/
|
|
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn
|
|
- FABRIC_LOGGING_SPEC=INFO
|
|
#- FABRIC_LOGGING_SPEC=DEBUG
|
|
- CORE_PEER_TLS_ENABLED=true
|
|
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
|
- CORE_PEER_GOSSIP_ORGLEADER=false
|
|
- CORE_PEER_PROFILE_ENABLED=true
|
|
- 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
|
|
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
|
|
command: peer node start
|
|
|
|
orderer-base:
|
|
image: hyperledger/fabric-orderer:$IMAGE_TAG
|
|
environment:
|
|
- FABRIC_LOGGING_SPEC=INFO
|
|
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
|
|
- ORDERER_GENERAL_GENESISMETHOD=file
|
|
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
|
|
- 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_KAFKA_TOPIC_REPLICATIONFACTOR=1
|
|
- ORDERER_KAFKA_VERBOSE=true
|
|
- 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]
|
|
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
|
|
command: orderer
|
|
|