|
...
|
...
|
@@ -282,7 +282,7 @@ fi
|
|
282
|
282
|
# Some distros need to add repos beyond the defaults provided by the vendor
|
|
283
|
283
|
# to pick up required packages.
|
|
284
|
284
|
|
|
285
|
|
-function _install_epel_and_rdo {
|
|
|
285
|
+function _install_epel {
|
|
286
|
286
|
# NOTE: We always remove and install latest -- some environments
|
|
287
|
287
|
# use snapshot images, and if EPEL version updates they break
|
|
288
|
288
|
# unless we update them to latest version.
|
|
...
|
...
|
@@ -313,12 +313,27 @@ EOF
|
|
313
|
313
|
yum_install epel-release || \
|
|
314
|
314
|
die $LINENO "Error installing EPEL repo, cannot continue"
|
|
315
|
315
|
sudo rm -f /etc/yum.repos.d/epel-bootstrap.repo
|
|
|
316
|
+}
|
|
316
|
317
|
|
|
317
|
|
- # ... and also optional to be enabled
|
|
318
|
|
- sudo yum-config-manager --enable rhel-7-server-optional-rpms
|
|
|
318
|
+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
|
+ yum_install https://rdoproject.org/repos/rdo-release.rpm
|
|
|
332
|
+ fi
|
|
319
|
333
|
|
|
320
|
|
- # install the lastest RDO
|
|
321
|
|
- is_package_installed rdo-release || yum_install https://rdoproject.org/repos/rdo-release.rpm
|
|
|
334
|
+ # Also enable optional for RHEL7 proper. Note this is a silent
|
|
|
335
|
+ # no-op on other platforms.
|
|
|
336
|
+ sudo yum-config-manager --enable rhel-7-server-optional-rpms
|
|
322
|
337
|
|
|
323
|
338
|
if is_oraclelinux; then
|
|
324
|
339
|
sudo yum-config-manager --enable ol7_optional_latest ol7_addons ol7_MySQL56
|
|
...
|
...
|
@@ -362,20 +377,22 @@ fi
|
|
362
|
362
|
# to speed things up
|
|
363
|
363
|
SKIP_EPEL_INSTALL=$(trueorfalse False SKIP_EPEL_INSTALL)
|
|
364
|
364
|
|
|
365
|
|
-# If we have /etc/nodepool/provider assume we're on a OpenStack CI
|
|
366
|
|
-# node, where EPEL is already pointing at our internal mirror and RDO
|
|
367
|
|
-# is pre-installed.
|
|
368
|
|
-if [[ -f /etc/nodepool/provider ]]; then
|
|
369
|
|
- SKIP_EPEL_INSTALL=True
|
|
370
|
|
- if is_fedora; then
|
|
371
|
|
- # However, EPEL is not enabled by default.
|
|
|
365
|
+if [[ $DISTRO == "rhel7" ]]; then
|
|
|
366
|
+ # If we have /etc/ci/mirror_info.sh assume we're on a OpenStack CI
|
|
|
367
|
+ # node, where EPEL is installed (but disabled) and already
|
|
|
368
|
+ # pointing at our internal mirror
|
|
|
369
|
+ if [[ -f /etc/ci/mirror_info.sh ]]; then
|
|
|
370
|
+ SKIP_EPEL_INSTALL=True
|
|
372
|
371
|
sudo yum-config-manager --enable epel
|
|
373
|
372
|
fi
|
|
374
|
|
-fi
|
|
375
|
373
|
|
|
376
|
|
-if is_fedora && [[ $DISTRO == "rhel7" ]] && \
|
|
377
|
|
- [[ ${SKIP_EPEL_INSTALL} != True ]]; then
|
|
378
|
|
- _install_epel_and_rdo
|
|
|
374
|
+ if [[ ${SKIP_EPEL_INSTALL} != True ]]; then
|
|
|
375
|
+ _install_epel
|
|
|
376
|
+ fi
|
|
|
377
|
+ # Along with EPEL, CentOS (and a-likes) require some packages only
|
|
|
378
|
+ # available in RDO repositories (e.g. OVS, or later versions of
|
|
|
379
|
+ # kvm) to run.
|
|
|
380
|
+ _install_rdo
|
|
379
|
381
|
fi
|
|
380
|
382
|
|
|
381
|
383
|
# Ensure python is installed
|