update compose files
parent
3a9e21f61e
commit
2ca08915ab
20
README.md
20
README.md
|
@ -31,25 +31,7 @@ A simple haproxy and web applications cluster.
|
|||
## [hyperledger](hyperledger)
|
||||
Quickly bootup a hyperledger cluster with several validator nodes, without vagrant or any manual configuration. By default, the cluster enables PBFT as the consensus.
|
||||
|
||||
Note, currently you should manually create an `openblockchain/baseimage:latest` first. The
|
||||
easiest way to do so is:
|
||||
```sh
|
||||
$ docker pull yeasy/hyperledger:latest
|
||||
$ docker tag yeasy/hyperledger:latest hyperledger/fabric-baseimage:latest
|
||||
$ docker pull yeasy/hyperledger-peer:noops
|
||||
$ docker pull yeasy/hyperledger-peer:pbft
|
||||
$ docker pull yeasy/hyperledger-membersrvc:latest
|
||||
```
|
||||
|
||||
Then you can start a 4 nodes hyperledger cluster with
|
||||
```sh
|
||||
$ docker-compose up
|
||||
```
|
||||
|
||||
After the cluster is synced, you can validate by deploying, invoking or querying chaincode from the container or from the
|
||||
host. See [hyperledger-peer](https://github .com/yeasy/docker-hyperledger-peer) if you've not familiar on that.
|
||||
|
||||
This refers the example from the [hyperledger](https://github.com/hyperledger/fabric/tree/master/consensus/docker-compose-files) project.
|
||||
See [hyperledger](hyperledger) for more details.
|
||||
|
||||
## [mongo_cluster](mongo_cluster)
|
||||
Start 3 mongo instance to make a replica set.
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
# Hyperledger fabric
|
||||
Note, currently you should manually create an `openblockchain/baseimage:latest` first. The
|
||||
easiest way to do so is:
|
||||
```sh
|
||||
$ docker pull yeasy/hyperledger:latest && docker tag yeasy/hyperledger:latest hyperledger/fabric-baseimage:latest
|
||||
$ docker pull yeasy/hyperledger-peer:latest
|
||||
$ docker pull yeasy/hyperledger-membersrvc:latest
|
||||
```
|
||||
|
||||
Then go into the specific consensus directory, then you can start a 4 nodes hyperledger cluster.
|
||||
|
||||
E.g., for pbft consensus, use
|
||||
|
||||
```sh
|
||||
$ 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.
|
||||
|
||||
See [hyperledger-peer](https://github.com/yeasy/docker-hyperledger-peer) if you've not familiar on that.
|
||||
|
||||
This refers the example from the [hyperledger](https://github.com/hyperledger/fabric/tree/master/consensus/docker-compose-files) project.
|
||||
|
||||
## noops
|
||||
|
||||
Use the noops as consensus, i.e., no consensus.
|
||||
|
||||
## pbft
|
||||
|
||||
Use pbft as consensus.
|
|
@ -0,0 +1,22 @@
|
|||
# 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
|
||||
|
||||
# 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 30303:30303 to host
|
||||
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:30303` to specify peer addr.
|
||||
vp0:
|
||||
extends:
|
||||
file: peer-noops.yml
|
||||
service: vp
|
||||
hostname: vp0
|
||||
environment:
|
||||
- CORE_PEER_ID=vp0
|
||||
ports:
|
||||
- "5000:5000"
|
||||
#- "30303:30303"
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
# 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
|
||||
|
||||
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 # this repeats the default cmd to make sure
|
||||
|
||||
# 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 30303:30303 to host
|
||||
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:30303` to specify peer addr.
|
||||
vp0:
|
||||
extends:
|
||||
file: peer-noops.yml
|
||||
service: vp
|
||||
hostname: vp0
|
||||
environment:
|
||||
- CORE_PEER_ID=vp0
|
||||
- CORE_SECURITY_ENABLED=true
|
||||
- CORE_SECURITY_ENROLLID=test_vp0
|
||||
- CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT
|
||||
- CORE_PEER_PKI_ECA_PADDR=membersrvc:50051
|
||||
- CORE_PEER_PKI_TCA_PADDR=membersrvc:50051
|
||||
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:50051
|
||||
ports:
|
||||
- "5000:5000"
|
||||
#- "30303:30303"
|
||||
links:
|
||||
- membersrvc
|
||||
|
||||
vp1:
|
||||
extends:
|
||||
file: peer-noops.yml
|
||||
service: vp
|
||||
hostname: vp1
|
||||
environment:
|
||||
- CORE_PEER_ID=vp1
|
||||
- CORE_SECURITY_ENABLED=true
|
||||
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
||||
- CORE_SECURITY_ENROLLID=test_vp1
|
||||
- CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy
|
||||
- CORE_PEER_PKI_ECA_PADDR=membersrvc:50051
|
||||
- CORE_PEER_PKI_TCA_PADDR=membersrvc:50051
|
||||
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:50051
|
||||
links:
|
||||
- membersrvc
|
||||
- vp0
|
||||
|
||||
vp2:
|
||||
extends:
|
||||
file: peer-noops.yml
|
||||
service: vp
|
||||
hostname: vp2
|
||||
environment:
|
||||
- CORE_PEER_ID=vp2
|
||||
- CORE_SECURITY_ENABLED=true
|
||||
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
||||
- CORE_SECURITY_ENROLLID=test_vp2
|
||||
- CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ
|
||||
- CORE_PEER_PKI_ECA_PADDR=membersrvc:50051
|
||||
- CORE_PEER_PKI_TCA_PADDR=membersrvc:50051
|
||||
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:50051
|
||||
links:
|
||||
- membersrvc
|
||||
- vp0
|
||||
|
||||
vp3:
|
||||
extends:
|
||||
file: peer-noops.yml
|
||||
service: vp
|
||||
hostname: vp3
|
||||
environment:
|
||||
- CORE_PEER_ID=vp3
|
||||
- CORE_SECURITY_ENABLED=true
|
||||
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
||||
- CORE_SECURITY_ENROLLID=test_vp3
|
||||
- CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL
|
||||
- CORE_PEER_PKI_ECA_PADDR=membersrvc:50051
|
||||
- CORE_PEER_PKI_TCA_PADDR=membersrvc:50051
|
||||
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:50051
|
||||
links:
|
||||
- membersrvc
|
||||
- vp0
|
||||
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
# 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
|
||||
|
||||
# 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 30303:30303 to host
|
||||
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:30303` to specify peer addr.
|
||||
vp0:
|
||||
extends:
|
||||
file: peer-noops.yml
|
||||
service: vp
|
||||
hostname: vp0
|
||||
environment:
|
||||
- CORE_PEER_ID=vp0
|
||||
ports:
|
||||
- "5000:5000"
|
||||
#- "30303:30303"
|
||||
|
||||
# validating node
|
||||
vp1:
|
||||
extends:
|
||||
file: peer-noops.yml
|
||||
service: vp
|
||||
hostname: vp1
|
||||
environment:
|
||||
- CORE_PEER_ID=vp1
|
||||
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
||||
links:
|
||||
- vp0
|
||||
|
||||
# validating node
|
||||
vp2:
|
||||
extends:
|
||||
file: peer-noops.yml
|
||||
service: vp
|
||||
hostname: vp2
|
||||
environment:
|
||||
- CORE_PEER_ID=vp2
|
||||
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
||||
links:
|
||||
- vp0
|
||||
|
||||
|
||||
# validating node
|
||||
vp3:
|
||||
extends:
|
||||
file: peer-noops.yml
|
||||
service: vp
|
||||
hostname: vp3
|
||||
environment:
|
||||
- CORE_PEER_ID=vp3
|
||||
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
||||
links:
|
||||
- vp0
|
|
@ -8,15 +8,15 @@
|
|||
# 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:noops
|
||||
image: yeasy/hyperledger-peer:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- CORE_PEER_ADDRESSAUTODETECT=true
|
||||
- CORE_PEER_NETWORKID=dev
|
||||
- CORE_LOGGING_LEVEL=debug #critical, error, warning, notice, info, debug
|
||||
- CORE_LOGGING_LEVEL=info #critical, error, warning, notice, info, debug
|
||||
# The following section enables pbft consensus
|
||||
- CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN=noops # noops, obcpbft, pbft
|
||||
- CORE_NOOPS_BLOCK_TIMEOUT=10s
|
||||
- CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN=noops # noops, pbft
|
||||
- CORE_NOOPS_BLOCK_TIMEOUT=5s
|
||||
expose:
|
||||
- "30303"
|
||||
- "30304"
|
|
@ -8,7 +8,7 @@
|
|||
# validating node as the root
|
||||
vp0:
|
||||
extends:
|
||||
file: compose-defaults.yml
|
||||
file: peer-pbft.yml
|
||||
service: vp
|
||||
hostname: vp0
|
||||
environment:
|
||||
|
@ -19,12 +19,15 @@ vp0:
|
|||
- CORE_PEER_PKI_ECA_PADDR=membersrvc:50051
|
||||
- CORE_PEER_PKI_TCA_PADDR=membersrvc:50051
|
||||
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:50051
|
||||
ports:
|
||||
- "5000:5000"
|
||||
#- "30303:30303"
|
||||
links:
|
||||
- membersrvc
|
||||
|
||||
vp1:
|
||||
extends:
|
||||
file: compose-defaults.yml
|
||||
file: peer-pbft.yml
|
||||
service: vp
|
||||
hostname: vp1
|
||||
environment:
|
||||
|
@ -42,7 +45,7 @@ vp1:
|
|||
|
||||
vp2:
|
||||
extends:
|
||||
file: compose-defaults.yml
|
||||
file: peer-pbft.yml
|
||||
service: vp
|
||||
hostname: vp2
|
||||
environment:
|
||||
|
@ -64,7 +67,7 @@ vp2:
|
|||
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:30303` to specify peer addr.
|
||||
vp3:
|
||||
extends:
|
||||
file: compose-defaults.yml
|
||||
file: peer-pbft.yml
|
||||
service: vp
|
||||
hostname: vp3
|
||||
environment:
|
||||
|
@ -79,9 +82,6 @@ vp3:
|
|||
links:
|
||||
- membersrvc
|
||||
- vp0
|
||||
ports:
|
||||
- "5000:5000"
|
||||
#- "30303:30303"
|
||||
|
||||
membersrvc:
|
||||
image: yeasy/hyperledger-membersrvc:latest
|
|
@ -8,16 +8,19 @@
|
|||
# validating node as the root
|
||||
vp0:
|
||||
extends:
|
||||
file: compose-defaults.yml
|
||||
file: peer-pbft.yml
|
||||
service: vp
|
||||
hostname: vp0
|
||||
environment:
|
||||
- CORE_PEER_ID=vp0
|
||||
ports:
|
||||
- "5000:5000"
|
||||
#- "30303:30303"
|
||||
|
||||
# validating node
|
||||
vp1:
|
||||
extends:
|
||||
file: compose-defaults.yml
|
||||
file: peer-pbft.yml
|
||||
service: vp
|
||||
hostname: vp1
|
||||
environment:
|
||||
|
@ -29,7 +32,7 @@ vp1:
|
|||
# validating node
|
||||
vp2:
|
||||
extends:
|
||||
file: compose-defaults.yml
|
||||
file: peer-pbft.yml
|
||||
service: vp
|
||||
hostname: vp2
|
||||
environment:
|
||||
|
@ -45,7 +48,7 @@ vp2:
|
|||
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:30303` to specify peer addr.
|
||||
vp3:
|
||||
extends:
|
||||
file: compose-defaults.yml
|
||||
file: peer-pbft.yml
|
||||
service: vp
|
||||
hostname: vp3
|
||||
environment:
|
||||
|
@ -53,6 +56,3 @@ vp3:
|
|||
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
||||
links:
|
||||
- vp0
|
||||
ports:
|
||||
- "5000:5000"
|
||||
#- "30303:30303"
|
|
@ -8,17 +8,18 @@
|
|||
# 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:pbft
|
||||
image: yeasy/hyperledger-peer:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- CORE_PEER_ADDRESSAUTODETECT=true
|
||||
- CORE_PEER_NETWORKID=dev
|
||||
- CORE_LOGGING_LEVEL=debug #critical, error, warning, notice, info, debug
|
||||
- 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=classic # batch, classic, sieve
|
||||
- CORE_PBFT_GENERAL_MODE=sieve # batch, classic, sieve
|
||||
- CORE_PBFT_GENERAL_N=4
|
||||
- CORE_PBFT_GENERAL_TIMEOUT_REQUEST=10s
|
||||
- CORE_PBFT_GENERAL_BATCHSIZE=2 # only useful when in batch mode
|
||||
- CORE_PBFT_GENERAL_TIMEOUT_REQUEST=2s
|
||||
expose:
|
||||
- "30303"
|
||||
- "30304"
|
Loading…
Reference in New Issue