From ced54fea75c625e9e22791be16758bb89fad79f7 Mon Sep 17 00:00:00 2001 From: "Chandan Kumar (raukadah)" Date: Wed, 7 Apr 2021 16:03:19 +0530 Subject: [PATCH] Make DIB_DNF_MODULE_STREAMS part of yum element While building cloud images, it is common to set modules for CentOS and RHEL images. Earlier it was part of rhel-common which was specific to RHEL OS not for CentOS. Moving it under yum element as module/stream can be enabled or disabled via dnf itself. Signed-off-by: Chandan Kumar (raukadah) Change-Id: Idc0f277f97e92e4d003f059f01b59f1b5513da34 --- .../elements/rhel-common/README.rst | 22 ------------------- diskimage_builder/elements/yum/README.rst | 17 ++++++++++++++ .../pre-install.d/01-module-configuration | 0 3 files changed, 17 insertions(+), 22 deletions(-) rename diskimage_builder/elements/{rhel-common => yum}/pre-install.d/01-module-configuration (100%) diff --git a/diskimage_builder/elements/rhel-common/README.rst b/diskimage_builder/elements/rhel-common/README.rst index db8ab149c..d7305307d 100644 --- a/diskimage_builder/elements/rhel-common/README.rst +++ b/diskimage_builder/elements/rhel-common/README.rst @@ -31,10 +31,6 @@ use with RHEL7, you do not need to set any DIB_RHSM variables. The scripts named with "rhel-registration" have not been developed or tested for RHEL6. For information on building RHEL6 images, please see the rhel element README. -The 01-module-configuration script is specific to RHEL8. RHEL8 includes -various versions of software which can be selected during installation, some -may be older and/or incompatible with a given release of OpenStack. - Environment Variables For Regisration during Image Creation ----------------------------------------------------------- The following environment variables are used for registering a RHEL instance @@ -249,21 +245,3 @@ use the following metadata:: "method":"portal" } } - - -Environment Variables for Module Selection during Image Creation ----------------------------------------------------------------- -The following environment variable is used to select module streams to be -enabled during an image build on RHEL8. Any existing stream for the given -module is first disabled prior to enabling the specified stream. - -#### DIB\_DNF\_MODULE\_STREAMS -This is a space-separated list of module streams to enable prior to any -RPMs being installed. - -Image Build Module Selection Example ------------------------------------- -When using Train on RHEL8.2, one must select the appropriate virt and -container-tools module streams: - -DIB_DNF_MODULE_STREAMS='virt:8.2 container-tools:2.0' diff --git a/diskimage_builder/elements/yum/README.rst b/diskimage_builder/elements/yum/README.rst index 335b36b8f..11eaa5ebe 100644 --- a/diskimage_builder/elements/yum/README.rst +++ b/diskimage_builder/elements/yum/README.rst @@ -17,3 +17,20 @@ Custom yum repository configurations can also be applied by defining files will be copied to /etc/yum.repos.d/ during the image build, and then removed at the end of the build. Each repo file should be named differently to avoid a filename collision. + +Environment Variables for Module Selection during Image Creation +---------------------------------------------------------------- +The following environment variable is used to select module streams to be +enabled during an image build on RHEL8. Any existing stream for the given +module is first disabled prior to enabling the specified stream. + +#### DIB\_DNF\_MODULE\_STREAMS +This is a space-separated list of module streams to enable prior to any +RPMs being installed. + +Image Build Module Selection Example +------------------------------------ +When using Train on RHEL8.2, one must select the appropriate virt and +container-tools module streams: + +DIB_DNF_MODULE_STREAMS='virt:8.2 container-tools:3.0' diff --git a/diskimage_builder/elements/rhel-common/pre-install.d/01-module-configuration b/diskimage_builder/elements/yum/pre-install.d/01-module-configuration similarity index 100% rename from diskimage_builder/elements/rhel-common/pre-install.d/01-module-configuration rename to diskimage_builder/elements/yum/pre-install.d/01-module-configuration