【问题标题】:How to Deploy Fabric Network on Kubernetes?如何在 Kubernetes 上部署 Fabric 网络?
【发布时间】:2019-11-22 02:31:49
【问题描述】:

我想在 Kubernetes 上部署超级账本结构网络,谁能指导我或提供相同的示例文档

【问题讨论】:

  • 多么宽泛的问题...与 Kubernetes 上的任何其他网络一样,需要非常注意持久卷、网络相关配置等。您需要有关 Hyperledger Fabric 和 Kubernetes 的知识。这不是微不足道的。不要指望任何人为你做所有这些工作。您有一些示例,例如 github.com/feitnomore/hyperledger-fabric-kubernetes,但我更喜欢 etcd-raft 而不是 Kafka/Zookeper,而且您可能希望为您的 Fabric 网络和 Kubernetes 基础设施定制很多东西。
  • 谢谢@kekomal 我会参考你提供的链接

标签: kubernetes hyperledger-fabric


【解决方案1】:

您可以在 Hyperledger Fabric meets Kubernetes 中找到令人惊叹的文档和示例。我已经使用 1.4.1 HL Fabric 二进制文件进行了测试 - 工作正常。


要求

  • 一个正在运行的 Kubernetes 集群,Minikube 也应该可以工作,但不能 测试过

  • HL Fabric binaries (有一个 issue 使用cryptogen 1.4.3,所以使用1.4.2或1.4.1)

  • Helm,已开发 对于 2.11,更新的 2.xx 版本也应该可以工作

  • jq 1.5+ 和

  • yq2.6+

  • Argo,两者都有 CLI 和控制器 2.4.0+

  • Minio, 仅备份/恢复和新对等组织流需要

  • 运行fabric-kube文件夹中的所有命令

  • AWS EKS 用户也请应用此 fix


1) 运行集群并安装 helm

2) 克隆仓库git clone https://github.com/APGGroeiFabriek/PIVT.git

3) 安装 HL Fabric 二进制文件

$curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s -- 1.4.1 1.4.1 0.4.18

$export PATH=$PATH:/path-to-fabric-kube-dir/fabric-samples/bin (path to `cryptogen` bin)

$./init.sh ./samples/simple/ ./samples/chaincode/

-- creating certificates --
aptalkarga.tr
nevergreen.nl
atlantis.com
-- creating genesis block --
...
creating hlf-kube/chaincode/very-simple.tar
creating hlf-kube/chaincode/even-simpler.tar

4) 安装图表依赖项

$helm repo add kafka http://storage.googleapis.com/kubernetes-charts-incubator    
$helm dependency update ./hlf-kube/

5) 在 fabric-kube 文件夹中启动网络:

helm install ./hlf-kube --name hlf-kube -f samples/simple/network.yaml -f samples/simple/crypto-config.yaml
...
Happy BlockChaining :)

And don't forget the first rule of BlockChain club:

"Do not use BlockChain unless absolutely necessary!"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-07
    • 2021-07-23
    • 1970-01-01
    • 2017-07-22
    • 1970-01-01
    • 2020-07-24
    相关资源
    最近更新 更多