Stop supporting CentOS 7 controllers and images

The diskimage-create.sh tool will now default to CentOS 8 when building
CentOS-based amphora images.

This patch also removes leftover references to support for Ubuntu Trusty
and Xenial.

Change-Id: I3aba59c8dd86aeeee28cc6a67af93697912fb55b
This commit is contained in:
Carlos Goncalves 2019-12-08 15:45:20 +01:00
parent bc92de786c
commit dc2dd711e6
13 changed files with 18 additions and 135 deletions

View File

@ -8,10 +8,7 @@ function octavia_install {
setup_develop $OCTAVIA_DIR
if [ $OCTAVIA_NODE == 'main' ] || [ $OCTAVIA_NODE == 'standalone' ] ; then
if ! [ "$DISABLE_AMP_IMAGE_BUILD" == 'True' ]; then
if [[ ${DISTRO} =~ "rhel7" ]]; then
# Installing qemu would bring in the default OS qemu package,
# which is too old for Pike and later releases
# See https://review.opendev.org/#/c/438325 for details
if [[ ${DISTRO} =~ (rhel|centos) ]]; then
install_package qemu-kvm
else
install_package qemu

View File

@ -5,14 +5,14 @@ VM_CPUS = ENV['VM_CPUS'] || "1"
def configure_providers(vm)
vm.provider "virtualbox" do |vb, config|
config.vm.box = "ubuntu/xenial64"
config.vm.box = "ubuntu/bionic64"
vb.gui = true
vb.memory = VM_MEMORY
vb.cpus = VM_CPUS
end
vm.provider "libvirt" do |lb, config|
config.vm.box = "celebdor/xenial64"
config.vm.box = "celebdor/bionic64"
config.vm.synced_folder './', '/vagrant', type: 'rsync'
lb.nested = true
lb.memory = VM_MEMORY

View File

@ -12,13 +12,10 @@ future release.
Prerequisites
=============
This script assumes a typical Linux environment and was developed on
Ubuntu 12.04.5 LTS.
Python pip should be installed as well as the python modules found in the
requirements.txt file.
To do so, you can use the following command on ubuntu:
To do so, you can use the following command on Ubuntu:
.. code:: bash
@ -57,7 +54,7 @@ Fedora, CentOS and Red Hat Enterprise Linux
.. code:: bash
$ sudo yum install qemu-img git e2fsprogs policycoreutils-python
$ sudo dnf install qemu-img git e2fsprogs policycoreutils-python-utils
Test Prerequisites
------------------
@ -70,8 +67,6 @@ running the tests:
$ sudo chmod 0644 /boot/vmlinuz*
Tests were run on Ubuntu 14.04.1 LTS during development.
Usage
=====
This script and associated elements will build Amphora images. Current support
@ -106,7 +101,7 @@ Command syntax:
[-a i386 | **amd64** | armhf | ppc64le ]
[-b **haproxy** ]
[-c **~/.cache/image-create** | <cache directory> ]
[-d **bionic**/**7** | 8 | <other release id> ]
[-d **bionic**/**8** | <other release id> ]
[-e]
[-f]
[-h]
@ -211,20 +206,6 @@ DIB_CLOUD_IMAGES
- Directory base URL to download the image from
- Default: depends on the distribution
For example to build a CentOS 7 amphora with Pike RPM packages:
.. code:: bash
# Get image
$ wget https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2
# Add repository
$ virt-customize -a CentOS-7-x86_64-GenericCloud.qcow2 --selinux-relabel --run-command 'yum install -y centos-release-openstack-pike'
# Point to modified image and run script
$ export DIB_LOCAL_IMAGE=/home/stack/CentOS-7-x86_64-GenericCloud.qcow2
$ ./diskimage-create.sh -p -i centos-minimal
RHEL specific variables
------------------------
Building a RHEL-based image requires:
@ -240,13 +221,13 @@ Building a RHEL-based image requires:
More details at:
<DIB_REPO_PATH>/elements/rhel-common
Here is an example with Customer Portal registration and OSP 13 repository:
Here is an example with Customer Portal registration and OSP 15 repository:
.. code:: bash
$ export DIB_LOCAL_IMAGE='/tmp/rhel-server-7.6-x86_64-kvm.qcow2'
$ export DIB_LOCAL_IMAGE='/tmp/rhel-server-8.0-x86_64-kvm.qcow2'
$ export REG_METHOD='portal' REG_REPOS='rhel-7-server-openstack-13-rpms'
$ export REG_METHOD='portal' REG_REPOS='rhel-8-server-openstack-15-rpms'
$ export REG_USER='<user>' REG_PASSWORD='<password>' REG_AUTO_ATTACH=true
@ -255,7 +236,7 @@ an OSP repository):
.. code:: bash
$ export DIB_LOCAL_IMAGE='/tmp/rhel-server-7.6-x86_64-kvm.qcow2'
$ export DIB_LOCAL_IMAGE='/tmp/rhel-server-8.1-x86_64-kvm.qcow2'
$ export REG_METHOD='satellite' REG_ACTIVATION_KEY="<activation key>"

