Add hlf v2.2

pull/135/head
Baohua Yang 2020-07-17 13:05:38 -07:00
parent 2ad5f820a5
commit 0ad6a98414
5 changed files with 0 additions and 574 deletions

View File

@ -1,95 +0,0 @@
---
version: '2.0'
services:
orderer.example.com: # orderer in solo mode
extends:
file: base.yaml
service: orderer-base
container_name: orderer.example.com
hostname: orderer.example.com
expose:
- '7050'
volumes:
- ./solo/channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ./solo/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
- ./solo/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls:/var/hyperledger/orderer/tls
peer0.org1.example.com: # peer node
extends:
file: base.yaml
service: peer-base
container_name: peer0.org1.example.com # will generated automatically
hostname: peer0.org1.example.com # will generated automatically
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
- CORE_PEER_TLS_ENABLED=true
volumes:
- ./solo/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp
- ./solo/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls
expose:
- 7051
- 7052
- 7053
peer1.org1.example.com: # peer node
extends:
file: base.yaml
service: peer-base
container_name: peer1.org1.example.com # will generated automatically
hostname: peer1.org1.example.com # will generated automatically
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_LOCALMSPID=Org1MSP
- CORE_PEER_TLS_ENABLED=true
volumes:
- ./solo/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp
- ./solo/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/tls
expose:
- 7051
- 7052
- 7053
peer0.org2.example.com: # peer node
extends:
file: base.yaml
service: peer-base
container_name: peer0.org2.example.com # will generated automatically
hostname: peer0.org2.example.com # will generated automatically
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
- CORE_PEER_TLS_ENABLED=true
volumes:
- ./solo/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/msp
- ./solo/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/tls
expose:
- 7051
- 7052
- 7053
peer1.org2.example.com: # peer node
extends:
file: base.yaml
service: peer-base
container_name: peer1.org2.example.com # will generated automatically
hostname: peer1.org2.example.com # will generated automatically
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_LOCALMSPID=Org2MSP
- CORE_PEER_TLS_ENABLED=true
volumes:
- ./solo/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/etc/hyperledger/fabric/msp
- ./solo/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/tls
expose:
- 7051
- 7052
- 7053

View File

