IBM-Blockchain-Archive / marbles

WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.
Apache License 2.0
1.03k stars 979 forks source link

How to run this on multiple peers #150

Closed nirmal1988 closed 6 years ago

nirmal1988 commented 7 years ago

How to run marbles application on multiple peers?

I have tried to add one more peers(attached .yml file) but it fails to start. image

docker-compose.yml.txt

dshuffma-ibm commented 7 years ago

pretty sure I know what you mean, but just to clarify... the marbles application is a node.js app that does not run on the peers. the marbles chaincode however, can be "installed" and "instantiated" on a peer(s). i'm assuming you want to get the 2nd peer running to install/instantiate chaincode on it.

looking at the docker-compose file, you need to make sure that the crypto material you are mounting exists. ie: ./crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp. if you don't mind re-using the certs from org0 you can simply copy the files that peer0 is mounting. to do it properly, you need to generate these files, but that is beyond my knowledge.

nirmal1988 commented 7 years ago

Thanks... I just copy pasted following folder and renamed with peer1.org1.example.com ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com And I got my second peer running, but i am getting following error while joining channel with peer1. image

Here is my start.sh file, i am getting error on last line

Join peer1.org1.example.com to the channel.

docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" -e "CORE_PEER_ADDRESS=peer1.org1.example.com:7051" peer1.org1.example.com peer channel join -b mychannel.block

start.sh.txt

Please let me know if we join peers using other command.

sachin-varade commented 6 years ago

@dshuffma-ibm

Do you have any plans to extend this sample application to have configuration running on multiple peers, with multiple organisations (2 org, 4 peers) as asked in question above ?

dshuffma-ibm commented 6 years ago

@sachin-varade I'd like to find the time to do this, but it seems unlikely to happen anytime soon. of course i'm open to someone out there making a PR to bring this option to the demo.

@nirmal1988 have you got any further? i'm thinking the port on the last line of start.sh should be 8051 since thats the port you mapped to peer1.org1.example.com. ie:

docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" -e "CORE_PEER_ADDRESS=peer1.org1.example.com:8051" peer1.org1.example.com peer channel join -b mychannel.block

SBerda commented 6 years ago

@nirmal1988 Did you solved your multiple peer issue ? I'm also very interested in making marble running on several peers .

dshuffma-ibm commented 6 years ago

closing, inactive

donaldwright commented 6 years ago

Great post! Full Make More Marbles Crypto Course Review here! https://scamorno.com/Make-More-Marbles-Crypto-Course-Review/?id=github