1. version requires:
- go version:
go version go1.9.2 darwin/amd64
- docker version:
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:03:51 2017
OS/Arch: darwin/amd64
Server:
Engine:
? Version: 17.12.0-ce
? API version: 1.35 (minimum version 1.12)
? Go version: go1.9.2
? Git commit: c97c6d6
? Built: Wed Dec 27 20:12:29 2017
? OS/Arch: linux/amd64
2. fabric v1.0.0 : solo orderer service
1. export GOROOT=/usr/local/go
2. export GOPATH=~/go
3. mkdir -p ~/go/src/github.com/hyperledger
4. cd ~/go/src/github.com/hyperledger
5. git clone https://github.com/hyperledger/fabric.git
6. cd fabric
7. git checkout v1.0.0
8. cd scripts
9. ./bootstrap.sh? 1.0.0
#bootstrap.sh下載對(duì)應(yīng)版本的binary files材部, 拉取對(duì)應(yīng)的docker images;
#由于binary 拉取比較慢, 可以選擇在項(xiàng)目根目錄build 對(duì)應(yīng)的文件: make release
10. cd ../examples/e2e_cli
11. ./network_setup.sh up
#當(dāng)看到 All GOOD,End-2-End execution completed時(shí) 說(shuō)明通過(guò)了測(cè)試
2. fabric v1.1.0-alpha:? kafka orderer service
針對(duì)v1.0.0做如下調(diào)整
7. git checkout v1.1.0-alpha
9. ./bootstrap.sh 1.1.0-alpha
#e2e_cli 目錄下的download_dockerimages.sh目前不太完善唯竹,對(duì)于 kafka orderer service 無(wú)法下載對(duì)應(yīng)版本的 第三方鏡像
3. fabric v1.1.0-alpha:? kafka + multiple orderers service
在2的基礎(chǔ)上添加其他的orderer node乐导, 構(gòu)建 orderer service cluster;
對(duì)三個(gè)配置文件做修改后浸颓,運(yùn)行 network_setup.sh up
configtx.yaml
Orderer: &OrdererDefaults
? ? # Orderer Type: The orderer implementation to start
? ? # Available types are "solo" and "kafka"
? ? OrdererType: kafka
? ? Addresses:
? ? ? ? - orderer.example.com:7050
? ? ? ? - orderer0.example.com:7050
? ? ? ? - orderer1.example.com:7050
crypto-config.yaml
OrdererOrgs:
? # ---------------------------------------------------------------------------
? # Orderer
? # ---------------------------------------------------------------------------
? - Name: Orderer
? ? Domain: example.com
? ? CA:
? ? ? ? Country: US
? ? ? ? Province: California
? ? ? ? Locality: San Francisco
? ? # ---------------------------------------------------------------------------
? ? # "Specs" - See PeerOrgs below for complete description
? ? # ---------------------------------------------------------------------------
? ? Specs:
? ? ? - Hostname: orderer
? ? ? - Hostname: orderer0
? ? ? - Hostname: orderer1
docker-compose-cli.yaml:
添加service orderer0.example.com??? orderer1.example.com物臂; 注意volumes 字段的路徑;
orderer0.example.com:
? ? extends:
? ? ? file:? base/docker-compose-base.yaml
? ? ? service: orderer.example.com
? ? container_name: orderer0.example.com
? ? depends_on:
? ? ? - zookeeper0
? ? ? - zookeeper1
? ? ? - zookeeper2
? ? ? - kafka0
? ? ? - kafka1
? ? ? - kafka2
? ? ? - kafka3
? ? volumes:
? ? - ./crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/msp:/var/hyperledger/orderer/msp
? ? - ./crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/tls/:/var/hyperledger/orderer/tls? ? ? ?