xmhubj / fabric-kafka

Hyperledger Fabric Network with Kafka Consensus on Kubernetes.
Apache License 2.0
10 stars 9 forks source link
blockchain fabric fabric-network-sample kafka-cluster kubernetes

Fabric Network with Kafka

A fully automated way to setup Hyperledger Fabric Network with Kafka Consensus on Kubernetes.

Introduction

The Hyperledger Fabric has introduced Kafka as it’s primary consensus mechanism among the orderers. While in development, for testing purposes, a solo config orderer is used. However, in production, you need to have multiple orderer nodes set up to have fail proof systems.

Network Topology

A simple Fabric network configuration:

How to Use

Prerequisites

Note: The automation scripts are only working on a single node kubernetes cluster, since dynamic storage provisioning is not configured by default. Required persistent volumes are created by the script setupNetwork.sh.

Setup Fabric Netowrk

  1. Clone the repository

    $ git clone https://github.com/xmhubj/fabric-kafka.git
  2. Change directory

    $ cd fabric-kafka
  3. Run the setupNetwork.sh

    $ ./setupNetwork.sh

Please check the output of the above script, make sure no errors observed.

Verify the Fabric Network

There are two additional deployments called cli added to the Fabric network, for debugging or testing purpose.

Delete the Fabric Network

$ ./deleteNetwork.sh

References