This adds support for CentOS 8
Change-Id: If7ddbd6655086657db03074a27a2d47053fd88e0
| ... | ... |
@@ -39,6 +39,16 @@ |
| 39 | 39 |
- controller |
| 40 | 40 |
|
| 41 | 41 |
- nodeset: |
| 42 |
+ name: devstack-single-node-centos-8 |
|
| 43 |
+ nodes: |
|
| 44 |
+ - name: controller |
|
| 45 |
+ label: centos-8 |
|
| 46 |
+ groups: |
|
| 47 |
+ - name: tempest |
|
| 48 |
+ nodes: |
|
| 49 |
+ - controller |
|
| 50 |
+ |
|
| 51 |
+- nodeset: |
|
| 42 | 52 |
name: devstack-single-node-opensuse-15 |
| 43 | 53 |
nodes: |
| 44 | 54 |
- name: controller |
| ... | ... |
@@ -499,6 +509,14 @@ |
| 499 | 499 |
# and these platforms don't have the round-the-clock support to avoid |
| 500 | 500 |
# becoming blockers in that situation. |
| 501 | 501 |
- job: |
| 502 |
+ name: devstack-platform-centos-8 |
|
| 503 |
+ parent: tempest-full-py3 |
|
| 504 |
+ description: Centos 8 platform test |
|
| 505 |
+ nodeset: devstack-single-node-centos-8 |
|
| 506 |
+ voting: false |
|
| 507 |
+ timeout: 9000 |
|
| 508 |
+ |
|
| 509 |
+- job: |
|
| 502 | 510 |
name: devstack-platform-opensuse-15 |
| 503 | 511 |
parent: tempest-full-py3 |
| 504 | 512 |
description: openSUSE 15.x platform test |
| ... | ... |
@@ -595,6 +613,7 @@ |
| 595 | 595 |
- devstack-ipv6 |
| 596 | 596 |
- devstack-platform-opensuse-15 |
| 597 | 597 |
- devstack-platform-fedora-latest |
| 598 |
+ - devstack-platform-centos-8 |
|
| 598 | 599 |
- devstack-multinode |
| 599 | 600 |
- devstack-unit-tests |
| 600 | 601 |
- openstack-tox-bashate |
| ... | ... |
@@ -221,7 +221,7 @@ write_devstack_version |
| 221 | 221 |
|
| 222 | 222 |
# Warn users who aren't on an explicitly supported distro, but allow them to |
| 223 | 223 |
# override check and attempt installation with ``FORCE=yes ./stack`` |
| 224 |
-if [[ ! ${DISTRO} =~ (bionic|stretch|jessie|f30|f31|opensuse-15.0|opensuse-15.1|opensuse-tumbleweed) ]]; then
|
|
| 224 |
+if [[ ! ${DISTRO} =~ (bionic|stretch|jessie|f30|f31|opensuse-15.0|opensuse-15.1|opensuse-tumbleweed|rhel8) ]]; then
|
|
| 225 | 225 |
echo "WARNING: this script has not been tested on $DISTRO" |
| 226 | 226 |
if [[ "$FORCE" != "yes" ]]; then |
| 227 | 227 |
die $LINENO "If you wish to run this script anyway run with FORCE=yes" |
| ... | ... |
@@ -290,67 +290,20 @@ function _install_epel {
|
| 290 | 290 |
uninstall_package epel-release || true |
| 291 | 291 |
fi |
| 292 | 292 |
|
| 293 |
- # This trick installs the latest epel-release from a bootstrap |
|
| 294 |
- # repo, then removes itself (as epel-release installed the |
|
| 295 |
- # "real" repo). |
|
| 296 |
- # |
|
| 297 |
- # You would think that rather than this, you could use |
|
| 298 |
- # $releasever directly in .repo file we create below. However |
|
| 299 |
- # RHEL gives a $releasever of "6Server" which breaks the path; |
|
| 300 |
- # see https://bugzilla.redhat.com/show_bug.cgi?id=1150759 |
|
| 301 |
- cat <<EOF | sudo tee /etc/yum.repos.d/epel-bootstrap.repo |
|
| 302 |
-[epel-bootstrap] |
|
| 303 |
-name=Bootstrap EPEL |
|
| 304 |
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=\$basearch |
|
| 305 |
-failovermethod=priority |
|
| 306 |
-enabled=0 |
|
| 307 |
-gpgcheck=0 |
|
| 308 |
-EOF |
|
| 309 |
- # Enable a bootstrap repo. It is removed after finishing |
|
| 310 |
- # the epel-release installation. |
|
| 311 |
- is_package_installed yum-utils || install_package yum-utils |
|
| 312 |
- sudo yum-config-manager --enable epel-bootstrap |
|
| 313 |
- yum_install epel-release || \ |
|
| 314 |
- die $LINENO "Error installing EPEL repo, cannot continue" |
|
| 315 |
- sudo rm -f /etc/yum.repos.d/epel-bootstrap.repo |
|
| 293 |
+ # epel-release is in extras repo which is enabled by default |
|
| 294 |
+ install_package epel-release |
|
| 295 |
+ |
|
| 296 |
+ # RDO repos are not tested with epel and may have incompatibilities so |
|
| 297 |
+ # let's limit the packages fetched from epel to the ones not in RDO repos. |
|
| 298 |
+ sudo yum-config-manager --save --setopt=includepkgs=debootstrap,dpkg epel |
|
| 316 | 299 |
} |
| 317 | 300 |
|
| 318 | 301 |
function _install_rdo {
|
| 319 |
- # There are multiple options for this, including using CloudSIG |
|
| 320 |
- # repositories (centos-release-*), trunk versions, etc. Since |
|
| 321 |
- # we're not interested in the actual openstack distributions |
|
| 322 |
- # (since we're using git to run!) but only peripherial packages |
|
| 323 |
- # like kvm or ovs, this has been reliable. |
|
| 324 |
- |
|
| 325 |
- # TODO(ianw): figure out how to best mirror -- probably use infra |
|
| 326 |
- # mirror RDO reverse proxy. We could either have test |
|
| 327 |
- # infrastructure set it up disabled like EPEL, or fiddle it here. |
|
| 328 |
- # Per the point above, it's a bunch of repos so starts getting a |
|
| 329 |
- # little messy... |
|
| 330 |
- if ! is_package_installed rdo-release ; then |
|
| 331 |
- if [[ "$TARGET_BRANCH" == "master" ]]; then |
|
| 332 |
- yum_install https://rdoproject.org/repos/rdo-release.rpm |
|
| 333 |
- else |
|
| 334 |
- # Get latest rdo-release-$rdo_release RPM package version |
|
| 335 |
- rdo_release=$(echo $TARGET_BRANCH | sed "s|stable/||g") |
|
| 336 |
- yum_install https://rdoproject.org/repos/openstack-$rdo_release/rdo-release-$rdo_release.rpm |
|
| 337 |
- fi |
|
| 338 |
- fi |
|
| 339 |
- |
|
| 340 |
- # Also enable optional for RHEL7 proper. Note this is a silent |
|
| 341 |
- # no-op on other platforms. |
|
| 342 |
- sudo yum-config-manager --enable rhel-7-server-optional-rpms |
|
| 343 |
- |
|
| 344 |
- # Enable the Software Collections (SCL) repository for CentOS. |
|
| 345 |
- # This repository includes useful software (e.g. the Go Toolset) |
|
| 346 |
- # which is not present in the main repository. |
|
| 347 |
- if [[ "$os_VENDOR" =~ (CentOS) ]]; then |
|
| 348 |
- yum_install centos-release-scl |
|
| 349 |
- fi |
|
| 350 |
- |
|
| 351 |
- if is_oraclelinux; then |
|
| 352 |
- sudo yum-config-manager --enable ol7_optional_latest ol7_addons ol7_MySQL56 |
|
| 353 |
- fi |
|
| 302 |
+ # NOTE(ianw) 2020-04-30 : when we have future branches, we |
|
| 303 |
+ # probably want to install the relevant branch RDO release as |
|
| 304 |
+ # well. But for now it's all master. |
|
| 305 |
+ sudo dnf -y install https://rdoproject.org/repos/rdo-release.el8.rpm |
|
| 306 |
+ sudo dnf -y update |
|
| 354 | 307 |
} |
| 355 | 308 |
|
| 356 | 309 |
|
| ... | ... |
@@ -395,15 +348,19 @@ fi |
| 395 | 395 |
# to speed things up |
| 396 | 396 |
SKIP_EPEL_INSTALL=$(trueorfalse False SKIP_EPEL_INSTALL) |
| 397 | 397 |
|
| 398 |
-if [[ $DISTRO == "rhel7" ]]; then |
|
| 398 |
+if [[ $DISTRO == "rhel8" ]]; then |
|
| 399 | 399 |
# If we have /etc/ci/mirror_info.sh assume we're on a OpenStack CI |
| 400 | 400 |
# node, where EPEL is installed (but disabled) and already |
| 401 | 401 |
# pointing at our internal mirror |
| 402 | 402 |
if [[ -f /etc/ci/mirror_info.sh ]]; then |
| 403 | 403 |
SKIP_EPEL_INSTALL=True |
| 404 |
- sudo yum-config-manager --enable epel |
|
| 404 |
+ sudo dnf config-manager --set-enabled epel |
|
| 405 | 405 |
fi |
| 406 | 406 |
|
| 407 |
+ # PowerTools repo provides libyaml-devel required by devstack itself and |
|
| 408 |
+ # EPEL packages assume that the PowerTools repository is enable. |
|
| 409 |
+ sudo dnf config-manager --set-enabled PowerTools |
|
| 410 |
+ |
|
| 407 | 411 |
if [[ ${SKIP_EPEL_INSTALL} != True ]]; then
|
| 408 | 412 |
_install_epel |
| 409 | 413 |
fi |
| ... | ... |
@@ -411,6 +368,12 @@ if [[ $DISTRO == "rhel7" ]]; then |
| 411 | 411 |
# available in RDO repositories (e.g. OVS, or later versions of |
| 412 | 412 |
# kvm) to run. |
| 413 | 413 |
_install_rdo |
| 414 |
+ |
|
| 415 |
+ # NOTE(cgoncalves): workaround RHBZ#1154272 |
|
| 416 |
+ # dnf fails for non-privileged users when expired_repos.json doesn't exist. |
|
| 417 |
+ # RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1154272 |
|
| 418 |
+ # Patch: https://github.com/rpm-software-management/dnf/pull/1448 |
|
| 419 |
+ echo "[]" | sudo tee /var/cache/dnf/expired_repos.json |
|
| 414 | 420 |
fi |
| 415 | 421 |
|
| 416 | 422 |
# Ensure python is installed |