Demo links
FabNet tool, with the test configuration, start.sh script and the generated netowork are available at the following links.
Description
FabNet is an Hyperledger Fabric network generator, it was created for reducing the effort required by developers approaching this new technology.
It is based on a simple graphic interface where the user can insert information regarding the network such as organisations, peers and more.
Once completed, the server autogenerates a zip file containing all the network configuration files within the scripts needed to run the network.
FabNet can be used for different purposes like the generation of testing networks or for a production ready one.
Indeed, it supports an high-level of customizations that can be useful when working in a complex environment.
Network structure
The Fabric network is structured as showed in the near figure. It is possible to find mainly two type of files, configuration and script.
The firsts are used to specify information for peers, certificates, channels and, more in general, the network.
The seconds are used to create the related network components starting from the configurations.
Generally, we can classify files into three main topcis:
- Fabric Certification Authority server and client – each organization has a CA that provides certificates for members. CA server is created uisng docker-compose.yaml and fabric-ca-server-config.yaml. CA client is instead used to connect and is created using fabric-ca-client-config.yaml;
- peers and orderers container creation – for each peer a docker-compose.yaml must be defined, it contains peers configuration;
- channel configuration – to define network structure, internal and system channels configtx.yaml is used. For each is channel is also defined memebrs, policies, orgs and consritums;
- channel creation – config file is used to create the genesis.block and some other .tx files that contains channels info like the anchor peer
FabNet demo
The first page in figure 1 allows to specify the network name and the organizations involved (name, domain); it is also possible to add other organizations and to import/export JSON configuration.
Next, there is the panel related to organizations, where for each of them the user has to insert certification authority information and can handle members. In particular, it is possible to add or remove peers, clients, admins and orderers. Depending on the member type, different nformation is required, like host IP and ports.
After organisations and network are defined, the consortium must be creted. It is possible to create 1 or more consortiums, defining its participatin gorganizations. The last page specifies the channel in the network, requiring a consortium and, optionally, external organizations.
The finale page shows only the download button that generates the zip file containing the configurated network.
For a fast FabNet demo, import the test configuration into the FabNet interface, then download the generated network. Finally, put and execute the start script inside the download network. All the required files can be downloaded below.
N.B. To deploy the Fabric network is necessary to have the requirements installed (https://hyperledger-fabric.readthedocs.io/en/release-2.2/prereqs.html)