diff --git a/virtualbox/pybox/config/labSetupFiles/lab_setup1.sh b/virtualbox/pybox/config/labSetupFiles/lab_setup1.sh index e8a42fc..3b32ae3 100644 --- a/virtualbox/pybox/config/labSetupFiles/lab_setup1.sh +++ b/virtualbox/pybox/config/labSetupFiles/lab_setup1.sh @@ -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 \ No newline at end of file