I see a lot of examples for Hyperledger Fabric where I don't find core.yaml file in all examples. I see a lot of other files. And at many places, core.yaml is referred. Is there any other file, that corresponds to it? From where this, core.yaml config is picked? How should I use it?
core.yaml
file provides basic configuration option for various peer modules. For example it is capable of configuring logging level, e.g.:
###############################################################################
logging:
cauthdsl: warning
gossip: warning
ledger: info
msp: warning
policies: warning
grpc: error
Now, the reason you do not see this file within fabric-sample, because it has been already packed into peer docker container and therefore simple a part of it. Next, since Hyperledger Fabric uses viper to read the configuration and viper initialed with:
// For environment variables.
viper.SetEnvPrefix("core")
viper.AutomaticEnv()
replacer := strings.NewReplacer(".", "_")
viper.SetEnvKeyReplacer(replacer)
Which make it possible to override and control configuration parameters by exporting them via environment variables prefixed with CORE
.
core.yaml corresponds to a older version of Hyperledger Fabric, to the version 0.6. There, you defined the Peer configuration.
In the v1.0 Hyperledger Fabric, the docker-compose-file.yaml seem to be the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With