Question: steps to build ceph ubi8 image
tshacked opened this issue · comments
Hi All,
Im trying to build a ceph ubi8 image on F34 machine.
I didn't find a way to build this flavor from the makefile (beside maybe changing it).
$ make show.flavors
octopus,centos,7 octopus,centos,8 pacific,centos,8 quincy,centos,8 master,centos,8
I ran the following steps but not sure if those correct as the build failed due missing repo files on the image:
$ ./contrib/compose-rhcs.sh
$ cd staging/master-ubi8-latest-x86_64/
$ docker build -t rhcs-ubi8-test daemon-base/
Step 27/27 : RUN yum update -y --setopt=install_weak_deps=False && yum install -y --setopt=install_weak_deps=False wget unzip util-linux python3-saml python3-setuptools udev device-mapper && yum install -y --setopt=install_weak_deps=False ca-certificates e2fsprogs ceph-common ceph-mon ceph-osd ceph-mds cephfs-mirror rbd-mirror ceph-mgr ceph-mgr-cephadm ceph-mgr-dashboard ceph-mgr-diskprediction-local ceph-mgr-k8sevents ceph-mgr-rook ceph-grafana-dashboards kmod lvm2 gdisk smartmontools nvme-cli libstoragemgmt systemd-udev procps-ng hostname ceph-radosgw libradosstriper1 nfs-ganesha nfs-ganesha-ceph nfs-ganesha-rgw nfs-ganesha-rados-grace nfs-ganesha-rados-urls tcmu-runner ceph-iscsi ceph-immutable-object-cache ceph-volume && INITIAL_SIZE="$(bash -c 'sz="$(du -sm --exclude=/proc /)" ; echo "${sz%*/}"')" && echo 'Postinstall cleanup' && ( yum clean all && rpm -q ca-certificates e2fsprogs ceph-common ceph-mon ceph-osd ceph-mds cephfs-mirror rbd-mirror ceph-mgr ceph-mgr-cephadm ceph-mgr-dashboard ceph-mgr-diskprediction-local ceph-mgr-k8sevents ceph-mgr-rook ceph-grafana-dashboards kmod lvm2 gdisk smartmontools nvme-cli libstoragemgmt systemd-udev procps-ng hostname ceph-radosgw libradosstriper1 nfs-ganesha nfs-ganesha-ceph nfs-ganesha-rgw nfs-ganesha-rados-grace nfs-ganesha-rados-urls tcmu-runner ceph-iscsi ceph-immutable-object-cache ceph-volume && sed -i 's/enabled=.*/enabled=1/g' /etc/yum/pluginconf.d/subscription-manager.conf && rm -f /etc/profile.d/lang.sh ) && sed -i -e 's/udev_rules = 1/udev_rules = 0/' -e 's/udev_sync = 1/udev_sync = 0/' -e 's/obtain_device_list_from_udev = 1/obtain_device_list_from_udev = 0/' /etc/lvm/lvm.conf && grep -sqo "udev_sync = 0" /etc/lvm/lvm.conf && grep -sqo "udev_rules = 0" /etc/lvm/lvm.conf && grep -sqo "obtain_device_list_from_udev = 0" /etc/lvm/lvm.conf && find /var/log/ -type f -exec truncate -s 0 {} \; && FINAL_SIZE="$(bash -c 'sz="$(du -sm --exclude=/proc /)" ; echo "${sz%*/}"')" && REMOVED_SIZE=$((INITIAL_SIZE - FINAL_SIZE)) && echo "Cleaning process removed ${REMOVED_SIZE}MB" && echo "Dropped container size from ${INITIAL_SIZE}MB to ${FINAL_SIZE}MB" && rpm -q ca-certificates e2fsprogs ceph-common ceph-mon ceph-osd ceph-mds cephfs-mirror rbd-mirror ceph-mgr ceph-mgr-cephadm ceph-mgr-dashboard ceph-mgr-diskprediction-local ceph-mgr-k8sevents ceph-mgr-rook ceph-grafana-dashboards kmod lvm2 gdisk smartmontools nvme-cli libstoragemgmt systemd-udev procps-ng hostname ceph-radosgw libradosstriper1 nfs-ganesha nfs-ganesha-ceph nfs-ganesha-rgw nfs-ganesha-rados-grace nfs-ganesha-rados-urls tcmu-runner ceph-iscsi ceph-immutable-object-cache ceph-volume && echo 'Packages verified successfully'
---> Running in 7e7068e045cf
Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
Looking on the temp image - indeed there're no repo files.
$ docker run -it d380596e753a
[root@4b6e7d177bca /]# cat /etc/redhat-storage-release
Red Hat Ceph Storage Server 5 (Container)
[root@4b6e7d177bca /]# ls /etc/yum.repos.d/
[root@4b6e7d177bca /]#
I guess my staging dir is missing something, what are the correct steps for building a ubi image?
Thanks,
Tamar
@ktdreyer FYI
Thanks for opening this ticket.
Please ensure you're working on the stable-6.0
branch of the ceph-container
project. That corresponds to the RH Ceph Storage 5 product. The main
branch of ceph-container
does not work with RH Ceph Storage 5 today.
For the rest of the process, I've written a guide at #2012 . Would you please try those instructions and comment what could be improved there?
@tshacked are you ok with closing this ticket now?
are you ok with closing this ticket now?
Yes and thanks for the help.