Follow up to change on testing CI on ARM

Setting the minimum needed for configuring devstack.

Related-Change: #915441
Change-Id: Ia94ebe2d2a1bd66cd03a4c833273b20ff15171f4
This commit is contained in:
cid 2024-06-24 14:59:37 +01:00
parent 0e5efe4d9b
commit 3fd1fb3518
5 changed files with 18 additions and 34 deletions

View File

@ -8,13 +8,15 @@ fi
# values are: "bios" or "uefi", defaults to "uefi". # values are: "bios" or "uefi", defaults to "uefi".
IRONIC_BOOT_MODE=${IRONIC_BOOT_MODE:-uefi} IRONIC_BOOT_MODE=${IRONIC_BOOT_MODE:-uefi}
IRONIC_HW_ARCH=${IRONIC_HW_ARCH:-x86_64}
CIRROS_VERSION_DEVSTACK=$(set +o xtrace && CIRROS_VERSION_DEVSTACK=$(set +o xtrace &&
source $TOP_DIR/stackrc && source $TOP_DIR/stackrc &&
echo $CIRROS_VERSION) echo $CIRROS_VERSION)
CIRROS_VERSION=${CIRROS_VERSION:-$CIRROS_VERSION_DEVSTACK} CIRROS_VERSION=${CIRROS_VERSION:-$CIRROS_VERSION_DEVSTACK}
IRONIC_DEFAULT_IMAGE_NAME=cirros-${CIRROS_VERSION}-x86_64-uec IRONIC_DEFAULT_IMAGE_NAME=cirros-${CIRROS_VERSION}-${IRONIC_HW_ARCH}-uec
IRONIC_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-$IRONIC_DEFAULT_IMAGE_NAME} IRONIC_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-$IRONIC_DEFAULT_IMAGE_NAME}
@ -35,13 +37,8 @@ function add_image_link {
# Do not restrict downloading image only for specific case. Download both disk and uec images. # Do not restrict downloading image only for specific case. Download both disk and uec images.
# NOTE (vdrok): Here the images are actually pre-cached by devstack, in # NOTE (vdrok): Here the images are actually pre-cached by devstack, in
# the files folder, so they won't be downloaded again. # the files folder, so they won't be downloaded again.
if [[ $IRONIC_HW_ARCH == "aarch64" ]]; then add_image_link http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${IRONIC_HW_ARCH}-uec.tar.gz
add_image_link http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-aarch64-uec.tar.gz add_image_link http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${IRONIC_HW_ARCH}-disk.img
add_image_link http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-aarch64-disk.img
else
add_image_link http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz
add_image_link http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-disk.img
fi
export IRONIC_WHOLEDISK_IMAGE_NAME=${IRONIC_WHOLEDISK_IMAGE_NAME:-${IRONIC_IMAGE_NAME/-uec/-disk}} export IRONIC_WHOLEDISK_IMAGE_NAME=${IRONIC_WHOLEDISK_IMAGE_NAME:-${IRONIC_IMAGE_NAME/-uec/-disk}}
export IRONIC_PARTITIONED_IMAGE_NAME=${IRONIC_PARTITIONED_IMAGE_NAME:-${IRONIC_IMAGE_NAME/-disk/-uec}} export IRONIC_PARTITIONED_IMAGE_NAME=${IRONIC_PARTITIONED_IMAGE_NAME:-${IRONIC_IMAGE_NAME/-disk/-uec}}

View File

@ -124,6 +124,10 @@ IRONIC_VM_EMULATOR="/usr/bin/qemu-system-${IRONIC_HW_ARCH}"
GRUB_ARCH=x64 GRUB_ARCH=x64
if [[ $IRONIC_HW_ARCH == "aarch64" ]]; then if [[ $IRONIC_HW_ARCH == "aarch64" ]]; then
GRUB_ARCH=aa64 GRUB_ARCH=aa64
# NOTE(cid): Original change was tested on virt-6.2
# 'virt' is an alias for whatever is the latest version
IRONIC_MACHINE_TYPE=virt
fi fi
# Deploy Ironic Nodes & configure n-cpu for sharding # Deploy Ironic Nodes & configure n-cpu for sharding
@ -1161,15 +1165,13 @@ function configure_redfish {
mkdir -p $(dirname $IRONIC_REDFISH_EMULATOR_CONFIG) mkdir -p $(dirname $IRONIC_REDFISH_EMULATOR_CONFIG)
fi fi
local ironic_node_arch=$IRONIC_HW_ARCH
cat - <<EOF > $IRONIC_REDFISH_EMULATOR_CONFIG cat - <<EOF > $IRONIC_REDFISH_EMULATOR_CONFIG
SUSHY_EMULATOR_BOOT_LOADER_MAP = { SUSHY_EMULATOR_BOOT_LOADER_MAP = {
'UEFI': { 'UEFI': {
'$ironic_node_arch': '$UEFI_LOADER_PATH' '$IRONIC_HW_ARCH': '$UEFI_LOADER_PATH'
}, },
'Legacy': { 'Legacy': {
'$ironic_node_arch': None '$IRONIC_HW_ARCH': None
} }
} }
SUSHY_EMULATOR_FEATURE_SET = "$IRONIC_REDFISH_EMULATOR_FEATURE_SET" SUSHY_EMULATOR_FEATURE_SET = "$IRONIC_REDFISH_EMULATOR_FEATURE_SET"
@ -3047,7 +3049,7 @@ function upload_image_if_needed {
dest="$IRONIC_DATA_DIR/$IRONIC_PARTITIONED_IMAGE_NAME.img" dest="$IRONIC_DATA_DIR/$IRONIC_PARTITIONED_IMAGE_NAME.img"
# Export some variables that the script is using. # Export some variables that the script is using.
CIRROS_ARCH=$CIRROS_ARCH CIRROS_VERSION=$CIRROS_VERSION \ CIRROS_ARCH=$IRONIC_HW_ARCH CIRROS_VERSION=$CIRROS_VERSION \
IRONIC_TTY_DEV=$IRONIC_TTY_DEV VERBOSE=$VERBOSE \ IRONIC_TTY_DEV=$IRONIC_TTY_DEV VERBOSE=$VERBOSE \
$IRONIC_SCRIPTS_DIR/cirros-partition.sh "$dest" $IRONIC_SCRIPTS_DIR/cirros-partition.sh "$dest"

View File

@ -9,7 +9,7 @@ if [[ "$VERBOSE" == True ]]; then
fi fi
CIRROS_VERSION=${CIRROS_VERSION:-0.6.1} CIRROS_VERSION=${CIRROS_VERSION:-0.6.1}
CIRROS_ARCH=${CIRROS_ARCH:-x86_64} CIRROS_ARCH=${IRONIC_HW_ARCH:-x86_64}
# TODO(dtantsur): use the image cached on infra images in the CI # TODO(dtantsur): use the image cached on infra images in the CI
DISK_URL=http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img DISK_URL=http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img
OUT=$(realpath ${1:-rootfs.img}) OUT=$(realpath ${1:-rootfs.img})

View File

@ -43,9 +43,6 @@ Create devstack/local.conf with the following content::
IRONIC_VM_SPECS_CPU=1 IRONIC_VM_SPECS_CPU=1
IRONIC_VM_VOLUME_COUNT=2 IRONIC_VM_VOLUME_COUNT=2
IRONIC_RPC_TRANSPORT=json-rpc
IRONIC_RAMDISK_TYPE=dib
# Enable hardware types and interfaces. # Enable hardware types and interfaces.
IRONIC_ENABLED_HARDWARE_TYPES=redfish IRONIC_ENABLED_HARDWARE_TYPES=redfish
IRONIC_ENABLED_MANAGEMENT_INTERFACES=redfish IRONIC_ENABLED_MANAGEMENT_INTERFACES=redfish
@ -57,10 +54,6 @@ Create devstack/local.conf with the following content::
# Specify deploy driver. This driver should be in the enabled list above. # Specify deploy driver. This driver should be in the enabled list above.
IRONIC_DEPLOY_DRIVER=redfish IRONIC_DEPLOY_DRIVER=redfish
CIRROS_VERSION=0.6.1
CIRROS_ARCH=aarch64
DEFAULT_IMAGE_NAME=cirros-0.6.1-aarch64-uec
FORCE_CONFIG_DRIVE=False FORCE_CONFIG_DRIVE=False
# aarch64 + IRONIC_BUILD_DEPLOY_RAMDISK will be a bad mix # aarch64 + IRONIC_BUILD_DEPLOY_RAMDISK will be a bad mix
@ -73,8 +66,6 @@ Create devstack/local.conf with the following content::
IRONIC_GRUB2_SHIM_FILE=https://mirror.stream.centos.org/9-stream/BaseOS/aarch64/os/EFI/BOOT/BOOTAA64.EFI IRONIC_GRUB2_SHIM_FILE=https://mirror.stream.centos.org/9-stream/BaseOS/aarch64/os/EFI/BOOT/BOOTAA64.EFI
IRONIC_GRUB2_FILE=https://mirror.stream.centos.org/9-stream/BaseOS/aarch64/os/EFI/BOOT/grubaa64.efi IRONIC_GRUB2_FILE=https://mirror.stream.centos.org/9-stream/BaseOS/aarch64/os/EFI/BOOT/grubaa64.efi
IRONIC_HW_ARCH=aarch64 IRONIC_HW_ARCH=aarch64
IRONIC_MACHINE_TYPE=virt-6.2
IRONIC_JSON_RPC_AUTH_STRATEGY='http_basic'
IRONIC_DIB_RAMDISK_OS=debian-arm64 IRONIC_DIB_RAMDISK_OS=debian-arm64
INSTALL_TEMPEST=False INSTALL_TEMPEST=False
@ -83,10 +74,11 @@ Create devstack/local.conf with the following content::
# By default, DevStack creates a 10.0.0.0/24 network for instances. # By default, DevStack creates a 10.0.0.0/24 network for instances.
# If this overlaps with the hosts network, you may adjust with the # If this overlaps with the hosts network, you may adjust with the
# following. # following.
IP_VERSION=4 #
FIXED_RANGE=10.1.0.0/20 # IP_VERSION=4
IPV4_ADDRS_SAFE_TO_USE=10.1.0.0/20 # FIXED_RANGE=10.1.0.0/20
NETWORK_GATEWAY=10.1.0.1 # IPV4_ADDRS_SAFE_TO_USE=10.1.0.0/20
# NETWORK_GATEWAY=10.1.0.1
Q_AGENT=openvswitch Q_AGENT=openvswitch
Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch

View File

@ -123,9 +123,6 @@
tempest_test_regex: BaremetalDriverDirectWholedisk tempest_test_regex: BaremetalDriverDirectWholedisk
tempest_concurrency: 2 tempest_concurrency: 2
devstack_localrc: devstack_localrc:
CIRROS_VERSION: 0.6.1
CIRROS_ARCH: aarch64
DEFAULT_IMAGE_NAME: cirros-0.6.1-aarch64-uec
FORCE_CONFIG_DRIVE: False FORCE_CONFIG_DRIVE: False
IRONIC_AGENT_IMAGE_DOWNLOAD_SOURCE: http IRONIC_AGENT_IMAGE_DOWNLOAD_SOURCE: http
IRONIC_AUTOMATED_CLEAN_ENABLED: False IRONIC_AUTOMATED_CLEAN_ENABLED: False
@ -142,11 +139,7 @@
IRONIC_GRUB2_SHIM_FILE: https://mirror.stream.centos.org/9-stream/BaseOS/aarch64/os/EFI/BOOT/BOOTAA64.EFI IRONIC_GRUB2_SHIM_FILE: https://mirror.stream.centos.org/9-stream/BaseOS/aarch64/os/EFI/BOOT/BOOTAA64.EFI
IRONIC_GRUB2_FILE: https://mirror.stream.centos.org/9-stream/BaseOS/aarch64/os/EFI/BOOT/grubaa64.efi IRONIC_GRUB2_FILE: https://mirror.stream.centos.org/9-stream/BaseOS/aarch64/os/EFI/BOOT/grubaa64.efi
IRONIC_HW_ARCH: aarch64 IRONIC_HW_ARCH: aarch64
IRONIC_MACHINE_TYPE: virt-6.2
IRONIC_JSON_RPC_AUTH_STRATEGY: 'http_basic'
IRONIC_DIB_RAMDISK_OS: debian-arm64 IRONIC_DIB_RAMDISK_OS: debian-arm64
IRONIC_RAMDISK_TYPE: dib
IRONIC_RPC_TRANSPORT: json-rpc
IRONIC_VM_SPECS_RAM: 4096 IRONIC_VM_SPECS_RAM: 4096
IRONIC_VM_SPECS_CPU: 1 IRONIC_VM_SPECS_CPU: 1
IRONIC_VM_COUNT: 1 IRONIC_VM_COUNT: 1