Skip to content

Instantly share code, notes, and snippets.

@indranil32
Created June 24, 2021 10:40
Show Gist options
  • Select an option

  • Save indranil32/04ebe64f366b321986d13f00b52ef4ad to your computer and use it in GitHub Desktop.

Select an option

Save indranil32/04ebe64f366b321986d13f00b52ef4ad to your computer and use it in GitHub Desktop.

Revisions

  1. indranil32 created this gist Jun 24, 2021.
    23 changes: 23 additions & 0 deletions local.profiles.env
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    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