Use Ubuntu minimal image as advanced guest image

Ubuntu minimal is smaller than regular cloud image.
It should works fine with less memory and boot faster than in
the gates.

Change-Id: Ie281698ecef05fd7ddf831eabd0e0121ac477709
This commit is contained in:
Slawek Kaplonski 2021-10-08 16:05:21 +02:00
parent 9736cfd594
commit 7e5923ac25
6 changed files with 31 additions and 14 deletions

View File

@ -149,6 +149,7 @@ function overridden_openstack {
function customize_image {
local image_file=$1
local top_dir=$(dirname "${NEUTRON_TEMPEST_PLUGIN_DIR}")
install_customize_image_tools
(
export TEMP_DIR DISK_FORMAT RC_DIR
if [[ "$(basename ${image_file})" == ubuntu-* ]]; then

View File

@ -6,7 +6,6 @@ source "${NEUTRON_TEMPEST_PLUGIN_DIR}/customize_image.sh"
# install_neutron_tempest_plugin
function install_neutron_tempest_plugin {
setup_dev_lib "neutron-tempest-plugin"
install_customize_image_tools
}
if [[ "$1" == "stack" ]]; then
@ -20,7 +19,7 @@ if [[ "$1" == "stack" ]]; then
test-config)
echo_summary "Configuring neutron-tempest-plugin tempest options"
configure_advanced_image
create_flavor_for_advance_image ntp_image_384M 384 4 1
create_flavor_for_advance_image $ADVANCED_INSTANCE_TYPE 256 4 1
configure_flavor_for_advanced_image
esac
fi

View File

@ -16,6 +16,13 @@
INSTALL_GUEST_PACKAGES=(
socat # used to replace nc for testing advanced network features like
# multicast
iperf3
iputils-ping
ncat
psmisc # provides killall command
python3
tcpdump
vlan
)
# Function to be executed once after chroot on guest image
@ -33,8 +40,8 @@ function customize_image {
# Install desired packages to Ubuntu guest image
(
DEBIAN_FRONTEND=noninteractive
apt-get update -y
apt-get install -y "${INSTALL_GUEST_PACKAGES[@]}"
sudo apt-get update -y
sudo apt-get install -y "${INSTALL_GUEST_PACKAGES[@]}"
)
}

View File

@ -110,9 +110,10 @@
devstack_localrc:
PHYSICAL_NETWORK: default
CIRROS_VERSION: 0.5.1
IMAGE_URLS: https://cloud-images.ubuntu.com/releases/bionic/release/ubuntu-18.04-server-cloudimg-amd64.img
ADVANCED_IMAGE_NAME: ubuntu-18.04-server-cloudimg-amd64
ADVANCED_INSTANCE_TYPE: ntp_image_384M
IMAGE_URLS: https://cloud-images.ubuntu.com/minimal/releases/focal/release/ubuntu-20.04-minimal-cloudimg-amd64.img
ADVANCED_IMAGE_NAME: ubuntu-20.04-minimal-cloudimg-amd64
ADVANCED_INSTANCE_TYPE: ntp_image_256M
ADVANCED_INSTANCE_USER: ubuntu
CUSTOMIZE_IMAGE: true
BUILD_TIMEOUT: 784
tempest_concurrency: 3 # out of 4

View File

@ -404,6 +404,14 @@
Q_ML2_TENANT_NETWORK_TYPE: geneve
Q_USE_PROVIDERNET_FOR_PUBLIC: true
PHYSICAL_NETWORK: public
# NOTE(slaweq): In the job with OVN backend we can't use Ubuntu minimal
# image because kernel in that image don't supports MULTICAST traffic
# thus multicast scenario test with IGMP snooping enabled would fail
IMAGE_URLS: https://cloud-images.ubuntu.com/releases/bionic/release/ubuntu-18.04-server-cloudimg-amd64.img
ADVANCED_IMAGE_NAME: ubuntu-18.04-server-cloudimg-amd64
ADVANCED_INSTANCE_TYPE: ntp_image_384M
ADVANCED_INSTANCE_USER: ubuntu
CUSTOMIZE_IMAGE: false
ENABLE_CHASSIS_AS_GW: true
OVN_L3_CREATE_PUBLIC_NETWORK: true
OVN_DBS_LOG_LEVEL: dbg
@ -518,10 +526,11 @@
NETWORK_API_EXTENSIONS: "{{ (network_api_extensions_common + network_api_extensions_dvr) | join(',') }}"
PHYSICAL_NETWORK: default
CIRROS_VERSION: 0.5.1
IMAGE_URLS: https://cloud-images.ubuntu.com/releases/bionic/release/ubuntu-18.04-server-cloudimg-amd64.img
ADVANCED_IMAGE_NAME: ubuntu-18.04-server-cloudimg-amd64
ADVANCED_INSTANCE_TYPE: ntp_image_384M
IMAGE_URLS: https://cloud-images.ubuntu.com/minimal/releases/focal/release/ubuntu-20.04-minimal-cloudimg-amd64.img
ADVANCED_IMAGE_NAME: ubuntu-20.04-minimal-cloudimg-amd64
ADVANCED_INSTANCE_TYPE: ntp_image_256M
ADVANCED_INSTANCE_USER: ubuntu
CUSTOMIZE_IMAGE: true
BUILD_TIMEOUT: 784
Q_AGENT: openvswitch
Q_ML2_TENANT_NETWORK_TYPE: vxlan
@ -938,9 +947,9 @@
devstack_localrc:
NETWORK_API_EXTENSIONS: "{{ (network_api_extensions_common + network_api_extensions_tempest) | join(',') }}"
DOWNLOAD_DEFAULT_IMAGES: false
IMAGE_URLS: "http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img,https://cloud-images.ubuntu.com/releases/bionic/release/ubuntu-18.04-server-cloudimg-amd64.img"
IMAGE_URLS: "http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img,https://cloud-images.ubuntu.com/minimal/releases/focal/release/ubuntu-20.04-minimal-cloudimg-amd64.img"
DEFAULT_IMAGE_NAME: cirros-0.3.4-i386-disk
ADVANCED_IMAGE_NAME: ubuntu-18.04-server-cloudimg-amd64
ADVANCED_IMAGE_NAME: ubuntu-20.04-minimal-cloudimg-amd64
BUILD_TIMEOUT: 784
Q_AGENT: openvswitch
Q_ML2_TENANT_NETWORK_TYPE: vxlan
@ -953,7 +962,7 @@
test-config:
$TEMPEST_CONFIG:
taas_plugin_options:
advanced_image_ref: ubuntu-18.04-server-cloudimg-amd64
advanced_image_ref: ubuntu-20.04-minimal-cloudimg-amd64
advanced_image_ssh_user: ubuntu
provider_physical_network: public
provider_segmentation_id: 100

View File

@ -441,7 +441,7 @@
CIRROS_VERSION: 0.5.1
IMAGE_URLS: https://cloud-images.ubuntu.com/releases/bionic/release/ubuntu-18.04-server-cloudimg-amd64.img
ADVANCED_IMAGE_NAME: ubuntu-18.04-server-cloudimg-amd64
ADVANCED_INSTANCE_TYPE: ntp_image_384M
ADVANCED_INSTANCE_TYPE: ds512M
ADVANCED_INSTANCE_USER: ubuntu
BUILD_TIMEOUT: 784
TEMPEST_PLUGINS: /opt/stack/neutron-tempest-plugin