http://www.7klian.com

Hyperledger Fabric的CA操纵指南-part1

  rca-org2:
    networks:
        – ORDERER_DEBUG_BROADCASTTRACEDIR=data/logs
      – /tmp/hyperledger/org2/peer1:/tmp/hyperledger/org2/peer1
   tty: true
        # AnchorPeers defines the location of peers which can be used
        – CORE_PEER_ADDRESS=peer1-org2:7051
        – FABRIC_CA_SERVER_HOME=/tmp/hyperledger/fabric-ca/crypto
        – ORDERER_GENERAL_LOGLEVEL=debug
    environment:
        – /Users/kctam/hf142/fabric-samples/chaincode:/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode
        – /tmp/hyperledger/org1/ca:/tmp/hyperledger/fabric-ca
        – /tmp/hyperledger/org2/peer2:/tmp/hyperledger/org2/peer2
  ca-tls:
        – GOPATH=/opt/gopath
        – 7053:7053
        # AnchorPeers defines the location of peers which can be used
Application: &ApplicationDefaults
    image: hyperledger/fabric-peer:1.4.2
  OrgsOrdererGenesis:
        – CORE_PEER_GOSSIP_USELEADERELECTION=true
        – ORDERER_GENERAL_GENESISMETHOD=file

简介
#
        – 7052:7052
  peer1-org2:
    ID: org0MSP
    networks:

      BatchTimeout: 2s
   stdin_open: true
        – FABRIC_CA_SERVER_DEBUG=true
        – ORDERER_HOST=orderer1-org0
    ports:
        – FABRIC_CA_SERVER_DEBUG=true
        # for cross org gossip communication.  Note, this value is only

#   be referenced later in the configuration.
################################################################################
    container_name: orderer1-org0
    environment:
        – CORE_PEER_TLS_KEY_FILE=/tmp/hyperledger/org2/peer2/tls-msp/keystore/key.pem
        – FABRIC_CA_SERVER_HOME=/tmp/hyperledger/fabric-ca/crypto
        – FABRIC_CA_SERVER_TLS_ENABLED=true
        – fabric-ca
        – ORDERER_GENERAL_TLS_CERTIFICATE=/tmp/hyperledger/org0/orderer/tls-msp/signcerts/cert.pem
最后一列供快速参考。我们将在本教程的后头部门看到这些目次。

      – CORE_PEER_LOCALMSPID=org2MSP
4. 每个Organization都有一个打点员用户(admin-orgx)

3. 在每个peer organizations(org1和org2)中,都有peer organizations(peer1-orgx,peer2-orgx)
version: ‘2’
    MSPDir: /tmp/hyperledger/org1/msp
        – FABRIC_CA_SERVER_CSR_CN=rca-org1
        – CORE_PEER_TLS_ROOTCERT_FILE=/tmp/hyperledger/org2/peer2/tls-msp/tlscacerts/tls-0-0-0-0-7052.pem
        – CORE_PEER_GOSSIP_BOOTSTRAP=peer1-org2:7051
        – FABRIC_LOGGING_SPEC=info
#
        – CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
        – CORE_PEER_GOSSIP_SKIPHANDSHAKE=true
        – ORDERER_GENERAL_GENESISFILE=/tmp/hyperledger/org0/orderer/genesis.block
    networks:
    # ID to load the MSP definition as
          Port: 7051
    AnchorPeers:
        – fabric-ca
    networks:
        – FABRIC_CA_SERVER_DEBUG=true
    volumes:
        – CORE_PEER_ADDRESS=peer1-org1:7051
    command: /bin/bash -c ‘fabric-ca-server start -d -b rca-org2-admin:rca-org2-adminpw –port 7055’
        – /var/run:/host/var/run
        – fabric-ca
        – CORE_PEER_TLS_KEY_FILE=/tmp/hyperledger/org2/peer1/tls-msp/keystore/key.pem
        – 7054:7054
    volumes:
    image: hyperledger/fabric-ca:1.4.2
    volumes:
    networks:
    image: hyperledger/fabric-ca:1.4.2
    tty: true
      – /Users/kctam/hf142/fabric-samples/chaincode:/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode
    environment:
        – /tmp/hyperledger/org1/peer2:/tmp/hyperledger/org1/peer2
    image: hyperledger/fabric-ca:1.4.2
      Addresses:
        – CORE_PEER_MSPCONFIGPATH=/tmp/hyperledger/org1/peer2/msp
        – fabric-ca
        – FABRIC_CA_SERVER_CSR_HOSTS=0.0.0.0
################################################################################
    environment:
        – FABRIC_CA_SERVER_TLS_ENABLED=true
        – CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=guide_fabric-ca
        – CORE_PEER_TLS_KEY_FILE=/tmp/hyperledger/org1/peer1/tls-msp/keystore/key.pem
        – fabric-ca
    command: sh -c ‘fabric-ca-server start -d -b rca-org1-admin:rca-org1-adminpw –port 7054’
  fabric-ca:
        – FABRIC_LOGGING_SPEC=info
    environment:
        – CORE_PEER_MSPCONFIGPATH=/tmp/hyperledger/org2/peer2/msp
        – CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1-org2:7051
  rca-org1:
    volumes:
        – CORE_PEER_GOSSIP_BOOTSTRAP=peer1-org1:7051

完成证书揭晓并完成布局网络配置后,在日常操纵中不需要这些ca。他们不参加插手通道,陈设链码,挪用链码成果等。仅当新组件(添加一个orderer或多个peer)或新用户(添加更多客户端应用措施)插手配置和新证书时才需要它们生成。

郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。