diff options
Diffstat (limited to 'docker/ceph')
| -rw-r--r-- | docker/ceph/ceph-base/Dockerfile.j2 | 3 | ||||
| -rw-r--r-- | docker/ceph/ceph-mon/extend_start.sh | 4 | ||||
| -rw-r--r-- | docker/ceph/ceph-osd/extend_start.sh | 23 |
3 files changed, 25 insertions, 5 deletions
diff --git a/docker/ceph/ceph-base/Dockerfile.j2 b/docker/ceph/ceph-base/Dockerfile.j2 index 4aeaca4e4..c3027a031 100644 --- a/docker/ceph/ceph-base/Dockerfile.j2 +++ b/docker/ceph/ceph-base/Dockerfile.j2 @@ -12,10 +12,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set ceph_base_packages = [ 'btrfs-progs', 'ceph', + 'ceph-mgr-dashboard', 'ceph-radosgw', 'e2fsprogs', + 'gdisk', 'hdparm', 'parted', + 'smartmontools', 'xfsprogs' ] %} diff --git a/docker/ceph/ceph-mon/extend_start.sh b/docker/ceph/ceph-mon/extend_start.sh index 4c3e91b31..af60faa17 100644 --- a/docker/ceph/ceph-mon/extend_start.sh +++ b/docker/ceph/ceph-mon/extend_start.sh @@ -22,8 +22,8 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then # Generating initial keyrings and monmap ceph-authtool --create-keyring "${KEYRING_MON}" --gen-key -n mon. --cap mon 'allow *' - ceph-authtool --create-keyring "${KEYRING_ADMIN}" --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow' --cap mgr 'allow *' - ceph-authtool --create-keyring "${KEYRING_RGW}" --gen-key -n client.radosgw.gateway --set-uid=0 --cap osd 'allow rwx' --cap mon 'allow rwx' + ceph-authtool --create-keyring "${KEYRING_ADMIN}" --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow' --cap mgr 'allow *' + ceph-authtool --create-keyring "${KEYRING_RGW}" --gen-key -n client.radosgw.gateway --cap osd 'allow rwx' --cap mon 'allow rwx' ceph-authtool "${KEYRING_MON}" --import-keyring "${KEYRING_ADMIN}" ceph-authtool "${KEYRING_MON}" --import-keyring "${KEYRING_RGW}" monmaptool --create --add "${HOSTNAME}" "${MON_IP}" --fsid "${FSID}" "${MONMAP}" diff --git a/docker/ceph/ceph-osd/extend_start.sh b/docker/ceph/ceph-osd/extend_start.sh index 68c0a28d6..c6cd4535c 100644 --- a/docker/ceph/ceph-osd/extend_start.sh +++ b/docker/ceph/ceph-osd/extend_start.sh @@ -83,8 +83,14 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then # This will through an error about no key existing. That is normal. It then # creates the key in the next step. - ceph-osd -i "${OSD_ID}" --mkkey echo "bluestore" > "${OSD_DIR}"/type + + if [[ "$(ceph --version)" =~ (luminous|mimic) ]]; then + ceph-osd -i "${OSD_ID}" --mkkey + else + ceph-osd -i "${OSD_ID}" --mkkey --no-mon-config + fi + if [ -n "${OSD_BS_BLK_DEV}" ] && [ "${OSD_BS_BLK_DEV}" != "${OSD_BS_DEV}" ] && [ -n "${OSD_BS_BLK_PARTNUM}" ]; then sgdisk "--change-name="${OSD_BS_BLK_PARTNUM}":KOLLA_CEPH_DATA_BS_${OSD_ID}_B" "--typecode="${OSD_BS_BLK_PARTNUM}":${CEPH_OSD_TYPE_CODE}" -- "${OSD_BS_BLK_DEV}" else @@ -111,8 +117,14 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then ln -sf /dev/disk/by-partlabel/KOLLA_CEPH_DATA_BS_"${OSD_ID}"_D "${OSD_DIR}"/block.db fi - ceph-osd -i "${OSD_ID}" --mkfs -k "${OSD_DIR}"/keyring --osd-uuid "${OSD_UUID}" + if [[ "$(ceph --version)" =~ (luminous|mimic) ]]; then + ceph-osd -i "${OSD_ID}" --mkfs -k "${OSD_DIR}"/keyring --osd-uuid "${OSD_UUID}" + else + ceph-osd -i "${OSD_ID}" --mkfs -k "${OSD_DIR}"/keyring --osd-uuid "${OSD_UUID}" --no-mon-config + fi + ceph auth add "osd.${OSD_ID}" osd 'allow *' mon 'allow profile osd' -i "${OSD_DIR}/keyring" + if [[ "${OSD_BS_DEV}" =~ "/dev/loop" ]]; then umount "${OSD_BS_DEV}""p${OSD_BS_PARTNUM}" else @@ -134,7 +146,12 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then # This will through an error about no key existing. That is normal. It then # creates the key in the next step. - ceph-osd -i "${OSD_ID}" --mkfs --osd-journal="${JOURNAL_PARTITION}" --mkkey + if [[ "$(ceph --version)" =~ (luminous|mimic) ]]; then + ceph-osd -i "${OSD_ID}" --mkfs --osd-journal="${JOURNAL_PARTITION}" --mkkey + else + ceph-osd -i "${OSD_ID}" --mkfs --osd-journal="${JOURNAL_PARTITION}" --mkkey --no-mon-config + fi + ceph auth add "osd.${OSD_ID}" osd 'allow *' mon 'allow profile osd' -i "${OSD_DIR}/keyring" umount "${OSD_PARTITION}" fi |
