docker-compose-files/hyperledger_fabric/README.md

96 lines
3.0 KiB
Markdown
Raw Normal View History

2017-12-19 14:40:39 +08:00
# Hyperledger Fabric Playground
2016-07-23 17:09:42 +08:00
2017-01-04 14:54:05 +08:00
This project provides several useful Docker-Compose script to help quickly bootup a Hyperledger Fabric network, and do simple testing with deploy, invoke and query transactions.
2016-07-23 17:09:42 +08:00
2020-02-22 03:57:01 +08:00
Currently we support Hyperledger Fabric all releases from v0.6.0, 1.x to latest 2.x.
2016-12-08 16:03:52 +08:00
2017-05-10 11:57:19 +08:00
If you're not familiar with Docker and Blockchain, can have a look at these books (in CN):
2016-12-08 17:20:35 +08:00
* [Docker Practice](https://github.com/yeasy/docker_practice)
* [Blockchain Guide](https://github.com/yeasy/blockchain_guide)
2017-12-19 14:40:39 +08:00
## Supported Fabric Releases
Fabric Release | Description
--- | ---
2018-10-11 13:53:01 +08:00
[Fabric Latest](latest/) | latest fabric code, unstable.
2022-01-19 05:49:57 +08:00
[Fabric v2.4.0](v2.4.0/) | fabric 2.4.0 release.
[Fabric v2.3.3](v2.3.3/) | fabric 2.3.3 release.
[Fabric v2.3.0](v2.3.0/) | fabric 2.3.0 release.
[Fabric v2.2.4](v2.2.4/) | fabric 2.2.4 LTS release.
[Fabric v2.2.1](v2.2.1/) | fabric 2.2.1 LTS release.
[Fabric v2.2.0](v2.2.0/) | fabric 2.2.0 LTS release.
[Fabric v2.1.0](v2.1.0/) | fabric 2.1.0 release.
[Fabric v2.0.0](v2.0.0/) | fabric 2.0.0 release.
[Fabric v1.4.9](v1.4.9/) | fabric 1.4.9 LTS release.
[Fabric v1.4.8](v1.4.8/) | fabric 1.4.8 LTS release.
[Fabric v1.4.7](v1.4.7/) | fabric 1.4.7 LTS release.
[Fabric v1.4.6](v1.4.6/) | fabric 1.4.6 LTS release.
[Fabric v1.4.5](v1.4.5/) | fabric 1.4.5 LTS release.
[Fabric v1.4.4](v1.4.4/) | fabric 1.4.4 LTS release.
[Fabric v1.4.3](v1.4.3/) | fabric 1.4.3 release.
[Fabric v1.4.2](v1.4.2/) | fabric 1.4.2 release.
[Fabric v1.4.0](v1.4.0/) | fabric 1.4.0 release.
[Fabric v1.3.0](v1.3.0/) | fabric 1.3.0 release.
[Fabric v1.2.0](v1.2.0/) | fabric 1.2.0 release.
[Fabric v1.1.0](v1.1.0/) | fabric 1.1.0 release.
2018-04-03 09:17:48 +08:00
[Fabric v1.0.6](v1.0.6/) | fabric v1.0.6 release.
2018-10-11 13:53:01 +08:00
[Fabric v1.0.0](v1.0.0/) | fabric v1.0.0 release.
[Fabric v0.6.0](v0.6.0/) | fabric v0.6.0 release (too old, not recommend to use).
2017-12-19 14:40:39 +08:00
2017-11-02 10:19:05 +08:00
## Getting Started
2017-09-01 21:27:02 +08:00
2018-07-04 17:16:42 +08:00
### TLDR
2019-03-12 11:29:04 +08:00
```bash
2020-11-21 08:44:37 +08:00
$ export RELEASE=v2.3.0
2019-03-12 11:29:04 +08:00
```
2018-07-04 17:16:42 +08:00
```bash
2018-10-11 13:53:01 +08:00
$ cd ${RELEASE}; make setup test
2018-07-04 17:16:42 +08:00
```
More details are as below.
2018-10-11 13:53:01 +08:00
2017-12-07 13:55:24 +08:00
### Pick up a fabric version
2017-12-06 22:30:57 +08:00
2018-10-11 13:53:01 +08:00
Enter the subdir of specific version and setup, e.g.,
2017-12-06 22:30:57 +08:00
2017-11-02 10:19:05 +08:00
```bash
2018-10-11 13:53:01 +08:00
$ cd ${RELEASE} # select a fabric version
$ make setup download # Install docker/compose, and pull required images
2017-11-02 10:19:05 +08:00
```
2017-10-06 14:47:32 +08:00
2017-12-07 13:55:24 +08:00
### Quick Test
2017-11-02 10:19:05 +08:00
2017-12-07 13:55:24 +08:00
The following command will run the entire process (start a fabric network, create channel, test chaincode and stop it.) pass-through.
2017-10-06 14:47:32 +08:00
2017-12-07 13:55:24 +08:00
```bash
2020-07-18 04:00:18 +08:00
$ make test # Test with default fabric RAFT mode
2017-12-07 13:55:24 +08:00
```
2019-01-09 17:08:03 +08:00
[Prometheus](https://prometheus.io) dashboard listens at [http://localhost:9090](http://localhost:9090) to track the network statistics.
2017-12-07 13:55:24 +08:00
### Test with more modes
2020-07-18 04:00:18 +08:00
In v2.x, only raft is supported.
In v1.4.x, solo and kafka are also supported.
2017-12-07 13:55:24 +08:00
```bash
2020-11-21 08:44:37 +08:00
$ HLF_MODE=raft make test # Bootup a fabric network with solo mode
2017-12-07 13:55:24 +08:00
```
2017-12-19 14:40:39 +08:00
## Detailed Steps
2017-12-07 13:55:24 +08:00
See [detailed steps](docs/steps.md)
2019-03-12 11:29:04 +08:00
## Specify Version Numbers
* `.env`: docker images tags, used by those docker-compose files;
* `scripts/variable.sh`: docker images tags and project versions, used by scripts;
2017-12-07 13:55:24 +08:00
## Acknowledgement
2017-12-19 14:40:39 +08:00
2017-12-07 13:55:24 +08:00
* [Hyperledger Fabric](https://github.com/hyperledger/fabric/) project.