CentOS 8 support
This adds support for CentOS 8 Change-Id: If7ddbd6655086657db03074a27a2d47053fd88e0
This commit is contained in:
parent
1147300b9c
commit
36705b5233
19
.zuul.yaml
19
.zuul.yaml
@ -38,6 +38,16 @@
|
|||||||
nodes:
|
nodes:
|
||||||
- controller
|
- controller
|
||||||
|
|
||||||
|
- nodeset:
|
||||||
|
name: devstack-single-node-centos-8
|
||||||
|
nodes:
|
||||||
|
- name: controller
|
||||||
|
label: centos-8
|
||||||
|
groups:
|
||||||
|
- name: tempest
|
||||||
|
nodes:
|
||||||
|
- controller
|
||||||
|
|
||||||
- nodeset:
|
- nodeset:
|
||||||
name: devstack-single-node-opensuse-15
|
name: devstack-single-node-opensuse-15
|
||||||
nodes:
|
nodes:
|
||||||
@ -498,6 +508,14 @@
|
|||||||
# we often have to rush things through devstack to stabilise the gate,
|
# we often have to rush things through devstack to stabilise the gate,
|
||||||
# and these platforms don't have the round-the-clock support to avoid
|
# and these platforms don't have the round-the-clock support to avoid
|
||||||
# becoming blockers in that situation.
|
# becoming blockers in that situation.
|
||||||
|
- job:
|
||||||
|
name: devstack-platform-centos-8
|
||||||
|
parent: tempest-full-py3
|
||||||
|
description: Centos 8 platform test
|
||||||
|
nodeset: devstack-single-node-centos-8
|
||||||
|
voting: false
|
||||||
|
timeout: 9000
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: devstack-platform-opensuse-15
|
name: devstack-platform-opensuse-15
|
||||||
parent: tempest-full-py3
|
parent: tempest-full-py3
|
||||||
@ -595,6 +613,7 @@
|
|||||||
- devstack-ipv6
|
- devstack-ipv6
|
||||||
- devstack-platform-opensuse-15
|
- devstack-platform-opensuse-15
|
||||||
- devstack-platform-fedora-latest
|
- devstack-platform-fedora-latest
|
||||||
|
- devstack-platform-centos-8
|
||||||
- devstack-multinode
|
- devstack-multinode
|
||||||
- devstack-unit-tests
|
- devstack-unit-tests
|
||||||
- openstack-tox-bashate
|
- openstack-tox-bashate
|
||||||
|
85
stack.sh
85
stack.sh
@ -221,7 +221,7 @@ write_devstack_version
|
|||||||
|
|
||||||
# Warn users who aren't on an explicitly supported distro, but allow them to
|
# Warn users who aren't on an explicitly supported distro, but allow them to
|
||||||
# override check and attempt installation with ``FORCE=yes ./stack``
|
# override check and attempt installation with ``FORCE=yes ./stack``
|
||||||
if [[ ! ${DISTRO} =~ (bionic|stretch|jessie|f30|f31|opensuse-15.0|opensuse-15.1|opensuse-tumbleweed) ]]; then
|
if [[ ! ${DISTRO} =~ (bionic|stretch|jessie|f30|f31|opensuse-15.0|opensuse-15.1|opensuse-tumbleweed|rhel8) ]]; then
|
||||||
echo "WARNING: this script has not been tested on $DISTRO"
|
echo "WARNING: this script has not been tested on $DISTRO"
|
||||||
if [[ "$FORCE" != "yes" ]]; then
|
if [[ "$FORCE" != "yes" ]]; then
|
||||||
die $LINENO "If you wish to run this script anyway run with FORCE=yes"
|
die $LINENO "If you wish to run this script anyway run with FORCE=yes"
|
||||||
@ -290,67 +290,20 @@ function _install_epel {
|
|||||||
uninstall_package epel-release || true
|
uninstall_package epel-release || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# This trick installs the latest epel-release from a bootstrap
|
# epel-release is in extras repo which is enabled by default
|
||||||
# repo, then removes itself (as epel-release installed the
|
install_package epel-release
|
||||||
# "real" repo).
|
|
||||||
#
|
# RDO repos are not tested with epel and may have incompatibilities so
|
||||||
# You would think that rather than this, you could use
|
# let's limit the packages fetched from epel to the ones not in RDO repos.
|
||||||
# $releasever directly in .repo file we create below. However
|
sudo yum-config-manager --save --setopt=includepkgs=debootstrap,dpkg epel
|
||||||
# RHEL gives a $releasever of "6Server" which breaks the path;
|
|
||||||
# see https://bugzilla.redhat.com/show_bug.cgi?id=1150759
|
|
||||||
cat <<EOF | sudo tee /etc/yum.repos.d/epel-bootstrap.repo
|
|
||||||
[epel-bootstrap]
|
|
||||||
name=Bootstrap EPEL
|
|
||||||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=\$basearch
|
|
||||||
failovermethod=priority
|
|
||||||
enabled=0
|
|
||||||
gpgcheck=0
|
|
||||||
EOF
|
|
||||||
# Enable a bootstrap repo. It is removed after finishing
|
|
||||||
# the epel-release installation.
|
|
||||||
is_package_installed yum-utils || install_package yum-utils
|
|
||||||
sudo yum-config-manager --enable epel-bootstrap
|
|
||||||
yum_install epel-release || \
|
|
||||||
die $LINENO "Error installing EPEL repo, cannot continue"
|
|
||||||
sudo rm -f /etc/yum.repos.d/epel-bootstrap.repo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function _install_rdo {
|
function _install_rdo {
|
||||||
# There are multiple options for this, including using CloudSIG
|
# NOTE(ianw) 2020-04-30 : when we have future branches, we
|
||||||
# repositories (centos-release-*), trunk versions, etc. Since
|
# probably want to install the relevant branch RDO release as
|
||||||
# we're not interested in the actual openstack distributions
|
# well. But for now it's all master.
|
||||||
# (since we're using git to run!) but only peripherial packages
|
sudo dnf -y install https://rdoproject.org/repos/rdo-release.el8.rpm
|
||||||
# like kvm or ovs, this has been reliable.
|
sudo dnf -y update
|
||||||
|
|
||||||
# TODO(ianw): figure out how to best mirror -- probably use infra
|
|
||||||
# mirror RDO reverse proxy. We could either have test
|
|
||||||
# infrastructure set it up disabled like EPEL, or fiddle it here.
|
|
||||||
# Per the point above, it's a bunch of repos so starts getting a
|
|
||||||
# little messy...
|
|
||||||
if ! is_package_installed rdo-release ; then
|
|
||||||
if [[ "$TARGET_BRANCH" == "master" ]]; then
|
|
||||||
yum_install https://rdoproject.org/repos/rdo-release.rpm
|
|
||||||
else
|
|
||||||
# Get latest rdo-release-$rdo_release RPM package version
|
|
||||||
rdo_release=$(echo $TARGET_BRANCH | sed "s|stable/||g")
|
|
||||||
yum_install https://rdoproject.org/repos/openstack-$rdo_release/rdo-release-$rdo_release.rpm
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Also enable optional for RHEL7 proper. Note this is a silent
|
|
||||||
# no-op on other platforms.
|
|
||||||
sudo yum-config-manager --enable rhel-7-server-optional-rpms
|
|
||||||
|
|
||||||
# Enable the Software Collections (SCL) repository for CentOS.
|
|
||||||
# This repository includes useful software (e.g. the Go Toolset)
|
|
||||||
# which is not present in the main repository.
|
|
||||||
if [[ "$os_VENDOR" =~ (CentOS) ]]; then
|
|
||||||
yum_install centos-release-scl
|
|
||||||
fi
|
|
||||||
|
|
||||||
if is_oraclelinux; then
|
|
||||||
sudo yum-config-manager --enable ol7_optional_latest ol7_addons ol7_MySQL56
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -395,15 +348,19 @@ fi
|
|||||||
# to speed things up
|
# to speed things up
|
||||||
SKIP_EPEL_INSTALL=$(trueorfalse False SKIP_EPEL_INSTALL)
|
SKIP_EPEL_INSTALL=$(trueorfalse False SKIP_EPEL_INSTALL)
|
||||||
|
|
||||||
if [[ $DISTRO == "rhel7" ]]; then
|
if [[ $DISTRO == "rhel8" ]]; then
|
||||||
# If we have /etc/ci/mirror_info.sh assume we're on a OpenStack CI
|
# If we have /etc/ci/mirror_info.sh assume we're on a OpenStack CI
|
||||||
# node, where EPEL is installed (but disabled) and already
|
# node, where EPEL is installed (but disabled) and already
|
||||||
# pointing at our internal mirror
|
# pointing at our internal mirror
|
||||||
if [[ -f /etc/ci/mirror_info.sh ]]; then
|
if [[ -f /etc/ci/mirror_info.sh ]]; then
|
||||||
SKIP_EPEL_INSTALL=True
|
SKIP_EPEL_INSTALL=True
|
||||||
sudo yum-config-manager --enable epel
|
sudo dnf config-manager --set-enabled epel
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# PowerTools repo provides libyaml-devel required by devstack itself and
|
||||||
|
# EPEL packages assume that the PowerTools repository is enable.
|
||||||
|
sudo dnf config-manager --set-enabled PowerTools
|
||||||
|
|
||||||
if [[ ${SKIP_EPEL_INSTALL} != True ]]; then
|
if [[ ${SKIP_EPEL_INSTALL} != True ]]; then
|
||||||
_install_epel
|
_install_epel
|
||||||
fi
|
fi
|
||||||
@ -411,6 +368,12 @@ if [[ $DISTRO == "rhel7" ]]; then
|
|||||||
# available in RDO repositories (e.g. OVS, or later versions of
|
# available in RDO repositories (e.g. OVS, or later versions of
|
||||||
# kvm) to run.
|
# kvm) to run.
|
||||||
_install_rdo
|
_install_rdo
|
||||||
|
|
||||||
|
# NOTE(cgoncalves): workaround RHBZ#1154272
|
||||||
|
# dnf fails for non-privileged users when expired_repos.json doesn't exist.
|
||||||
|
# RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1154272
|
||||||
|
# Patch: https://github.com/rpm-software-management/dnf/pull/1448
|
||||||
|
echo "[]" | sudo tee /var/cache/dnf/expired_repos.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ensure python is installed
|
# Ensure python is installed
|
||||||
|
Loading…
Reference in New Issue
Block a user