Created
June 24, 2021 10:40
-
-
Save indranil32/04ebe64f366b321986d13f00b52ef4ad to your computer and use it in GitHub Desktop.
Fabric Test Network CLI env vars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH=${PWD}/../bin:$PATH | |
export FABRIC_CFG_PATH=$PWD/../config/ | |
export CORE_PEER_TLS_ENABLED=true | |
if [[ $# -lt 1 ]] || [[ $1 == "1" ]] ; then | |
# Environment variables for Org1(default) | |
export CORE_PEER_LOCALMSPID="Org1MSP" | |
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt | |
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp | |
export CORE_PEER_ADDRESS=localhost:7051 | |
elif [[ $1 == "2" ]] ; then | |
export CORE_PEER_LOCALMSPID="Org2MSP" | |
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt | |
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org2.example.com/users/[email protected]/msp | |
export CORE_PEER_ADDRESS=localhost:9051 | |
elif [[ $1 == "3" ]] ; then | |
export CORE_PEER_LOCALMSPID="Org3MSP" | |
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt | |
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org3.example.com/users/[email protected]/msp | |
export CORE_PEER_ADDRESS=localhost:11051 | |
else | |
echo -e "Invalid parameter!!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment