Commit 189439e2 authored by Waleed El Sayed's avatar Waleed El Sayed

develop script.sh

parent b7f4a474
......@@ -40,3 +40,94 @@ CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer1.org2.bitbrain.com/tls/ca.crt
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/users/Admin@org2.bitbrain.com/msp
peer channel join -b $CHANNEL_NAME.block
# Set peer0.org1 as anchor peer
CORE_PEER_ADDRESS=peer0.org1.bitbrain.com:7051
CORE_PEER_LOCALMSPID=Org1MSP
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer0.org1.bitbrain.com/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer0.org1.bitbrain.com/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer0.org1.bitbrain.com/tls/ca.crt
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/users/Admin@org1.bitbrain.com/msp
peer channel update -o orderer.bitbrain.com:7050 -c $CHANNEL_NAME -f ./mynetwork/Org1MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/bitbrain.com/orderers/orderer.bitbrain.com/msp/tlscacerts/tlsca.bitbrain.com-cert.pem
# Set peer0.org2 as anchor peer
CORE_PEER_ADDRESS=peer0.org2.bitbrain.com:7051
CORE_PEER_LOCALMSPID=Org2MSP
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer0.org2.bitbrain.com/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer0.org2.bitbrain.com/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer0.org2.bitbrain.com/tls/ca.crt
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/users/Admin@org2.bitbrain.com/msp
peer channel update -o orderer.bitbrain.com:7050 -c $CHANNEL_NAME -f ./mynetwork/Org2MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/bitbrain.com/orderers/orderer.bitbrain.com/msp/tlscacerts/tlsca.bitbrain.com-cert.pem
# Join peer0.org1 to channnel
CORE_PEER_ADDRESS=peer0.org1.bitbrain.com:7051
CORE_PEER_LOCALMSPID=Org1MSP
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer0.org1.bitbrain.com/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer0.org1.bitbrain.com/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer0.org1.bitbrain.com/tls/ca.crt
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/users/Admin@org1.bitbrain.com/msp
peer chaincode install -n chaincode_example02 -v 1.0.0 -l node -p /opt/gopath/src/github.com/chaincode/chaincode_example02/node
# Join peer1.org1 to channnel
CORE_PEER_ADDRESS=peer1.org1.bitbrain.com:7051
CORE_PEER_LOCALMSPID=Org1MSP
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer1.org1.bitbrain.com/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer1.org1.bitbrain.com/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer1.org1.bitbrain.com/tls/ca.crt
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/users/Admin@org1.bitbrain.com/msp
peer chaincode install -n chaincode_example02 -v 1.0.0 -l node -p /opt/gopath/src/github.com/chaincode/chaincode_example02/node
# Join peer0.org2 to channnel
CORE_PEER_ADDRESS=peer0.org2.bitbrain.com:7051
CORE_PEER_LOCALMSPID=Org2MSP
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer0.org2.bitbrain.com/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer0.org2.bitbrain.com/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer0.org2.bitbrain.com/tls/ca.crt
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/users/Admin@org2.bitbrain.com/msp
peer chaincode install -n chaincode_example02 -v 1.0.0 -l node -p /opt/gopath/src/github.com/chaincode/chaincode_example02/node
# Join peer1.org2 to channnel
CORE_PEER_ADDRESS=peer1.org2.bitbrain.com:7051
CORE_PEER_LOCALMSPID=Org2MSP
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer1.org2.bitbrain.com/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer1.org2.bitbrain.com/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer1.org2.bitbrain.com/tls/ca.crt
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/users/Admin@org2.bitbrain.com/msp
peer chaincode install -n chaincode_example02 -v 1.0.0 -l node -p /opt/gopath/src/github.com/chaincode/chaincode_example02/node
# instantiate chaincode on peer0.org1
CORE_PEER_ADDRESS=peer0.org1.bitbrain.com:7051
CORE_PEER_LOCALMSPID=Org1MSP
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer0.org1.bitbrain.com/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer0.org1.bitbrain.com/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer0.org1.bitbrain.com/tls/ca.crt
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/users/Admin@org1.bitbrain.com/msp
peer chaincode instantiate -o orderer.bitbrain.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/bitbrain.com/orderers/orderer.bitbrain.com/msp/tlscacerts/tlsca.bitbrain.com-cert.pem -C $CHANNEL_NAME -n chaincode_example02 -v 1.0.0 -l node -c '{"Args":["init","a", "100","b","200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')"
# instantiate chaincode on peer1.org1
CORE_PEER_ADDRESS=peer1.org1.bitbrain.com:7051
CORE_PEER_LOCALMSPID=Org1MSP
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer1.org1.bitbrain.com/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer1.org1.bitbrain.com/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/peers/peer1.org1.bitbrain.com/tls/ca.crt
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.bitbrain.com/users/Admin@org1.bitbrain.com/msp
peer chaincode instantiate -o orderer.bitbrain.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/bitbrain.com/orderers/orderer.bitbrain.com/msp/tlscacerts/tlsca.bitbrain.com-cert.pem -C $CHANNEL_NAME -n chaincode_example02 -v 1.0.0 -l node -c '{"Args":["init","a", "100","b","200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')"
# instantiate chaincode on peer0.org2
CORE_PEER_ADDRESS=peer0.org2.bitbrain.com:7051
CORE_PEER_LOCALMSPID=Org2MSP
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer0.org2.bitbrain.com/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer0.org2.bitbrain.com/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer0.org2.bitbrain.com/tls/ca.crt
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/users/Admin@org2.bitbrain.com/msp
peer chaincode instantiate -o orderer.bitbrain.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/bitbrain.com/orderers/orderer.bitbrain.com/msp/tlscacerts/tlsca.bitbrain.com-cert.pem -C $CHANNEL_NAME -n chaincode_example02 -v 1.0.0 -l node -c '{"Args":["init","a", "100","b","200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')"
# instantiate chaincode on peer1.org2
CORE_PEER_ADDRESS=peer1.org2.bitbrain.com:7051
CORE_PEER_LOCALMSPID=Org2MSP
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer1.org2.bitbrain.com/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer1.org2.bitbrain.com/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/peers/peer1.org2.bitbrain.com/tls/ca.crt
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.bitbrain.com/users/Admin@org2.bitbrain.com/msp
peer chaincode instantiate -o orderer.bitbrain.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/bitbrain.com/orderers/orderer.bitbrain.com/msp/tlscacerts/tlsca.bitbrain.com-cert.pem -C $CHANNEL_NAME -n chaincode_example02 -v 1.0.0 -l node -c '{"Args":["init","a", "100","b","200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment