The next step is to edit the configtx.yaml file, which represents an exhaustive list of all the internal resources defined by Fabric. It will be used later to create a channel and related artifacts. Here's the configuration we need for our network:
# Blockchain by example.
Profiles:
FSCOrgsOrdererGenesis:
Orderer:
<<: *OrdererDefaults
Organizations:
- *OrdererOrg
Consortiums:
FoodSupplyChainConsortium:
Organizations:
- *Org1
- *Org2
- *Org3
FSCOrgsChannel:
Consortium: FoodSupplyChainConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *Org1
- *Org2
- *Org3
################################################################################
# Section: Organizations
# - This section defines the different organizational identities which will
# be referenced later in the configuration.
################################################################################
Organizations:
- &OrdererOrg
Name: OrdererOrg
ID: OrdererMSP
MSPDir: crypto-config/ordererOrganizations/fsc.com/msp
- &Org1
Name: Org1MSP
ID: Org1MSP
MSPDir: crypto-config/peerOrganizations/org1.fsc.com/msp
AnchorPeers:
- Host: peer0.org1.fsc.com
Port: 7051
- &Org2
Name: Org2MSP
ID: Org2MSP
MSPDir: crypto-config/peerOrganizations/org2.fsc.com/msp
AnchorPeers:
- Host: peer0.org2.fsc.com
Port: 7051
- &Org3
Name: Org3MSP
ID: Org3MSP
MSPDir: crypto-config/peerOrganizations/org3.fsc.com/msp
AnchorPeers:
- Host: peer0.org3.fsc.com
Port: 7051
Orderer: &OrdererDefaults
OrdererType: solo
Addresses:
- orderer.fsc.com:7050
BatchTimeout: 2s
BatchSize:
MaxMessageCount: 10
AbsoluteMaxBytes: 20 MB
PreferredMaxBytes: 512 KB
Kafka:
Brokers:
- 127.0.0.1:9092
Organizations:
Application: &ApplicationDefaults
Organizations:
We define, among other things, the path which contains the MSP configuration for every organization.
You can refer to the sample configtx.yaml shipped with Fabric (https://github.com/hyperledger/fabric-test/blob/master/feature/configs/configtx.yaml) for all possible configuration options.