博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
save
阅读量:5966 次
发布时间:2019-06-19

本文共 18893 字,大约阅读时间需要 62 分钟。

 docker-compose-orderer.yaml

# Copyright IBM Corp. All Rights Reserved.## SPDX-License-Identifier: Apache-2.0#version: '2'services:  orderer.example.com:    extends:      file:   base/docker-compose-base.yaml      service: orderer.example.com    container_name: orderer.example.com  ca0:    image: hyperledger/fabric-ca    environment:     - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server     - FABRIC_CA_SERVER_CA_NAME=ca0     - FABRIC_CA_SERVER_TLS_ENABLED=false    ports:     - "7054:7054"    command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/${PRIVATE_KEY} -b admin:adminpw -d'    volumes:     - ./crypto-config/ordererOrganizations/example.com/ca/:/etc/hyperledger/fabric-ca-server-config/    container_name: ca0

docker-compose-base.yaml

# Copyright IBM Corp. All Rights Reserved.## SPDX-License-Identifier: Apache-2.0#version: '2'services:  orderer.example.com:    container_name: orderer.example.com    image: hyperledger/fabric-orderer    environment:      - ORDERER_GENERAL_LOGLEVEL=debug      - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0      - ORDERER_GENERAL_GENESISMETHOD=file      - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block      - ORDERER_GENERAL_LOCALMSPID=OrdererMSP      - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp      # enabled TLS      - ORDERER_GENERAL_TLS_ENABLED=false    working_dir: /opt/gopath/src/github.com/hyperledger/fabric    command: orderer    volumes:    - ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block    - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp    - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls    ports:      - 7050:7050  peer0.org1.example.com:    container_name: peer0.org1.example.com    extends:      file: peer-base.yaml      service: peer-base    environment:      - CORE_PEER_ID=peer0.org1.example.com      - CORE_PEER_ADDRESS=peer0.org1.example.com:7051      - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7052      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051      - CORE_PEER_LOCALMSPID=Org1MSP    volumes:        - /var/run/:/host/var/run/        - ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp        - ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls    ports:      - 7051:7051      - 7052:7052      - 7053:7053  peer1.org1.example.com:    container_name: peer1.org1.example.com    extends:      file: peer-base.yaml      service: peer-base    environment:      - CORE_PEER_ID=peer1.org1.example.com      - CORE_PEER_ADDRESS=peer1.org1.example.com:7051      - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7052      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7051      - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051      - CORE_PEER_LOCALMSPID=Org1MSP    volumes:        - /var/run/:/host/var/run/        - ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp        - ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/tls    ports:      - 8051:7051      - 8052:7052      - 8053:7053  peer0.org2.example.com:    container_name: peer0.org2.example.com    extends:      file: peer-base.yaml      service: peer-base    environment:      - CORE_PEER_ID=peer0.org2.example.com      - CORE_PEER_ADDRESS=peer0.org2.example.com:7051      - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7052      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7051      - CORE_PEER_LOCALMSPID=Org2MSP    volumes:        - /var/run/:/host/var/run/        - ../crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/msp        - ../crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/tls    ports:      - 7051:7051      - 7052:7052      - 7053:7053  peer1.org2.example.com:    container_name: peer1.org2.example.com    extends:      file: peer-base.yaml      service: peer-base    environment:      - CORE_PEER_ID=peer1.org2.example.com      - CORE_PEER_ADDRESS=peer1.org2.example.com:7051      - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org2.example.com:7052      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7051      - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7051      - CORE_PEER_LOCALMSPID=Org2MSP    volumes:        - /var/run/:/host/var/run/        - ../crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/etc/hyperledger/fabric/msp        - ../crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/tls    ports:      - 8051:7051      - 8052:7052      - 8053:7053

 peer-base.yaml

# Copyright IBM Corp. All Rights Reserved.## SPDX-License-Identifier: Apache-2.0#version: '2'services:  peer-base:    image: hyperledger/fabric-peer    environment:      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock      # the following setting starts chaincode containers on the same      # bridge network as the peers      # https://docs.docker.com/compose/networking/      - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_cli_default      #- CORE_LOGGING_LEVEL=ERROR      - CORE_LOGGING_LEVEL=DEBUG      - CORE_PEER_TLS_ENABLED=false      - CORE_PEER_GOSSIP_USELEADERELECTION=true      - CORE_PEER_GOSSIP_ORGLEADER=false      - CORE_PEER_PROFILE_ENABLED=true      - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt      - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key      - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer    command: peer node start

docker-compose-peer.yaml

