2018-02-15 22:59:55 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
name=$(hostname)
|
|
|
|
|
|
|
|
CEPH_PATH=/var/lib/ceph
|
2021-02-07 12:01:48 +00:00
|
|
|
MGR_PATH=$CEPH_PATH/mgr/ceph-${name}
|
2018-02-15 22:59:55 +00:00
|
|
|
|
|
|
|
if [ -e "$MGR_PATH" ]; then
|
|
|
|
echo "$MGR_PATH exists - aborting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir "$MGR_PATH"
|
|
|
|
chown ceph:ceph "$MGR_PATH"
|
|
|
|
touch "$MGR_PATH/sysvinit"
|
|
|
|
|
2021-02-07 12:01:48 +00:00
|
|
|
ceph auth get-or-create mgr.${name} \
|
2018-02-15 22:59:55 +00:00
|
|
|
mon 'allow profile mgr' \
|
|
|
|
osd 'allow *' \
|
|
|
|
mds 'allow *' > "$MGR_PATH/keyring"
|
2018-02-15 23:01:13 +00:00
|
|
|
|
2021-02-07 12:01:48 +00:00
|
|
|
# Starting with monit - same on every os
|
|
|
|
/opt/ungleich-tools/monit-ceph-create-start mgr.${name}
|