Add hyperledger with blockchain-explorer project

pull/16/head
Baohua Yang 2016-11-18 17:18:41 +08:00
parent f870b623a2
commit 4e0683f31b
9 changed files with 454 additions and 302 deletions

View File

@ -6,6 +6,8 @@ You can use the following script to install docker and start a 4-node PBFT clust
$ bash setupPbft.sh $ bash setupPbft.sh
``` ```
## Preparation
## Download Images ## Download Images
If you want to start it manually, follow the steps: If you want to start it manually, follow the steps:
@ -20,6 +22,15 @@ $ docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-baseimage:latest
$ docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-membersrvc:latest $ docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-membersrvc:latest
``` ```
### Setup network
If you want to enable the external network options in the compose files, please create two Docker networks for usage. Otherwise, just ignore.
```sh
$ docker network create fabric_noops
$ docker network create fabric_pbft
```
## Usage
### Start 4 Noops node cluster ### Start 4 Noops node cluster
```sh ```sh
@ -34,9 +45,22 @@ $ cd pbft; docker-compose up
After the cluster is synced, you can validate by deploying, invoking or querying chaincode from the container or from the host. After the cluster is synced, you can validate by deploying, invoking or querying chaincode from the container or from the host.
```sh
$ docker exec -it pbft_vp0_1 bash
# peer chaincode deploy -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Function":"init", "Args": ["a","100", "b", "200"]}'
```
See [hyperledger-fabric](https://github.com/yeasy/docker-hyperledger-fabric) if you've not familiar on those operations. See [hyperledger-fabric](https://github.com/yeasy/docker-hyperledger-fabric) if you've not familiar on those operations.
### Start 4 PBFT node cluster with blockchain explorer
```sh
$ cd pbft; docker-compose -f docker-compose-with-explorer.yml up
```
Then visit the 9090 port on the host using Web.
### Start 4 PBFT node cluster with member service ### Start 4 PBFT node cluster with member service
```sh ```sh

View File

@ -5,18 +5,25 @@
# vp3: validating node as peer # vp3: validating node as peer
# https://github.com/yeasy/docker-compose-files # https://github.com/yeasy/docker-compose-files
version: '2'
services:
# validating node as the root # validating node as the root
# vp0 will also be used for client interactive operations # 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 # 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. # 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-noops.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"
#networks:
# default:
# external:
# name: fabric_noops

View File

@ -8,92 +8,100 @@
# vp3: validating node as peer # vp3: validating node as peer
# https://github.com/yeasy/docker-compose-files # https://github.com/yeasy/docker-compose-files
membersrvc: version: '2'
image: hyperledger/fabric-membersrvc:latest
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
# validating node as the root services:
# vp0 will also be used for client interactive operations membersrvc:
# If you want to run fabric command on the host, then map 7051:7051 to host image: hyperledger/fabric-membersrvc:latest
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr. restart: unless-stopped
vp0: expose:
extends: - "7054"
file: peer-noops.yml volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
service: vp - /var/run/docker.sock:/var/run/docker.sock
hostname: vp0 command: membersrvc # this repeats the default cmd to make sure
environment:
- CORE_PEER_ID=vp0
- CORE_SECURITY_ENABLED=true
- CORE_SECURITY_ENROLLID=test_vp0
- CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT
- CORE_PEER_PKI_ECA_PADDR=membersrvc:7054
- CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054
ports:
- "7050:7050"
- "7051:7051"
links:
- membersrvc
command: sh -c "sleep 5; peer node start"
vp1: # validating node as the root
extends: # vp0 will also be used for client interactive operations
file: peer-noops.yml # If you want to run fabric command on the host, then map 7051:7051 to host
service: vp # port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
hostname: vp1 vp0:
environment: extends:
- CORE_PEER_ID=vp1 file: peer-noops.yml
- CORE_SECURITY_ENABLED=true service: vp
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 hostname: vp0
- CORE_SECURITY_ENROLLID=test_vp1 environment:
- CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy - CORE_PEER_ID=vp0
- CORE_PEER_PKI_ECA_PADDR=membersrvc:7054 - CORE_SECURITY_ENABLED=true
- CORE_PEER_PKI_TCA_PADDR=membersrvc:7054 - CORE_SECURITY_ENROLLID=test_vp0
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054 - CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT
links: - CORE_PEER_PKI_ECA_PADDR=membersrvc:7054
- membersrvc - CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
- vp0 - CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054
command: sh -c "sleep 5; peer node start" ports:
- "7050:7050"
- "7051:7051"
links:
- membersrvc
command: sh -c "sleep 5; peer node start"
vp2: vp1:
extends: extends:
file: peer-noops.yml file: peer-noops.yml
service: vp service: vp
hostname: vp2 hostname: vp1
environment: environment:
- CORE_PEER_ID=vp2 - CORE_PEER_ID=vp1
- CORE_SECURITY_ENABLED=true - CORE_SECURITY_ENABLED=true
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 - CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp2 - CORE_SECURITY_ENROLLID=test_vp1
- CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ - CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy
- CORE_PEER_PKI_ECA_PADDR=membersrvc:7054 - CORE_PEER_PKI_ECA_PADDR=membersrvc:7054
- 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 - membersrvc
- vp0 - vp0
command: sh -c "sleep 5; peer node start" command: sh -c "sleep 5; peer node start"
vp3: vp2:
extends: extends:
file: peer-noops.yml file: peer-noops.yml
service: vp service: vp
hostname: vp3 hostname: vp2
environment: environment:
- CORE_PEER_ID=vp3 - CORE_PEER_ID=vp2
- CORE_SECURITY_ENABLED=true - CORE_SECURITY_ENABLED=true
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 - CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp3 - CORE_SECURITY_ENROLLID=test_vp2
- CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL - CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ
- CORE_PEER_PKI_ECA_PADDR=membersrvc:7054 - CORE_PEER_PKI_ECA_PADDR=membersrvc:7054
- 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 - membersrvc
- vp0 - vp0
command: sh -c "sleep 5; peer node start" command: sh -c "sleep 5; peer node start"
vp3:
extends:
file: peer-noops.yml
service: vp
hostname: vp3
environment:
- CORE_PEER_ID=vp3
- CORE_SECURITY_ENABLED=true
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp3
- CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL
- CORE_PEER_PKI_ECA_PADDR=membersrvc:7054
- CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054
links:
- membersrvc
- vp0
command: sh -c "sleep 5; peer node start"
#networks:
# default:
# external:
# name: fabric_noops

View File

@ -5,54 +5,61 @@
# vp3: validating node as peer # vp3: validating node as peer
# https://github.com/yeasy/docker-compose-files # https://github.com/yeasy/docker-compose-files
version: '2'
services:
# validating node as the root # validating node as the root
# vp0 will also be used for client interactive operations # 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 # 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. # 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-noops.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-noops.yml file: peer-noops.yml
service: vp service: vp
hostname: vp1 hostname: vp1
environment: environment:
- CORE_PEER_ID=vp1 - CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 - CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links: links:
- vp0
# validating node
vp2:
extends:
file: peer-noops.yml
service: vp
hostname: vp2
environment:
- CORE_PEER_ID=vp2
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0 - vp0
# validating node # validating node
vp2: vp3:
extends: extends:
file: peer-noops.yml file: peer-noops.yml
service: vp service: vp
hostname: vp2 hostname: vp3
environment: environment:
- CORE_PEER_ID=vp2 - CORE_PEER_ID=vp3
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 - CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links: links:
- vp0 - vp0
#networks:
# validating node # default:
vp3: # external:
extends: # name: fabric_pbft
file: peer-noops.yml
service: vp
hostname: vp3
environment:
- CORE_PEER_ID=vp3
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0

View File

@ -7,22 +7,25 @@
# This utilizes the noops as consensus # This utilizes the noops as consensus
# See https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devnet-setup.md#using-consensus-plugin for more details. # See https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devnet-setup.md#using-consensus-plugin for more details.
vp: version: '2'
image: hyperledger/fabric-peer:latest
restart: unless-stopped services:
environment: vp:
- CORE_PEER_ADDRESSAUTODETECT=true image: hyperledger/fabric-peer:latest
- CORE_PEER_NETWORKID=dev restart: unless-stopped
- CORE_LOGGING_LEVEL=info #critical, error, warning, notice, info, debug environment:
# The following section enables pbft consensus - CORE_PEER_ADDRESSAUTODETECT=true
- CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN=noops # noops, pbft - CORE_PEER_NETWORKID=dev
- CORE_NOOPS_BLOCK_TIMEOUT=2s - CORE_LOGGING_LEVEL=info #critical, error, warning, notice, info, debug
- CORE_NOOPS_BLOCK_WAIT=2s # The following section enables pbft consensus
expose: - CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN=noops # noops, pbft
- "7051" - CORE_NOOPS_BLOCK_TIMEOUT=2s
- "7052" - CORE_NOOPS_BLOCK_WAIT=2s
- "7053" expose:
volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT - "7051"
- /var/run/docker.sock:/var/run/docker.sock - "7052"
command: peer node start # this repeats the default cmd to make sure - "7053"
# command: sh -c "sleep 5; peer node start" # peer node should have booting delay with CA volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
- /var/run/docker.sock:/var/run/docker.sock
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

View File

@ -0,0 +1,76 @@
# This compose file will start a cluster with 4 hyperledger peer nodes
# 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:
image: yeasy/blockchain-explorer:latest
restart: unless-stopped
hostname: explorer
environment:
- HYP_REST_ENDPOINT=http://vp0:7050
ports:
- "9090:9090"
# validating node as the root
vp0:
extends:
file: peer-pbft.yml
service: vp
hostname: vp0
environment:
- CORE_PEER_ID=vp0
ports:
- "7050:7050"
#- "7051:7051"
# validating node
vp1:
extends:
file: peer-pbft.yml
service: vp
hostname: vp1
environment:
- CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0
# validating node
vp2:
extends:
file: peer-pbft.yml
service: vp
hostname: vp2
environment:
- CORE_PEER_ID=vp2
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0
# 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:
extends:
file: peer-pbft.yml
service: vp
hostname: vp3
environment:
- CORE_PEER_ID=vp3
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0
#networks:
# default:
# external:
# name: fabric_pbft

View File

@ -8,76 +8,84 @@
# vp3: validating node as peer # vp3: validating node as peer
# https://github.com/yeasy/docker-compose-files # https://github.com/yeasy/docker-compose-files
membersrvc: version: '2'
image: hyperledger/fabric-membersrvc:latest
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
# validating node as the root services:
vp0: membersrvc:
extends: image: hyperledger/fabric-membersrvc:latest
file: peer-pbft.yml restart: unless-stopped
service: vp_sec expose:
hostname: vp0 - "7054"
environment: volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
- CORE_PEER_ID=vp0 - /var/run/docker.sock:/var/run/docker.sock
- CORE_SECURITY_ENROLLID=test_vp0 command: membersrvc # this repeats the default cmd to make sure
- CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT
ports:
- "7050:7050"
- "7051:7051"
links:
- membersrvc
command: sh -c "sleep 5; peer node start"
vp1: # validating node as the root
extends: vp0:
file: peer-pbft.yml extends:
service: vp_sec file: peer-pbft.yml
hostname: vp1 service: vp_sec
environment: hostname: vp0
- CORE_PEER_ID=vp1 environment:
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 - CORE_PEER_ID=vp0
- CORE_SECURITY_ENROLLID=test_vp1 - CORE_SECURITY_ENROLLID=test_vp0
- CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy - CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT
links: ports:
- membersrvc - "7050:7050"
- vp0 - "7051:7051"
command: sh -c "sleep 5; peer node start" links:
- membersrvc
command: sh -c "sleep 5; peer node start"
vp2: vp1:
extends: extends:
file: peer-pbft.yml file: peer-pbft.yml
service: vp_sec service: vp_sec
hostname: vp2 hostname: vp1
environment: environment:
- CORE_PEER_ID=vp2 - CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 - CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp2 - CORE_SECURITY_ENROLLID=test_vp1
- CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ - CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy
links: links:
- membersrvc - membersrvc
- vp0 - vp0
command: sh -c "sleep 5; peer node start" command: sh -c "sleep 5; peer node start"
# vp3 will be used for client interactive operations vp2:
# If you want to run fabric command on the host, then map 7051:7051 to host extends:
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr. file: peer-pbft.yml
vp3: service: vp_sec
extends: hostname: vp2
file: peer-pbft.yml environment:
service: vp_sec - CORE_PEER_ID=vp2
hostname: vp3 - CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
environment: - CORE_SECURITY_ENROLLID=test_vp2
- CORE_PEER_ID=vp3 - CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 links:
- CORE_SECURITY_ENROLLID=test_vp3 - membersrvc
- CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL - vp0
links: command: sh -c "sleep 5; peer node start"
- membersrvc
- vp0 # vp3 will be used for client interactive operations
command: sh -c "sleep 5; peer node start" # 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:
extends:
file: peer-pbft.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:
- membersrvc
- vp0
command: sh -c "sleep 5; peer node start"
#networks:
# default:
# external:
# name: fabric_pbft

View File

@ -5,54 +5,62 @@
# vp3: validating node as peer # vp3: validating node as peer
# https://github.com/yeasy/docker-compose-files # https://github.com/yeasy/docker-compose-files
# validating node as the root version: '2'
vp0:
extends:
file: peer-pbft.yml
service: vp
hostname: vp0
environment:
- CORE_PEER_ID=vp0
ports:
- "7050:7050"
#- "7051:7051"
# validating node services:
vp1: # validating node as the root
extends: vp0:
file: peer-pbft.yml extends:
service: vp file: peer-pbft.yml
hostname: vp1 service: vp
environment: hostname: vp0
- CORE_PEER_ID=vp1 environment:
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 - CORE_PEER_ID=vp0
links: ports:
- vp0 - "7050:7050"
#- "7051:7051"
# validating node # validating node
vp2: vp1:
extends: extends:
file: peer-pbft.yml file: peer-pbft.yml
service: vp service: vp
hostname: vp2 hostname: vp1
environment: environment:
- CORE_PEER_ID=vp2 - CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 - CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links: links:
- vp0 - vp0
# validating node
vp2:
extends:
file: peer-pbft.yml
service: vp
hostname: vp2
environment:
- CORE_PEER_ID=vp2
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0
# validating node # validating node
# vp3 will also be used for client interactive operations # 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 # 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. # 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-pbft.yml
service: vp service: vp
hostname: vp3 hostname: vp3
environment: environment:
- CORE_PEER_ID=vp3 - CORE_PEER_ID=vp3
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 - CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links: links:
- vp0 - vp0
#networks:
# default:
# external:
# name: fabric_pbft

View File

@ -7,33 +7,44 @@
# This utilized the pbft as consensus # This utilized the pbft as consensus
# See https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devnet-setup.md#using-consensus-plugin for more details. # See https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devnet-setup.md#using-consensus-plugin for more details.
vp: version: '2'
image: hyperledger/fabric-peer:latest
restart: unless-stopped
environment:
- CORE_PEER_ADDRESSAUTODETECT=true
- CORE_PEER_NETWORKID=dev
- CORE_LOGGING_LEVEL=info #critical, error, warning, notice, info, debug
# The following section enables pbft consensus
- CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN=pbft # noops, pbft
- CORE_PBFT_GENERAL_MODE=batch # batch. classic and sieve will be not supported again.
- CORE_PBFT_GENERAL_N=4
- CORE_PBFT_GENERAL_BATCHSIZE=2 # only useful when in batch mode
- CORE_PBFT_GENERAL_TIMEOUT_REQUEST=2s
expose:
- "7051"
- "7052"
- "7053"
volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
- /var/run/docker.sock:/var/run/docker.sock
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
vp_sec: services:
extends: vp:
service: vp image: hyperledger/fabric-peer:latest
environment: restart: unless-stopped
- CORE_SECURITY_ENABLED=true environment:
- CORE_PEER_PKI_ECA_PADDR=membersrvc:7054 - CORE_PEER_ADDRESSAUTODETECT=true
- CORE_PEER_PKI_TCA_PADDR=membersrvc:7054 - CORE_PEER_NETWORKID=dev
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054 - CORE_LOGGING_LEVEL=info #critical, error, warning, notice, info, debug
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fabric_
# The following section enables pbft consensus
- CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN=pbft # noops, pbft
- CORE_PBFT_GENERAL_MODE=batch # batch. classic and sieve will be not supported again.
- CORE_PBFT_GENERAL_N=4
- CORE_PBFT_GENERAL_BATCHSIZE=2 # only useful when in batch mode
- CORE_PBFT_GENERAL_TIMEOUT_REQUEST=2s
expose:
- "7050" # Rest
- "7051" # Grpc
- "7052" # Peer CLI
- "7053" # Peer Event
- "7054" # eCAP
- "7055" # eCAA
- "7056" # tCAP
- "7057" # eCAA
- "7058" # tlsCAP
- "7059" # tlsCAA
volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
- /var/run/docker.sock:/var/run/docker.sock
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
vp_sec:
extends:
service: vp
environment:
- CORE_SECURITY_ENABLED=true
- CORE_PEER_PKI_ECA_PADDR=membersrvc:7054
- CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054