Skip to content

Commit

Permalink
Merge pull request #8157 from nelljerram/bionic-use-v3.26
Browse files Browse the repository at this point in the history
Drop support for OpenStack on Ubuntu Bionic and older
  • Loading branch information
nelljerram committed Oct 31, 2023
2 parents aff1043 + d76575c commit f667450
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 262 deletions.
36 changes: 0 additions & 36 deletions .semaphore/semaphore-scheduled-builds.yml
Expand Up @@ -689,42 +689,6 @@ blocks:
commands:
- ../.semaphore/run-and-monitor ci.log make ci

- name: 'OpenStack integration (Ussuri)'
run:
when: "true or change_in(['/networking-calico/'])"
dependencies: ["Prerequisites"]
task:
agent:
machine:
type: e1-standard-4
os_image: ubuntu1804
prologue:
commands:
- cd networking-calico
jobs:
- name: 'Unit and FV tests (tox) on Ussuri'
commands:
- ../.semaphore/run-and-monitor tox.log make tox-ussuri
- name: 'Mainline ST (DevStack + Tempest) on Ussuri'
commands:
- git checkout -b devstack-test
- export LIBVIRT_TYPE=qemu
- export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/ussuri
# Use proposed fix at
# https://review.opendev.org/c/openstack/requirements/+/810859. See commit
# message for more context.
- export REQUIREMENTS_REPO=https://review.opendev.org/openstack/requirements
- export REQUIREMENTS_BRANCH=refs/changes/59/810859/1
- export NC_PLUGIN_REPO=$(dirname $(pwd))
- export NC_PLUGIN_REF=$(git rev-parse --abbrev-ref HEAD)
- TEMPEST=true DEVSTACK_BRANCH=stable/ussuri ./devstack/bootstrap.sh
epilogue:
on_fail:
commands:
- mkdir logs
- sudo journalctl > logs/journalctl.txt
- artifact push job --expire-in 1d logs

- name: 'OpenStack integration (Yoga)'
run:
when: "true or change_in(['/networking-calico/'])"
Expand Down
36 changes: 0 additions & 36 deletions .semaphore/semaphore.yml
Expand Up @@ -689,42 +689,6 @@ blocks:
commands:
- ../.semaphore/run-and-monitor ci.log make ci

- name: 'OpenStack integration (Ussuri)'
run:
when: "false or change_in(['/networking-calico/'])"
dependencies: ["Prerequisites"]
task:
agent:
machine:
type: e1-standard-4
os_image: ubuntu1804
prologue:
commands:
- cd networking-calico
jobs:
- name: 'Unit and FV tests (tox) on Ussuri'
commands:
- ../.semaphore/run-and-monitor tox.log make tox-ussuri
- name: 'Mainline ST (DevStack + Tempest) on Ussuri'
commands:
- git checkout -b devstack-test
- export LIBVIRT_TYPE=qemu
- export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/ussuri
# Use proposed fix at
# https://review.opendev.org/c/openstack/requirements/+/810859. See commit
# message for more context.
- export REQUIREMENTS_REPO=https://review.opendev.org/openstack/requirements
- export REQUIREMENTS_BRANCH=refs/changes/59/810859/1
- export NC_PLUGIN_REPO=$(dirname $(pwd))
- export NC_PLUGIN_REF=$(git rev-parse --abbrev-ref HEAD)
- TEMPEST=true DEVSTACK_BRANCH=stable/ussuri ./devstack/bootstrap.sh
epilogue:
on_fail:
commands:
- mkdir logs
- sudo journalctl > logs/journalctl.txt
- artifact push job --expire-in 1d logs

- name: 'OpenStack integration (Yoga)'
run:
when: "false or change_in(['/networking-calico/'])"
Expand Down
36 changes: 0 additions & 36 deletions .semaphore/semaphore.yml.tpl
Expand Up @@ -687,42 +687,6 @@ blocks:
commands:
- ../.semaphore/run-and-monitor ci.log make ci

- name: 'OpenStack integration (Ussuri)'
run:
when: "${FORCE_RUN} or change_in(['/networking-calico/'])"
dependencies: ["Prerequisites"]
task:
agent:
machine:
type: e1-standard-4
os_image: ubuntu1804
prologue:
commands:
- cd networking-calico
jobs:
- name: 'Unit and FV tests (tox) on Ussuri'
commands:
- ../.semaphore/run-and-monitor tox.log make tox-ussuri
- name: 'Mainline ST (DevStack + Tempest) on Ussuri'
commands:
- git checkout -b devstack-test
- export LIBVIRT_TYPE=qemu
- export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/ussuri
# Use proposed fix at
# https://review.opendev.org/c/openstack/requirements/+/810859. See commit
# message for more context.
- export REQUIREMENTS_REPO=https://review.opendev.org/openstack/requirements
- export REQUIREMENTS_BRANCH=refs/changes/59/810859/1
- export NC_PLUGIN_REPO=$(dirname $(pwd))
- export NC_PLUGIN_REF=$(git rev-parse --abbrev-ref HEAD)
- TEMPEST=true DEVSTACK_BRANCH=stable/ussuri ./devstack/bootstrap.sh
epilogue:
on_fail:
commands:
- mkdir logs
- sudo journalctl > logs/journalctl.txt
- artifact push job --expire-in 1d logs

