Drop hard requirement on debootstrap and EPEL
EPEL is only needed for debootstrap, debootstrap is only needed when building Debian/Ubuntu images. Install it on demand and update the docs. Change-Id: I6b90c91f20b5acd198cabbb89f21a72caaf90c63
This commit is contained in:
parent
508899cc6b
commit
7e363d4318
doc/source/install
playbooks/roles
bifrost-create-dib-image/tasks
bifrost-ironic-install/defaults
scripts
@ -37,20 +37,8 @@ Installation
|
||||
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)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
------------------------------------------
|
||||
|
||||
The ``extras`` and ``optional`` dnf repositories must be enabled to satisfy
|
||||
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-extras
|
||||
|
||||
Enable the EPEL repository
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Enable the EPEL repository (RHEL and CentOS)
|
||||
--------------------------------------------
|
||||
|
||||
The Extra Packages for Enterprise Linux (EPEL) are required to install some
|
||||
dependencies. Please refer to the
|
||||
`official wiki page <https://fedoraproject.org/wiki/EPEL>`_ to install and
|
||||
configure them.
|
||||
Building Debian or Ubuntu based images 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.
|
||||
|
||||
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
|
||||
===========================
|
||||
|
@ -15,11 +15,6 @@
|
||||
---
|
||||
- import_role:
|
||||
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
|
||||
# is the recommended, and default path.
|
||||
- name: "Test if image is present"
|
||||
@ -150,6 +145,15 @@
|
||||
- name: "Build argument list"
|
||||
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('')}}"
|
||||
- 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"
|
||||
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 {}) }}"
|
||||
|
@ -29,7 +29,6 @@ required_packages:
|
||||
- genisoimage
|
||||
- kpartx
|
||||
- qemu-utils
|
||||
- debootstrap
|
||||
- uuid-runtime
|
||||
- curl
|
||||
- socat
|
||||
|
@ -9,7 +9,6 @@ nginx_user: nginx
|
||||
mysql_service_name: mariadb
|
||||
tftp_service_name: tftp
|
||||
required_packages:
|
||||
- debootstrap
|
||||
- dnsmasq
|
||||
- gcc
|
||||
- genisoimage
|
||||
|
@ -33,7 +33,6 @@ required_packages:
|
||||
- qemu-img
|
||||
- python3-libselinux
|
||||
- python3-policycoreutils
|
||||
- debootstrap
|
||||
- gcc
|
||||
- python3-pip
|
||||
- socat
|
||||
|
@ -35,7 +35,6 @@ required_packages:
|
||||
- kpartx
|
||||
- qemu-tools
|
||||
- policycoreutils-python
|
||||
- debootstrap
|
||||
- dpkg
|
||||
- iptables
|
||||
- tar
|
||||
|
@ -26,7 +26,6 @@ required_packages:
|
||||
- genisoimage
|
||||
- kpartx
|
||||
- qemu-utils
|
||||
- debootstrap
|
||||
- uuid-runtime
|
||||
- curl
|
||||
- dnsmasq
|
||||
|
@ -70,15 +70,6 @@ case ${ID,,} in
|
||||
*) echo "ERROR: Supported package manager not found. Supported: apt, dnf, yum, zypper"; exit 1;;
|
||||
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
|
||||
if ! $(${CHECK_CMD} ${PKG_MAP[$pkg]} &>/dev/null); then
|
||||
${INSTALLER_CMD} ${PKG_MAP[$pkg]}
|
||||
|
@ -44,6 +44,10 @@ CLOUD_CONFIG=""
|
||||
WAIT_FOR_DEPLOY=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.
|
||||
if [ "$ZUUL_BRANCH" != "" ]; then
|
||||
sudo mkdir -p /opt/libvirt/images
|
||||
@ -83,6 +87,17 @@ elif [ ${BUILD_IMAGE} = "true" ]; then
|
||||
INSPECT_NODES=false
|
||||
DOWNLOAD_IPA=false
|
||||
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
|
||||
NOAUTH_MODE=false
|
||||
CLOUD_CONFIG="-e cloud_name=bifrost"
|
||||
|
Loading…
x
Reference in New Issue
Block a user