#!/bin/bash

# Get the keyring and config files from etcd
for f in \
  /etc/ceph/ceph.client.admin.keyring \
  /etc/ceph/ceph.conf \
  /etc/ceph/ceph.mon.keyring \
  /etc/ceph/monmap \
  /var/lib/ceph/bootstrap-mds/ceph.keyring \
  /var/lib/ceph/bootstrap-osd/ceph.keyring \
  /var/lib/ceph/bootstrap-rgw/ceph.keyring
do
  sudo mkdir -p $(dirname $f)
  etcdctl get /unisound/ceph-dist$f | base64 --decode | sudo tee $f >/dev/null
done

# Run an OSD daemon, use /dev/sdb for now
docker run -d --net=host -v /etc/ceph:/etc/ceph -v /var/lib/ceph:/var/lib/ceph \
  -v /dev:/dev --privileged=true -e OSD_FORCE_ZAP=1 \
  -e OSD_DEVICE=/dev/sdb ceph/daemon osd_ceph_disk

Add installation script for Ceph OSD
Add installation script for Ceph OSD

Currently the disk for the OSD storage is hard coded to /dev/sdb, fix it
later.
