Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hyperledger Fabric - Core.yaml

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?

like image 999
Raj Wadhwa Avatar asked Sep 08 '17 04:09

Raj Wadhwa


2 Answers

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.

like image 125
Artem Barger Avatar answered Oct 20 '22 23:10

Artem Barger


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.

like image 29
Urko Avatar answered Oct 20 '22 22:10

Urko