0

I want to deploy Ceph cluster on Docker Swarm.

For first I try to deploy just monitor... Yaml compose file:

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:

But its don't working, in logs i see:

2017-10-08 20:09:07 /entrypoint.sh: ERROR- it looks like we have not been able to discover the network settings

May be exist something working sample?

markwatsonatx
  • 3,391
  • 2
  • 21
  • 19
Ivan Bukharin
  • 321
  • 2
  • 4
  • 22

1 Answers1

1

It seems you need to use host network, but option network_mode: host is not supported in Swarm. Swarm flavour would be:

services:
  Mon:
    ...
    networks:
      hostnet: {}

networks:
  hostnet:
    external: true
    name: host

From: https://docs.docker.com/compose/compose-file/#host-or-none
Also, complete CephFS in Swarm example available at https://github.com/sepich/ceph-swarm

Community
  • 1
  • 1
sepa
  • 31
  • 3