首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >设置CrateDB 4.0.4集群

设置CrateDB 4.0.4集群
EN

Stack Overflow用户
提问于 2019-09-22 16:58:43
回答 1查看 313关注 0票数 0

我正在尝试建立一个CrateDB 4.0.4社区集群,其中有3个节点在Docker中。

更新:

最后,我得到了4.0.4机箱中的集群。它只对我适用于Cnode.name属性。通过使用Hostname集群没有出现。

代码语言:javascript
复制
crate01:
  image: crate
  container_name: crate01
  hostname: crate01
  ports:
    - 4201:4200
  volumes:
    - /tmp/crate/01:/data
  command: >
    crate -Cnetwork.host=_site_
    -Cnode.name=crate01
    -Cdiscovery.seed_hosts=crate02,crate03
    -Ccluster.initial_master_nodes=crate01,crate02,crate03
  environment:
    - CRATE_HEAP_SIZE=2g
crate02:
  image: crate
  container_name: crate02
  hostname: crate02
  ports:
    - 4202:4200
  volumes:
    - /tmp/crate/02:/data
  command: >
    crate -Cnetwork.host=_site_
    -Cnode.name=crate02
   -Cdiscovery.seed_hosts=crate01,crate03
    -Ccluster.initial_master_nodes=crate01,crate02,crate03
  environment:
    - CRATE_HEAP_SIZE=2g

crate03:
  image: crate
  container_name: crate03
  hostname: crate03
  ports:
    - 4203:4200
  volumes:
    - /tmp/crate/03:/data
  command: >
    crate -Cnetwork.host=_site_
    -Cnode.name=crate03
    -Cdiscovery.seed_hosts=crate01,crate02
    -Ccluster.initial_master_nodes=crate01,crate02,crate03
  environment:
    - CRATE_HEAP_SIZE=2g
EN

回答 1

Stack Overflow用户

发布于 2019-09-25 13:07:42

请尝试以下docker-compose.yml内容

代码语言:javascript
复制
crate01:
  image: crate
  container_name: crate01
  hostname: crate01
  ports:
    - 4201:4200
  net: crate
  command: >
    crate -Cnetwork.host=_site_
    -Cdiscovery.seed_hosts=crate02,crate03
    -Ccluster.initial_master_nodes=crate01,crate02,crate03
  environment:
    - CRATE_HEAP_SIZE=2g

crate02:
  image: crate
  container_name: crate02
  hostname: crate02
  ports:
    - 4202:4200
  net: crate
  command: >
    crate -Cnetwork.host=_site_
    -Cdiscovery.seed_hosts=crate01,crate03
    -Ccluster.initial_master_nodes=crate01,crate02,crate03
  environment:
    - CRATE_HEAP_SIZE=2g

crate03:
  image: crate
  container_name: crate03
  hostname: crate03
  ports:
    - 4203:4200
  net: crate
  command: >
    crate -Cnetwork.host=_site_
    -Cdiscovery.seed_hosts=crate01,crate02
    -Ccluster.initial_master_nodes=crate01,crate02,crate03
  environment:
    - CRATE_HEAP_SIZE=2g
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58051469

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档