# Copyright IBM Corp. All Rights Reserved.## SPDX-License-Identifier: Apache-2.0#version: '2'services:  peer0.org1.example.com:    container_name: peer0.org1.example.com    environment:      - CORE_LEDGER_STATE_STATEDATABASE=CouchDB      - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=10.20.31.127:5984      - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=admin      - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=password     extends:      file:  base/docker-compose-base.yaml      service: peer0.org1.example.com    extra_hosts:     - "orderer.example.com:10.20.31.128"  cli:    container_name: cli    image: hyperledger/fabric-tools    tty: true    environment:      - GOPATH=/opt/gopath      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock      - CORE_LOGGING_LEVEL=DEBUG      - CORE_PEER_ID=cli      - CORE_PEER_ADDRESS=peer0.org1.example.com:7051      - CORE_PEER_LOCALMSPID=Org1MSP      - CORE_PEER_TLS_ENABLED=false      - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer    volumes:        - /var/run/:/host/var/run/        - ../chaincode/go/:/opt/gopath/src/github.com/hyperledger/fabric/examples/chaincode/go        - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/        - ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/        - ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts    depends_on:      - peer0.org1.example.com    extra_hosts:      - "orderer.example.com:10.20.31.128"      - "peer0.org1.example.com:10.20.31.127"       - "peer1.org1.example.com:10.20.31.126"       - "peer0.org2.example.com:10.20.31.131"       - "peer1.org2.example.com:10.20.31.132"

  PRIVATE_KEY.sh

#!/bin/bashfolder="crypto-config/peerOrganizations/org1.example.com/ca" privName="" for file_a in ${folder}/* do   temp_file=`basename $file_a`  if [ ${temp_file##*.} != "pem" ];then     privName=$temp_file   fi done echo $privName

  base/docker-compose-base.yaml

# Copyright IBM Corp. All Rights Reserved.## SPDX-License-Identifier: Apache-2.0#version: '2'services:  orderer.example.com:    container_name: orderer.example.com    image: hyperledger/fabric-orderer    environment:      - ORDERER_GENERAL_LOGLEVEL=debug      - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0      - ORDERER_GENERAL_GENESISMETHOD=file      - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block      - ORDERER_GENERAL_LOCALMSPID=OrdererMSP      - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp      # enabled TLS      - ORDERER_GENERAL_TLS_ENABLED=true      - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key      - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt      - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]    working_dir: /opt/gopath/src/github.com/hyperledger/fabric    command: orderer    volumes:    - ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block    - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp    - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls    ports:      - 7050:7050  peer0.org1.example.com:    container_name: peer0.org1.example.com    extends:      file: peer-base.yaml      service: peer-base    environment:      - CORE_PEER_ID=peer0.org1.example.com      - CORE_PEER_ADDRESS=peer0.org1.example.com:7051      - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7052      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051      - CORE_PEER_LOCALMSPID=Org1MSP    volumes:        - /var/run/:/host/var/run/        - ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp        - ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls    ports:      - 7051:7051      - 7052:7052      - 7053:7053  peer1.org1.example.com:    container_name: peer1.org1.example.com    extends:      file: peer-base.yaml      service: peer-base    environment:      - CORE_PEER_ID=peer1.org1.example.com      - CORE_PEER_ADDRESS=peer1.org1.example.com:7051      - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7052      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7051      - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051      - CORE_PEER_LOCALMSPID=Org1MSP    volumes:        - /var/run/:/host/var/run/        - ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp        - ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/tls    ports:      - 8051:7051      - 8052:7052      - 8053:7053  peer0.org2.example.com:    container_name: peer0.org2.example.com    extends:      file: peer-base.yaml      service: peer-base    environment:      - CORE_PEER_ID=peer0.org2.example.com      - CORE_PEER_ADDRESS=peer0.org2.example.com:7051      - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7052      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7051      - CORE_PEER_LOCALMSPID=Org2MSP    volumes:        - /var/run/:/host/var/run/        - ../crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/msp        - ../crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/tls    ports:      - 7051:7051      - 7052:7052      - 7053:7053  peer1.org2.example.com:    container_name: peer1.org2.example.com    extends:      file: peer-base.yaml      service: peer-base    environment:      - CORE_PEER_ID=peer1.org2.example.com      - CORE_PEER_ADDRESS=peer1.org2.example.com:7051      - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org2.example.com:7052      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7051      - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7051      - CORE_PEER_LOCALMSPID=Org2MSP    volumes:        - /var/run/:/host/var/run/        - ../crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/etc/hyperledger/fabric/msp        - ../crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/tls    ports:      - 8051:7051      - 8052:7052      - 8053:7053

  base/peer-base.yaml

# Copyright IBM Corp. All Rights Reserved.## SPDX-License-Identifier: Apache-2.0#version: '2'services:  peer-base:    image: hyperledger/fabric-peer    environment:      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock      # the following setting starts chaincode containers on the same      # bridge network as the peers      # https://docs.docker.com/compose/networking/      - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_cli_default      #- CORE_LOGGING_LEVEL=ERROR      - CORE_LOGGING_LEVEL=DEBUG      - CORE_PEER_TLS_ENABLED=false      - CORE_PEER_GOSSIP_USELEADERELECTION=true      - CORE_PEER_GOSSIP_ORGLEADER=false      - CORE_PEER_PROFILE_ENABLED=true      - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt      - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key      - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer    command: peer node start

  

 aa

