mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Merge "FAB-9294 eliminate excess noise in BYFN"
This commit is contained in:
commit
54b071bfdc
11 changed files with 38 additions and 15 deletions
|
|
@ -18,7 +18,7 @@ services:
|
|||
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/4239aa0dcd76daeeb8ba0cda701851d14504d31aad1b2ddddbac6a57365e497c_sk
|
||||
ports:
|
||||
- "7054:7054"
|
||||
command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
|
||||
command: sh -c 'fabric-ca-server start -b admin:adminpw'
|
||||
volumes:
|
||||
- ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
|
||||
container_name: ca.example.com
|
||||
|
|
@ -29,7 +29,7 @@ services:
|
|||
container_name: orderer.example.com
|
||||
image: hyperledger/fabric-orderer
|
||||
environment:
|
||||
- ORDERER_GENERAL_LOGLEVEL=debug
|
||||
- ORDERER_GENERAL_LOGLEVEL=info
|
||||
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
|
||||
- ORDERER_GENERAL_GENESISMETHOD=file
|
||||
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
|
||||
|
|
@ -52,8 +52,8 @@ services:
|
|||
environment:
|
||||
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||||
- CORE_PEER_ID=peer0.org1.example.com
|
||||
- CORE_LOGGING_PEER=debug
|
||||
- CORE_CHAINCODE_LOGGING_LEVEL=DEBUG
|
||||
- CORE_LOGGING_PEER=info
|
||||
- CORE_CHAINCODE_LOGGING_LEVEL=info
|
||||
- CORE_PEER_LOCALMSPID=Org1MSP
|
||||
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
|
||||
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
|
||||
|
|
@ -105,7 +105,7 @@ services:
|
|||
environment:
|
||||
- GOPATH=/opt/gopath
|
||||
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||||
- CORE_LOGGING_LEVEL=DEBUG
|
||||
- CORE_LOGGING_LEVEL=info
|
||||
- CORE_PEER_ID=cli
|
||||
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
|
||||
- CORE_PEER_LOCALMSPID=Org1MSP
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ docker-compose -f docker-compose.yml kill && docker-compose -f docker-compose.ym
|
|||
rm -f ~/.hfc-key-store/*
|
||||
|
||||
# remove chaincode docker images
|
||||
docker rm $(docker ps -aq)
|
||||
docker rmi $(docker images dev-* -q)
|
||||
|
||||
# Your system is now clean
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
# this may be commented out to resolve installed version of tools if desired
|
||||
export PATH=${PWD}/../bin:${PWD}:$PATH
|
||||
export FABRIC_CFG_PATH=${PWD}
|
||||
export VERBOSE=false
|
||||
|
||||
# Print the usage message
|
||||
function printHelp () {
|
||||
|
|
@ -49,6 +50,7 @@ function printHelp () {
|
|||
echo " -s <dbtype> - the database backend to use: goleveldb (default) or couchdb"
|
||||
echo " -l <language> - the chaincode language: golang (default) or node"
|
||||
echo " -i <imagetag> - the tag to be used to launch the network (defaults to \"latest\")"
|
||||
echo " -v - verbose mode"
|
||||
echo
|
||||
echo "Typically, one would first generate the required certificates and "
|
||||
echo "genesis block, then bring up the network. e.g.:"
|
||||
|
|
@ -163,7 +165,7 @@ function networkUp () {
|
|||
exit 1
|
||||
fi
|
||||
# now run the end to end script
|
||||
docker exec cli scripts/script.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT
|
||||
docker exec cli scripts/script.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR !!!! Test failed"
|
||||
exit 1
|
||||
|
|
@ -222,7 +224,7 @@ function upgradeNetwork () {
|
|||
docker-compose $COMPOSE_FILES up -d --no-deps $PEER
|
||||
done
|
||||
|
||||
docker exec cli scripts/upgrade_to_v11.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT
|
||||
docker exec cli scripts/upgrade_to_v11.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR !!!! Test failed"
|
||||
exit 1
|
||||
|
|
@ -470,7 +472,7 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
while getopts "h?m:c:t:d:f:s:l:i:" opt; do
|
||||
while getopts "h?m:c:t:d:f:s:l:i:v" opt; do
|
||||
case "$opt" in
|
||||
h|\?)
|
||||
printHelp
|
||||
|
|
@ -490,6 +492,8 @@ while getopts "h?m:c:t:d:f:s:l:i:" opt; do
|
|||
;;
|
||||
i) IMAGETAG=`uname -m`"-"$OPTARG
|
||||
;;
|
||||
v) VERBOSE=true
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
# this may be commented out to resolve installed version of tools if desired
|
||||
export PATH=${PWD}/../bin:${PWD}:$PATH
|
||||
export FABRIC_CFG_PATH=${PWD}
|
||||
export VERBOSE=false
|
||||
|
||||
# Print the usage message
|
||||
function printHelp () {
|
||||
|
|
@ -32,6 +33,7 @@ function printHelp () {
|
|||
echo " -s <dbtype> - the database backend to use: goleveldb (default) or couchdb"
|
||||
echo " -l <language> - the chaincode language: golang (default) or node"
|
||||
echo " -i <imagetag> - the tag to be used to launch the network (defaults to \"latest\")"
|
||||
echo " -v - verbose mode"
|
||||
echo
|
||||
echo "Typically, one would first generate the required certificates and "
|
||||
echo "genesis block, then bring up the network. e.g.:"
|
||||
|
|
@ -80,7 +82,7 @@ function clearContainers () {
|
|||
# specifically the following images are often left behind:
|
||||
# TODO list generated image naming patterns
|
||||
function removeUnwantedImages() {
|
||||
DOCKER_IMAGE_IDS=$(docker images | grep "dev\|none\|test-vp\|peer[0-9]-" | awk '{print $3}')
|
||||
DOCKER_IMAGE_IDS=$(docker images|awk '($1 ~ /dev-peer.*.mycc.*/) {print $3}')
|
||||
if [ -z "$DOCKER_IMAGE_IDS" -o "$DOCKER_IMAGE_IDS" == " " ]; then
|
||||
echo "---- No images available for deletion ----"
|
||||
else
|
||||
|
|
@ -110,7 +112,7 @@ function networkUp () {
|
|||
echo "###############################################################"
|
||||
echo "############### Have Org3 peers join network ##################"
|
||||
echo "###############################################################"
|
||||
docker exec Org3cli ./scripts/step2org3.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT
|
||||
docker exec Org3cli ./scripts/step2org3.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR !!!! Unable to have Org3 peers join network"
|
||||
exit 1
|
||||
|
|
@ -119,13 +121,13 @@ function networkUp () {
|
|||
echo "###############################################################"
|
||||
echo "##### Upgrade chaincode to have Org3 peers on the network #####"
|
||||
echo "###############################################################"
|
||||
docker exec cli ./scripts/step3org3.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT
|
||||
docker exec cli ./scripts/step3org3.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR !!!! Unable to add Org3 peers on network"
|
||||
exit 1
|
||||
fi
|
||||
# finish by running the test
|
||||
docker exec Org3cli ./scripts/testorg3.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT
|
||||
docker exec Org3cli ./scripts/testorg3.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR !!!! Unable to run test"
|
||||
exit 1
|
||||
|
|
@ -160,7 +162,7 @@ function createConfigTx () {
|
|||
echo "###############################################################"
|
||||
echo "####### Generate and submit config tx to add Org3 #############"
|
||||
echo "###############################################################"
|
||||
docker exec cli scripts/step1org3.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT
|
||||
docker exec cli scripts/step1org3.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR !!!! Unable to create config tx"
|
||||
exit 1
|
||||
|
|
@ -271,7 +273,7 @@ else
|
|||
printHelp
|
||||
exit 1
|
||||
fi
|
||||
while getopts "h?c:t:d:f:s:l:i:" opt; do
|
||||
while getopts "h?c:t:d:f:s:l:i:v" opt; do
|
||||
case "$opt" in
|
||||
h|\?)
|
||||
printHelp
|
||||
|
|
@ -291,6 +293,8 @@ while getopts "h?c:t:d:f:s:l:i:" opt; do
|
|||
;;
|
||||
i) IMAGETAG=$OPTARG
|
||||
;;
|
||||
v) VERBOSE=true
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,12 @@ CHANNEL_NAME="$1"
|
|||
DELAY="$2"
|
||||
LANGUAGE="$3"
|
||||
TIMEOUT="$4"
|
||||
VERBOSE="$5"
|
||||
: ${CHANNEL_NAME:="mychannel"}
|
||||
: ${DELAY:="3"}
|
||||
: ${LANGUAGE:="golang"}
|
||||
: ${TIMEOUT:="10"}
|
||||
: ${VERBOSE:="false"}
|
||||
LANGUAGE=`echo "$LANGUAGE" | tr [:upper:] [:lower:]`
|
||||
COUNTER=1
|
||||
MAX_RETRY=5
|
||||
|
|
|
|||
|
|
@ -15,10 +15,12 @@ CHANNEL_NAME="$1"
|
|||
DELAY="$2"
|
||||
LANGUAGE="$3"
|
||||
TIMEOUT="$4"
|
||||
VERBOSE="$5"
|
||||
: ${CHANNEL_NAME:="mychannel"}
|
||||
: ${DELAY:="3"}
|
||||
: ${LANGUAGE:="golang"}
|
||||
: ${TIMEOUT:="10"}
|
||||
: ${VERBOSE:="false"}
|
||||
LANGUAGE=`echo "$LANGUAGE" | tr [:upper:] [:lower:]`
|
||||
COUNTER=1
|
||||
MAX_RETRY=5
|
||||
|
|
|
|||
|
|
@ -18,10 +18,12 @@ CHANNEL_NAME="$1"
|
|||
DELAY="$2"
|
||||
LANGUAGE="$3"
|
||||
TIMEOUT="$4"
|
||||
VERBOSE="$5"
|
||||
: ${CHANNEL_NAME:="mychannel"}
|
||||
: ${DELAY:="3"}
|
||||
: ${LANGUAGE:="golang"}
|
||||
: ${TIMEOUT:="10"}
|
||||
: ${VERBOSE:="false"}
|
||||
LANGUAGE=`echo "$LANGUAGE" | tr [:upper:] [:lower:]`
|
||||
COUNTER=1
|
||||
MAX_RETRY=5
|
||||
|
|
|
|||
|
|
@ -19,10 +19,12 @@ CHANNEL_NAME="$1"
|
|||
DELAY="$2"
|
||||
LANGUAGE="$3"
|
||||
TIMEOUT="$4"
|
||||
VERBOSE="$5"
|
||||
: ${CHANNEL_NAME:="mychannel"}
|
||||
: ${DELAY:="3"}
|
||||
: ${LANGUAGE:="golang"}
|
||||
: ${TIMEOUT:="10"}
|
||||
: ${VERBOSE:="false"}
|
||||
LANGUAGE=`echo "$LANGUAGE" | tr [:upper:] [:lower:]`
|
||||
COUNTER=1
|
||||
MAX_RETRY=5
|
||||
|
|
|
|||
|
|
@ -24,9 +24,11 @@ CHANNEL_NAME="$1"
|
|||
DELAY="$2"
|
||||
LANGUAGE="$3"
|
||||
TIMEOUT="$4"
|
||||
VERBOSE="$5"
|
||||
: ${CHANNEL_NAME:="mychannel"}
|
||||
: ${TIMEOUT:="10"}
|
||||
: ${LANGUAGE:="golang"}
|
||||
: ${VERBOSE:="false"}
|
||||
LANGUAGE=`echo "$LANGUAGE" | tr [:upper:] [:lower:]`
|
||||
COUNTER=1
|
||||
MAX_RETRY=5
|
||||
|
|
|
|||
|
|
@ -13,10 +13,12 @@ CHANNEL_NAME="$1"
|
|||
DELAY="$2"
|
||||
LANGUAGE="$3"
|
||||
TIMEOUT="$4"
|
||||
VERBOSE="$5"
|
||||
: ${CHANNEL_NAME:="mychannel"}
|
||||
: ${DELAY:="5"}
|
||||
: ${LANGUAGE:="golang"}
|
||||
: ${TIMEOUT:="10"}
|
||||
: ${VERBOSE:="false"}
|
||||
LANGUAGE=`echo "$LANGUAGE" | tr [:upper:] [:lower:]`
|
||||
COUNTER=1
|
||||
MAX_RETRY=5
|
||||
|
|
|
|||
|
|
@ -59,7 +59,9 @@ setGlobals () {
|
|||
echo "================== ERROR !!! ORG Unknown =================="
|
||||
fi
|
||||
|
||||
env |grep CORE
|
||||
if [ "$VERBOSE" == "true" ]; then
|
||||
env |grep CORE
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue