Browse Source

[ci] Use Fedora CoreOS image for devstack plugin

Story: 2007561
Task: 39478

Depends-on: https://review.opendev.org/#/c/721213/

Change-Id: I05caa60fd0180e20003f876fd439b6f421e50ff3
changes/65/721265/8
Bharat Kunwar 1 year ago
parent
commit
9fedb8fe43
  1. 6
      .zuul.yaml
  2. 10
      devstack/lib/magnum
  3. 2
      devstack/plugin.sh
  4. 6
      magnum/tests/contrib/gate_hook.sh
  5. 2
      magnum/tests/contrib/post_test_hook.sh

6
.zuul.yaml

@ -298,14 +298,14 @@
- release-notes-jobs-python3
check:
jobs:
- magnum-functional-api
- magnum-functional-api:
voting: false
- openstack-tox-cover:
voting: false
- magnum-container-build
gate:
queue: magnum
jobs:
- magnum-functional-api
jobs: []
experimental:
jobs:
- magnum-functional-dcos

10
devstack/lib/magnum

@ -280,10 +280,14 @@ function magnum_register_image {
if [ ! -z "$ubuntu" ]; then
magnum_image_property=$magnum_image_property"ubuntu"
fi
local coreos="$(echo $MAGNUM_GUEST_IMAGE_URL | grep -io "coreos" || true;)"
local coreos="$(echo $MAGNUM_GUEST_IMAGE_URL | grep -io "^coreos" || true;)"
if [ ! -z "$coreos" ]; then
magnum_image_property=$magnum_image_property"coreos"
fi
local fedora_coreos="$(echo $MAGNUM_GUEST_IMAGE_URL | grep -io "fedora-coreos" || true;)"
if [ ! -z "$fedora_coreos" ]; then
magnum_image_property=$magnum_image_property"fedora-coreos"
fi
# os_distro property for fedora ironic image
local fedora_ironic="$(echo $MAGNUM_GUEST_IMAGE_URL | grep -i "ironic" \
| grep -io "fedora" || true;)"
@ -294,7 +298,7 @@ function magnum_register_image {
# get the image name
local image_filename=$(basename "$MAGNUM_GUEST_IMAGE_URL")
local image_name=""
for extension in "tgz" "img" "qcow2" "iso" "vhd" "vhdx" "tar.gz" "img.gz" "img.bz2" "vhd.gz" "vhdx.gz"
for extension in "tgz" "img" "qcow2" "iso" "vhd" "vhdx" "tar.gz" "img.gz" "img.bz2" "vhd.gz" "vhdx.gz" "qcow2.xz"
do
if [ $(expr match "${image_filename}" ".*\.${extension}$") -ne 0 ]; then
image_name=$(basename "$image_filename" ".${extension}")
@ -302,7 +306,7 @@ function magnum_register_image {
fi
done
if [ -z ${image_name} ]; then
echo "Unknown image extension in $image_filename, supported extensions: tgz, img, qcow2, iso, vhd, vhdx, tar.gz, img.gz, img.bz2, vhd.gz, vhdx.gz"; false
echo "Unknown image extension in $image_filename, supported extensions: tgz, img, qcow2, iso, vhd, vhdx, tar.gz, img.gz, img.bz2, vhd.gz, vhdx.gz, qcow2.xz"; false
fi
openstack image set $image_name $magnum_image_property

2
devstack/plugin.sh

@ -13,7 +13,7 @@ if is_service_enabled magnum-api magnum-cond; then
echo_summary "Installing magnum"
install_magnum
MAGNUM_GUEST_IMAGE_URL=${MAGNUM_GUEST_IMAGE_URL:-"https://dl.fedoraproject.org/pub/alt/atomic/stable/Fedora-29-updates-20190820.0/AtomicHost/x86_64/images/Fedora-AtomicHost-29-20190820.0.x86_64.qcow2"}
MAGNUM_GUEST_IMAGE_URL=${MAGNUM_GUEST_IMAGE_URL:-"https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/31.20200323.3.2/x86_64/fedora-coreos-31.20200323.3.2-openstack.x86_64.qcow2.xz"}
IMAGE_URLS+=",${MAGNUM_GUEST_IMAGE_URL}"
LIBS_FROM_GIT="${LIBS_FROM_GIT},python-magnumclient"

6
magnum/tests/contrib/gate_hook.sh

@ -41,8 +41,6 @@ if [[ -e /etc/ci/mirror_info.sh ]]; then
source /etc/ci/mirror_info.sh
fi
NODEPOOL_ATOMIC_MIRROR=${NODEPOOL_FEDORA_MIRROR:-https://download.fedoraproject.org/pub/alt}
if [ "$coe" = "mesos" ]; then
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL=https://fedorapeople.org/groups/magnum/ubuntu-mesos-ocata.qcow2"
elif [ "$coe" = "k8s-coreos" ]; then
@ -88,8 +86,8 @@ elif [ "${coe}${special}" = "k8s-ironic" ]; then
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_DISK=10"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_EPHEMERAL_DISK=5"
else
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL='${NODEPOOL_ATOMIC_MIRROR}/atomic/stable/Fedora-29-updates-20190820.0/AtomicHost/x86_64/images/Fedora-AtomicHost-29-20190820.0.x86_64.qcow2'"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_IMAGE_NAME='Fedora-AtomicHost-29-20190820.0.x86_64'"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL='https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/31.20200323.3.2/x86_64/fedora-coreos-31.20200323.3.2-openstack.x86_64.qcow2.xz'"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_IMAGE_NAME='fedora-coreos-31.20200323.3.2-openstack.x86_64'"
fi
# Enable magnum plugin in the last step

2
magnum/tests/contrib/post_test_hook.sh

@ -47,7 +47,7 @@ function create_test_data {
openstack subnet set private-subnet --dns-nameserver 8.8.8.8
local container_format="ami"
else
local image_name="atomic"
local image_name="fedora-coreos"
local container_format="bare"
fi

Loading…
Cancel
Save