Create mon + permissions

This commit is contained in:
Nico Schottelius 2018-02-15 23:08:24 +01:00
parent 61a5d3174e
commit db09531983
2 changed files with 16 additions and 1 deletions

12
ceph-create-mon Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
if [ $# -ne 1 ]; then
echo "$0 initial-key-file"
exit 1
fi
fname=$1
ceph-mon --mkfs -i $(hostname) --keyring "$fname"
ceph-mon --mkfs -i $(hostname) --keyring "$fname" --setuser ceph --setgroup ceph
touch /var/lib/ceph/mon/ceph-$(hostname)/sysvinit

5
ceph-monitor-bootstrap Normal file → Executable file
View file

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
# Creates the initial keys
fname=/tmp/monkey fname=/tmp/monkey
ceph-authtool --create-keyring "$fname" --gen-key -n mon. ceph-authtool --create-keyring "$fname" --gen-key -n mon.
@ -8,4 +10,5 @@ ceph-authtool "$fname" --gen-key -n client.admin --set-uid=0 --cap mon 'allow *'
cat "$fname" cat "$fname"
# ensure mon has persistent storage! # ensure mon has persistent storage!
ceph-mon --mkfs -i mon.$(hostname) --keyring /tmp/monkey ceph-mon --mkfs -i $(hostname) --keyring /tmp/monkey
touch /var/lib/ceph/mon/ceph-server3/