Skip to content

Instantly share code, notes, and snippets.

@indranil32
Created June 24, 2021 10:40
Show Gist options
  • Save indranil32/04ebe64f366b321986d13f00b52ef4ad to your computer and use it in GitHub Desktop.
Save indranil32/04ebe64f366b321986d13f00b52ef4ad to your computer and use it in GitHub Desktop.
Fabric Test Network CLI env vars
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/Admin@org1.example.com/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/Admin@org2.example.com/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/Admin@org3.example.com/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