From dc2dd711e682f00f43355057e7a40a935ab7f324 Mon Sep 17 00:00:00 2001 From: Carlos Goncalves Date: Sun, 8 Dec 2019 15:45:20 +0100 Subject: [PATCH] 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 --- devstack/plugin.sh | 5 +-- devstack/samples/providers.rb | 4 +- diskimage-create/README.rst | 33 ++++------------- diskimage-create/diskimage-create.sh | 8 ++-- .../contributor/guides/dev-quick-start.rst | 6 +-- elements/haproxy-octavia/pkg-map | 12 ------ .../post-install.d/20-disable-default-haproxy | 9 +---- .../pre-install.d/01-backports | 37 ------------------- elements/keepalived-octavia/pkg-map | 7 ---- .../post-install.d/11-ip6-tables | 11 ------ .../pre-install.d/00-backports | 9 ----- zuul.d/jobs.yaml | 10 ----- zuul.d/projects.yaml | 2 - 13 files changed, 18 insertions(+), 135 deletions(-) delete mode 100755 elements/haproxy-octavia/pre-install.d/01-backports delete mode 100755 elements/keepalived-octavia/post-install.d/11-ip6-tables delete mode 100755 elements/keepalived-octavia/pre-install.d/00-backports diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 6476d7f35d..98df497685 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -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 diff --git a/devstack/samples/providers.rb b/devstack/samples/providers.rb index 2e6a83fcb7..d02876f067 100644 --- a/devstack/samples/providers.rb +++ b/devstack/samples/providers.rb @@ -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 diff --git a/diskimage-create/README.rst b/diskimage-create/README.rst index 16e171acf8..fcd2b93c57 100644 --- a/diskimage-create/README.rst +++ b/diskimage-create/README.rst @@ -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** | ] - [-d **bionic**/**7** | 8 | ] + [-d **bionic**/**8** | ] [-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: /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='' REG_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="" diff --git a/diskimage-create/diskimage-create.sh b/diskimage-create/diskimage-create.sh index 9c05b1ac9f..74561ee6a0 100755 --- a/diskimage-create/diskimage-create.sh +++ b/diskimage-create/diskimage-create.sh @@ -23,7 +23,7 @@ usage() { echo " [-a i386 | **amd64** | armhf | ppc64le]" echo " [-b **haproxy** ]" echo " [-c **~/.cache/image-create** | ]" - echo " [-d **bionic**/**7** | 8 | ]" + echo " [-d **bionic**/**8** | ]" 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 diff --git a/doc/source/contributor/guides/dev-quick-start.rst b/doc/source/contributor/guides/dev-quick-start.rst index d7dc03107d..fd8bf2c404 100644 --- a/doc/source/contributor/guides/dev-quick-start.rst +++ b/doc/source/contributor/guides/dev-quick-start.rst @@ -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 `__ -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 diff --git a/elements/haproxy-octavia/pkg-map b/elements/haproxy-octavia/pkg-map index cc82cdbfc9..e7aa52f8f3 100644 --- a/elements/haproxy-octavia/pkg-map +++ b/elements/haproxy-octavia/pkg-map @@ -1,16 +1,4 @@ { - "release": { - "ubuntu": { - "trusty": { - "haproxy": "haproxy/trusty-backports" - } - }, - "centos": { - "7": { - "haproxy": "haproxy18" - } - } - }, "distro": { "ubuntu": { "haproxy": "haproxy" diff --git a/elements/haproxy-octavia/post-install.d/20-disable-default-haproxy b/elements/haproxy-octavia/post-install.d/20-disable-default-haproxy index d88ee23140..fa9a78b947 100755 --- a/elements/haproxy-octavia/post-install.d/20-disable-default-haproxy +++ b/elements/haproxy-octavia/post-install.d/20-disable-default-haproxy @@ -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 diff --git a/elements/haproxy-octavia/pre-install.d/01-backports b/elements/haproxy-octavia/pre-install.d/01-backports deleted file mode 100755 index 7c2db67408..0000000000 --- a/elements/haproxy-octavia/pre-install.d/01-backports +++ /dev/null @@ -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 < /etc/modules-load.d/ip6_tables.conf -fi diff --git a/elements/keepalived-octavia/pre-install.d/00-backports b/elements/keepalived-octavia/pre-install.d/00-backports deleted file mode 100755 index a6eb639cb3..0000000000 --- a/elements/keepalived-octavia/pre-install.d/00-backports +++ /dev/null @@ -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 diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index caa43011fc..77b79aa236 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -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 diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml index 9bc45d571f..280bd661cc 100644 --- a/zuul.d/projects.yaml +++ b/zuul.d/projects.yaml @@ -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/.*).*$