Added uec images for tempest tests
When running instances on qemu emulated images in packstack gate we usually hit https://bugs.launchpad.net/cirros/+bug/1312199 and jobs fails. This patch adds glance UEC images (AKI, ARI and AMI) when tempest deployment is enabled and configure those images in tempest config file. UEC image name an URLs can be configured with parameters: * CONFIG_PROVISION_UEC_IMAGE_NAME * CONFIG_PROVISION_UEC_IMAGE_KERNEL_URL * CONFIG_PROVISION_UEC_IMAGE_RAMDISK_URL * CONFIG_PROVISION_UEC_IMAGE_DISK_URL Change-Id: I316e34d85a2e1a2799b7cbf11e7fa3635a81887a
This commit is contained in:
parent
ac8dc735a3
commit
11b281071a
@ -1025,6 +1025,18 @@ Provisioning tempest config
|
||||
**CONFIG_RUN_TEMPEST_TESTS**
|
||||
Test suites to run, example: "smoke dashboard TelemetryAlarming". Optional, defaults to "smoke".
|
||||
|
||||
**CONFIG_PROVISION_UEC_IMAGE_NAME**
|
||||
Name of the uec image created in Glance used in tempest tests (default "cirros-uec").
|
||||
|
||||
**CONFIG_PROVISION_UEC_IMAGE_KERNEL_URL**
|
||||
URL of the kernel image copied to Glance image for uec image (defaults to a URL for a recent "cirros" uec image).
|
||||
|
||||
**CONFIG_PROVISION_UEC_IMAGE_RAMDISK_URL**
|
||||
URL of the ramdisk image copied to Glance image for uec image (defaults to a URL for a recent "cirros" uec image).
|
||||
|
||||
**CONFIG_PROVISION_UEC_IMAGE_DISK_URL**
|
||||
URL of the disk image copied to Glance image for uec image (defaults to a URL for a recent "cirros" uec image).
|
||||
|
||||
Provisioning all-in-one ovs bridge config
|
||||
-----------------------------------------
|
||||
|
||||
|
@ -36,6 +36,16 @@ DEMO_IMAGE_URL = (
|
||||
)
|
||||
DEMO_IMAGE_SSH_USER = 'cirros'
|
||||
DEMO_IMAGE_FORMAT = 'qcow2'
|
||||
UEC_IMAGE_NAME = 'cirros-uec'
|
||||
UEC_IMAGE_KERNEL_URL = (
|
||||
'http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-kernel'
|
||||
)
|
||||
UEC_IMAGE_RAMDISK_URL = (
|
||||
'http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-initramfs'
|
||||
)
|
||||
UEC_IMAGE_DISK_URL = (
|
||||
'http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img'
|
||||
)
|
||||
|
||||
|
||||
def initConfig(controller):
|
||||
@ -139,6 +149,57 @@ def initConfig(controller):
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
|
||||
{"CMD_OPTION": "provision-uec-image-name",
|
||||
"PROMPT": "Enter the name to be assigned to the uec image used for tempest",
|
||||
"OPTION_LIST": False,
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"DEFAULT_VALUE": UEC_IMAGE_NAME,
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_PROVISION_UEC_IMAGE_NAME",
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
|
||||
{"CMD_OPTION": "provision-uec-kernel-url",
|
||||
"PROMPT": ("Enter the location of a uec kernel to be loaded "
|
||||
"into Glance"),
|
||||
"OPTION_LIST": False,
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"DEFAULT_VALUE": UEC_IMAGE_KERNEL_URL,
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_PROVISION_UEC_IMAGE_KERNEL_URL",
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
|
||||
{"CMD_OPTION": "provision-uec-ramdisk-url",
|
||||
"PROMPT": ("Enter the location of a uec ramdisk to be loaded "
|
||||
"into Glance"),
|
||||
"OPTION_LIST": False,
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"DEFAULT_VALUE": UEC_IMAGE_RAMDISK_URL,
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_PROVISION_UEC_IMAGE_RAMDISK_URL",
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
|
||||
{"CMD_OPTION": "provision-uec-disk-url",
|
||||
"PROMPT": ("Enter the location of a uec disk image to be loaded "
|
||||
"into Glance"),
|
||||
"OPTION_LIST": False,
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"DEFAULT_VALUE": UEC_IMAGE_DISK_URL,
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_PROVISION_UEC_IMAGE_DISK_URL",
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
],
|
||||
|
||||
"PROVISION_TEMPEST": [
|
||||
|
@ -1,6 +1,10 @@
|
||||
$image_name = hiera('CONFIG_PROVISION_IMAGE_NAME')
|
||||
$image_source = hiera('CONFIG_PROVISION_IMAGE_URL')
|
||||
$image_format = hiera('CONFIG_PROVISION_IMAGE_FORMAT')
|
||||
$image_name = hiera('CONFIG_PROVISION_IMAGE_NAME')
|
||||
$image_source = hiera('CONFIG_PROVISION_IMAGE_URL')
|
||||
$image_format = hiera('CONFIG_PROVISION_IMAGE_FORMAT')
|
||||
$uec_image_name = hiera('CONFIG_PROVISION_UEC_IMAGE_NAME')
|
||||
$uec_image_source_kernel = hiera('CONFIG_PROVISION_UEC_IMAGE_KERNEL_URL')
|
||||
$uec_image_source_ramdisk = hiera('CONFIG_PROVISION_UEC_IMAGE_RAMDISK_URL')
|
||||
$uec_image_source_disk = hiera('CONFIG_PROVISION_UEC_IMAGE_DISK_URL')
|
||||
|
||||
glance_image { $image_name:
|
||||
ensure => present,
|
||||
@ -11,12 +15,44 @@ glance_image { $image_name:
|
||||
}
|
||||
|
||||
if str2bool(hiera('CONFIG_PROVISION_TEMPEST')) {
|
||||
$image_name_alt = "${image_name}_alt"
|
||||
glance_image { $image_name_alt:
|
||||
$image_name_alt = "${uec_image_name}_alt"
|
||||
|
||||
glance_image{"${uec_image_name}-kernel":
|
||||
ensure => present,
|
||||
is_public => 'yes',
|
||||
container_format => 'bare',
|
||||
disk_format => $image_format,
|
||||
source => $image_source,
|
||||
container_format => 'aki',
|
||||
disk_format => 'aki',
|
||||
source => $uec_image_source_kernel,
|
||||
id => '146d4a6b-ad1e-4d9f-8b08-98eae3c3dab4'
|
||||
}
|
||||
|
||||
glance_image{"${uec_image_name}-ramdisk":
|
||||
ensure => present,
|
||||
is_public => 'yes',
|
||||
container_format => 'ari',
|
||||
disk_format => 'ari',
|
||||
source => $uec_image_source_ramdisk,
|
||||
id => '0b50e2e5-1440-4654-b568-4e120ddf28c1'
|
||||
}
|
||||
|
||||
glance_image{$uec_image_name:
|
||||
ensure => present,
|
||||
is_public => 'yes',
|
||||
container_format => 'ami',
|
||||
disk_format => 'ami',
|
||||
source => $uec_image_source_disk,
|
||||
properties => { 'kernel_id' => '146d4a6b-ad1e-4d9f-8b08-98eae3c3dab4', 'ramdisk_id' => '0b50e2e5-1440-4654-b568-4e120ddf28c1' },
|
||||
require => [ Glance_image["${uec_image_name}-kernel"], Glance_image["${uec_image_name}-ramdisk"] ]
|
||||
}
|
||||
|
||||
glance_image{$image_name_alt:
|
||||
ensure => present,
|
||||
is_public => 'yes',
|
||||
container_format => 'ami',
|
||||
disk_format => 'ami',
|
||||
source => $uec_image_source_disk,
|
||||
properties => { 'kernel_id' => '146d4a6b-ad1e-4d9f-8b08-98eae3c3dab4', 'ramdisk_id' => '0b50e2e5-1440-4654-b568-4e120ddf28c1' },
|
||||
require => [ Glance_image["${uec_image_name}-kernel"], Glance_image["${uec_image_name}-ramdisk"] ]
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -25,9 +25,9 @@ $configure_images = true
|
||||
$configure_networks = true
|
||||
|
||||
# Image
|
||||
$image_name = hiera('CONFIG_PROVISION_IMAGE_NAME')
|
||||
$uec_image_name = hiera('CONFIG_PROVISION_UEC_IMAGE_NAME')
|
||||
$image_ssh_user = hiera('CONFIG_PROVISION_IMAGE_SSH_USER')
|
||||
$image_name_alt = "${image_name}_alt"
|
||||
$image_name_alt = "${uec_image_name}_alt"
|
||||
$image_alt_ssh_user = hiera('CONFIG_PROVISION_IMAGE_SSH_USER')
|
||||
$image_source = hiera('CONFIG_PROVISION_IMAGE_URL')
|
||||
$image_format = hiera('CONFIG_PROVISION_IMAGE_FORMAT')
|
||||
@ -110,7 +110,7 @@ class { '::tempest':
|
||||
identity_uri_v3 => $identity_uri_v3,
|
||||
image_alt_ssh_user => $image_alt_ssh_user,
|
||||
image_name_alt => $image_name_alt,
|
||||
image_name => $image_name,
|
||||
image_name => $uec_image_name,
|
||||
image_ssh_user => $image_ssh_user,
|
||||
log_file => $log_file,
|
||||
neutron_available => $neutron_available,
|
||||
|
13
releasenotes/notes/create-uec-image-70073744430d1538.yaml
Normal file
13
releasenotes/notes/create-uec-image-70073744430d1538.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
When tempest provisioning is enabled, three glance images
|
||||
following uec schema (AKI,ARI,AMI) are created. These
|
||||
images are used for tempest tests. This is done for issue
|
||||
in https://bugs.launchpad.net/cirros/+bug/1312199
|
||||
Image name and URLs to download images can be modified
|
||||
with parameters:
|
||||
* CONFIG_PROVISION_UEC_IMAGE_NAME
|
||||
* CONFIG_PROVISION_UEC_IMAGE_KERNEL_URL
|
||||
* CONFIG_PROVISION_UEC_IMAGE_RAMDISK_URL
|
||||
* CONFIG_PROVISION_UEC_IMAGE_DISK_URL
|
Loading…
Reference in New Issue
Block a user