Merge "Initialize Ceph-Storage"

This commit is contained in:
Zuul 2023-07-03 15:12:45 +00:00 committed by Gerrit Code Review
commit 0d5855a7d9

View File

@ -2,10 +2,11 @@
## This file makes the necessary configuration for the unlock of the Controller-0
GROUPNO=0
DATE_FORMAT="%Y-%m-%d %T"
LOG_FILE=${LOG_FILE:-"${HOME}/lab_setup_1.group${GROUPNO}.log"}
LOG_FILE=${LOG_FILE:-"${HOME}/lab_setup_1.log"}
VERBOSE_LEVEL=0
##For now ceph_storage variable will be set to true but can be changed before executing the script
CEPH_STORAGE="true"
OPENRC=/etc/platform/openrc
source ${OPENRC}
@ -62,4 +63,22 @@ function configure_OAM_interface {
}
## Initialize and set ceph_storage
function initialize_ceph_storage {
echo "Setting host-based Ceph storage backend solution"
#Adding ceph backend
log_command "system storage-backend-add ceph --confirmed"
#Adding OSD on controller-0
log_command "system host-disk-list controller-0"
log_command "system host-disk-list controller-0 | awk '/\/dev\/sdb/{print \$2}' | xargs -i system host-stor-add controller-0 {}"
log_command "system host-stor-list controller-0"
}
configure_OAM_interface
if [ "${CEPH_STORAGE}" == "true" ]; then
initialize_ceph_storage
fi