Building First Network

Fabric samples by default provide a Test Network that we can use to run our first network. Follow the steps below to build the first network:

Step 1: Navigate through the Fabric-samples folder and then through the Test network folder where you can find script files using these we can run our network. The test network is provided for learning about Fabric by running nodes on your local machine. Developers can use the network to test their smart contracts and applications. It is recommended not to change the script file.

cd fabric-samples/test-network

Step 2: From inside this directory, you can directly run ./network.sh script file through which we run the Test Network. By default, we would be running ./network.sh down command to remove any previous network containers or artifacts that still exist. This is to ensure that there are no conflicts when we run a new network.

./network.sh down

 

Step 3: Now you can bring up a network using the following command. This command creates a fabric network that consists of two peer nodes and one ordering node. No channel is created when you run ./network.sh up

./network.sh up

If the above  command completes successfully, you will see the logs of the nodes being created below picture:

 

Congratulation you have successfully run your first Hyperledger Fabric Network.


Hyperledger Fabric “Building Your First Network”

Hyperledger Fabric is a Blockchain framework that works as the foundation for developing applications with a modular architecture. It is an open-source engine for blockchain and takes care of the most important features for evaluating and using blockchain for business use cases. Hyperledger comes under an open-source Umbrella Project under the Linux Foundation that helps in different fields of finance, banking, IoT, supply chain, manufacturing, and technology. This article focuses on discussing how to install Fabric-samples and how to “Build our First Network”.

Similar Reads

Prerequisites for Hyperledger Fabric-Samples

In order to start the first Hyperledger fabric network Fabric-samples repository will be used. This repository is a set of CLI tool binaries and Fabric Docker Images that help you understand and use the basics of Fabric. Install the below dependencies before starting the project:...

Building First Network

Fabric samples by default provide a Test Network that we can use to run our first network. Follow the steps below to build the first network:...