@ -1,190 +0,0 @@
# All elements in this file should depend on the base.yaml
# Provided solo-base fabric network with:
# ca.org1.example.com
# ca.org2.example.com
# orderer.example.com
# peer0.org1.example.com
# peer1.org1.example.com
# peer0.org2.example.com
# peer1.org2.example.com
# cli
version: '2' # v3 does not support 'extends' yet
services:
ca.org1.example.com: # ca node for org1
extends:
file: base.yaml
service: ca-base
container_name: ca.org1.example.com
hostname: ca.org1.example.com
environment:
- FABRIC_CA_SERVER_CA_NAME=ca-org1
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/c843d3f021118963ce5d340e95286e8869bb7bd051454cd4166aa2887a2ad451_sk
ports:
- "7054:7054"
volumes:
- ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
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/c843d3f021118963ce5d340e95286e8869bb7bd051454cd4166aa2887a2ad451_sk -b admin:adminpw -d'
ca.org2.example.com: # ca node for org2
extends:
file: base.yaml
service: ca-base
container_name: ca.org2.example.com
hostname: ca.org2.example.com
environment:
- FABRIC_CA_SERVER_CA_NAME=ca-org2
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/1ee551a8753171c0377366e96a1d7ec01afddb868c9483cc501b6f8ac7ae752f_sk
ports:
- "8054:7054"
volumes:
- ./crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
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/1ee551a8753171c0377366e96a1d7ec01afddb868c9483cc501b6f8ac7ae752f_sk -b admin:adminpw -d'
orderer0.example.com: # orderer in solo mode
extends:
file: base.yaml
service: orderer-base
container_name: orderer0.example.com
hostname: orderer0.example.com
ports:
- "7050:7050"
- "8443:8443"
volumes:
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/msp:/var/hyperledger/orderer/msp
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/tls/:/var/hyperledger/orderer/tls
- ./solo/channel-artifacts/orderer0.genesis.block:/var/hyperledger/orderer/orderer.genesis.block
## following are peer nodes ##
peer0.org1.example.com:
extends:
file: peer.yaml
service: peer-solo
container_name: peer0.org1.example.com
hostname: peer0.org1.example.com
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:
- ./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"
- "9443:9443"
peer1.org1.example.com:
extends:
file: peer.yaml
service: peer-solo
container_name: peer1.org1.example.com
hostname: peer1.org1.example.com
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:
- ./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:
extends:
file: peer.yaml
service: peer-solo
container_name: peer0.org2.example.com
hostname: peer0.org2.example.com
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_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7051
- CORE_PEER_LOCALMSPID=Org2MSP
volumes:
- ./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:
- "9051:7051"
- "9052:7052"
- "9053:7053"
peer1.org2.example.com:
extends:
file: peer.yaml
service: peer-solo
container_name: peer1.org2.example.com
hostname: peer1.org2.example.com
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:
- ./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:
- "10051:7051"
- "10052:7052"
- "10053:7053"
peer0.org3.example.com:
extends:
file: peer.yaml
service: peer-solo
container_name: peer0.org3.example.com
hostname: peer0.org3.example.com
environment:
- CORE_PEER_ID=peer0.org3.example.com
- CORE_PEER_ADDRESS=peer0.org3.example.com:7051
- CORE_PEER_CHAINCODELISTENADDRESS=peer0.org3.example.com:7052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org3.example.com:7051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org3.example.com:7051
- CORE_PEER_LOCALMSPID=Org3MSP
volumes:
- ./crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/msp:/etc/hyperledger/fabric/msp
- ./crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls:/etc/hyperledger/fabric/tls
ports:
- "11051:7051"
- "11052:7052"
- "11053:7053"
cli: # client node
extends:
file: base.yaml
service: cli-base
container_name: fabric-cli
hostname: fabric-cli
volumes:
- ./scripts:/tmp/scripts
- ./crypto-config.yaml:/etc/hyperledger/fabric/crypto-config.yaml
- ./crypto-config:/etc/hyperledger/fabric/crypto-config
- ./solo/configtx.yaml:/etc/hyperledger/fabric/configtx.yaml
- ./solo/channel-artifacts:/tmp/channel-artifacts
- ./examples:/opt/gopath/src/examples
prometheus: # prometheus will pull metrics from fabric
extends:
file: base.yaml
service: prometheus
container_name: prometheus
hostname: prometheus
ports:
- "9090:9090"

View File

@ -1,134 +0,0 @@
# https://github.com/yeasy/docker-compose-files/tree/master/hyperledger
# This compose file will start a Hyperledger Fabric 1.0 MVE, including
# * 2 ca (not in use now)
# * 1 orderer
# * 4 peers in 2 orgs
# * cli for testing
version: '2.0'
services:
# ca.org1.example.com:
# extends:
# file: base-kafka.yaml
# service: ca.org1.example.com
# ca.org2.example.com:
# extends:
# file: base-kafka.yaml
# service: ca.org2.example.com
cli:
extends:
file: base-kafka.yaml
service: cli
orderer0.example.com: # There can be multiple orderers
extends:
file: base-kafka.yaml
service: orderer0.example.com
depends_on:
- kafka0
- kafka1
- kafka2
- kafka3
orderer1.example.com: # There can be multiple orderers
extends:
file: base-kafka.yaml
service: orderer1.example.com
depends_on:
- kafka0
- kafka1
- kafka2
- kafka3
peer0.org1.example.com:
extends:
file: base-kafka.yaml
service: peer0.org1.example.com
depends_on:
- orderer0.example.com
- orderer1.example.com
peer1.org1.example.com:
extends:
file: base-kafka.yaml
service: peer1.org1.example.com
depends_on:
- orderer0.example.com
- orderer1.example.com
peer0.org2.example.com:
extends:
file: base-kafka.yaml
service: peer0.org2.example.com
depends_on:
- orderer0.example.com
- orderer1.example.com
peer1.org2.example.com:
extends:
file: base-kafka.yaml
service: peer1.org2.example.com
depends_on:
- orderer0.example.com
- orderer1.example.com
# ZooKeeper services, at least 3 nodes
zookeeper0:
extends:
file: base-kafka.yaml
service: zookeeper0
zookeeper1:
extends:
file: base-kafka.yaml
service: zookeeper1
zookeeper2:
extends:
file: base-kafka.yaml
service: zookeeper2
# Kafka services, at least 4 node to tolerant work with 1 node failure
kafka0:
extends:
file: base-kafka.yaml
service: kafka0
depends_on:
- zookeeper0
- zookeeper1
- zookeeper2
kafka1:
extends:
file: base-kafka.yaml
service: kafka1
depends_on:
- zookeeper0
- zookeeper1
- zookeeper2
kafka2:
extends:
file: base-kafka.yaml
service: kafka2
depends_on:
- zookeeper0
- zookeeper1
- zookeeper2
kafka3:
extends:
file: base-kafka.yaml
service: kafka3
depends_on:
- zookeeper0
- zookeeper1
- zookeeper2
#networks:
# default:
# external:
# name: hyperledger_fabric

