This is an AI-generated documentation of the Fablo schema.
This documentation provides a detailed overview of the JSON schema used for configuring a Hyperledger Fabric network. The schema defines the structure and requirements for various components of the network, including global settings, organizations, channels, chaincodes, and hooks.
The schema is defined as an object that requires the following four main properties:
global
: Contains global network settings.orgs
: An array of organizations participating in the network.channels
: An array of channels that connect organizations.chaincodes
: An array of chaincodes deployed on the network.
The global
property defines the basic settings for the Hyperledger Fabric network.
-
$schema
: (const) The URL of the schema definition. -
fabricVersion
: (string, required) Specifies the version of Hyperledger Fabric to be used. Default is"2.4.2"
. -
tls
: (boolean, required) Indicates whether Transport Layer Security (TLS) is enabled. Default istrue
. -
peerDevMode
: (boolean) Indicates if all peers should start in development mode. Default isfalse
. -
engine
: (string) Specifies the deployment engine. Options are"docker"
or"kubernetes"
. Default is"docker"
. -
monitoring
: (object) Optional settings for monitoring purposes.loglevel
: (string) Defines the log level for all components. Options are"debug"
,"info"
, or"warn"
. Default is"info"
.
-
tools
: (object) Optional tools configuration.explorer
: (boolean) Indicates if a blockchain explorer is enabled.
The orgs
property is an array that defines the organizations participating in the network.
-
organization
: (object, required) Contains basic information about the organization.name
: (string, required) The name of the organization, must match the pattern^[a-zA-Z0-9]+$
.mspName
: (string, required) The Membership Service Provider (MSP) name, must match the pattern^[a-zA-Z0-9]+$
.domain
: (string, required) The domain of the organization, must match the pattern^[a-z0-9\\.\\-]+$
.
-
ca
: (object) Configuration for the organization's Certificate Authority (CA).prefix
: (string) The domain prefix for the CA, must match the pattern^[a-z0-9\\.\\-]+$
.db
: (string) The database type used by the CA. Options are"sqlite"
or"postgres"
.
-
orderers
: (array) An array of orderer configurations.- Each orderer object must include:
groupName
: (string, required) The name of the orderer group, must match the pattern^[a-z0-9\\.\\-]+$
.prefix
: (string, required) The domain prefix, must match the pattern^[a-z0-9\\.\\-]+$
.type
: (string, required) The consensus type. Options are"solo"
(for development) or"raft"
(for production).instances
: (integer, required) The number of orderer instances, must be between 1 and 9.
- Each orderer object must include:
-
peer
: (object) Configuration for the organization's peers.prefix
: (string) The domain prefix for the peers, must match the pattern^[a-z0-9\\.\\-]+$
.instances
: (integer, required) The number of peer instances, must be between 1 and 9.anchorPeerInstances
: (integer) The number of anchor peer instances, must be between 1 and 9.db
: (string) The database type for the peers. Options are"LevelDb"
or"CouchDb"
.
-
tools
: (object) Optional tools configuration for the organization.fabloRest
: (boolean) Indicates if Fablo REST is enabled.explorer
: (boolean) Indicates if a blockchain explorer is enabled.
The channels
property is an array that defines the channels connecting organizations.
-
name
: (string, required) The name of the channel, must match the pattern^[a-z0-9_-]+$
. -
ordererGroup
: (string) The name of the orderer organization handling the channel, must match the pattern^[a-zA-Z0-9]+$
. -
orgs
: (array, required) An array of organizations participating in the channel.- Each organization object must include:
name
: (string, required) The name of the organization, must match the pattern^[a-zA-Z0-9]+$
.peers
: (array, required) An array of peer names associated with the organization, each must match the pattern^[a-z0-9]+$
.
- Each organization object must include:
The chaincodes
property is an array that defines the chaincodes deployed on the network.
-
name
: (string, required) The name of the chaincode, must match the pattern^[a-zA-Z0-9_-]+$
. -
version
: (string, required) The version of the chaincode, must match the pattern^[a-zA-Z0-9\\.]+$
. -
lang
: (string, required) The programming language of the chaincode. Options are"golang"
,"java"
, or"node"
. -
channel
: (string, required) The name of the channel where the chaincode is deployed, must match the pattern^[a-z0-9_-]+$
. -
init
: (string) Initialization arguments for Hyperledger Fabric versions below 2.0. -
initRequired
: (boolean) Indicates whether the chaincode requires an initialization transaction (for Hyperledger Fabric 2.0 and greater). -
endorsement
: (string) The endorsement policy for the chaincode. -
directory
: (string, required) The directory where the chaincode is located. -
privateData
: (array) An array of private data collections associated with the chaincode.- Each private data collection object must include:
name
: (string, required) The name of the collection, must match the pattern^[A-Za-z0-9_-]+$
.orgNames
: (array, required) An array of organization names that have access to the private data, each must match the pattern^[A-Za-z0-9]+$
.
- Each private data collection object must include:
The hooks
property defines operations that should be executed after specific events.
postGenerate
: (string) An operation (bash script or command) to run after the network configuration is generated. The working directory for the hooks is set to thefablo-target
directory.
This schema provides a comprehensive structure for configuring a Hyperledger Fabric network, detailing the necessary components and their relationships. Each section outlines the required properties, types, and constraints, ensuring that users can create a valid configuration file for their network setup.