This is a simple tool to generate a set of scripts to spawn a docker-compose based hyperledger fabric network in a linux machine. Tool takes a simple JSON as input specifying any fabric network and generates a set of shell scripts, docker-compose.yaml file to start a network, create and join channels, install and update chain codes. Tool also generates a README file to assit new users with squence of scripts to runm in order to bring a hyperledger fabric network up and running. The saves time for a developer to build a network without making any mistake in creating configtx.yaml, crypto-config.yaml. docker-compose files etc, those are required by a hyperledger fabric network to start. Moreover this tools helps developers to concentrate more on the smart contract writing and developing other integration parts rather than concentrating on the infrastructure part. The future versions of this tool is aimed to support multi-vm , K8S complient and docker swarm compliant network configuration files and scripts generation.
Dec 28,2018: Fixed issues with Fabric version 1.3 . Updated code for some new features like pre-generated user lookup and ca-affiliate-add shell scripts
Dec 25,2018: Version 1.3 issues are resolved. Now you may generate and operate a hyperledger version 1.3 network
Nov 28,2018: Updated to support Fabric 1.3 based network with solo anf kafka orderer. Support for Fabric 1.2 is skipped for now.
June 30, 2018: Updated a version comapatibility map system so that it can support fabric version 1.0.0, 1.1.0, 1.0.4.
- Refer to the startPort entry in the network-config.json
- Tested for solo. Need to be tested for kafka based orderer options.
- The port numbers generated are not continous
- Clone this source code
- Build using
cd <path to source code directory> go get gopkg.in/yaml.v2 go build
- Install using the following commands ( Make sure that GOBIN environment variable is set and your PATH contains GOBIN in it)
cd <path to source code directory> go install
- Create a network-config.json ( Refer to the example given in the respository).
- Generate the scripts and other configs
fabricnetgen <path to the network-config json file name>
- Follow the instructions generated in README.txt file.
- Download latest fabricnetgen from the releases tab
- Change the permission to make it an executable
chmod a+x fabricnetgen
- Put the fabricnetgen some where so that it is in PATH
- Create a network-config.json ( Refer to the example given in the respository).
- Generate the scripts and other configs
fabricnetgen <path to the network-config json file name>
- Follow the instructions generated in README.txt file.