mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Update high throughput sample scripts for chaincode lifecycle Change-Id: I8e7f9d98bb62d75a779e2767b0e165a36a700d43 Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>
45 lines
3.2 KiB
Bash
Executable file
45 lines
3.2 KiB
Bash
Executable file
#
|
|
# Copyright IBM Corp All Rights Reserved
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
ORDERER_CA=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
|
|
|
|
# Channel creation
|
|
echo "========== Creating channel: "$CHANNEL_NAME" =========="
|
|
peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ../channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
|
|
|
|
# peer0.org1 channel join
|
|
echo "========== Joining peer0.org1.example.com to channel mychannel =========="
|
|
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
|
|
export CORE_PEER_ADDRESS=peer0.org1.example.com:7051
|
|
export CORE_PEER_LOCALMSPID="Org1MSP"
|
|
export 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
|
|
peer channel join -b ${CHANNEL_NAME}.block
|
|
peer channel update -o orderer.example.com:7050 -c $CHANNEL_NAME -f ../channel-artifacts/${CORE_PEER_LOCALMSPID}anchors.tx --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA
|
|
|
|
# peer1.org1 channel join
|
|
echo "========== Joining peer1.org1.example.com to channel mychannel =========="
|
|
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
|
|
export CORE_PEER_ADDRESS=peer1.org1.example.com:8051
|
|
export CORE_PEER_LOCALMSPID="Org1MSP"
|
|
export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt
|
|
peer channel join -b ${CHANNEL_NAME}.block
|
|
|
|
# peer0.org2 channel join
|
|
echo "========== Joining peer0.org2.example.com to channel mychannel =========="
|
|
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
|
|
export CORE_PEER_ADDRESS=peer0.org2.example.com:9051
|
|
export CORE_PEER_LOCALMSPID="Org2MSP"
|
|
export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt
|
|
peer channel join -b ${CHANNEL_NAME}.block
|
|
peer channel update -o orderer.example.com:7050 -c $CHANNEL_NAME -f ../channel-artifacts/${CORE_PEER_LOCALMSPID}anchors.tx --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA
|
|
|
|
# peer1.org2 channel join
|
|
echo "========== Joining peer1.org2.example.com to channel mychannel =========="
|
|
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
|
|
export CORE_PEER_ADDRESS=peer1.org2.example.com:10051
|
|
export CORE_PEER_LOCALMSPID="Org2MSP"
|
|
export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt
|
|
peer channel join -b ${CHANNEL_NAME}.block
|