diff --git a/elements/haproxy-octavia/pre-install.d/01-repositories b/elements/haproxy-octavia/pre-install.d/01-repositories new file mode 100755 index 0000000000..03ee47286d --- /dev/null +++ b/elements/haproxy-octavia/pre-install.d/01-repositories @@ -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 diff --git a/releasenotes/notes/add-haproxy2-centos-063beb304409d141.yaml b/releasenotes/notes/add-haproxy2-centos-063beb304409d141.yaml new file mode 100644 index 0000000000..6ce22700b9 --- /dev/null +++ b/releasenotes/notes/add-haproxy2-centos-063beb304409d141.yaml @@ -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.