View File

@ -1,82 +0,0 @@
# https://github.com/yeasy/docker-compose-files/tree/master/hyperledger
# This compose file will start a Hyperledger Fabric 1.0 MVE, including
# * 2 ca (not in use now)
# * 1 orderer
# * 4 peers in 2 orgs
# * cli for testing
# * blockchain-explorer
version: '2.0'
services:
# ca.org1.example.com:
# extends:
# file: base-solo.yaml
# service: ca.org1.example.com
# ca.org2.example.com:
# extends:
# file: base-solo.yaml
# service: ca.org2.example.com
cli:
extends:
file: base-solo.yaml
service: cli
orderer.example.com: # There can be multiple orderers
extends:
file: base-solo.yaml
service: orderer.example.com
peer0.org1.example.com:
extends:
file: base-solo.yaml
service: peer0.org1.example.com
peer1.org1.example.com:
extends:
file: base-solo.yaml
service: peer1.org1.example.com
peer0.org2.example.com:
extends:
file: base-solo.yaml
service: peer0.org2.example.com
peer1.org2.example.com:
extends:
file: base-solo.yaml
service: peer1.org2.example.com
explorer:
extends:
file: base.yaml
service: explorer-base
container_name: explorer
hostname: explorer
depends_on:
- mysql
volumes:
- ./explorer-artifacts/config.json:/blockchain-explorer/config.json
- ./crypto-config:/blockchain-explorer/first-network/crypto-config
ports:
- "8080:8080" # HTTP port
mysql: # mysql service
extends:
file: base.yaml
service: mysql-base
container_name: mysql
hostname: mysql
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=fabricexplorer
volumes:
- ./explorer-artifacts/fabricexplorer.sql:/docker-entrypoint-initdb.d/fabricexplorer.sql
#command: bash -c 'mysqld; sleep 1; mysql -uroot -proot < /tmp/fabricexplorer.sql; while true; do sleep 20171117; done'
#networks:
# default:
# external:
# name: hyperledger_fabric

View File

@ -1,73 +0,0 @@
# https://github.com/yeasy/docker-compose-files/tree/master/hyperledger
# This compose file will start a Hyperledger Fabric 1.0 MVE, including
# * 2 ca (not in use now)
# * 1 orderer
# * 4 peers in 2 orgs
# * cli for testing
version: '2.0'
services:
# ca.org1.example.com:
# extends:
# file: base-solo.yaml
# service: ca.org1.example.com
# ca.org2.example.com:
# extends:
# file: base-solo.yaml
# service: ca.org2.example.com
cli:
extends:
file: base-solo.yaml
service: cli
orderer0.example.com: # There can be multiple orderers
extends:
file: base-solo.yaml
service: orderer0.example.com
peer0.org1.example.com:
extends:
file: base-solo.yaml
service: peer0.org1.example.com
depends_on:
- orderer0.example.com
peer1.org1.example.com:
extends:
file: base-solo.yaml
service: peer1.org1.example.com
depends_on:
- orderer0.example.com
peer0.org2.example.com:
extends:
file: base-solo.yaml
service: peer0.org2.example.com
depends_on:
- orderer0.example.com
peer1.org2.example.com:
extends:
file: base-solo.yaml
service: peer1.org2.example.com
depends_on:
- orderer0.example.com
prometheus:
extends:
file: base-solo.yaml
service: prometheus
depends_on:
- orderer0.example.com
- peer0.org1.example.com
- peer1.org1.example.com
- peer0.org2.example.com
- peer1.org2.example.com
#networks:
# default:
# external:
# name: hyperledger_fabric