Refine structure and docs
parent
587c5b7c51
commit
b6445aa698
|
@ -14,7 +14,7 @@ services:
|
||||||
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
|
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
|
||||||
vp0:
|
vp0:
|
||||||
extends:
|
extends:
|
||||||
file: peer-noops.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp0
|
hostname: vp0
|
||||||
environment:
|
environment:
|
|
@ -11,13 +11,15 @@
|
||||||
version: '2'
|
version: '2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
membersrvc:
|
membersrvc0:
|
||||||
image: hyperledger/fabric-membersrvc:latest
|
extends:
|
||||||
restart: unless-stopped
|
file: membersrvc.yml
|
||||||
expose:
|
service: membersrvc
|
||||||
- "7054"
|
hostname: membersrvc
|
||||||
volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
|
environment:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- CORE_LOGGING_SERVER=debug
|
||||||
|
ports:
|
||||||
|
- "7054:7054"
|
||||||
command: membersrvc # this repeats the default cmd to make sure
|
command: membersrvc # this repeats the default cmd to make sure
|
||||||
|
|
||||||
# validating node as the root
|
# validating node as the root
|
||||||
|
@ -26,7 +28,7 @@ services:
|
||||||
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
|
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
|
||||||
vp0:
|
vp0:
|
||||||
extends:
|
extends:
|
||||||
file: peer-noops.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp0
|
hostname: vp0
|
||||||
environment:
|
environment:
|
||||||
|
@ -41,12 +43,12 @@ services:
|
||||||
- "7050:7050"
|
- "7050:7050"
|
||||||
- "7051:7051"
|
- "7051:7051"
|
||||||
links:
|
links:
|
||||||
- membersrvc
|
- membersrvc0
|
||||||
command: sh -c "sleep 5; peer node start"
|
command: sh -c "sleep 5; peer node start"
|
||||||
|
|
||||||
vp1:
|
vp1:
|
||||||
extends:
|
extends:
|
||||||
file: peer-noops.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp1
|
hostname: vp1
|
||||||
environment:
|
environment:
|
||||||
|
@ -59,13 +61,13 @@ services:
|
||||||
- CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
|
- CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
|
||||||
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054
|
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054
|
||||||
links:
|
links:
|
||||||
- membersrvc
|
|
||||||
- vp0
|
- vp0
|
||||||
|
- membersrvc0
|
||||||
command: sh -c "sleep 5; peer node start"
|
command: sh -c "sleep 5; peer node start"
|
||||||
|
|
||||||
vp2:
|
vp2:
|
||||||
extends:
|
extends:
|
||||||
file: peer-noops.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp2
|
hostname: vp2
|
||||||
environment:
|
environment:
|
||||||
|
@ -78,13 +80,13 @@ services:
|
||||||
- CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
|
- CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
|
||||||
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054
|
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054
|
||||||
links:
|
links:
|
||||||
- membersrvc
|
|
||||||
- vp0
|
- vp0
|
||||||
|
- membersrvc0
|
||||||
command: sh -c "sleep 5; peer node start"
|
command: sh -c "sleep 5; peer node start"
|
||||||
|
|
||||||
vp3:
|
vp3:
|
||||||
extends:
|
extends:
|
||||||
file: peer-noops.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp3
|
hostname: vp3
|
||||||
environment:
|
environment:
|
||||||
|
@ -97,8 +99,8 @@ services:
|
||||||
- CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
|
- CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
|
||||||
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054
|
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054
|
||||||
links:
|
links:
|
||||||
- membersrvc
|
|
||||||
- vp0
|
- vp0
|
||||||
|
- membersrvc0
|
||||||
command: sh -c "sleep 5; peer node start"
|
command: sh -c "sleep 5; peer node start"
|
||||||
|
|
||||||
#networks:
|
#networks:
|
|
@ -14,7 +14,7 @@ services:
|
||||||
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
|
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
|
||||||
vp0:
|
vp0:
|
||||||
extends:
|
extends:
|
||||||
file: peer-noops.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp0
|
hostname: vp0
|
||||||
environment:
|
environment:
|
||||||
|
@ -26,7 +26,7 @@ services:
|
||||||
# validating node
|
# validating node
|
||||||
vp1:
|
vp1:
|
||||||
extends:
|
extends:
|
||||||
file: peer-noops.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp1
|
hostname: vp1
|
||||||
environment:
|
environment:
|
||||||
|
@ -38,7 +38,7 @@ services:
|
||||||
# validating node
|
# validating node
|
||||||
vp2:
|
vp2:
|
||||||
extends:
|
extends:
|
||||||
file: peer-noops.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp2
|
hostname: vp2
|
||||||
environment:
|
environment:
|
||||||
|
@ -50,7 +50,7 @@ services:
|
||||||
# validating node
|
# validating node
|
||||||
vp3:
|
vp3:
|
||||||
extends:
|
extends:
|
||||||
file: peer-noops.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp3
|
hostname: vp3
|
||||||
environment:
|
environment:
|
|
@ -0,0 +1,19 @@
|
||||||
|
# This is the default base file to for fabric membersrvc
|
||||||
|
# https://github.com/yeasy/docker-compose-files/
|
||||||
|
|
||||||
|
# Depends on the hyperledger/fabric-membersrvc image.
|
||||||
|
|
||||||
|
version: '2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
membersrvc:
|
||||||
|
image: hyperledger/fabric-membersrvc:latest
|
||||||
|
#image: yeasy/hyperledger-fabric-membersrvc:0.6-dp
|
||||||
|
#image: hyperledger/fabric-membersrvc:x86_64-0.6.1-preview
|
||||||
|
#image: ibmblockchain/fabric-membersrvc:x86_64-0.6.1-preview
|
||||||
|
restart: unless-stopped
|
||||||
|
expose:
|
||||||
|
- "7054"
|
||||||
|
volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
command: membersrvc # this repeats the default cmd to make sure
|
|
@ -10,8 +10,9 @@ version: '2'
|
||||||
services:
|
services:
|
||||||
# blockchain-explorer
|
# blockchain-explorer
|
||||||
explorer:
|
explorer:
|
||||||
image: yeasy/blockchain-explorer:latest
|
extends:
|
||||||
restart: unless-stopped
|
file: explorer.yml
|
||||||
|
service: explorer
|
||||||
hostname: explorer
|
hostname: explorer
|
||||||
environment:
|
environment:
|
||||||
- HYP_REST_ENDPOINT=http://vp0:7050
|
- HYP_REST_ENDPOINT=http://vp0:7050
|
||||||
|
@ -19,21 +20,24 @@ services:
|
||||||
- "9090:9090"
|
- "9090:9090"
|
||||||
|
|
||||||
# validating node as the root
|
# validating node as the root
|
||||||
|
# vp0 will also be used for client interactive operations
|
||||||
|
# If you want to run fabric command on the host, then map 7051:7051 to host
|
||||||
|
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
|
||||||
vp0:
|
vp0:
|
||||||
extends:
|
extends:
|
||||||
file: peer-pbft.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp0
|
hostname: vp0
|
||||||
environment:
|
environment:
|
||||||
- CORE_PEER_ID=vp0
|
- CORE_PEER_ID=vp0
|
||||||
ports:
|
ports:
|
||||||
- "7050:7050"
|
- "7050:7050"
|
||||||
#- "7051:7051"
|
- "7051:7051"
|
||||||
|
|
||||||
# validating node
|
# validating node
|
||||||
vp1:
|
vp1:
|
||||||
extends:
|
extends:
|
||||||
file: peer-pbft.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp1
|
hostname: vp1
|
||||||
environment:
|
environment:
|
||||||
|
@ -45,7 +49,7 @@ services:
|
||||||
# validating node
|
# validating node
|
||||||
vp2:
|
vp2:
|
||||||
extends:
|
extends:
|
||||||
file: peer-pbft.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp2
|
hostname: vp2
|
||||||
environment:
|
environment:
|
||||||
|
@ -56,12 +60,9 @@ services:
|
||||||
|
|
||||||
|
|
||||||
# validating node
|
# validating node
|
||||||
# vp3 will also be used for client interactive operations
|
|
||||||
# If you want to run fabric command on the host, then map 7051:7051 to host
|
|
||||||
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
|
|
||||||
vp3:
|
vp3:
|
||||||
extends:
|
extends:
|
||||||
file: peer-pbft.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp3
|
hostname: vp3
|
||||||
environment:
|
environment:
|
|
@ -0,0 +1,103 @@
|
||||||
|
# This compose file will start 4 hyperledger peer nodes + 1 CA node.
|
||||||
|
# We add a delay to start the VP nodes after CA node:
|
||||||
|
# command: sh -c "sleep 5; peer node start"
|
||||||
|
#
|
||||||
|
# vp0: validating node as root
|
||||||
|
# vp1: validating node as peer
|
||||||
|
# vp2: validating node as peer
|
||||||
|
# vp3: validating node as peer
|
||||||
|
# https://github.com/yeasy/docker-compose-files
|
||||||
|
|
||||||
|
version: '2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
# blockchain-explorer
|
||||||
|
explorer:
|
||||||
|
extends:
|
||||||
|
file: explorer.yml
|
||||||
|
service: explorer
|
||||||
|
hostname: explorer
|
||||||
|
environment:
|
||||||
|
- HYP_REST_ENDPOINT=http://vp0:7050
|
||||||
|
ports:
|
||||||
|
- "9090:9090"
|
||||||
|
|
||||||
|
membersrvc0:
|
||||||
|
extends:
|
||||||
|
file: membersrvc.yml
|
||||||
|
service: membersrvc
|
||||||
|
hostname: membersrvc
|
||||||
|
environment:
|
||||||
|
- CORE_LOGGING_SERVER=debug
|
||||||
|
ports:
|
||||||
|
- "7054:7054"
|
||||||
|
command: membersrvc # this repeats the default cmd to make sure
|
||||||
|
|
||||||
|
# vp0 will be used for client interactive operations
|
||||||
|
# If you want to run fabric command on the host, then map 7051:7051 to host
|
||||||
|
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
|
||||||
|
vp0: # validating node as the root
|
||||||
|
extends:
|
||||||
|
file: peer.yml
|
||||||
|
service: vp_sec
|
||||||
|
hostname: vp0
|
||||||
|
environment:
|
||||||
|
- CORE_PEER_ID=vp0
|
||||||
|
- CORE_SECURITY_ENROLLID=test_vp0
|
||||||
|
- CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT
|
||||||
|
ports:
|
||||||
|
- "7050:7050"
|
||||||
|
- "7051:7051"
|
||||||
|
links:
|
||||||
|
- membersrvc0
|
||||||
|
command: sh -c "sleep 10; peer node start"
|
||||||
|
|
||||||
|
vp1:
|
||||||
|
extends:
|
||||||
|
file: peer.yml
|
||||||
|
service: vp_sec
|
||||||
|
hostname: vp1
|
||||||
|
environment:
|
||||||
|
- CORE_PEER_ID=vp1
|
||||||
|
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
|
||||||
|
- CORE_SECURITY_ENROLLID=test_vp1
|
||||||
|
- CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy
|
||||||
|
links:
|
||||||
|
- vp0
|
||||||
|
- membersrvc0
|
||||||
|
command: sh -c "sleep 10; peer node start"
|
||||||
|
|
||||||
|
vp2:
|
||||||
|
extends:
|
||||||
|
file: peer.yml
|
||||||
|
service: vp_sec
|
||||||
|
hostname: vp2
|
||||||
|
environment:
|
||||||
|
- CORE_PEER_ID=vp2
|
||||||
|
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
|
||||||
|
- CORE_SECURITY_ENROLLID=test_vp2
|
||||||
|
- CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ
|
||||||
|
links:
|
||||||
|
- vp0
|
||||||
|
- membersrvc0
|
||||||
|
command: sh -c "sleep 10; peer node start"
|
||||||
|
|
||||||
|
vp3:
|
||||||
|
extends:
|
||||||
|
file: peer.yml
|
||||||
|
service: vp_sec
|
||||||
|
hostname: vp3
|
||||||
|
environment:
|
||||||
|
- CORE_PEER_ID=vp3
|
||||||
|
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
|
||||||
|
- CORE_SECURITY_ENROLLID=test_vp3
|
||||||
|
- CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL
|
||||||
|
links:
|
||||||
|
- vp0
|
||||||
|
- membersrvc0
|
||||||
|
command: sh -c "sleep 10; peer node start"
|
||||||
|
|
||||||
|
#networks:
|
||||||
|
# default:
|
||||||
|
# external:
|
||||||
|
# name: fabric_pbft
|
|
@ -11,19 +11,23 @@
|
||||||
version: '2'
|
version: '2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
membersrvc:
|
membersrvc0:
|
||||||
image: hyperledger/fabric-membersrvc:latest
|
extends:
|
||||||
restart: unless-stopped
|
file: membersrvc.yml
|
||||||
expose:
|
service: membersrvc
|
||||||
- "7054"
|
hostname: membersrvc
|
||||||
volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
|
environment:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- CORE_LOGGING_SERVER=debug
|
||||||
|
ports:
|
||||||
|
- "7054:7054"
|
||||||
command: membersrvc # this repeats the default cmd to make sure
|
command: membersrvc # this repeats the default cmd to make sure
|
||||||
|
|
||||||
# validating node as the root
|
# vp0 will be used for client interactive operations
|
||||||
vp0:
|
# If you want to run fabric command on the host, then map 7051:7051 to host
|
||||||
|
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
|
||||||
|
vp0: # validating node as the root
|
||||||
extends:
|
extends:
|
||||||
file: peer-pbft.yml
|
file: peer.yml
|
||||||
service: vp_sec
|
service: vp_sec
|
||||||
hostname: vp0
|
hostname: vp0
|
||||||
environment:
|
environment:
|
||||||
|
@ -34,12 +38,12 @@ services:
|
||||||
- "7050:7050"
|
- "7050:7050"
|
||||||
- "7051:7051"
|
- "7051:7051"
|
||||||
links:
|
links:
|
||||||
- membersrvc
|
- membersrvc0
|
||||||
command: sh -c "sleep 5; peer node start"
|
command: sh -c "sleep 10; peer node start"
|
||||||
|
|
||||||
vp1:
|
vp1:
|
||||||
extends:
|
extends:
|
||||||
file: peer-pbft.yml
|
file: peer.yml
|
||||||
service: vp_sec
|
service: vp_sec
|
||||||
hostname: vp1
|
hostname: vp1
|
||||||
environment:
|
environment:
|
||||||
|
@ -48,13 +52,13 @@ services:
|
||||||
- CORE_SECURITY_ENROLLID=test_vp1
|
- CORE_SECURITY_ENROLLID=test_vp1
|
||||||
- CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy
|
- CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy
|
||||||
links:
|
links:
|
||||||
- membersrvc
|
|
||||||
- vp0
|
- vp0
|
||||||
command: sh -c "sleep 5; peer node start"
|
- membersrvc0
|
||||||
|
command: sh -c "sleep 10; peer node start"
|
||||||
|
|
||||||
vp2:
|
vp2:
|
||||||
extends:
|
extends:
|
||||||
file: peer-pbft.yml
|
file: peer.yml
|
||||||
service: vp_sec
|
service: vp_sec
|
||||||
hostname: vp2
|
hostname: vp2
|
||||||
environment:
|
environment:
|
||||||
|
@ -63,16 +67,13 @@ services:
|
||||||
- CORE_SECURITY_ENROLLID=test_vp2
|
- CORE_SECURITY_ENROLLID=test_vp2
|
||||||
- CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ
|
- CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ
|
||||||
links:
|
links:
|
||||||
- membersrvc
|
|
||||||
- vp0
|
- vp0
|
||||||
command: sh -c "sleep 5; peer node start"
|
- membersrvc0
|
||||||
|
command: sh -c "sleep 10; peer node start"
|
||||||
|
|
||||||
# vp3 will be used for client interactive operations
|
|
||||||
# If you want to run fabric command on the host, then map 7051:7051 to host
|
|
||||||
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
|
|
||||||
vp3:
|
vp3:
|
||||||
extends:
|
extends:
|
||||||
file: peer-pbft.yml
|
file: peer.yml
|
||||||
service: vp_sec
|
service: vp_sec
|
||||||
hostname: vp3
|
hostname: vp3
|
||||||
environment:
|
environment:
|
||||||
|
@ -81,9 +82,9 @@ services:
|
||||||
- CORE_SECURITY_ENROLLID=test_vp3
|
- CORE_SECURITY_ENROLLID=test_vp3
|
||||||
- CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL
|
- CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL
|
||||||
links:
|
links:
|
||||||
- membersrvc
|
|
||||||
- vp0
|
- vp0
|
||||||
command: sh -c "sleep 5; peer node start"
|
- membersrvc0
|
||||||
|
command: sh -c "sleep 10; peer node start"
|
||||||
|
|
||||||
#networks:
|
#networks:
|
||||||
# default:
|
# default:
|
|
@ -9,9 +9,12 @@ version: '2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# validating node as the root
|
# validating node as the root
|
||||||
|
# vp0 will also be used for client interactive operations
|
||||||
|
# If you want to run fabric command on the host, then map 7051:7051 to host
|
||||||
|
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
|
||||||
vp0:
|
vp0:
|
||||||
extends:
|
extends:
|
||||||
file: peer-pbft.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp0
|
hostname: vp0
|
||||||
environment:
|
environment:
|
||||||
|
@ -23,7 +26,7 @@ services:
|
||||||
# validating node
|
# validating node
|
||||||
vp1:
|
vp1:
|
||||||
extends:
|
extends:
|
||||||
file: peer-pbft.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp1
|
hostname: vp1
|
||||||
environment:
|
environment:
|
||||||
|
@ -35,7 +38,7 @@ services:
|
||||||
# validating node
|
# validating node
|
||||||
vp2:
|
vp2:
|
||||||
extends:
|
extends:
|
||||||
file: peer-pbft.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp2
|
hostname: vp2
|
||||||
environment:
|
environment:
|
||||||
|
@ -46,12 +49,9 @@ services:
|
||||||
|
|
||||||
|
|
||||||
# validating node
|
# validating node
|
||||||
# vp3 will also be used for client interactive operations
|
|
||||||
# If you want to run fabric command on the host, then map 7051:7051 to host
|
|
||||||
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
|
|
||||||
vp3:
|
vp3:
|
||||||
extends:
|
extends:
|
||||||
file: peer-pbft.yml
|
file: peer.yml
|
||||||
service: vp
|
service: vp
|
||||||
hostname: vp3
|
hostname: vp3
|
||||||
environment:
|
environment:
|
|
@ -0,0 +1,13 @@
|
||||||
|
# This is the default base file for blockchain-explorer
|
||||||
|
# https://github.com/yeasy/docker-compose-files
|
||||||
|
|
||||||
|
# Depends on the yeasy/blockchain-explorer image.
|
||||||
|
|
||||||
|
version: '2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
explorer:
|
||||||
|
image: yeasy/blockchain-explorer:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
expose:
|
||||||
|
- "9090"
|
|
@ -0,0 +1,19 @@
|
||||||
|
# This is the default base file to for fabric membersrvc
|
||||||
|
# https://github.com/yeasy/docker-compose-files/
|
||||||
|
|
||||||
|
# Depends on the hyperledger/fabric-membersrvc image.
|
||||||
|
|
||||||
|
version: '2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
membersrvc:
|
||||||
|
image: hyperledger/fabric-membersrvc:latest
|
||||||
|
#image: yeasy/hyperledger-fabric-membersrvc:0.6-dp
|
||||||
|
#image: hyperledger/fabric-membersrvc:x86_64-0.6.1-preview
|
||||||
|
#image: ibmblockchain/fabric-membersrvc:x86_64-0.6.1-preview
|
||||||
|
restart: unless-stopped
|
||||||
|
expose:
|
||||||
|
- "7054"
|
||||||
|
volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
command: membersrvc # this repeats the default cmd to make sure
|
|
@ -10,8 +10,11 @@
|
||||||
version: '2'
|
version: '2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
vp:
|
vp: # vp node no needing membersrvc
|
||||||
image: hyperledger/fabric-peer:latest
|
image: hyperledger/fabric-peer:latest
|
||||||
|
#image: yeasy/hyperledger-fabric-peer:0.6-dp
|
||||||
|
#image: hyperledger/fabric-peer:x86_64-0.6.1-preview
|
||||||
|
#image: ibmblockchain/fabric-peer:x86_64-0.6.1-preview
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- CORE_PEER_ADDRESSAUTODETECT=true
|
- CORE_PEER_ADDRESSAUTODETECT=true
|
||||||
|
@ -40,11 +43,11 @@ services:
|
||||||
command: peer node start # this repeats the default cmd to make sure
|
command: peer node start # this repeats the default cmd to make sure
|
||||||
# command: sh -c "sleep 5; peer node start" # peer node should have booting delay with CA
|
# command: sh -c "sleep 5; peer node start" # peer node should have booting delay with CA
|
||||||
|
|
||||||
vp_sec:
|
vp_sec: # vp node needing membersrvc suppot
|
||||||
extends:
|
extends:
|
||||||
service: vp
|
service: vp
|
||||||
environment:
|
environment:
|
||||||
- CORE_SECURITY_ENABLED=true
|
- CORE_SECURITY_ENABLED=true
|
||||||
- CORE_PEER_PKI_ECA_PADDR=membersrvc:7054
|
- CORE_PEER_PKI_ECA_PADDR=membersrvc0:7054
|
||||||
- CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
|
- CORE_PEER_PKI_TCA_PADDR=membersrvc0:7054
|
||||||
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054
|
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc0:7054
|
|
@ -1,28 +1,62 @@
|
||||||
# Hyperledger fabric
|
# Hyperledger fabric
|
||||||
|
|
||||||
|
|
||||||
You can use the following script to install Docker and start a 4-node PBFT cluster in one instruction.
|
You can use the following script to install Docker and start a 4-node PBFT cluster in one instruction.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ bash setupPbft.sh
|
$ bash setupPbft.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
tldr :)
|
||||||
|
|
||||||
|
If you want to explore more, then can follow these steps.
|
||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
|
|
||||||
### Download Images
|
### Download Images
|
||||||
|
|
||||||
*The latest code is evolving quickly, we recommend to use the 0.6 branch code currently.*
|
*The latest code is evolving quickly, we recommend to use the 0.6 branch code currently.*
|
||||||
|
|
||||||
Pull necessary images of peer, base image and the membersrvc.
|
Pull necessary images of peer, base image and the membersrvc. You can use any one from below options
|
||||||
|
|
||||||
|
#### Option 1: Use our images
|
||||||
|
|
||||||
|
We maintained a tested dockerhub image with latest changes.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ docker pull yeasy/hyperledger-fabric:0.6-dp
|
$ docker pull yeasy/hyperledger-fabric:0.6-dp \
|
||||||
$ docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-peer:latest
|
&& docker pull yeasy/hyperledger-fabric-peer:0.6-dp \
|
||||||
$ docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-baseimage:latest
|
&& docker pull yeasy/hyperledger-fabric-base:0.6-dp \
|
||||||
$ docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-membersrvc:latest
|
&& docker pull yeasy/blockchain-explorer:latest \
|
||||||
|
&& docker tag yeasy/hyperledger-fabric-peer:0.6-dp hyperledger/fabric-peer \
|
||||||
|
&& docker tag yeasy/hyperledger-fabric-base:0.6-dp hyperledger/fabric-baseimage \
|
||||||
|
&& docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-membersrvc
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Option 2: Use community images
|
||||||
The community [images](https://hub.docker.com/r/hyperledger/) are also available at dockerhub, use at your own choice.
|
The community [images](https://hub.docker.com/r/hyperledger/) are also available at dockerhub, use at your own choice.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker pull hyperledger/fabric-peer:x86_64-0.6.1-preview \
|
||||||
|
&& docker pull hyperledger/fabric-membersrvc:x86_64-0.6.1-preview \
|
||||||
|
&& docker pull yeasy/blockchain-explorer:latest \
|
||||||
|
&& docker tag hyperledger/fabric-peer:x86_64-0.6.1-preview hyperledger/fabric-peer \
|
||||||
|
&& docker tag hyperledger/fabric-peer:x86_64-0.6.1-preview hyperledger/fabric-baseimage \
|
||||||
|
&& docker tag hyperledger/fabric-membersrvc:x86_64-0.6.1-preview hyperledger/fabric-membersrvc
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Option 3: Use IBM certificated images
|
||||||
|
IBM also provides some tested [images](http://www-31.ibm.com/ibm/cn/blockchain/index.html), available at [dockerhub](http://www-31.ibm.com/ibm/cn/blockchain/index.html), use at your own choice.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker pull ibmblockchain/fabric-peer:x86_64-0.6.1-preview \
|
||||||
|
&& docker pull ibmblockchain/fabric-membersrvc:x86_64-0.6.1-preview \
|
||||||
|
&& docker pull yeasy/blockchain-explorer:latest \
|
||||||
|
&& docker tag ibmblockchain/fabric-peer:x86_64-0.6.1-preview hyperledger/fabric-peer \
|
||||||
|
&& docker tag ibmblockchain/fabric-peer:x86_64-0.6.1-preview hyperledger/fabric-baseimage \
|
||||||
|
&& docker tag ibmblockchain/fabric-membersrvc:x86_64-0.6.1-preview hyperledger/membersrvc
|
||||||
|
```
|
||||||
|
|
||||||
### Setup network
|
### Setup network
|
||||||
|
|
||||||
*Just ignore if you are not familiar with Docker networking configurations.*
|
*Just ignore if you are not familiar with Docker networking configurations.*
|
||||||
|
@ -42,12 +76,18 @@ $ docker network create fabric_pbft
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
When use the 0.6 branch, first switch to `0.6` directory.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ cd 0.6
|
||||||
|
```
|
||||||
|
|
||||||
### 4-node Noops
|
### 4-node Noops
|
||||||
|
|
||||||
Start a 4-node fabric cluster with Noops consensus.
|
Start a 4-node fabric cluster with Noops consensus.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ cd noops; docker-compose up
|
$ cd noops; docker-compose -f 4-peers.yml up
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4-node PBFT
|
### 4-node PBFT
|
||||||
|
@ -55,7 +95,7 @@ $ cd noops; docker-compose up
|
||||||
Start a 4-node fabric cluster with PBFT consensus.
|
Start a 4-node fabric cluster with PBFT consensus.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ cd pbft; docker-compose up
|
$ cd pbft; docker-compose -f 4-peers.yml up
|
||||||
```
|
```
|
||||||
|
|
||||||
### Test chaincode
|
### Test chaincode
|
||||||
|
@ -75,7 +115,7 @@ See [hyperledger-fabric](https://github.com/yeasy/docker-hyperledger-fabric) if
|
||||||
Start a 4-node fabric cluster with PBFT consensus and with blockchain-explorer as the dashboard.
|
Start a 4-node fabric cluster with PBFT consensus and with blockchain-explorer as the dashboard.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ cd pbft; docker-compose -f docker-compose-with-explorer.yml up
|
$ cd pbft; docker-compose -f 4-peers-with-explorer.yml up
|
||||||
```
|
```
|
||||||
|
|
||||||
Then visit the `localhost:9090` on the host using Web.
|
Then visit the `localhost:9090` on the host using Web.
|
||||||
|
@ -85,7 +125,7 @@ Then visit the `localhost:9090` on the host using Web.
|
||||||
Start a 4-node fabric cluster with PBFT consensus and with member service.
|
Start a 4-node fabric cluster with PBFT consensus and with member service.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ cd pbft; docker-compose -f docker-compose-with-membersrvc.yml up
|
$ cd pbft; docker-compose -f 4-peers-with-membersrvc.yml up
|
||||||
```
|
```
|
||||||
|
|
||||||
Then go to vp0, login and deploy a chaincode.
|
Then go to vp0, login and deploy a chaincode.
|
||||||
|
@ -104,4 +144,4 @@ Enter password for user 'jim': 6avZQLwcUe9b
|
||||||
4 new chaincode containers will be built up automatically.
|
4 new chaincode containers will be built up automatically.
|
||||||
|
|
||||||
## Acknowledgement
|
## Acknowledgement
|
||||||
This refers the example from the [hyperledger](https://github.com/hyperledger/fabric/tree/master/consensus/docker-compose-files) project.
|
This refers the example from the [hyperledger](https://github.com/hyperledger/fabric/tree/master/consensus/4-peers-files) project.
|
||||||
|
|
|
@ -19,12 +19,10 @@ curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose
|
||||||
chmod +x /usr/local/bin/docker-compose
|
chmod +x /usr/local/bin/docker-compose
|
||||||
docker-compose --version
|
docker-compose --version
|
||||||
|
|
||||||
docker pull yeasy/hyperledger-fabric:0.6-dp \
|
docker pull hyperledger/fabric-peer:x86_64-0.6.1-preview \
|
||||||
&& docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-peer:latest \
|
&& docker pull hyperledger/fabric-membersrvc:x86_64-0.6.1-preview \
|
||||||
&& docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-baseimage:latest \
|
&& docker tag hyperledger/fabric-peer:x86_64-0.6.1-preview hyperledger/fabric-baseimage:latest \
|
||||||
&& docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-membersrvc:latest
|
|
||||||
|
|
||||||
cd pbft
|
cd 0.6/pbft && docker-compose -f 4-peers.yml up
|
||||||
docker-compose up
|
|
||||||
|
|
||||||
#test: curl HOST:5000/network/peers
|
#test: curl HOST:5000/network/peers
|
||||||
|
|
Loading…
Reference in New Issue