Add variable for check installing python3 in yum element
If client have not internet or have some limitation, such as firewall/proxy/etc. this step will stop build image with error. Client must have possible override of URL for pass this step. Change-Id: Iafe3283665a437d0a9cf83a93ff66c0613310b69
This commit is contained in:
parent
b706802a1c
commit
a9edef6548
2 changed files with 17 additions and 15 deletions
|
@ -22,20 +22,22 @@ The yum repository can also be configured by defining `DIB_YUM_REPO_PACKAGE` as
|
|||
a yum available package or a URL to an rpm file. This package can install repo
|
||||
files with any associated keys and certificates.
|
||||
|
||||
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 Yum/DNF based distributions. Any existing
|
||||
stream for the given module is first disabled prior to enabling
|
||||
the specified stream.
|
||||
Environment Variables
|
||||
---------------------
|
||||
|
||||
#### DIB\_DNF\_MODULE\_STREAMS
|
||||
This is a space-separated list of module streams to enable prior to any
|
||||
RPMs being installed.
|
||||
DIB_DNF_MODULE_STREAMS
|
||||
:Required: No
|
||||
:Default: None
|
||||
:Description: The following environment variable is used to select module streams
|
||||
to be enabled during an image build on Yum/DNF based distributions.Any existing
|
||||
stream for the given module is first disabled prior to enabling the specified
|
||||
stream.
|
||||
:Example: ``DIB_DNF_MODULE_STREAMS='virt:8.2 container-tools:3.0'``
|
||||
|
||||
Image Build Module Selection Example
|
||||
------------------------------------
|
||||
When using Train release on RHEL/CentOS/Fedora, one must select the appropriate
|
||||
virt and container-tools module streams:
|
||||
DIB_CENTOS_7_PREINSTALL_EPEL_URL_PACKAGE
|
||||
:Required: No
|
||||
:Default: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||
:Description: The environment variable is used to override default value in pre-install
|
||||
stage to install epel repository from custom source
|
||||
:Example: ``DIB_CENTOS_7_PREINSTALL_EPEL_URL_PACKAGE=http://repos.example.com/epel/epel-latest-7.noarch.rpm``
|
||||
|
||||
DIB_DNF_MODULE_STREAMS='virt:8.2 container-tools:3.0'
|
||||
|
|
|
@ -17,7 +17,7 @@ if [[ ${DISTRO_NAME} =~ (centos|rhel) && ${DIB_RELEASE} == 7 ]]; then
|
|||
# early stage.
|
||||
yum install -y python3
|
||||
# NOTE(dpawlik) The epel-release package is not available in RHEL.
|
||||
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||
yum install -y ${DIB_CENTOS_7_PREINSTALL_EPEL_URL_PACKAGE:-https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm}
|
||||
yum install -y python36-PyYAML
|
||||
yum remove -y epel-release
|
||||
elif [[ ${DISTRO_NAME} =~ (centos|rhel) && ${DIB_RELEASE} > 7 ]]; then
|
||||
|
|
Loading…
Reference in a new issue