Hyperledger Fabric 组件的环境变量文档

Documentation of environment variables of Hyperledger Fabric components

最近我正在研究 hyperledger fabric 的一些实现,我遇到了一些令人困惑的 fabric 组件环境变量(下面列出了其中的一些)。是否有任何文档可以让我阅读有关结构组件的所有环境变量的信息。目前我对 fabric peer 的以下环境变量感到困惑:

  1. CORE_PEER_ADDRESS CORE_PEER_NETWORKID
  2. CORE_PEER_ENDORSER_ENABLED
  3. CORE_PEER_ID
  4. CORE_PEER_PROFILE_ENABLED
  5. CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE
  6. CORE_PEER_GOSSIP_EXTERNALENDPOINT

所有环境变量实际上都镜像了前缀为CORE_PEER的配置参数,其中大部分在core.yaml中都有下降文档。在环境变量中设置这些参数的目的是能够在 docker 容器内覆盖它们。

例如 CORE_PEER_ADDRESSCORE_PEER_NETWORKIDCORE_PEER_ID:

###############################################################################
#
#    Peer section
#
###############################################################################
peer:

    # The Peer id is used for identifying this Peer instance.
    id: jdoe

    # The networkId allows for logical seperation of networks
    networkId: dev   

    # The endpoint this peer uses to listen for inbound chaincode connections.
    # If this is commented-out, the listen address is selected to be
    # the peer's address (see below) with port 7052
    # chaincodeListenAddress: 0.0.0.0:7052

    # The endpoint the chaincode for this peer uses to connect to the peer.
    # If this is not specified, the chaincodeListenAddress address is selected.
    # And if chaincodeListenAddress is not specified, address is selected from
    # peer listenAddress.
    # chaincodeAddress: 0.0.0.0:7052

    # When used as peer config, this represents the endpoint to other peers
    # in the same organization. For peers in other organization, see
    # gossip.externalEndpoint for more info.
    # When used as CLI config, this means the peer's endpoint to interact with
    address: 0.0.0.0:7051

您还可以找到更多 here