Skip to content

Instantly share code, notes, and snippets.

@xiaoping378
Created August 4, 2017 08:10
Show Gist options
  • Save xiaoping378/8ba8e796552e27277073e56cfd7b281a to your computer and use it in GitHub Desktop.
Save xiaoping378/8ba8e796552e27277073e56cfd7b281a to your computer and use it in GitHub Desktop.
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
services:
ca.org1.example.com:
image: hyperledger/fabric-ca:x86_64-1.0.0
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/0e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011_sk
- FABRIC_CA_SERVER_TLS_ENABLED=true
- 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/0e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011_sk
ports:
- "7054:7054"
command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
volumes:
- ./channel/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca_peerOrg1
extra_hosts:
- "ca.org1.example.com:192.168.10.78"
- "ca.org2.example.com:192.168.10.78"
- "orderer.example.com:192.168.10.110"
- "peer0.org1.example.com:192.168.10.114"
- "peer1.org1.example.com:192.168.10.114"
- "peer0.org2.example.com:192.168.10.115"
- "peer1.org2.example.com:192.168.10.115"
ca.org2.example.com:
image: hyperledger/fabric-ca:x86_64-1.0.0
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/a7d47efa46a6ba07730c850fed2c1375df27360d7227f48cdc2f80e505678005_sk
- FABRIC_CA_SERVER_TLS_ENABLED=true
- 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/a7d47efa46a6ba07730c850fed2c1375df27360d7227f48cdc2f80e505678005_sk
ports:
- "8054:7054"
command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
volumes:
- ./channel/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca_peerOrg2
extra_hosts:
- "ca.org1.example.com:192.168.10.78"
- "ca.org2.example.com:192.168.10.78"
- "orderer.example.com:192.168.10.110"
- "peer0.org1.example.com:192.168.10.114"
- "peer1.org1.example.com:192.168.10.114"
- "peer0.org2.example.com:192.168.10.115"
- "peer1.org2.example.com:192.168.10.115"
orderer.example.com:
container_name: orderer.example.com
image: hyperledger/fabric-orderer:x86_64-1.0.0
environment:
- ORDERER_GENERAL_LOGLEVEL=debug
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/crypto/orderer/msp
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/crypto/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/crypto/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/crypto/orderer/tls/ca.crt, /etc/hyperledger/crypto/peerOrg1/tls/ca.crt, /etc/hyperledger/crypto/peerOrg2/tls/ca.crt]
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderers
command: orderer
ports:
- 7050:7050
volumes:
- ./channel:/etc/hyperledger/configtx
- ./channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/:/etc/hyperledger/crypto/orderer
- ./channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/crypto/peerOrg1
- ./channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/:/etc/hyperledger/crypto/peerOrg2
extra_hosts:
- "ca.org1.example.com:192.168.10.78"
- "ca.org2.example.com:192.168.10.78"
- "orderer.example.com:192.168.10.110"
- "peer0.org1.example.com:192.168.10.114"
- "peer1.org1.example.com:192.168.10.114"
- "peer0.org2.example.com:192.168.10.115"
- "peer1.org2.example.com:192.168.10.115"
peer0.org1.example.com:
container_name: peer0.org1.example.com
extends:
file: base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.org1.example.com
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
ports:
- 7051:7051
- 7053:7053
volumes:
- ./channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/crypto/peer
depends_on:
- orderer.example.com
extra_hosts:
- "ca.org1.example.com:192.168.10.78"
- "ca.org2.example.com:192.168.10.78"
- "orderer.example.com:192.168.10.110"
- "peer0.org1.example.com:192.168.10.114"
- "peer1.org1.example.com:192.168.10.114"
- "peer0.org2.example.com:192.168.10.115"
- "peer1.org2.example.com:192.168.10.115"
peer1.org1.example.com:
container_name: peer1.org1.example.com
extends:
file: base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.org1.example.com
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_ADDRESS=peer1.org1.example.com:7051
ports:
- 7056:7051
- 7058:7053
volumes:
- ./channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/:/etc/hyperledger/crypto/peer
depends_on:
- orderer.example.com
extra_hosts:
- "ca.org1.example.com:192.168.10.78"
- "ca.org2.example.com:192.168.10.78"
- "orderer.example.com:192.168.10.110"
- "peer0.org1.example.com:192.168.10.114"
- "peer1.org1.example.com:192.168.10.114"
- "peer0.org2.example.com:192.168.10.115"
- "peer1.org2.example.com:192.168.10.115"
peer0.org2.example.com:
container_name: peer0.org2.example.com
extends:
file: base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.org2.example.com
- CORE_PEER_LOCALMSPID=Org2MSP
- CORE_PEER_ADDRESS=peer0.org2.example.com:7051
ports:
- 8051:7051
- 8053:7053
volumes:
- ./channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/:/etc/hyperledger/crypto/peer
depends_on:
- orderer.example.com
extra_hosts:
- "ca.org1.example.com:192.168.10.78"
- "ca.org2.example.com:192.168.10.78"
- "orderer.example.com:192.168.10.110"
- "peer0.org1.example.com:192.168.10.114"
- "peer1.org1.example.com:192.168.10.114"
- "peer0.org2.example.com:192.168.10.115"
- "peer1.org2.example.com:192.168.10.115"
peer1.org2.example.com:
container_name: peer1.org2.example.com
extends:
file: base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.org2.example.com
- CORE_PEER_LOCALMSPID=Org2MSP
- CORE_PEER_ADDRESS=peer1.org2.example.com:7051
ports:
- 8056:7051
- 8058:7053
volumes:
- ./channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/:/etc/hyperledger/crypto/peer
depends_on:
- orderer.example.com
extra_hosts:
- "ca.org1.example.com:192.168.10.78"
- "ca.org2.example.com:192.168.10.78"
- "orderer.example.com:192.168.10.110"
- "peer0.org1.example.com:192.168.10.114"
- "peer1.org1.example.com:192.168.10.114"
- "peer0.org2.example.com:192.168.10.115"
- "peer1.org2.example.com:192.168.10.115"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment