diff --git a/ceph-monitor-bootstrap b/ceph-create-initial-keyring similarity index 57% rename from ceph-monitor-bootstrap rename to ceph-create-initial-keyring index fee7519..c64b8f5 100755 --- a/ceph-monitor-bootstrap +++ b/ceph-create-initial-keyring @@ -2,13 +2,12 @@ # Creates the initial keys -fname=/tmp/monkey +if [ $# -ne 1 ]; then + echo "$0 initial-key-file" + exit 1 +fi + +fname=$1 ceph-authtool --create-keyring "$fname" --gen-key -n mon. ceph-authtool "$fname" --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow' - -cat "$fname" - -# ensure mon has persistent storage! -ceph-mon --mkfs -i $(hostname) --keyring /tmp/monkey -touch /var/lib/ceph/mon/ceph-server3/ diff --git a/ceph-create-mon b/ceph-mon-create-start similarity index 81% rename from ceph-create-mon rename to ceph-mon-create-start index 552374b..18d6293 100755 --- a/ceph-create-mon +++ b/ceph-mon-create-start @@ -7,6 +7,7 @@ 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 + +/etc/init.d/ceph start mon.$(hostname)