First network in hyperledger

前端 未结 1 923
长发绾君心
长发绾君心 2021-01-01 04:07

I am trying to work on my first network in Hyperledger Fabric. Using the following documentation http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html

<
1条回答
  •  离开以前
    2021-01-01 04:21

    Let's try to make sure you run thru all the steps as outlined in docs.

    1. First of all you need to edit your docker-compose-cli.yaml file the cli section to comment out line responsible to run automatic flow of channel creation and join:

      command: /bin/bash -c './scripts/script.sh ${CHANNEL_NAME}; sleep $TIMEOUT'
      

    E.g.

    # command: /bin/bash -c './scripts/script.sh ${CHANNEL_NAME}; sleep $TIMEOUT'
    
    1. Next export channel name you are working with:

      export CHANNEL_NAME=mychannel

    2. Start the network (use default timeout of 60s):

      CHANNEL_NAME=$CHANNEL_NAME docker-compose -f docker-compose-cli.yaml up -d

    3. Enter the cli container:

      docker exec -it cli bash

    4. Export environmental variables:

      export CHANNEL_NAME=mychannel

    5. Create the channel:

      peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
      
    6. Join the channel:

      peer channel join -b mychannel.block
      

    0 讨论(0)
提交回复
热议问题