简体   繁体   中英

How to setup composer with fabric + kafka

I'm setting up a Hyperledger Fabric, with: 1 org, 2 orderers, 2 peers, 4 kafkas, 3 zookeepers, 1 certificate authority.

I followed the fabric-samples-with-kafka guide, but as I need hyperledger composer as well I added an additional CA to the docker compose file. After running ./startfabric all of my containers start logging handshake failures: 2019-06-05 09:56:23.215 UTC [grpc] Printf -> DEBU 20c grpc: Server.Serve failed to complete security handshake from "192.168.96.6:49830": remote error: tls: bad certificate . As this is a handshaking error I believe this is because the CA is setup incorrectly, my CA in the docker compose looks like this

  ca.org1.example.com:
    image: hyperledger/fabric-ca:latest
    environment:
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
      - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com
      - FABRIC_CA_SERVER_CSR_CN=ca.org1.example.com
      - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.example.com-cert.pem
      - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/071043b1f49c2df2e317c9679e0f15212bdf8ee7a193d021dbd8b3d29709eb5f_sk
      - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/071043b1f49c2df2e317c9679e0f15212bdf8ee7a193d021dbd8b3d29709eb5f_sk
    ports:
      - "7054:7054"
    # command: bash
    command: sh -c 'fabric-ca-server start --ca.certfile $${FABRIC_CA_SERVER_CA_CERTFILE} --ca.keyfile $${FABRIC_CA_SERVER_CA_KEYFILE} -b Admin:adminpw '
    # command: sh -c 'fabric-ca-server start -b Admin:adminpw '
    volumes:
      - ./crypto-config/peerOrganizations/org1.example.com/ca:/etc/hyperledger/fabric-ca-server-config
      - ./crypto-config/peerOrganizations/org1.example.com:/etc/hyperledger/fabric-ca-server-config
    container_name: ca.org1.example.com
    networks:
      - byfn

Has anyone been successful in setting up fabric + kafka + composer, and is able to give me some advice?

I would not go down this path at all given it looks like you are just starting out. Why?

  1. Fabric 1.2 is pretty old; we are now on Fabric 1.4.1 with 1.4.2 around the corner

  2. Composer is no longer under active development; this is not marketing for IBM, but https://marketplace.visualstudio.com/items?itemName=IBMBlockchain.ibm-blockchain-platform is the replacement tool from the core team who built Composer but many facets of the programming model are now part of Fabric and the Fabric SDKs

  3. Fabric 1.4.1 introduced Raft-based ordering which is much simpler to run and operate than the Kafka-based orderer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM