From db09531983f0d4a9d206aaedce70b904d7b1f37d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 15 Feb 2018 23:08:24 +0100 Subject: [PATCH] Create mon + permissions --- ceph-create-mon | 12 ++++++++++++ ceph-monitor-bootstrap | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 ceph-create-mon mode change 100644 => 100755 ceph-monitor-bootstrap diff --git a/ceph-create-mon b/ceph-create-mon new file mode 100755 index 0000000..552374b --- /dev/null +++ b/ceph-create-mon @@ -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 diff --git a/ceph-monitor-bootstrap b/ceph-monitor-bootstrap old mode 100644 new mode 100755 index 446a14a..fee7519 --- a/ceph-monitor-bootstrap +++ b/ceph-monitor-bootstrap @@ -1,5 +1,7 @@ #!/bin/sh +# Creates the initial keys + fname=/tmp/monkey 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" # 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/