Hyperledger

Hyperledger Fabric Platform Components & Docker Images

This article represents details on installing / setting up Hyperledger Fabric Platform Components / Binaries  with emphasis on some of the following:

  • Steps for how to install / setup Fabric platform components & docker images
  • Details on platform components which are used for setting up the Fabric network
  • Details on docker images which comprise Hyperledger Fabric network

The installation leads to download /pull of docker images which are required to run the Blockchain network using Hyperledger Fabric.


Installing Fabric Platform Components & Docker Images

The following command can be used to install Platform binaries:

curl -sSL https://goo.gl/byy2Qj | bash -s 1.0.5

In case Docker commands require sudo, the above command looks like following:

curl -sSL https://goo.gl/byy2Qj | sudo bash -s 1.0.5

The script which gets executed (piped to bash) looks like following:

#!/bin/bash
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

# current version of fabric released
export VERSION=${1:-1.0.5}
# current version of fabric-ca released
export CA_VERSION=${2:-$VERSION}
export ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}')
#Set MARCH variable i.e ppc64le,s390x,x86_64,i386
MARCH=`uname -m`

dockerFabricPull() {
local FABRIC_TAG=$1
for IMAGES in peer orderer couchdb ccenv javaenv kafka zookeeper tools; do
echo "==> FABRIC IMAGE: $IMAGES"
echo
docker pull hyperledger/fabric-$IMAGES:$FABRIC_TAG
docker tag hyperledger/fabric-$IMAGES:$FABRIC_TAG hyperledger/fabric-$IMAGES
done
}

dockerCaPull() {
local CA_TAG=$1
echo "==> FABRIC CA IMAGE"
echo
docker pull hyperledger/fabric-ca:$CA_TAG
docker tag hyperledger/fabric-ca:$CA_TAG hyperledger/fabric-ca
}

: ${CA_TAG:="$MARCH-$CA_VERSION"}
: ${FABRIC_TAG:="$MARCH-$VERSION"}

echo "===> Downloading platform binaries"
curl https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/${ARCH}-${VERSION}/hyperledger-fabric-${ARCH}-${VERSION}.tar.gz | tar xz

echo "===> Pulling fabric Images"
dockerFabricPull ${FABRIC_TAG}

echo "===> Pulling fabric ca Image"
dockerCaPull ${CA_TAG}
echo
echo "===> List out hyperledger docker images"
docker images | grep hyperledger*

Pay attention to some of the following in above script:

  • Download / install Docker Fabric images related with platform binaries
  • Download / install Docker Fabric CA images

Platform Components / Binaries for setting up Hyperledger Fabric Network

The following binaries get installed within bin folder:

  • cryptogen
  • configtxgen
  • configtxlator
  • peer

These binaries help setup the Hyperledger Fabric network.


Docker Images comprising Hyperledger Fabric Network

The following are the Docker container images which get downloaded /pulled as a result of executing above command for installing platform binaries / components. These images represents the components which will comprise Hyperledger Fabric network.

  • Fabric tools
  • CouchDB: Used to create database to store the world state.
  • Kafka
  • Zookeeper
  • Orderer: Used to created ordering service / consenter service containers which are used for consensus.
  • Peer: Used for creating one or more peer (endorser / committer nodes) containers
  • Java: Runtime for running Blockchain
  • CCEnv
  • Fabric CA

References

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. For latest updates and blogs, follow us on Twitter. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking. Check out my other blog, Revive-n-Thrive.com

Share
Published by
Ajitesh Kumar

Recent Posts

Feature Engineering in Machine Learning: Python Examples

Last updated: 3rd May, 2024 Have you ever wondered why some machine learning models perform…

10 hours ago

Feature Selection vs Feature Extraction: Machine Learning

Last updated: 2nd May, 2024 The success of machine learning models often depends on the…

1 day ago

Model Selection by Evaluating Bias & Variance: Example

When working on a machine learning project, one of the key challenges faced by data…

1 day ago

Bias-Variance Trade-off in Machine Learning: Examples

Last updated: 1st May, 2024 The bias-variance trade-off is a fundamental concept in machine learning…

2 days ago

Mean Squared Error vs Cross Entropy Loss Function

Last updated: 1st May, 2024 As a data scientist, understanding the nuances of various cost…

2 days ago

Cross Entropy Loss Explained with Python Examples

Last updated: 1st May, 2024 In this post, you will learn the concepts related to…

2 days ago