Add member service support
parent
8b94988e85
commit
1d74a14666
|
@ -37,6 +37,7 @@ easiest way to do so is:
|
|||
$ docker pull yeasy/hyperledger:latest
|
||||
$ docker tag yeasy/hyperledger:latest openblockchain/baseimage:latest
|
||||
$ docker pull yeasy/hyperledger-peer:latest
|
||||
$ docker pull yeasy/hyperledger-membersrvc:latest
|
||||
```
|
||||
|
||||
Then you can start a 4 nodes hyperledger cluster with
|
||||
|
|
|
@ -5,18 +5,28 @@
|
|||
# If you want enable consensus, just uncomment the
|
||||
# CORE_PEER_VALIDATOR_CONSENSUE=obcpbft line
|
||||
# See https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devnet-setup.md#using-consensus-plugin for more details.
|
||||
|
||||
vp:
|
||||
image: yeasy/hyperledger-peer:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- CORE_PEER_ADDRESSAUTODETECT=true
|
||||
- CORE_PEER_NETWORKID=dev
|
||||
- CORE_LOGGING_LEVEL=warning
|
||||
- CORE_PEER_VALIDATOR_CONSENSUS=obcpbft
|
||||
- CORE_LOGGING_LEVEL=debug #critical, error, warning, notice, info, debug
|
||||
# The following section enables bpft consensus
|
||||
- CORE_PEER_VALIDATOR_CONSENSUS=obcpbft # noops, obcpbft, pbft
|
||||
- CORE_PBFT_GENERAL_MODE=classic # batch, classic, sieve
|
||||
- CORE_PBFT_GENERAL_N=4
|
||||
- CORE_PBFT_GENERAL_TIMEOUT_REQUEST=10s
|
||||
# The following section enable member authentication, set follow to True
|
||||
- CORE_SECURITY_ENABLED=false
|
||||
- CORE_PEER_PKI_ECA_PADDR=membersrvc:50051
|
||||
- CORE_PEER_PKI_TCA_PADDR=membersrvc:50051
|
||||
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:50051
|
||||
expose:
|
||||
- "30303"
|
||||
- "30304"
|
||||
- "31315"
|
||||
- "30303"
|
||||
- "30304"
|
||||
- "31315"
|
||||
volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
command: fabric peer
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
# This compose file will 4 hyperledger peer nodes for testing
|
||||
# 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
|
||||
|
||||
# validating node as the root
|
||||
vp0:
|
||||
extends:
|
||||
file: compose-defaults.yml
|
||||
service: vp
|
||||
hostname: vp0
|
||||
environment:
|
||||
- CORE_PEER_ID=vp0
|
||||
- CORE_SECURITY_ENROLLID=test_vp0
|
||||
- CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT
|
||||
links:
|
||||
- membersrvc
|
||||
|
||||
vp1:
|
||||
extends:
|
||||
file: compose-defaults.yml
|
||||
service: vp
|
||||
hostname: vp1
|
||||
environment:
|
||||
- CORE_PEER_ID=vp1
|
||||
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
||||
- CORE_SECURITY_ENROLLID=test_vp1
|
||||
- CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy
|
||||
links:
|
||||
- membersrvc
|
||||
- vp0
|
||||
|
||||
vp2:
|
||||
extends:
|
||||
file: compose-defaults.yml
|
||||
service: vp
|
||||
hostname: vp2
|
||||
environment:
|
||||
- CORE_PEER_ID=vp2
|
||||
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
||||
- CORE_SECURITY_ENROLLID=test_vp2
|
||||
- CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ
|
||||
links:
|
||||
- membersrvc
|
||||
- vp0
|
||||
|
||||
|
||||
# vp3 will be used for client interactive operations
|
||||
# If you want to run fabric command on the host, then map 30303:30303 to host
|
||||
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:30303` to specify peer addr.
|
||||
vp3:
|
||||
extends:
|
||||
file: compose-defaults.yml
|
||||
service: vp
|
||||
hostname: vp3
|
||||
environment:
|
||||
- CORE_PEER_ID=vp3
|
||||
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
||||
- CORE_SECURITY_ENROLLID=test_vp3
|
||||
- CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL
|
||||
links:
|
||||
- membersrvc
|
||||
- vp0
|
||||
ports:
|
||||
- "5000:5000"
|
||||
#- "30303:30303"
|
||||
|
||||
membersrvc:
|
||||
image: yeasy/hyperledger-membersrvc:latest
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "50051"
|
||||
volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
command: membersrvc
|
||||
|
|
@ -16,7 +16,8 @@ vp0:
|
|||
|
||||
vp1:
|
||||
extends:
|
||||
service: vp0
|
||||
file: compose-defaults.yml
|
||||
service: vp
|
||||
hostname: vp1
|
||||
environment:
|
||||
- CORE_PEER_ID=vp1
|
||||
|
@ -26,7 +27,8 @@ vp1:
|
|||
|
||||
vp2:
|
||||
extends:
|
||||
service: vp0
|
||||
file: compose-defaults.yml
|
||||
service: vp
|
||||
hostname: vp2
|
||||
environment:
|
||||
- CORE_PEER_ID=vp2
|
||||
|
@ -34,16 +36,20 @@ vp2:
|
|||
links:
|
||||
- vp0
|
||||
|
||||
vp3: # vp3 will be used for client interactive operations
|
||||
|
||||
# vp3 will be used for client interactive operations
|
||||
# If you want to run fabric command on the host, then map 30303:30303 to host
|
||||
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:30303` to specify peer addr.
|
||||
vp3:
|
||||
extends:
|
||||
service: vp0
|
||||
container_name: vp3
|
||||
file: compose-defaults.yml
|
||||
service: vp
|
||||
hostname: vp3
|
||||
ports:
|
||||
- "5000:5000"
|
||||
- "30303:30303"
|
||||
environment:
|
||||
- CORE_PEER_ID=vp3
|
||||
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
||||
links:
|
||||
- vp0
|
||||
ports:
|
||||
- "5000:5000"
|
||||
#- "30303:30303"
|
||||
|
|
Loading…
Reference in New Issue