HyperLedger Fabric自动化集中化部署方案

目前使用的方案是基于Ansible,参考项目如下:
https://github.com/Altoros/Ansible-Fabric-Starter
由于官方只是支持到1.4.2,本人升级到1.4.4
https://github.com/tokyoliyi/Ansible-Fabric-Starter

Ansible fabric starter by Altoros

This project contains playbooks and roles for deployment of Hyperledger fabric project on multiple instances. Everything is running inside docker-containers, and managed by docker-compose. Assumed that 1 physical (or virtual) host will serve one organisation, so only multi-host deployment is supported by this tool.

Quick overview:

  • Hyperledger Fabric v1.4.4
  • TLS enabled on all configurations
  • etcdraft, kafka and solo orderers are supported
  • CouchDB and LevelDB peer database supprted
  • Configurable amount of organisations
  • Configurable amount of channels
  • 1 chaincode for common channel, and 1 other chaincode for everything else
  • Build-in hyperledger fabric explorer
  • Build-in Altoros RestAPI

Technical Requirements:

Your machine should have:

  • GNU/Linux operating system
  • ansible 2.5.0+

You can find installation instructions on ansible website.

Provisioned nodes by ansible should have:

  • Ubuntu 16.04, Debian 9+ or CentOS 7
  • python
  • sudo access

At least 2GB of RAM if you are using kafka-orderer.

Ports, used by default, you probably want to whitelist them in your firewall.

Ports, needed for blockchain instances to communicate with each other:

  • 7050 - Hyperledger fabric orderer port
  • 7054 - Hyperledger fabric CA port
  • 7051 - Hyperledger fabric peer port
  • 7053 - Hyperledger fabric peer event port
  • 22 - ssh, or any other port number, needed for inital ansible deployment only

In case of kafka-orderer:

  • 9092 - Kafka broker port
  • 2181 - Kafka zookeper port
  • 2888 - Kafka zookeper port
  • 3888 - Kafka zookeper port

Ports, you may want (or may not) open to the internet:

  • 4000 - Altoros RestAPI
  • 8080 - Hyperledger Blockchain Explorer web-app

Instructions

How can I clone this repositry?

git clone https://github.com/Altoros/Ansible-Fabric-Starter.git

How should I configure my blockchain network?

You can find three example-configurations:

image.png
  • hosts_compact.yml - Solo orderer, 3 organizations, orderer-service is hosted on first's organization node. Only common channel is enabled.
image.png
  • hosts_dedicated_orderer.yml - Solo orderer, 3 organizations, orderer-service is hosted on separated node. 3 private channels between all organizations.
image.png
  • hosts_kafka.yml - Kafka orderer, 3 organizations, each organization has own copy of orderer-service. 3 private channels between all organizations.
image.png
  • hosts_raft.yml - EtcdRaft orderer, 4 organizations, each organization has own copy of orderer-service. 2 private channels between first three organizations.

你可能感兴趣的:(HyperLedger Fabric自动化集中化部署方案)