mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Update samples to use new logging env variables
FAB-12669 #done Change-Id: Ibb50cc77cb64c3cc138af9afde7273636f34b816 Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
This commit is contained in:
parent
33f064f2fb
commit
c21bbbaa38
11 changed files with 23 additions and 23 deletions
|
|
@ -13,7 +13,7 @@ services:
|
|||
# bridge network as the peers
|
||||
# https://docs.docker.com/compose/networking/
|
||||
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=artifacts_default
|
||||
- CORE_LOGGING_LEVEL=DEBUG
|
||||
- FABRIC_LOGGING_SPEC=DEBUG
|
||||
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
||||
- CORE_PEER_GOSSIP_ORGLEADER=false
|
||||
# The following setting skips the gossip handshake since we are
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ services:
|
|||
container_name: orderer.example.com
|
||||
image: hyperledger/fabric-orderer
|
||||
environment:
|
||||
- ORDERER_GENERAL_LOGLEVEL=debug
|
||||
- FABRIC_LOGGING_SPEC=debug
|
||||
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
|
||||
- ORDERER_GENERAL_GENESISMETHOD=file
|
||||
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ services:
|
|||
container_name: orderer.example.com
|
||||
image: hyperledger/fabric-orderer
|
||||
environment:
|
||||
- ORDERER_GENERAL_LOGLEVEL=info
|
||||
- FABRIC_LOGGING_SPEC=info
|
||||
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
|
||||
- ORDERER_GENERAL_GENESISMETHOD=file
|
||||
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
|
||||
|
|
@ -52,7 +52,7 @@ services:
|
|||
environment:
|
||||
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||||
- CORE_PEER_ID=peer0.org1.example.com
|
||||
- CORE_LOGGING_PEER=info
|
||||
- FABRIC_LOGGING_SPEC=info
|
||||
- CORE_CHAINCODE_LOGGING_LEVEL=info
|
||||
- CORE_PEER_LOCALMSPID=Org1MSP
|
||||
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
|
||||
|
|
@ -105,7 +105,7 @@ services:
|
|||
environment:
|
||||
- GOPATH=/opt/gopath
|
||||
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||||
- CORE_LOGGING_LEVEL=info
|
||||
- FABRIC_LOGGING_SPEC=info
|
||||
- CORE_PEER_ID=cli
|
||||
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
|
||||
- CORE_PEER_LOCALMSPID=Org1MSP
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ services:
|
|||
container_name: orderer
|
||||
image: hyperledger/fabric-orderer
|
||||
environment:
|
||||
- ORDERER_GENERAL_LOGLEVEL=debug
|
||||
- FABRIC_LOGGING_SPEC=debug
|
||||
- ORDERER_GENERAL_LISTENADDRESS=orderer
|
||||
- ORDERER_GENERAL_GENESISMETHOD=file
|
||||
- ORDERER_GENERAL_GENESISFILE=orderer.block
|
||||
|
|
@ -29,7 +29,7 @@ services:
|
|||
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer:7051
|
||||
- CORE_PEER_LOCALMSPID=DEFAULT
|
||||
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||||
- CORE_LOGGING_LEVEL=DEBUG
|
||||
- FABRIC_LOGGING_SPEC=DEBUG
|
||||
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp
|
||||
volumes:
|
||||
- /var/run/:/host/var/run/
|
||||
|
|
@ -49,7 +49,7 @@ services:
|
|||
environment:
|
||||
- GOPATH=/opt/gopath
|
||||
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||||
- CORE_LOGGING_LEVEL=DEBUG
|
||||
- FABRIC_LOGGING_SPEC=DEBUG
|
||||
- CORE_PEER_ID=cli
|
||||
- CORE_PEER_ADDRESS=peer:7051
|
||||
- CORE_PEER_LOCALMSPID=DEFAULT
|
||||
|
|
@ -72,7 +72,7 @@ services:
|
|||
environment:
|
||||
- GOPATH=/opt/gopath
|
||||
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||||
- CORE_LOGGING_LEVEL=DEBUG
|
||||
- FABRIC_LOGGING_SPEC=DEBUG
|
||||
- CORE_PEER_ID=example02
|
||||
- CORE_PEER_ADDRESS=peer:7051
|
||||
- CORE_PEER_LOCALMSPID=DEFAULT
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ function writeOrderer {
|
|||
- ORDERER_GENERAL_TLS_ROOTCAS=[$CA_CHAINFILE]
|
||||
- ORDERER_GENERAL_TLS_CLIENTAUTHREQUIRED=true
|
||||
- ORDERER_GENERAL_TLS_CLIENTROOTCAS=[$CA_CHAINFILE]
|
||||
- ORDERER_GENERAL_LOGLEVEL=debug
|
||||
- FABRIC_LOGGING_SPEC=debug
|
||||
- ORDERER_DEBUG_BROADCASTTRACEDIR=$LOGDIR
|
||||
- ORG=$ORG
|
||||
- ORG_ADMIN_CERT=$ORG_ADMIN_CERT
|
||||
|
|
@ -272,7 +272,7 @@ function writePeer {
|
|||
- CORE_PEER_MSPCONFIGPATH=$MYHOME/msp
|
||||
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||||
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_${NETWORK}
|
||||
- CORE_LOGGING_LEVEL=DEBUG
|
||||
- FABRIC_LOGGING_SPEC=DEBUG
|
||||
- CORE_PEER_TLS_ENABLED=true
|
||||
- CORE_PEER_TLS_CERT_FILE=$MYHOME/tls/server.crt
|
||||
- CORE_PEER_TLS_KEY_FILE=$MYHOME/tls/server.key
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ function initOrdererVars {
|
|||
MYHOME=/etc/hyperledger/orderer
|
||||
|
||||
export FABRIC_CA_CLIENT=$MYHOME
|
||||
export ORDERER_GENERAL_LOGLEVEL=debug
|
||||
export FABRIC_LOGGING_SPEC=debug
|
||||
export ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
|
||||
export ORDERER_GENERAL_GENESISMETHOD=file
|
||||
export ORDERER_GENERAL_GENESISFILE=$GENESIS_BLOCK_FILE
|
||||
|
|
@ -217,8 +217,8 @@ function initPeerVars {
|
|||
# https://docs.docker.com/compose/networking/
|
||||
#export CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_${NETWORK}
|
||||
export CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_${NETWORK}
|
||||
# export CORE_LOGGING_LEVEL=ERROR
|
||||
export CORE_LOGGING_LEVEL=DEBUG
|
||||
# export FABRIC_LOGGING_SPEC=ERROR
|
||||
export FABRIC_LOGGING_SPEC=DEBUG
|
||||
export CORE_PEER_TLS_ENABLED=true
|
||||
export CORE_PEER_TLS_CLIENTAUTHREQUIRED=true
|
||||
export CORE_PEER_TLS_ROOTCERT_FILE=$CA_CHAINFILE
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ function main {
|
|||
logr "Sending invoke transaction to $PEER_HOST ..."
|
||||
peer chaincode invoke -C $CHANNEL_NAME -n mycc -c '{"Args":["invoke","a","b","10"]}' $ORDERER_CONN_ARGS
|
||||
|
||||
## Install chaincode on 2nd peer of 2nd org
|
||||
# Install chaincode on 2nd peer of 2nd org
|
||||
initPeerVars ${PORGS[1]} 2
|
||||
installChaincode
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ function createChannel {
|
|||
initPeerVars ${PORGS[0]} 1
|
||||
switchToAdminIdentity
|
||||
logr "Creating channel '$CHANNEL_NAME' on $ORDERER_HOST ..."
|
||||
peer channel create --logging-level=DEBUG -c $CHANNEL_NAME -f $CHANNEL_TX_FILE $ORDERER_CONN_ARGS
|
||||
FABRIC_LOGGING_SPEC=debug peer channel create -c $CHANNEL_NAME -f $CHANNEL_TX_FILE $ORDERER_CONN_ARGS
|
||||
}
|
||||
|
||||
# Enroll as a fabric admin and join the channel
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ services:
|
|||
container_name: orderer.example.com
|
||||
image: hyperledger/fabric-orderer:$IMAGE_TAG
|
||||
environment:
|
||||
- ORDERER_GENERAL_LOGLEVEL=INFO
|
||||
- FABRIC_LOGGING_SPEC=INFO
|
||||
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
|
||||
- ORDERER_GENERAL_GENESISMETHOD=file
|
||||
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ services:
|
|||
# bridge network as the peers
|
||||
# https://docs.docker.com/compose/networking/
|
||||
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn
|
||||
- CORE_LOGGING_LEVEL=INFO
|
||||
#- CORE_LOGGING_LEVEL=DEBUG
|
||||
- FABRIC_LOGGING_SPEC=INFO
|
||||
#- FABRIC_LOGGING_SPEC=DEBUG
|
||||
- CORE_PEER_TLS_ENABLED=true
|
||||
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
||||
- CORE_PEER_GOSSIP_ORGLEADER=false
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ services:
|
|||
environment:
|
||||
- GOPATH=/opt/gopath
|
||||
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||||
#- CORE_LOGGING_LEVEL=DEBUG
|
||||
- CORE_LOGGING_LEVEL=INFO
|
||||
#- FABRIC_LOGGING_SPEC=DEBUG
|
||||
- FABRIC_LOGGING_SPEC=INFO
|
||||
- CORE_PEER_ID=cli
|
||||
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
|
||||
- CORE_PEER_LOCALMSPID=Org1MSP
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ services:
|
|||
environment:
|
||||
- GOPATH=/opt/gopath
|
||||
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||||
- CORE_LOGGING_LEVEL=INFO
|
||||
#- CORE_LOGGING_LEVEL=DEBUG
|
||||
- FABRIC_LOGGING_SPEC=INFO
|
||||
#- FABRIC_LOGGING_SPEC=DEBUG
|
||||
- CORE_PEER_ID=Org3cli
|
||||
- CORE_PEER_ADDRESS=peer0.org3.example.com:7051
|
||||
- CORE_PEER_LOCALMSPID=Org3MSP
|
||||
|
|
|
|||
Loading…
Reference in a new issue