【问题标题】:Ceph on Docker Swarm from Compose来自 Compose 的 Docker Swarm 上的 Ceph
【发布时间】:2017-10-08 20:21:28
【问题描述】:

我想在 Docker Swarm 上部署 Ceph 集群。

首先,我尝试仅部署监视器... Yaml 编写文件:

version: "3.3"
services:
  Mon:
    image: ceph/daemon:tag-build-master-kraken-ubuntu-16.04
    #command: ceph mon
    environment:
      - "CEPH_DAEMON=MON"
      - "NETWORK_AUTO_DETECT=1"
#      - "MON_IP=192.168.0.20"
#      - "CEPH_PUBLIC_NETWORK=192.168.0.0/24"
    volumes:
      - type: volume
        source: etc_ceph
        target: /etc/ceph
      - type: volume
        source: var_lib_ceph
        target: /var/lib/ceph/
    network_mode: host
    deploy:
      replicas: 1
      placement:
        constraints:
          - node.labels.DFS==true

volumes:
    etc_ceph:
    var_lib_ceph:
    dev:

但它不起作用,在我看到的日志中:

2017-10-08 20:09:07 /entrypoint.sh: 错误 - 看起来我们无法发现网络设置

可能存在一些工作样本?

【问题讨论】:

    标签: docker ceph swarm


    【解决方案1】:

    您似乎需要使用主机网络,但在 Swarm 中选项 network_mode: hostnot supported。群体风味将是:

    services:
      Mon:
        ...
        networks:
          hostnet: {}
    
    networks:
      hostnet:
        external: true
        name: host
    

    发件人:https://docs.docker.com/compose/compose-file/#host-or-none
    另外,完整的 CephFS in Swarm 示例可在 https://github.com/sepich/ceph-swarm

    获得

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多