forked from ceph/ceph-container
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ceph-config.service
35 lines (30 loc) · 1.1 KB
/
ceph-config.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
[Unit]
Description=Ceph Config
After=docker.service
Before=ceph-mon.service
Before=ceph-osd.service
Before=ceph-mds@.service
[Service]
EnvironmentFile=-/etc/environment
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/bin/mkdir -p /etc/ceph
# systemd-docker does not work here because we want to briefly block execution in
# case another host is running a cluster bootstrap in parallel. systemd-docker's
# notify mechanism does not block. A workaround is described here:
#
# https://github.com/docker/docker/issues/6791#issuecomment-72338100
ExecStartPre=/usr/bin/docker pull ceph/ceph-config
ExecStartPre=-/usr/bin/docker kill %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStartPre=/usr/bin/docker run -d -e MON_IP=${COREOS_PUBLIC_IPV4} -e MON_NAME=%H -e ETCDCTL_PEERS=http://${COREOS_PUBLIC_IPV4}:4001 -e CLUSTER=ceph --name %n -v /etc/ceph:/etc/ceph ceph/ceph-config
ExecStart=/usr/bin/docker logs -f %n
ExecStop=-/usr/bin/docker stop %n
ExecStopPost=-/usr/bin/docker stop %n
[Install]
RequiredBy=ceph-mon.service
RequiredBy=ceph-osd.service
RequiredBy=ceph-mds@.service
WantedBy=multi-user.target
[X-Fleet]
Global=true