Merge "Drop hard requirement on debootstrap and EPEL"
This commit is contained in:
commit
51f1bea437
@ -37,20 +37,8 @@ Installation
|
|||||||
Pre-install steps
|
Pre-install steps
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Installing bifrost on RHEL or CentOS requires a few extra pre-install steps,
|
|
||||||
in order to have access to the additional packages contained in the EPEL
|
|
||||||
repository. Some of the software bifrost leverages, can only be obtained from
|
|
||||||
EPEL on RHEL and CentOS systems.
|
|
||||||
|
|
||||||
.. note:: Use of EPEL repositories may result in incompatible packages
|
|
||||||
being installed by the package manager. Care should be taken
|
|
||||||
when using a system with EPEL enabled.
|
|
||||||
|
|
||||||
RHEL
|
|
||||||
----
|
|
||||||
|
|
||||||
Enable additional repositories (RHEL only)
|
Enable additional repositories (RHEL only)
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
------------------------------------------
|
||||||
|
|
||||||
The ``extras`` and ``optional`` dnf repositories must be enabled to satisfy
|
The ``extras`` and ``optional`` dnf repositories must be enabled to satisfy
|
||||||
bifrost's dependencies. To check::
|
bifrost's dependencies. To check::
|
||||||
@ -76,13 +64,19 @@ to enable them::
|
|||||||
sudo dnf config-manager --enable rhui-REGION-rhel-server-optional
|
sudo dnf config-manager --enable rhui-REGION-rhel-server-optional
|
||||||
sudo dnf config-manager --enable rhui-REGION-rhel-server-extras
|
sudo dnf config-manager --enable rhui-REGION-rhel-server-extras
|
||||||
|
|
||||||
Enable the EPEL repository
|
Enable the EPEL repository (RHEL and CentOS)
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
--------------------------------------------
|
||||||
|
|
||||||
The Extra Packages for Enterprise Linux (EPEL) are required to install some
|
Building Debian or Ubuntu based images on RHEL or CentOS requires a few extra
|
||||||
dependencies. Please refer to the
|
pre-install steps, in order to have access to the additional packages contained
|
||||||
`official wiki page <https://fedoraproject.org/wiki/EPEL>`_ to install and
|
in the EPEL repository.
|
||||||
configure them.
|
|
||||||
|
Please refer to the `official wiki page <https://fedoraproject.org/wiki/EPEL>`_
|
||||||
|
to install and configure them.
|
||||||
|
|
||||||
|
.. note:: Use of EPEL repositories may result in incompatible packages
|
||||||
|
being installed by the package manager. Care should be taken
|
||||||
|
when using a system with EPEL enabled.
|
||||||
|
|
||||||
Performing the installation
|
Performing the installation
|
||||||
===========================
|
===========================
|
||||||
|
@ -15,11 +15,6 @@
|
|||||||
---
|
---
|
||||||
- import_role:
|
- import_role:
|
||||||
name: venv_python_path
|
name: venv_python_path
|
||||||
- name: Ensure required packages are installed
|
|
||||||
package:
|
|
||||||
name: "{{ dib_host_required_packages }}"
|
|
||||||
state: present
|
|
||||||
environment: "{{ venv }}"
|
|
||||||
# If attempting to utilize a base Ubuntu image, diskimage-builder
|
# If attempting to utilize a base Ubuntu image, diskimage-builder
|
||||||
# is the recommended, and default path.
|
# is the recommended, and default path.
|
||||||
- name: "Test if image is present"
|
- name: "Test if image is present"
|
||||||
@ -150,6 +145,15 @@
|
|||||||
- name: "Build argument list"
|
- name: "Build argument list"
|
||||||
set_fact:
|
set_fact:
|
||||||
dib_arglist: "{{dib_trace_arg|default('')}} {{dib_uncompressed_arg|default('')}} {{dib_clearenv_arg|default('')}} {{dib_notmpfs_arg|default('')}} {{dib_offline_arg|default('')}} {{dib_skipbase_arg|default('')}} {{dib_arch_arg|default('')}} {{dib_imagename_arg|default('')}} {{dib_imagetype_arg|default('')}} {{dib_imagesize_arg|default('')}} {{dib_imagecache_arg|default('')}} {{dib_maxresize_arg|default('')}} {{dib_mintmpfs_arg|default('')}} {{dib_mkfsopts_arg|default('')}} {{dib_qemuopts_arg|default('')}} {{dib_rootlabel_arg|default('')}} {{dib_rdelement_arg|default('')}} {{dib_installtype_arg|default('')}} {{dib_packages_arg|default('')}} {{dib_os_element}} {{dib_elements|default('')}}"
|
dib_arglist: "{{dib_trace_arg|default('')}} {{dib_uncompressed_arg|default('')}} {{dib_clearenv_arg|default('')}} {{dib_notmpfs_arg|default('')}} {{dib_offline_arg|default('')}} {{dib_skipbase_arg|default('')}} {{dib_arch_arg|default('')}} {{dib_imagename_arg|default('')}} {{dib_imagetype_arg|default('')}} {{dib_imagesize_arg|default('')}} {{dib_imagecache_arg|default('')}} {{dib_maxresize_arg|default('')}} {{dib_mintmpfs_arg|default('')}} {{dib_mkfsopts_arg|default('')}} {{dib_qemuopts_arg|default('')}} {{dib_rootlabel_arg|default('')}} {{dib_rdelement_arg|default('')}} {{dib_installtype_arg|default('')}} {{dib_packages_arg|default('')}} {{dib_os_element}} {{dib_elements|default('')}}"
|
||||||
|
- name: Install debootstrap if building a Debian image
|
||||||
|
package:
|
||||||
|
name: debootstrap
|
||||||
|
state: present
|
||||||
|
when: >
|
||||||
|
test_image_present.stat.exists == false
|
||||||
|
and test_image_dib_present.stat.exists == false
|
||||||
|
and test_image_initramfs_present.stat.exists == false
|
||||||
|
and ("debian" in dib_os_element or "ubuntu" in dib_os_element)
|
||||||
- name: "Initiate image build"
|
- name: "Initiate image build"
|
||||||
command: disk-image-create {{dib_arglist}}
|
command: disk-image-create {{dib_arglist}}
|
||||||
environment: "{{ dib_env_vars_final | combine(bifrost_venv_env if enable_venv|bool else {}) | combine({'DIB_BLOCK_DEVICE_CONFIG': dib_partitioning} if dib_partitioning is defined and dib_partitioning|length > 0 else {}) }}"
|
environment: "{{ dib_env_vars_final | combine(bifrost_venv_env if enable_venv|bool else {}) | combine({'DIB_BLOCK_DEVICE_CONFIG': dib_partitioning} if dib_partitioning is defined and dib_partitioning|length > 0 else {}) }}"
|
||||||
|
@ -29,7 +29,6 @@ required_packages:
|
|||||||
- genisoimage
|
- genisoimage
|
||||||
- kpartx
|
- kpartx
|
||||||
- qemu-utils
|
- qemu-utils
|
||||||
- debootstrap
|
|
||||||
- uuid-runtime
|
- uuid-runtime
|
||||||
- curl
|
- curl
|
||||||
- socat
|
- socat
|
||||||
|
@ -9,7 +9,6 @@ nginx_user: nginx
|
|||||||
mysql_service_name: mariadb
|
mysql_service_name: mariadb
|
||||||
tftp_service_name: tftp
|
tftp_service_name: tftp
|
||||||
required_packages:
|
required_packages:
|
||||||
- debootstrap
|
|
||||||
- dnsmasq
|
- dnsmasq
|
||||||
- gcc
|
- gcc
|
||||||
- genisoimage
|
- genisoimage
|
||||||
|
@ -33,7 +33,6 @@ required_packages:
|
|||||||
- qemu-img
|
- qemu-img
|
||||||
- python3-libselinux
|
- python3-libselinux
|
||||||
- python3-policycoreutils
|
- python3-policycoreutils
|
||||||
- debootstrap
|
|
||||||
- gcc
|
- gcc
|
||||||
- python3-pip
|
- python3-pip
|
||||||
- socat
|
- socat
|
||||||
|
@ -35,7 +35,6 @@ required_packages:
|
|||||||
- kpartx
|
- kpartx
|
||||||
- qemu-tools
|
- qemu-tools
|
||||||
- policycoreutils-python
|
- policycoreutils-python
|
||||||
- debootstrap
|
|
||||||
- dpkg
|
- dpkg
|
||||||
- iptables
|
- iptables
|
||||||
- tar
|
- tar
|
||||||
|
@ -26,7 +26,6 @@ required_packages:
|
|||||||
- genisoimage
|
- genisoimage
|
||||||
- kpartx
|
- kpartx
|
||||||
- qemu-utils
|
- qemu-utils
|
||||||
- debootstrap
|
|
||||||
- uuid-runtime
|
- uuid-runtime
|
||||||
- curl
|
- curl
|
||||||
- dnsmasq
|
- dnsmasq
|
||||||
|
@ -70,15 +70,6 @@ case ${ID,,} in
|
|||||||
*) echo "ERROR: Supported package manager not found. Supported: apt, dnf, yum, zypper"; exit 1;;
|
*) echo "ERROR: Supported package manager not found. Supported: apt, dnf, yum, zypper"; exit 1;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# if running in OpenStack CI, then make sure epel is enabled
|
|
||||||
# since it may already be present (but disabled) on the host
|
|
||||||
if env | grep -q ^ZUUL; then
|
|
||||||
if [ "${OS_FAMILY}" == "RedHat" ]; then
|
|
||||||
${INSTALLER_CMD} dnf-utils
|
|
||||||
sudo dnf config-manager --set-enabled epel || true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
for pkg in ${CHECK_CMD_PKGS[@]}; do
|
for pkg in ${CHECK_CMD_PKGS[@]}; do
|
||||||
if ! $(${CHECK_CMD} ${PKG_MAP[$pkg]} &>/dev/null); then
|
if ! $(${CHECK_CMD} ${PKG_MAP[$pkg]} &>/dev/null); then
|
||||||
${INSTALLER_CMD} ${PKG_MAP[$pkg]}
|
${INSTALLER_CMD} ${PKG_MAP[$pkg]}
|
||||||
|
@ -44,6 +44,10 @@ CLOUD_CONFIG=""
|
|||||||
WAIT_FOR_DEPLOY=true
|
WAIT_FOR_DEPLOY=true
|
||||||
ENABLE_VENV=true
|
ENABLE_VENV=true
|
||||||
|
|
||||||
|
# Get OS information
|
||||||
|
source /etc/os-release || source /usr/lib/os-release
|
||||||
|
OS_DISTRO="$ID"
|
||||||
|
|
||||||
# Setup openstack_ci test database if run in OpenStack CI.
|
# Setup openstack_ci test database if run in OpenStack CI.
|
||||||
if [ "$ZUUL_BRANCH" != "" ]; then
|
if [ "$ZUUL_BRANCH" != "" ]; then
|
||||||
sudo mkdir -p /opt/libvirt/images
|
sudo mkdir -p /opt/libvirt/images
|
||||||
@ -83,6 +87,17 @@ elif [ ${BUILD_IMAGE} = "true" ]; then
|
|||||||
INSPECT_NODES=false
|
INSPECT_NODES=false
|
||||||
DOWNLOAD_IPA=false
|
DOWNLOAD_IPA=false
|
||||||
CREATE_IPA_IMAGE=true
|
CREATE_IPA_IMAGE=true
|
||||||
|
|
||||||
|
# if running in OpenStack CI, then make sure epel is enabled
|
||||||
|
# since it may already be present (but disabled) on the host
|
||||||
|
# we need epel for debootstrap
|
||||||
|
if env | grep -q ^ZUUL; then
|
||||||
|
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
|
||||||
|
sudo dnf install -y dnf-utils
|
||||||
|
sudo dnf install -y epel-release || true
|
||||||
|
sudo dnf config-manager --set-enabled epel || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
elif [ ${ENABLE_KEYSTONE} = "true" ]; then
|
elif [ ${ENABLE_KEYSTONE} = "true" ]; then
|
||||||
NOAUTH_MODE=false
|
NOAUTH_MODE=false
|
||||||
CLOUD_CONFIG="-e cloud_name=bifrost"
|
CLOUD_CONFIG="-e cloud_name=bifrost"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user