hyperledger fabrci e2e_cli example配置

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下载对应版本的binary files, 拉取对应的docker images;

#由于binary 拉取比较慢, 可以选择在项目根目录build 对应的文件: make release

10. cd ../examples/e2e_cli

11. ./network_setup.sh up

#当看到 All GOOD,End-2-End execution completed时 说明通过了测试



2. fabric v1.1.0-alpha:  kafka orderer service

针对v1.0.0做如下调整

7. git checkout v1.1.0-alpha

9. ./bootstrap.sh 1.1.0-alpha

#e2e_cli 目录下的download_dockerimages.sh目前不太完善,对于 kafka orderer service 无法下载对应版本的 第三方镜像


v1.1.0-alpha images tags

3. fabric v1.1.0-alpha:  kafka + multiple orderers service

在2的基础上添加其他的orderer node, 构建 orderer service cluster;

对三个配置文件做修改后,运行 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       

你可能感兴趣的:(hyperledger fabrci e2e_cli example配置)