# Copyright IBM Corp. All Rights Reserved.## SPDX-License-Identifier: Apache-2.0#version: '2'services:  peer1.org1.example.com:    container_name: peer1.org1.example.com    environment:      - CORE_LEDGER_STATE_STATEDATABASE=CouchDB      - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=10.20.31.126:5984      - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=admin      - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=password     extends:      file:  base/docker-compose-base.yaml      service: peer1.org1.example.com    extra_hosts:     - "orderer.example.com:10.20.31.128"     - "peer0.org1.example.com:10.20.31.127"  ca0:     image: hyperledger/fabric-ca     environment:      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server      - FABRIC_CA_SERVER_CA_NAME=ca0      - FABRIC_CA_SERVER_TLS_ENABLED=false     ports:      - "7054:7054"     command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/${PRIVATE_KEY} -b admin:adminpw -d'     volumes:      - ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config     container_name: ca0  cli:    container_name: cli    image: hyperledger/fabric-tools    tty: true    environment:      - GOPATH=/opt/gopath      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock      - CORE_LOGGING_LEVEL=DEBUG      - CORE_PEER_ID=cli      - CORE_PEER_ADDRESS=peer1.org1.example.com:7051      - CORE_PEER_LOCALMSPID=Org1MSP      - CORE_PEER_TLS_ENABLED=false      - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer    volumes:        - /var/run/:/host/var/run/        - ../chaincode/go/:/opt/gopath/src/github.com/hyperledger/fabric/examples/chaincode/go        - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/        - ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/        - ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts    depends_on:      - peer1.org1.example.com    extra_hosts:      - "orderer.example.com:10.20.31.128"      - "peer0.org1.example.com:10.20.31.127"       - "peer1.org1.example.com:10.20.31.126"       - "peer0.org2.example.com:10.20.31.131"       - "peer1.org2.example.com:10.20.31.132"

  aa

[root@C20-19U-131 e2e_cli]# cat docker-compose-peer.yaml # Copyright IBM Corp. All Rights Reserved.## SPDX-License-Identifier: Apache-2.0#version: '2'services:  peer0.org2.example.com:    container_name: peer0.org2.example.com    environment:      - CORE_LEDGER_STATE_STATEDATABASE=CouchDB      - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=10.20.31.131:5984      - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=admin      - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=password     extends:      file:  base/docker-compose-base.yaml      service: peer0.org2.example.com    extra_hosts:     - "orderer.example.com:10.20.31.128"     - "peer0.org1.example.com:10.20.31.127"     - "peer1.org1.example.com:10.20.31.126"  ca0:    image: hyperledger/fabric-ca    environment:     - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server     - FABRIC_CA_SERVER_CA_NAME=ca0     - FABRIC_CA_SERVER_TLS_ENABLED=false    ports:     - "7054:7054"    command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/${PRIVATE_KEY} -b admin:adminpw -d'    volumes:     - ./crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server-config    container_name: ca0  cli:    container_name: cli    image: hyperledger/fabric-tools    tty: true    environment:      - GOPATH=/opt/gopath      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock      - CORE_LOGGING_LEVEL=DEBUG      - CORE_PEER_ID=cli      - CORE_PEER_ADDRESS=peer0.org2.example.com:7051      - CORE_PEER_LOCALMSPID=Org2MSP      - CORE_PEER_TLS_ENABLED=false      - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer    volumes:        - /var/run/:/host/var/run/        - ../chaincode/go/:/opt/gopath/src/github.com/hyperledger/fabric/examples/chaincode/go        - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/        - ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/        - ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts    depends_on:      - peer0.org2.example.com    extra_hosts:      - "orderer.example.com:10.20.31.128"      - "peer0.org1.example.com:10.20.31.127"       - "peer1.org1.example.com:10.20.31.126"       - "peer0.org2.example.com:10.20.31.131"       - "peer1.org2.example.com:10.20.31.132"

  sss

#!/bin/bashfolder="crypto-config/peerOrganizations/org2.example.com/ca" privName="" for file_a in ${folder}/* do   temp_file=`basename $file_a`  if [ ${temp_file##*.} != "pem" ];then     privName=$temp_file   fi done echo $privName

  

 

转载地址:http://fqmax.baihongyu.com/

你可能感兴趣的文章
[Linux][Redis][05]Benchmark
查看>>
第一次作业-准备篇
查看>>
HDU1848 Fibonacci again and again
查看>>
HTML思维导图
查看>>
git改密码出现授权问题
查看>>
ORA-02266: 表中的唯一/主键被启用的外键引用
查看>>
Django的POST请求时因为开启防止csrf,报403错误,及四种解决方法
查看>>
day-6 and day-7:面向对象
查看>>
CSU Double Shortest Paths 湖南省第十届省赛
查看>>
webgl像机世界
查看>>
php正则怎么使用(最全最细致)
查看>>
javascript数学运算符
查看>>
LC.155. Min Stack(非优化,两个stack 同步 + -)
查看>>
交互设计[3]--点石成金
查看>>
SCCM TP4部署Office2013
查看>>
Android创建启动画面
查看>>
Linux中date命令的各种实用方法--转载
查看>>
mysqld -install命令时出现install/remove of the service denied错误的原因和解决办法
查看>>
苹果企业版帐号申请记录
查看>>
C++ Error: error LNK2019: unresolved external symbol
查看>>