View File

@ -23,7 +23,7 @@ usage() {
echo " [-a i386 | **amd64** | armhf | ppc64le]"
echo " [-b **haproxy** ]"
echo " [-c **~/.cache/image-create** | <cache directory> ]"
echo " [-d **bionic**/**7** | 8 | <other release id> ]"
echo " [-d **bionic**/**8** | <other release id> ]"
echo " [-e]"
echo " [-f]"
echo " [-h]"
@ -216,7 +216,7 @@ AMP_BASEOS=${AMP_BASEOS:-"ubuntu-minimal"}
if [ "$AMP_BASEOS" = "ubuntu-minimal" ]; then
export DIB_RELEASE=${AMP_DIB_RELEASE:-"bionic"}
elif [ "${AMP_BASEOS}" = "centos-minimal" ] || [ "${AMP_BASEOS}" = "rhel" ]; then
export DIB_RELEASE=${AMP_DIB_RELEASE:-"7"}
export DIB_RELEASE=${AMP_DIB_RELEASE:-"8"}
elif [ "${AMP_BASEOS}" = "fedora" ]; then
export DIB_RELEASE=${AMP_DIB_RELEASE:-"28"}
fi
@ -321,8 +321,8 @@ if [[ "$platform" = 'Ubuntu' || "$platform" =~ 'Debian' ]]; then
# Also check if we can build the BASEOS on this Ubuntu version
UBUNTU_VERSION=`lsb_release -r | awk '{print $2}'`
if [ "$AMP_BASEOS" != "ubuntu-minimal" ] && \
[ 1 -eq $(echo "$UBUNTU_VERSION < 14.04" | bc) ]; then
echo "Ubuntu minimum version 14.04 required to build $AMP_BASEOS."
[ 1 -eq $(echo "$UBUNTU_VERSION < 16.04" | bc) ]; then
echo "Ubuntu minimum version 16.04 required to build $AMP_BASEOS."
echo "Earlier versions don't support the extended attributes required."
exit 1
fi

View File

@ -28,7 +28,7 @@ tl;dr
-----
* 8GB RAM minimum
* "vmx" or "svm" in ``/proc/cpuinfo``
* Ubuntu 16.04 or later
* Ubuntu 18.04 or later
* On that host, copy and run as root:
``octavia/devstack/contrib/new-octavia-devstack.sh``
@ -57,7 +57,7 @@ For more information, see:
`Configure DevStack with KVM-based Nested Virtualization
<https://docs.openstack.org/devstack/latest/guides/devstack-with-nested-kvm.html>`__
The devstack environment we recommend should be running Ubuntu Linux 16.04 or
The devstack environment we recommend should be running Ubuntu Linux 18.04 or
later. These instructions may work for other Linux operating systems or
environments. However, most people doing development on Octavia are using
Ubuntu for their test environment, so you will probably have the easiest time
@ -66,7 +66,7 @@ getting your devstack working with that OS.
Deployment
----------
1. Deploy an Ubuntu 16.04 or later Linux host with at least 8GB of RAM. (This
1. Deploy an Ubuntu 18.04 or later Linux host with at least 8GB of RAM. (This
can be a VM, but again, make sure you have nested virtualization features
enabled in your BIOS and virtualization software.)
2. Copy ``devstack/contrib/new-octavia-devstack.sh`` from this source

View File

@ -1,16 +1,4 @@
{
"release": {
"ubuntu": {
"trusty": {
"haproxy": "haproxy/trusty-backports"
}
},
"centos": {
"7": {
"haproxy": "haproxy18"
}
}
},
"distro": {
"ubuntu": {
"haproxy": "haproxy"

View File

@ -3,11 +3,4 @@
set -eu
set -o pipefail
if [ "$DISTRO_NAME" == "ubuntu" ]; then
# Doing both here as just remove doesn't seem to work on xenial
update-rc.d haproxy disable || true
update-rc.d -f haproxy remove || true
else
chkconfig haproxy off
fi
systemctl disable haproxy

View File

@ -1,37 +0,0 @@
#!/bin/bash
# Add the Ubuntu backports archive
set -eu
set -o xtrace
if [ "$DISTRO_NAME" == "ubuntu" ] && [ "$DIB_RELEASE" == "trusty" ]; then
echo deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse > /etc/apt/sources.list.d/backports.list
elif [ "$DISTRO_NAME" == "centos" ] && [ "$DIB_RELEASE" == "7" ]; then
INCLUDEPKGS=''
case $ARCH in
x86_64|amd64)
BASEURL=http://mirror.centos.org/\$contentdir/\$releasever/paas/\$basearch/openshift-origin/
;;
ppc64le)
# For ppc64le, the CentOS PaaS sig does not currently publish a repo
# even though it does build everything for that architecture. Until
# there is an official repo, the publish buildroot can be used. One
# down-side to doing this is that the build root contains *all* of the
# CentOS-base, CentOS-extras, and CentOS-updates content. To ensure
# *only* `haproxy18` is retrieved from this repo, the explicit limit
# for that package can be used. This should be fine for now since
# haproxy18's dependencies are available outside this repo. If things
# change, the includepkgs line can be expanded as needed.
BASEURL=https://cbs.centos.org/kojifiles/repos/paas7-openshift-multiarch-el7-build/latest/\$basearch/
INCLUDEPKGS='includepkgs=haproxy*'
;;
esac
cat > /etc/yum.repos.d/CentOS-PaaS.repo <<EOF
[paas]
name=CentOS-7 - PaaS
baseurl=$BASEURL
gpgcheck=0
enabled=1
$INCLUDEPKGS
EOF
fi

View File

@ -1,11 +1,4 @@
{
"release": {
"ubuntu": {
"trusty": {
"keepalived": "keepalived/trusty-backports"
}
}
},
"distro": {
"ubuntu": {
"keepalived": "keepalived"

View File

@ -1,11 +0,0 @@
#!/bin/bash
# keepalived older than 1.3 will segfault when using IPv6 VIPs if the
# ip6_tables module is not loaded. Make sure it is loaded on releases we
# know have the older version.
set -eu
set -o xtrace
if [ "$DISTRO_NAME" == "ubuntu" ] && { [ "$DIB_RELEASE" == "trusty" ] || [ "$DIB_RELEASE" == "xenial" ]; }; then
echo ip6_tables > /etc/modules-load.d/ip6_tables.conf
fi

View File

@ -1,9 +0,0 @@
#!/bin/bash
# Add the Ubuntu backports archive
set -eu
set -o xtrace
if [ "$DISTRO_NAME" == "ubuntu" ] && [ "$DIB_RELEASE" == "trusty" ]; then
echo deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse > /etc/apt/sources.list.d/backports.list
fi

View File

@ -42,16 +42,6 @@
amphora_os: ubuntu
amphora_os_release: bionic
- job:
name: publish-openstack-octavia-amphora-image-centos7
parent: publish-openstack-octavia-amphora-image
description: |
Publish CentOS 7 based amphora image to tarballs.o.o.
vars:
amphora_os: centos
amphora_image_size: 3
amphora_os_release: 7
- job:
name: publish-openstack-octavia-amphora-image-centos8
parent: publish-openstack-octavia-amphora-image

View File

@ -71,7 +71,5 @@
jobs:
- publish-openstack-octavia-amphora-image-bionic:
branches: ^(?!stable/.*).*$
- publish-openstack-octavia-amphora-image-centos7:
branches: ^(?!stable/.*).*$
- publish-openstack-octavia-amphora-image-centos8:
branches: ^(?!stable/.*).*$