Install HAProxy 2.x in CentOS amphora images

The CentOS NFV SIG [1] maintains a RPM repository with extra and newer
packages. This includes HAProxy 2.2 as of this time of writing.

[1] https://wiki.centos.org/SpecialInterestGroup/NFV

Change-Id: I2f64a44c566f138c58ea4be53b1ff90a52012950
This commit is contained in:
Carlos Goncalves 2020-07-31 07:02:37 +00:00 committed by Adam Harwell
parent d2d5fc80f8
commit 3730d27232
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#!/bin/bash
set -eu
set -o xtrace
if [ "$DISTRO_NAME" == "centos" ]; then
dnf install -y dnf-plugins-core centos-release-nfv-common
# REVISIT(cgoncalves): replace arch if-else + GPG with release RPM once available
if [[ "$ARCH" =~ (aarch64|arm64) ]]; then
yum_arch=aarch64
elif [[ "$ARCH" =~ (ppc64le|ppc64el) ]]; then
yum_arch=ppc64le
elif [[ "$ARCH" =~ (x86_64|amd64) ]]; then
yum_arch=x86_64
else
echo "ERROR: Unsupported architecture $ARCH"
exit 1
fi
dnf config-manager --add-repo http://mirror.centos.org/centos/8/nfv/${yum_arch}/network-extras
echo gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV >> /etc/yum.repos.d/mirror.centos.org_centos_8_nfv_*_network-extras.repo
fi

View File

@ -0,0 +1,6 @@
---
features:
- |
CentOS-based amphora images will now install HAProxy version 2.2 maintained
by CentOS NFV SIG. Other supported distributions (Ubuntu Bionic, RHEL 8)
remain untouched.