diff --git a/bin/manila-image-create b/bin/manila-image-create index 4f28b8f..2166bb3 100755 --- a/bin/manila-image-create +++ b/bin/manila-image-create @@ -58,7 +58,7 @@ print_usage() { echo "Usage: ${0##*/} [-s share-proto] [-d distro] [-h]" echo "Options:" echo " -s | --share-proto: name of the share protocol. \ - Possible options are nfs, nfs-ganesha, cifs or zfs" + Possible options are nfs, nfs-ganesha, cephfs, cifs or zfs" echo " -d | --distro: name of the Linux distro. \ Possible options are ubuntu or centos" echo " -h | --help: print this usage message and exit" @@ -68,8 +68,9 @@ print_usage() { valid_share_protocol() { if [ "${MANILA_SHARE_PROTO}" != "nfs" ] && [ "${MANILA_SHARE_PROTO}" != "nfs-ganesha" ] && - [ "${MANILA_SHARE_PROTO}" != "cifs" ] && [ "${MANILA_SHARE_PROTO}" != "zfs" ]; then - err "Protocol ${MANILA_SHARE_PROTO} not supported. Valid options are nfs, nfs-ganesha, cifs or zfs." + [ "${MANILA_SHARE_PROTO}" != "cifs" ] && [ "${MANILA_SHARE_PROTO}" != "zfs" ] && + [ "${MANILA_SHARE_PROTO}" != "cephfs" ]; then + err "Protocol ${MANILA_SHARE_PROTO} not supported. Valid options are nfs, nfs-ganesha, cephfs, cifs or zfs." exit 1 fi } @@ -127,6 +128,8 @@ configure() { OPTIONAL_ELEMENTS="$OPTIONAL_ELEMENTS ${MANILA_DISTRO}-cifs" elif [ "$MANILA_SHARE_PROTO" = "zfs" ]; then OPTIONAL_ELEMENTS="$OPTIONAL_ELEMENTS ${MANILA_DISTRO}-zfs" + elif [ "$MANILA_SHARE_PROTO" = "cephfs" ]; then + OPTIONAL_ELEMENTS="$OPTIONAL_ELEMENTS ${MANILA_DISTRO}-cephfs" fi if [ "$USE_OFFLINE_MODE" = "yes" ]; then diff --git a/elements/centos-cephfs/install.d/50-manila-cephfs b/elements/centos-cephfs/install.d/50-manila-cephfs new file mode 100755 index 0000000..17d7181 --- /dev/null +++ b/elements/centos-cephfs/install.d/50-manila-cephfs @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -eu + +install-packages ceph-common ceph-fuse crudini diff --git a/elements/ubuntu-cephfs/install.d/50-manila-cephfs b/elements/ubuntu-cephfs/install.d/50-manila-cephfs new file mode 100644 index 0000000..17d7181 --- /dev/null +++ b/elements/ubuntu-cephfs/install.d/50-manila-cephfs @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -eu + +install-packages ceph-common ceph-fuse crudini