Merge "Glance: Test cinder backend"

This commit is contained in:
Zuul 2022-08-02 14:23:01 +00:00 committed by Gerrit Code Review
commit c5b37d3ad5
8 changed files with 74 additions and 20 deletions

View File

@ -49,11 +49,11 @@ scenario](#all-in-one).
| ssl | yes | yes | yes | yes | yes | yes | no |
| ipv6 | centos9 | centos9 | centos9 | centos9 | centos9 | centos9 | no |
| keystone | X | X | X | X | X | X | X |
| glance | | rbd | swift | file | swift+rgw | file | file |
| glance | | rbd | swift | file | swift+rgw | cinder | file |
| nova | | rbd | X | X | rbd | X | X |
| placement | | X | X | X | X | X | X |
| neutron | | ovs | ovs | ovn | ovs | ovn | ovs |
| cinder | | rbd | iscsi | | | | iscsi |
| cinder | | rbd | iscsi | | | iscsi | iscsi |
| ceilometer | | X | X | | | | |
| aodh | | X | X | | | | |
| designate | | | | bind | | | |

View File

@ -88,17 +88,22 @@ include openstack_integration::ceph
class { 'openstack_integration::heat':
notification_topics => $notification_topics,
}
include openstack_integration::provision
class { 'openstack_integration::provision':
# NOTE(tkajinam): Use raw format to use rbd image cloning when creating
# a volume from an image.
image_format => 'raw',
}
include openstack_integration::redis
class { 'openstack_integration::gnocchi':
integration_enable => true,
}
class { 'openstack_integration::tempest':
cinder => true,
gnocchi => true,
ceilometer => true,
aodh => true,
heat => true,
vitrage => $enable_vitrage,
cinder => true,
gnocchi => true,
ceilometer => true,
aodh => true,
heat => true,
vitrage => $enable_vitrage,
image_format => 'raw',
}

View File

@ -46,7 +46,10 @@ include openstack_integration::rabbitmq
include openstack_integration::mysql
include openstack_integration::ovn
include openstack_integration::keystone
include openstack_integration::glance
include openstack_integration::cinder
class { 'openstack_integration::glance':
backend => 'cinder',
}
class { 'openstack_integration::neutron':
driver => 'ovn',
}
@ -57,9 +60,15 @@ class { 'openstack_integration::octavia':
provider_driver => 'ovn'
}
include openstack_integration::provision
class { 'openstack_integration::provision':
# NOTE(tkajinam): Use raw format to use volume cloning when creating a volume
# from an image.
image_format => 'raw',
}
class { 'openstack_integration::tempest':
cinder => true,
octavia => true,
neutron_driver => 'ovn',
image_format => 'raw',
}

View File

@ -2,7 +2,7 @@
#
# [*backend*]
# (optional) Glance backend to use.
# Can be 'file', 'swift' or 'rbd'.
# Can be 'file', 'swift', 'rbd' or 'cinder'.
# Defaults to 'file'.
#
class openstack_integration::glance (
@ -71,6 +71,15 @@ class openstack_integration::glance (
}
$default_backend = 'swift1'
}
'cinder': {
glance::backend::multistore::cinder { 'cinder1':
cinder_store_auth_address => "${::openstack_integration::config::keystone_auth_uri}/v3",
cinder_store_project_name => 'services',
cinder_store_user_name => 'glance',
cinder_store_password => 'a_big_secret',
}
$default_backend = 'cinder1'
}
default: {
fail("Unsupported backend (${backend})")
}

View File

@ -13,10 +13,15 @@
# (optional) Define if Nova Resources needs to be created.
# Default to true.
#
# [*image_format*]
# (optional) Format of glance images to be created.
# Defaults to 'qcow2'
#
class openstack_integration::provision (
$glance = true,
$nova = true,
$neutron = true,
$glance = true,
$nova = true,
$neutron = true,
$image_format = 'qcow2',
){
include openstack_integration::config
@ -79,19 +84,21 @@ class openstack_integration::provision (
}
if $glance {
$image_path = "/tmp/openstack/image/cirros-0.5.1-x86_64-disk-${image_format}.img"
glance_image { 'cirros':
ensure => present,
container_format => 'bare',
disk_format => 'qcow2',
disk_format => $image_format,
is_public => 'yes',
source => '/tmp/openstack/image/cirros-0.5.1-x86_64-disk.img'
source => $image_path,
}
glance_image { 'cirros_alt':
ensure => present,
container_format => 'bare',
disk_format => 'qcow2',
disk_format => $image_format,
is_public => 'yes',
source => '/tmp/openstack/image/cirros-0.5.1-x86_64-disk.img'
source => $image_path,
}
Keystone_user_role['admin@openstack'] -> Glance_image<||>
}

View File

@ -130,6 +130,11 @@
# The list is known to work with the repo; this reflects extensions enabled
# in neutron gate, for the most part (minus features not configured like
# trunk, dns-integration, qos, or port_security support)
#
# [*image_format*]
# (optional) Format of glance images to be created.
# Defaults to 'qcow2'
#
class openstack_integration::tempest (
$aodh = false,
$bgpvpn = false,
@ -163,6 +168,7 @@ class openstack_integration::tempest (
$configure_networks = true,
$neutron_driver = 'openvswitch',
$neutron_api_extensions = undef,
$image_format = 'qcow2',
) {
include openstack_integration::config
@ -308,7 +314,8 @@ class openstack_integration::tempest (
image_alt_ssh_user => 'cirros',
# TODO(emilien) optimization by 1/ using Hiera to configure Glance image source
# and 2/ if running in the gate, use /home/jenkins/cache/files/ cirros image.
img_file => '/tmp/openstack/image/cirros-0.5.1-x86_64-disk.img',
img_file => "/tmp/openstack/image/cirros-0.5.1-x86_64-disk-${image_format}.img",
img_disk_format => $image_format,
compute_build_interval => 10,
ca_certificates_file => $::openstack_integration::params::ca_bundle_cert_path,
manage_tests_packages => true,

View File

@ -1,5 +1,19 @@
- hosts: all
tasks:
- name: Install the qemu-img command (CentOS/RHEL)
dnf:
name: qemu-img
become: true
when:
- ansible_os_family == 'RedHat'
- name: Install the qemu-img command (Ubuntu/Debian)
apt:
name: qemu-utils
become: true
when:
- ansible_os_family == 'Debian'
- shell:
cmd: |
set -e

View File

@ -133,6 +133,9 @@ if [ -f ~/cache/files/cirros-0.5.1-x86_64-disk.img ]; then
else
wget http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img -P $IMG_DIR
fi
ln -s $IMG_DIR/cirros-0.5.1-x86_64-disk.img $IMG_DIR/cirros-0.5.1-x86_64-disk-qcow2.img
# NOTE(tkajinam): Prepare raw format image
qemu-img convert -f qcow2 -O raw $IMG_DIR/cirros-0.5.1-x86_64-disk.img $IMG_DIR/cirros-0.5.1-x86_64-disk-raw.img
install_puppet
PUPPET_FULL_PATH=$(which puppet)