Hyperledger Fabric 2.2 test-network setup in 10 minutes !!

Adarsha Jha
Coinmonks
3 min readJul 17, 2020

--

This medium article will help you create a hyperledger-fabric 2.2 version network in just ten minutes. We will install hyperledger fabric latest version and try the scripts in test-network. This tutorial is for beginners who want to see how fabric 2.2 network is run step by step.

To do this I’m using ubuntu 16.04 LTS version aws ec2 instance T2-medium free tier VM and it’s a fresh installation and i don’t have anything else installed on my server yet.

Install the Pre-requistes before downloading the hyperledger-fabric 2.2 binaries:

Install curl, docker, docker-compose, nodejs & npm.

install GOlang and set path by doing this :-

wget https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz

tar -xvf go1.14.2.linux-amd64.tar.gz

sudo chown -R root:root ./go
sudo mv go /usr/local

export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

source ~/.bashrc

sudo systemctl enable docker

sudo usermod -a -G docker <username>

Check If your docker is running properly by running this command.

docker run hello-world

It should give you this response

export PATH=<path to download location>/bin:$PATH

Download Hyperledger fabric binaries

You can check if you have pulled the fabric2.2.0 fabric binaries by typing

docker images

It should show you this.

cd fabric-samples/test-network/

To create the network and setup peers and orderers. Run this command

./network.sh up

create the channel

./network.sh createChannel

deploy the chaincode

./network.sh deployCC

Check now your chaincode containers are up and running by typing

docker ps -a

You will see response like this.

Your network is up , your peers and orderer containers are up and your chaincode is installed and ready to use.

In next article, I will take you to a more detailed network architecture and we will dive deep into what’s the code inside network.sh , deploy.sh , createchannel etc.

I hope you liked this article, if yes then please don’t forget to clap.

Stay tuned for more articles and follow me to get notifications whenever i post any new article.

Get Best Software Deals Directly In Your Inbox

--

--

Adarsha Jha
Coinmonks

Young passionate Blockchain developer and architect . I like to do R&D and love to contribute opensource.