美文网首页
fabric-zookeeper 集群部署

fabric-zookeeper 集群部署

作者: 小二郎_读书 | 来源:发表于2018-04-18 10:46 被阅读0次

    部署机器: 172.17.3.146/145/144

    zookeeper_0.yaml

    version: '2'
    services:
        zookeeper0:
        image: hyperledger/fabric-zookeeper
        restart: always
        ports:
            - '2181:2181'
            - '2888:2888'
            - '3888:3888'
        environment:
          - ZOO_MY_ID=1
          - ZOO_SERVERS=server.1=0.0.0.0:2888:3888 server.2=172.17.3.145:2888:3888 server.3=172.17.3.144:2888:3888
    

    zookeeper_1.yaml

    version: '2'
    services:
        zookeeper0:
        image: hyperledger/fabric-zookeeper
        restart: always
        ports:
            - '2181:2181'
            - '2888:2888'
            - '3888:3888'
        environment:
          - ZOO_MY_ID=2
          - ZOO_SERVERS=server.1=172.17.3.146:2888:3888 server.2=0.0.0.0:2888:3888 server.3=172.17.3.144:2888:3888
    

    zookeeper_2.yaml

    version: '2'
    services:
        zookeeper0:
        image: hyperledger/fabric-zookeeper
        restart: always
        ports:
            - '2181:2181'
            - '2888:2888'
            - '3888:3888'
        environment:
          - ZOO_MY_ID=3
          - ZOO_SERVERS=server.1=172.17.3.146:2888:3888 server.2=172.17.3.145:2888:3888 server.3=0.0.0.0:2888:3888
    

    注意点:
    ZOO_MY_ID不能重复
    ZOO_SERVERS本机的需要修改0.0.0.0,如果写为ip,则2888:3888只为本机开放,外面机器无法访问。

    相关文章

      网友评论

          本文标题:fabric-zookeeper 集群部署

          本文链接:https://www.haomeiwen.com/subject/bixvkftx.html