While creating a channel in Hyperledger fabric, which of the following Docker commands will you use for updating the anchor peer for the Org2 organization?
Question
While creating a channel in Hyperledger fabric, which of the following Docker commands will you use for updating the anchor peer for the Org2 organization?
Solution
To update the anchor peer for the Org2 organization while creating a channel in Hyperledger Fabric, you would use the following Docker command:
docker exec -e "CORE_PEER_LOCALMSPID=Org2MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/[email protected]/msp" peer0.org2.example.com peer channel update -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/Org2MSPanchors.tx
Here's a step-by-step breakdown of the command:
-
docker exec: This command is used to run a new command in a running container. -
-e "CORE_PEER_LOCALMSPID=Org2MSP": This sets the environment variableCORE_PEER_LOCALMSPIDtoOrg2MSP. This is used to specify the MSP ID of the peer's organization. -
-e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/[email protected]/msp": This sets the environment variableCORE_PEER_MSPCONFIGPATHto the path of the MSP configuration for the admin user of Org2. -
peer0.org2.example.com: This is the name of the Docker container for the peer. -
peer channel update: This is the command to update the channel. -
-o orderer.example.com:7050: This specifies the orderer endpoint. -
-c $CHANNEL_NAME: This specifies the name of the channel. -
-f ./channel-artifacts/Org2MSPanchors.tx: This specifies the file that contains the configuration update for setting the anchor peer for Org2.
Similar Questions
While using Docker with Hyperledger Fabric, a user wants to check all the containers.Which of the following commands can he use?docker c -adocker check -adocker p -alldocker ps -a
After creating a sales-network application in Hyperledger Fabric, a user wants to enable the network for it and display its containers.Which of the following commands can he use for that?cd sales-network/<br /> ./network.sp up -ca -s couchdbcd up sales-network/<br /> ./network.sp start -s -couchdb -cacd sales-network/<br /> ./network.sp start -ca -s couchdbcd sales-network/<br /> ./network.sp up couchdb -ca -s
While using Hyperledger Fabric, a user wants to launch a network using Docker commands. He has set the bin folder to the config path. Now he needs to create the certificate for peer organisation Org1.Which of the following commands can he use for that?cryptogen create<br /> --config=./organizations/crypto-config-org1.yaml<br /> --output= “organizations”cryptogen generate<br /> --config=./organizations/crypto-config-org1.yaml<br /> --output= ‘organizations’cryptogen create<br /> --config=./cryptogen/organizations/crypto-config-org1.yaml<br /> --output= “organizations”cryptogen generate<br /> --config=./organizations/cryptogen/crypto-config-org1.yaml<br /> --output= “organizations”
Which of the following commands can be used for installing the Fabric network in Hyperledger?npm install -n fabricnpm install network.fabricnpm install Network --fabricnpm install fabric-network
A user wants to create a channel in Hyperledger Terminal for providing completely separate communication mechanisms between two organizations, Org1 and Org2. He has set up the config path by exporting the required variables. He is now required to create the System Genesis Block and Channel Genesis block.Which of the following Docker commands can he use in this scenario?configtxgen -export -profile TwoOrgsApplicationGenesis -artifacts-outputBlock ./channel-artifacts/${CHANNEL_NAME}.block -channelIDconfigtxgen -p TwoOrgsApplicationGenesis -o ./channel-artifact/${CHANNEL_NAME}.block -channelID $CHANNEL_NAMEconfigtxgen -e -p TwoOrgsApplicationGenesis -getoutputBlock ./channel-artifact/${CHANNEL_ID}.block $CHANNEL_NAMEconfigtxgen -profile TwoOrgsApplicationGenesis -outputBlock./channel-artifact/${CHANNEL_NAME}.block -channelID $CHANNEL_NAME
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.