- name: 'OpenStack integration (Yoga)'
run:
when: "${FORCE_RUN} or change_in(['/networking-calico/'])"
Expand Down
27 changes: 7 additions & 20 deletions hack/release/packaging/README.md
Expand Up @@ -57,8 +57,6 @@ Supported, optional environment variables:

- `dnsmasq`: Build dnsmasq packages.

- `nettle`: Build nettle packages (Ubuntu Xenial only).

- `pub_debs`: Publish all Debian packages.

- `pub_rpms`: Publish all RPMs.
Expand All @@ -78,9 +76,8 @@ Published column.

We build and publish packages for these platforms:

- Ubuntu 14.04 (Trusty), 16.04 (Xenial), 18.04 (Bionic)
and 20.04 (Focal). The hosting for these packages is
in PPAs at https://launchpad.net/~project-calico.
- Ubuntu 20.04 (Focal) and 22.04 (Jammy). The hosting for these
packages is in PPAs at https://launchpad.net/~project-calico.

- CentOS 7 or RHEL 7. The hosting for these packages is in RPM repos
at binaries.projectcalico.org (for example
Expand Down Expand Up @@ -110,7 +107,7 @@ The components that we package and host are:
[document](https://docs.projectcalico.org/master/getting-started/openstack/installation/ubuntu)
that the installer must do `pip install etcd3gw`.

- dnsmasq and nettle - see below.
- dnsmasq - see below.

For OpenStack and bare metal installs we don't currently need any
other Calico components.
Expand Down Expand Up @@ -148,20 +145,10 @@ releases is as follows.
- 2018-01-18 Remove limit of 67 on the number of VMs per compute node
- v2.79

To get all of these patches requires Dnsmasq v2.79 or later. Ubuntu
Bionic or later have that, but none of our other target platforms do,
so we build and host v2.79 packages for those platforms ourselves.
The source for that comes from the following tags in [our Dnsmasq
To get all of these patches requires Dnsmasq v2.79 or later. Our Ubuntu
platforms have that, but not CentOS/RHEL 7, so for CentOS/RHEL we build
and host v2.79 packages ourselves. The source for that comes from the
following tags in [our Dnsmasq
fork](https://github.com/projectcalico/calico-dnsmasq).

- For Ubuntu Trusty, `2.79test1calico1-3-trusty`.
- For Ubuntu Xenial, `2.79test1calico1-2-xenial`.
- For CentOS/RHEL 7, `rpm_2.79`.

## Nettle

The dnsmasq code that we build for Xenial has a hardcoded
package-install-time dependency on libnettle6 >= 3.3, which is
problematic because that version of libnettle is not available in
Xenial. Therefore, for Ubuntu Xenial only, we build and upload nettle
3.3 to our PPA.
16 changes: 2 additions & 14 deletions hack/release/packaging/docker-build-images/docker-bake.hcl
@@ -1,7 +1,7 @@
# docker-bake.hcl

# To use a different arch, define it in an environment variable;
# for example, `ARCH=ppc64le docker buildx bake`.
# for example, `ARCH=ppc64le docker buildx bake`.
variable "ARCH" {
default = "amd64"
}
Expand All @@ -25,7 +25,7 @@ group "default" {

# All ubuntu images
group "ubuntu" {
targets = ["trusty", "xenial", "bionic", "focal", "jammy"]
targets = ["focal", "jammy"]
}

# All centos images
Expand All @@ -34,18 +34,6 @@ group "centos" {
}

# Ubuntu builds
target "trusty" {
dockerfile = "ubuntu-trusty-build.Dockerfile.${ARCH}"
tags = ["calico-build/trusty"]
}
target "xenial" {
dockerfile = "ubuntu-xenial-build.Dockerfile.${ARCH}"
tags = ["calico-build/xenial"]
}
target "bionic" {
dockerfile = "ubuntu-bionic-build.Dockerfile.${ARCH}"
tags = ["calico-build/bionic"]
}
target "focal" {
dockerfile = "ubuntu-focal-build.Dockerfile.${ARCH}"
tags = ["calico-build/focal"]
Expand Down
Expand Up @@ -5,31 +5,11 @@
set -x # Print commands as they're run
set -e # Exit immediately if a command returns non-zero

source /etc/os-release

# Ubuntu 14.04 doesn't have UBUNTU_CODENAME in /etc/os-release
if [[ $VERSION_ID == "14.04" ]]; then
UBUNTU_CODENAME=trusty
fi

# We need to detect which Ubuntu version we're on, because trusty/xenial/bionic
# require dh-systemd, focal doesn't require it but has a transitional package,
# and jammy and later no longer have the package.
case $UBUNTU_CODENAME in
trusty|xenial|bionic)
echo "Detected release ${UBUNTU_CODENAME}, adding dh-systemd to depends"
dh_systemd_pkg=dh-systemd
;;
*)
;;
esac

apt-get -q update
DEBIAN_FRONTEND=noninteractive \
apt-get install -y -q build-essential \
devscripts \
debhelper \
"${dh_systemd_pkg}" \
dh-python \
python-all \
python-setuptools \
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

50 changes: 1 addition & 49 deletions hack/release/packaging/utils/create-update-packages.sh
Expand Up @@ -35,7 +35,7 @@ fi

# We used to have some Semaphore environment-dependent logic here, but we now
# place that in the Semaphore YAML (which is a more appropriate place for it).
: ${STEPS:=bld_images net_cal felix etcd3gw dnsmasq nettle ${pub_steps}}
: ${STEPS:=bld_images net_cal felix etcd3gw dnsmasq ${pub_steps}}

function check_bin {
which $1 > /dev/null
Expand Down Expand Up @@ -133,10 +133,6 @@ function precheck_dnsmasq {
:
}

function precheck_nettle {
:
}

function precheck_pub_debs {
# Check the PPA exists.
require_repo_name
Expand Down Expand Up @@ -247,16 +243,6 @@ function do_dnsmasq {
git clone https://github.com/projectcalico/calico-dnsmasq.git dnsmasq
cd dnsmasq

# Ubuntu Trusty
git checkout 2.79test1calico1-3-trusty
docker_run_rm calico-build/trusty dpkg-buildpackage -I -S

# Ubuntu Xenial
git checkout 2.79test1calico1-2-xenial
sed -i s/trusty/xenial/g debian/changelog
git commit -a -m "switch trusty to xenial in debian/changelog" --author="Marvin <marvin@tigera.io>"
docker_run_rm calico-build/xenial dpkg-buildpackage -I -S

# CentOS/RHEL 7
git checkout origin/rpm_2.79
docker_run_rm -e EL_VERSION=el7 calico-build/centos7 /code/hack/release/packaging/rpm/build-rpms
Expand All @@ -270,40 +256,6 @@ function do_dnsmasq {
rm -rf ${rootdir}/dnsmasq
}

function do_nettle {
# nettle-3.3 for Ubuntu Xenial - At the point checked out, the
# Dnsmasq code had this content in debian/shlibs.local:
#
# libnettle 6 libnettle6 (>= 3.3)
#
# This causes the built binary package to depend on libnettle6 >=
# 3.3, which is problematic because that version is not available
# in Xenial. So we also build and upload nettle 3.3 to our PPA.
pushd ${rootdir}
rm -rf nettle
mkdir nettle
cd nettle
wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/nettle/3.3-1/nettle_3.3-1.dsc
wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/nettle/3.3-1/nettle_3.3.orig.tar.gz
wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/nettle/3.3-1/nettle_3.3-1.debian.tar.xz
docker_run_rm calico-build/xenial dpkg-source -x nettle_3.3-1.dsc
rm -rf ../nettle-3.3
mv nettle-3.3 ../
cp -a nettle_3.3.orig.tar.gz ../
cp -a nettle_3.3.orig.tar.gz $outputDir
cd ../nettle-3.3
sed -i '1 s/unstable/xenial/' debian/changelog
docker_run_rm calico-build/xenial dpkg-buildpackage -S

# Packages are produced in rootDir/ - move them to the output dir.
find ../ -type f -name 'nettle_*-*' -exec mv '{}' $outputDir \;

popd

# Clean up nettle build files.
rm -rf ${rootdir}/nettle ${rootdir}/nettle-3.3 ${rootdir}/nettle_3.3.orig.tar.gz
}

function do_pub_debs {
# Publish Debian packages.
pushd ${rootdir}/hack/release/packaging/output
Expand Down
2 changes: 1 addition & 1 deletion hack/release/packaging/utils/make-packages.sh
Expand Up @@ -49,7 +49,7 @@ for package_type in "$@"; do
# Current time in Debian changelog format; e.g. Wed, 02
# Mar 2016 14:08:51 +0000.
timestamp=`date "+%a, %d %b %Y %H:%M:%S %z"`
for series in trusty xenial bionic focal jammy; do
for series in focal jammy; do
{
if ${release}; then
changelog_message="* ${NAME} v${version} (from Git commit ${sha})."
Expand Down

0 comments on commit f667450

Please sign in to comment.