ungleich-tools/ceph-mgr-create
2018-02-15 23:59:55 +01:00

20 lines
374 B
Bash
Executable file

#!/bin/sh
name=$(hostname)
CEPH_PATH=/var/lib/ceph
MGR_PATH=$CEPH_PATH/mgr/ceph-$name
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"
ceph auth get-or-create mgr.$name \
mon 'allow profile mgr' \
osd 'allow *' \
mds 'allow *' > "$MGR_PATH/keyring"