Tools, FAQ, Tutorials:
start.sh - Start basic-network
How to run start.sh script to start the Hyperledger Fabric example network, basic-network?
✍: FYIcenter.com
You can follow this tutorial to
run start.sh script to start the Hyperledger Fabric example network,
basic-network.
1. Stop existing Hyperledger Fabric Networks on your local host by stopping all Docker containers:
$ docker stop $(docker ps -aq)
2. You may want to remove all data of existing Hyperledger Fabric Networks, if you are running out of disk space by removing all stopped containers:
$ docker rm -f $(docker ps -aq)
3. You may also want to remove all container images related to Hyperledger Fabric networks:
$ docker rmi -f $(docker images | grep fabric | awk '{print $3}')
4. Now run start.sh script to spin up a copy of the basic-network to the Docker engine:
$ cd ~/hyperledger-binaries/fabric-samples/basic-network $ ./start.sh # don't rewrite paths for Windows Git Bash users export MSYS_NO_PATHCONV=1 docker-compose -f docker-compose.yml down Removing network net_basic WARNING: Network net_basic not found. docker-compose -f docker-compose.yml up -d ca.example.com orderer.example.com \ peer0.org1.example.com couchdb Creating network "net_basic" with the default driver Creating ca.example.com ... done Creating orderer.example.com ... done Creating couchdb ... done Creating peer0.org1.example.com ... done export FABRIC_START_TIMEOUT=10 # Create the channel docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" ... \ peer0.org1.example.com \ peer channel create -o orderer.example.com:7050 -c mychannel \ -f /etc/hyperledger/configtx/channel.tx # Join peer0.org1.example.com to the channel. docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" ...\ peer0.org1.example.com peer channel join -b mychannel.block
5. List all Docker containers of basic-network:
$ docker ps
IMAGE STATUS NAMES
hyperledger/fabric-peer Up 25 seconds peer0.org1.example.com
hyperledger/fabric-orderer Up 34 seconds orderer.example.com
hyperledger/fabric-couchdb Up 32 seconds couchdb
hyperledger/fabric-ca Up 33 seconds ca.example.com
As you can see, we have a Hyperledger Fabric network running with 4 Docker containers: a peer, an orderer, a DB server, and a CA server.
⇒ stop.sh - Stop basic-network
⇐ What Is basic-network Sample Network
2020-04-25, ∼1442🔥, 0💬
Popular Posts:
What Is session_register() in PHP? session_register() is old function that registers global variable...
What's Wrong with "while ($c=fgetc($f)) {}" in PHP? If you are using "while ($c=fgetc($f)) {}" to lo...
How To Open Standard Output as a File Handle in PHP? If you want to open the standard output as a fi...
What is Azure API Management Developer Portal? Azure API Management Developer Portal is an Azure Web...
How to add request query string Parameters to my Azure API operation 2017 version to make it more us...