From 3730d27232b2aa98eea7636f68a2f8d6e904ea77 Mon Sep 17 00:00:00 2001 From: Carlos Goncalves Date: Fri, 31 Jul 2020 07:02:37 +0000 Subject: [PATCH] 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 --- .../pre-install.d/01-repositories | 21 +++++++++++++++++++ .../add-haproxy2-centos-063beb304409d141.yaml | 6 ++++++ 2 files changed, 27 insertions(+) create mode 100755 elements/haproxy-octavia/pre-install.d/01-repositories create mode 100644 releasenotes/notes/add-haproxy2-centos-063beb304409d141.yaml 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.