add initial compose files

master
lub 5 years ago
parent ca16b9a8c4
commit 3f3412148c

1
.gitignore vendored

@ -0,0 +1 @@
mon/.env

@ -0,0 +1,23 @@
version: "3.0"
services:
ceph_client:
image: docker.io/ceph/daemon:latest-nautilus
devices:
- /dev/fuse
volumes:
- /ceph/client/etc/ceph/:/etc/ceph/
#:shared makes container mounts accessiable from the host
- /cephfs/:/cephfs/:shared
entrypoint: ceph-fuse
command: /cephfs/ -f --id ${HOSTNAME}
security_opt:
#required for fuse
- apparmor:unconfied
cap_add:
#required for fuse
- SYS_ADMIN
networks:
- ceph
networks:
ceph:
external: true

@ -0,0 +1,18 @@
version: "3.0"
services:
ceph_mds:
image: docker.io/ceph/daemon:latest-nautilus
#copy hostname of the host to avoid confusion in e.g. `ceph status`
hostname: ${HOSTNAME}
environment:
#in case cephfs doesn't exist, yet (normally only during bootstrap)
- CEPHFS_CREATE=1
volumes:
- /ceph/mds/var/lib/ceph/:/var/lib/ceph/
- /ceph/mds/etc/ceph/:/etc/ceph/
command: mds
networks:
- ceph
networks:
ceph:
external: true

@ -0,0 +1,15 @@
version: "3.0"
services:
ceph_mgr:
image: docker.io/ceph/daemon:latest-nautilus
#copy hostname of the host to avoid confusion in e.g. `ceph status`
hostname: ${HOSTNAME}
volumes:
- /ceph/mgr/var/lib/ceph/:/var/lib/ceph/
- /ceph/mgr/etc/ceph/:/etc/ceph/
command: mgr
networks:
- ceph
networks:
ceph:
external: true

@ -0,0 +1,25 @@
#mons need a static ip address
#we reserve 10.13.37.0/24 for this
#manually pick a free ip address and place it in a .env file:
#MON_IP=10.13.37.312
version: "3.0"
services:
ceph_mon:
image: docker.io/ceph/daemon:latest-nautilus
#copy hostname of the host to avoid confusion in e.g. `ceph status`
hostname: ${HOSTNAME}
environment:
- MON_IP=${MON_IP}
- CEPH_PUBLIC_NETWORK=10.13.37.0/23
- CEPH_CLUSTER_NETWORK=10.13.37.0/23
volumes:
- /ceph/mon/var/lib/ceph/:/var/lib/ceph/
- /ceph/mon/etc/ceph/:/etc/ceph/
command: mon
networks:
ceph:
ipv4_address: ${MON_IP}
networks:
ceph:
external: true

@ -0,0 +1,23 @@
#provide the OSD_ID via a environment variable:
#OSD_ID=1337
version: "3.0"
services:
ceph_osd_${OSD_ID}:
image: docker.io/ceph/daemon:latest-nautilus
#copy hostname of the host to correctly calculate CRUSH map positions
hostname: ${HOSTNAME}
environment:
- OSD_ID=${OSD_ID}
volumes:
- /ceph/osd_${OSD_ID}/var/lib/ceph/:/var/lib/ceph/
- /ceph/osd_${OSD_ID}/etc/ceph/:/etc/ceph/
- /dev/:/dev/
command: osd_ceph_volume_activate
cap_add:
- SYS_ADMIN
networks:
- ceph
networks:
ceph:
external: true