summaryrefslogtreecommitdiffstats
path: root/debian/lib-systemd
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xdebian/lib-systemd/system-sleep/ceph12
-rw-r--r--debian/lib-systemd/system/ceph-create-keys.service9
-rw-r--r--debian/lib-systemd/system/ceph-mds.service16
-rw-r--r--debian/lib-systemd/system/ceph-mon.service22
-rw-r--r--debian/lib-systemd/system/ceph-osd@.service22
5 files changed, 81 insertions, 0 deletions
diff --git a/debian/lib-systemd/system-sleep/ceph b/debian/lib-systemd/system-sleep/ceph
new file mode 100755
index 00000000..cf62f832
--- /dev/null
+++ b/debian/lib-systemd/system-sleep/ceph
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+#/lib/systemd/system-sleep/ceph
+
+case $1 in
+pre)
+ /bin/systemctl stop ceph
+;;
+post)
+ /bin/systemctl start ceph
+;;
+esac
diff --git a/debian/lib-systemd/system/ceph-create-keys.service b/debian/lib-systemd/system/ceph-create-keys.service
new file mode 100644
index 00000000..4e29bc1e
--- /dev/null
+++ b/debian/lib-systemd/system/ceph-create-keys.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Create Ceph client.admin key when possible
+PartOf=ceph-mon.service
+
+[Service]
+Environment=CLUSTER=ceph
+Environment=CONFIG=/etc/ceph/ceph.conf
+EnvironmentFile=-/etc/default/ceph
+ExecStart=/usr/sbin/ceph-create-keys --cluster ${CLUSTER} --id %H
diff --git a/debian/lib-systemd/system/ceph-mds.service b/debian/lib-systemd/system/ceph-mds.service
new file mode 100644
index 00000000..86ff057f
--- /dev/null
+++ b/debian/lib-systemd/system/ceph-mds.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Ceph metadata server daemon (MDS)
+Documentation=man:ceph-mds
+After=network-online.target nss-lookup.target
+Wants=network-online.target nss-lookup.target
+PartOf=ceph.target
+
+[Service]
+LimitNOFILE=1048576
+LimitNPROC=1048576
+EnvironmentFile=-/etc/default/ceph
+Environment=CLUSTER=ceph
+ExecStart=/usr/bin/ceph-mds -f --cluster ${CLUSTER} --id %H --setuser ceph --setgroup ceph
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/lib-systemd/system/ceph-mon.service b/debian/lib-systemd/system/ceph-mon.service
new file mode 100644
index 00000000..d89c74a6
--- /dev/null
+++ b/debian/lib-systemd/system/ceph-mon.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=Ceph cluster monitor daemon
+Documentation=man:ceph-mon
+
+After=network-online.target local-fs.target ceph-create-keys.service
+Wants=network-online.target local-fs.target ceph-create-keys.service
+
+PartOf=ceph.target
+
+[Service]
+LimitNOFILE=1048576
+LimitNPROC=1048576
+EnvironmentFile=-/etc/default/ceph
+Environment=CLUSTER=ceph
+ExecStart=/usr/bin/ceph-mon -f --cluster ${CLUSTER} --id %H --setuser ceph --setgroup ceph
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-failure
+RestartSec=30
+TasksMax=infinity
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/lib-systemd/system/ceph-osd@.service b/debian/lib-systemd/system/ceph-osd@.service
new file mode 100644
index 00000000..adfa6a02
--- /dev/null
+++ b/debian/lib-systemd/system/ceph-osd@.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=Ceph object storage daemon (OSD)
+Documentation=man:ceph-osd
+After=network-online.target
+Wants=network-online.target
+PartOf=ceph.service
+RequiresMountsFor=/var/lib/ceph/osd/ceph-%i
+
+[Service]
+Environment=CLUSTER=ceph
+Environment=CONFIG=/etc/ceph/ceph.conf
+EnvironmentFile=-/etc/default/ceph
+ExecStartPre=-/bin/sh -c '${osd_prestart_sh}' -- %i
+ExecStartPre=/usr/lib/ceph/ceph-osd-prestart.sh --id %i --cluster ${CLUSTER}
+ExecStart=/usr/bin/ceph-osd --id %i --foreground --cluster ${CLUSTER} -c ${CONFIG}
+ExecStopPost=-/bin/sh -c '${osd_poststop_sh}' -- %i
+LimitNOFILE=327680
+Restart=on-failure
+RestartSec=30
+
+[Install]
+WantedBy=multi-user.target