ceph-container icon indicating copy to clipboard operation
ceph-container copied to clipboard

switch ubi8 to ubi8-minimal

Open ktdreyer opened this issue 2 years ago • 2 comments

I tested installing the list of ceph packages inside the ubi8-minimal image to see what the savings would be.

In a ubi8 container (copying what the Dockerfile does):

dnf install -y --setopt=install_weak_deps=False wget unzip util-linux python3-saml python3-setuptools udev device-mapper 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 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

In a ubi8-minimal container:

microdnf install -y --setopt=install_weak_deps=0 (... same list of packages ...)

And then diff'd the resulting list of RPMs in each container:

rpm -qa --qf '%{name}\n' | sort > pkgs.txt

Experiment results

The ubi8-minimal container has two packages that ubi8 does not have (0.5MB):

Package Size (bytes)
libpeas 374264
microdnf 123455

The ubi container has 39 packages that ubi8-minimal does not have (29.9MB):

Package Size (bytes)
crypto-policies-scripts 189108
dbus-glib 365054
dmidecode 225761
dnf-data 38364
dnf-plugin-subscription-manager 89066
dnf 2094938
gdb-gdbserver 657023
ima-evm-utils 137649
libcomps 219268
libreport-filesystem 0
libuser 2077004
passwd 442589
python3-cloud-what 71971
python3-dbus 524237
python3-decorator 47871
python3-dmidecode 301490
python3-dnf-plugins-core 804785
python3-dnf 1905485
python3-ethtool 93697
python3-gobject-base 1101277
python3-gpg 1402026
python3-hawkey 301392
python3-iniparse 108846
python3-inotify 248598
python3-libcomps 143829
python3-libdnf 4067877
python3-librepo 179974
python3-libxml2 1358735
python3-rpm 398293
python3-subscription-manager-rhsm 421369
python3-syspurpose 143581
rpm-build-libs 216200
subscription-manager-rhsm-certificates 9716
subscription-manager 4511197
tar 2876729
tpm2-tss 1208830
usermode 854312
virt-what 47630
yum 76420

Summary

Switching to ubi8-minimal would eliminate a net total of 37 packages from our RH Ceph Storage images and save a net total of 29.4MB of installed disk space.

Caveats

I have not functionally tested Ceph with this at all. I just wanted to track the packages and disk space for this experiment.

For upstream, you may want to use ubi8-minimal also, like the CentOS team recommends.

ktdreyer avatar Apr 08 '22 15:04 ktdreyer

That's a great start, I just hope that Ceph can start as well in under minimal UBI ;-)

  1. We should also not install docs (covered in https://github.com/ceph/ceph-container/pull/1999 ?)
  2. It's clear from your experiment the big fish are on how we can more granularly install the Ceph components themselves - we probably need to split into functionality (RGW, MGR, MON, OSD, MDS) - which I'm somewhat surprised we do not have already? And perhaps make nfs-ganesha and ceph-iscsi and friends also separate/optional, etc (break https://github.com/ceph/ceph-container/blob/master/src/daemon-base/CEPH_BASE_PACKAGES to different containers essentially?)

mykaul avatar Apr 10 '22 08:04 mykaul

@mykaul from what I understand, bundling everything into a single container was a specific decision @leseb and @liewegas made in order to make Ceph simpler for users. (Users already complain that Ceph has too many daemons.)

It could make sense to have a "client" and "server" container, maybe.

ktdreyer avatar Apr 18 '22 16:04 ktdreyer