Skip to content

Instantly share code, notes, and snippets.

@byron1st
Created March 30, 2018 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save byron1st/179a4f5920f9ae28291d698fc0e58c04 to your computer and use it in GitHub Desktop.
Save byron1st/179a4f5920f9ae28291d698fc0e58c04 to your computer and use it in GitHub Desktop.
running scripts for orderer, peer, and cli
#!/bin/bash
CHANNEL_NAME=reputationch
docker container run --rm -it --name cli \
-e GOPATH=/opt/gopath \
-e "CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock" \
-e CORE_LOGGING_LEVEL=DEBUG \
-e CORE_PEER_ID=cli \
-e CORE_PEER_ADDRESS=peer0.company1.com:7051 \
-e CORE_PEER_LOCALMSPID=Company1MSP \
-e CORE_PEER_TLS_ENABLED=false \
-e CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/company1.com/users/Admin@company1.com/msp \
-w="/opt/gopath/src/github.com/hyperledger/fabric/peer" \
-v /var/run/:/host/var/run/ \
-v "$(pwd)"/../chaincode/:/opt/gopath/src/github.com/hyperledger/fabric/examples/chaincode/go \
-v "$(pwd)"/crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ \
-v "$(pwd)"/channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts \
--network byfn \
hyperledger/fabric-tools /bin/bash
docker container run --rm --name orderer.operator.com \
-e ORDERER_GENERAL_LOGLEVEL=debug \
-e ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 \
-e ORDERER_GENERAL_GENESISMETHOD=file \
-e ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block \
-e ORDERER_GENERAL_LOCALMSPID=OperatorMSP \
-e ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp \
-e "ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]" \
-w="/opt/gopath/src/github.com/hyperledger/fabric" \
-v "$(pwd)"/channel-artifacts/reputation-genesis.block:/var/hyperledger/orderer/orderer.genesis.block \
-v "$(pwd)"/crypto-config/ordererOrganizations/operator.com/orderers/orderer.operator.com/msp:/var/hyperledger/orderer/msp \
--network byfn \
hyperledger/fabric-orderer orderer
#!/bin/bash
docker container run --name peer0.company1.com \
-e CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock \
-e CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=byfn \
-e CORE_LOGGING_LEVEL=DEBUG \
-e CORE_PEER_TLS_ENABLED=false \
-e CORE_PEER_GOSSIP_USELEADERELECTION=true \
-e CORE_PEER_GOSSIP_ORGLEADER=false \
-e CORE_PEER_PROFILE_ENABLED=true \
-e CORE_PEER_ID=peer0.company1.com \
-e CORE_PEER_ADDRESS=peer0.company1.com:7051 \
-e CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.company1.com:7051 \
-e CORE_PEER_LOCALMSPID=Company1MSP \
-w="/opt/gopath/src/github.com/hyperledger/fabric/peer" \
-v /var/run/:/host/var/run/ \
-v "$(pwd)"/crypto-config/peerOrganizations/company1.com/peers/peer0.company1.com/msp:/etc/hyperledger/fabric/msp \
-p 7051:7051 \
-p 7053:7053 \
--network byfn \
hyperledger/fabric-peer peer node start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment