mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
This change brings a new set of scripts and configuration files to the first-network sample to make it easier for people to follow the new tutorial on how to add a third org to the network setup in BYFN. To function properly the new Extend You First Network script (eyfn.sh) must be run after byfn.sh is run and with the same parameters. So, valid uses include: ./byfn.sh up ./eyfn.sh up or ./byfn.sh up -c testchannel -s couchdb -l node ./eyfn.sh up -c testchannel -s couchdb -l node A single './eyfn.sh down' command is however necessary to take the whole network down. Patch-set #2: fixes ./eyfn.sh down Patch-set #3: removed unused option from Usage and spurious whitespaces Patch-set #4: added missing test file Change-Id: I9c926b52f2243dda1c5f9368112c314a6c5c6929 Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
61 lines
1.6 KiB
Bash
Executable file
61 lines
1.6 KiB
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# Copyright IBM Corp. All Rights Reserved.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
# This script is designed to be run in the org3cli container as the
|
|
# final step of the EYFN tutorial. It simply issues a couple of
|
|
# chaincode requests through the org3 peers to check that org3 was
|
|
# properly added to the network previously setup in the BYFN tutorial.
|
|
#
|
|
|
|
echo
|
|
echo " ____ _____ _ ____ _____ "
|
|
echo "/ ___| |_ _| / \ | _ \ |_ _|"
|
|
echo "\___ \ | | / _ \ | |_) | | | "
|
|
echo " ___) | | | / ___ \ | _ < | | "
|
|
echo "|____/ |_| /_/ \_\ |_| \_\ |_| "
|
|
echo
|
|
echo "Extend your first network (EYFN) test"
|
|
echo
|
|
CHANNEL_NAME="$1"
|
|
DELAY="$2"
|
|
LANGUAGE="$3"
|
|
TIMEOUT="$4"
|
|
: ${CHANNEL_NAME:="mychannel"}
|
|
: ${TIMEOUT:="10"}
|
|
: ${LANGUAGE:="golang"}
|
|
LANGUAGE=`echo "$LANGUAGE" | tr [:upper:] [:lower:]`
|
|
COUNTER=1
|
|
MAX_RETRY=5
|
|
ORDERER_CA=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
|
|
|
|
CC_SRC_PATH="github.com/chaincode/chaincode_example02/go/"
|
|
if [ "$LANGUAGE" = "node" ]; then
|
|
CC_SRC_PATH="/opt/gopath/src/github.com/chaincode/chaincode_example02/node/"
|
|
fi
|
|
|
|
echo "Channel name : "$CHANNEL_NAME
|
|
|
|
# import functions
|
|
. scripts/utils.sh
|
|
|
|
chaincodeQuery 0 3 90
|
|
chaincodeInvoke 0 3
|
|
chaincodeQuery 0 3 80
|
|
|
|
echo
|
|
echo "========= All GOOD, EYFN test execution completed =========== "
|
|
echo
|
|
|
|
echo
|
|
echo " _____ _ _ ____ "
|
|
echo "| ____| | \ | | | _ \ "
|
|
echo "| _| | \| | | | | | "
|
|
echo "| |___ | |\ | | |_| | "
|
|
echo "|_____| |_| \_| |____/ "
|
|
echo
|
|
|
|
exit 0
|