I have succesfully started first-network, it consists of 4 peers, 2 for each org. Using docker exec cli
I can only send commands to peer0.org1.example.com
. The question is how can I send calls for example to peer0.or2.example.com
? In docs it's said:
For the following CLI commands against peer0.org1.example.com to work, we need to preface our commands with the four environment variables given below. These variables for peer0.org1.example.com are baked into the CLI container, therefore we can operate without passing them. HOWEVER, if you want to send calls to other peers or the orderer, then you will need to provide these values accordingly. Inspect the docker-compose-base.yaml for the specific paths:
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
CORE_PEER_LOCALMSPID="Org1MSP"
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
So when I change these variables for example for CORE_PEER_LOCALMSPID="Org2MSP" and so on - nothing changes because when I do docker exec it cli bash
and then in docker as peer echo $CORE_PEER_LOCALMSPID
it still says Org1Msp