Enable manila in integration job

... to validate basic functionality of Manila deployment in CI.

Depends-on: https://review.opendev.org/855195
Depends-on: https://review.opendev.org/855217
Depends-on: https://review.opendev.org/855719
Change-Id: Iabf85c7da0cdca1378ee52882fc6981a273441b9
This commit is contained in:
Takashi Kajinami 2022-09-02 01:40:44 +09:00
parent ab3efd68dd
commit 4f09ea96df
5 changed files with 151 additions and 0 deletions

View File

@ -54,6 +54,7 @@ scenario](#all-in-one).
| placement | | X | X | X | X | X | X |
| neutron | | ovs | ovs | ovn | ovs | ovn | ovs |
| cinder | | rbd | iscsi | | | iscsi | iscsi |
| manila | | | | | | lvm | |
| ceilometer | | X | X | | | | |
| aodh | | X | X | | | | |
| designate | | | | bind | | | |

View File

@ -60,6 +60,8 @@ class { 'openstack_integration::octavia':
provider_driver => 'ovn'
}
include openstack_integration::manila
class { 'openstack_integration::provision':
# NOTE(tkajinam): Use raw format to use volume cloning when creating a volume
# from an image.
@ -68,6 +70,7 @@ class { 'openstack_integration::provision':
class { 'openstack_integration::tempest':
cinder => true,
manila => true,
octavia => true,
neutron_driver => 'ovn',
image_format => 'raw',

130
manifests/manila.pp Normal file
View File

@ -0,0 +1,130 @@
# Configure the Manila service
#
# [*backend*]
# (optional) Manila backend to use.
# Can be 'lvm'.
# Defaults to 'lvm'.
#
# [*notification_topics*]
# (optional) AMQP topic used for OpenStack notifications
# Defaults to $::os_service_default.
#
class openstack_integration::manila (
$backend = 'lvm',
$notification_topics = $::os_service_default,
) {
include openstack_integration::config
include openstack_integration::params
openstack_integration::mq_user { 'manila':
password => 'an_even_bigger_secret',
before => Anchor['manila::service::begin'],
}
if $::openstack_integration::config::ssl {
openstack_integration::ssl_key { 'manila':
notify => Service['httpd'],
require => Package['manila'],
}
Exec['update-ca-certificates'] ~> Service['httpd']
}
include manila::client
class { 'manila::db::mysql':
charset => $::openstack_integration::params::mysql_charset,
collate => $::openstack_integration::params::mysql_collate,
password => 'manila',
}
class { 'manila::keystone::auth':
public_url => "${::openstack_integration::config::base_url}:8786/v1/%(tenant_id)s",
internal_url => "${::openstack_integration::config::base_url}:8786/v1/%(tenant_id)s",
admin_url => "${::openstack_integration::config::base_url}:8786/v1/%(tenant_id)s",
public_url_v2 => "${::openstack_integration::config::base_url}:8786/v2",
internal_url_v2 => "${::openstack_integration::config::base_url}:8786/v2",
admin_url_v2 => "${::openstack_integration::config::base_url}:8786/v2",
password => 'a_big_secret',
configure_user_v2 => false,
configure_user_role_v2 => false,
}
class { 'manila::logging':
debug => true,
}
class { 'manila::db':
database_connection => 'mysql+pymysql://manila:manila@127.0.0.1/manila?charset=utf8',
}
class { 'manila':
default_transport_url => os_transport_url({
'transport' => $::openstack_integration::config::messaging_default_proto,
'host' => $::openstack_integration::config::host,
'port' => $::openstack_integration::config::messaging_default_port,
'username' => 'manila',
'password' => 'an_even_bigger_secret',
}),
notification_transport_url => os_transport_url({
'transport' => $::openstack_integration::config::messaging_notify_proto,
'host' => $::openstack_integration::config::host,
'port' => $::openstack_integration::config::messaging_notify_port,
'username' => 'manila',
'password' => 'an_even_bigger_secret',
}),
notification_topics => $notification_topics,
notification_driver => 'messagingv2',
rabbit_use_ssl => $::openstack_integration::config::ssl,
amqp_sasl_mechanisms => 'PLAIN',
}
class { 'manila::keystone::authtoken':
password => 'a_big_secret',
user_domain_name => 'Default',
project_domain_name => 'Default',
auth_url => $::openstack_integration::config::keystone_admin_uri,
www_authenticate_uri => $::openstack_integration::config::keystone_auth_uri,
memcached_servers => $::openstack_integration::config::memcached_servers,
}
class { 'manila::api':
service_name => 'httpd',
}
include apache
class { 'manila::wsgi::apache':
bind_host => $::openstack_integration::config::host,
ssl => $::openstack_integration::config::ssl,
ssl_key => "/etc/manila/ssl/private/${::fqdn}.pem",
ssl_cert => $::openstack_integration::params::cert_path,
workers => 2,
}
class { 'manila::quota': }
class { 'manila::scheduler': }
class { 'manila::share': }
class { 'manila::backends':
enabled_share_backends => [$backend],
}
case $backend {
'lvm': {
class { 'manila::setup_test_volume':
size => '15G',
# NOTE(tkajinam): /dev/loop2 is used by cinder.
loopback_device => '/dev/loop3',
}
manila::backend::lvm { 'lvm':
lvm_share_export_ips => $::openstack_integration::config::host,
}
}
default: {
fail("Unsupported backend (${backend})")
}
}
class { 'manila::compute::nova': }
class { 'manila::network::neutron': }
class { 'manila::volume::cinder': }
class { 'manila::cron::db_purge': }
# TODO(tkajinam): This should be fixed in the RDO package
if $::osfamily == 'RedHat' {
file_line { 'manila-sudoers-privsep-helper':
path => '/etc/sudoers.d/manila',
line => 'manila ALL = (root) NOPASSWD: /usr/bin/privsep-helper *',
require => Anchor['manila::config::begin'],
notify => Anchor['manila::config::end']
}
}
}

View File

@ -68,6 +68,10 @@
# (optional) Define if Magmum needs to be tested.
# Default to false.
#
# [*manila*]
# (optional) Define if Manila needs to be tested.
# Default to false.
#
# [*mistral*]
# (optional) Define if Mistral needs to be tested.
# Default to false.
@ -139,6 +143,10 @@
# (optional) Format of glance images to be created.
# Defaults to 'qcow2'
#
# [*share_protocol*]
# (optional) Protocol used in Manila shares
# Defaults to 'NFS'
#
class openstack_integration::tempest (
$aodh = false,
$barbican = false,
@ -157,6 +165,7 @@ class openstack_integration::tempest (
$l2gw_switch = undef,
$dr = false,
$magnum = false,
$manila = false,
$mistral = false,
$murano = false,
$neutron = true,
@ -174,6 +183,7 @@ class openstack_integration::tempest (
$neutron_driver = 'openvswitch',
$neutron_api_extensions = undef,
$image_format = 'qcow2',
$share_protocol = 'NFS',
) {
include openstack_integration::config
@ -296,6 +306,7 @@ class openstack_integration::tempest (
swift_available => $swift,
ironic_available => $ironic,
zaqar_available => $zaqar,
manila_available => $manila,
mistral_available => $mistral,
vitrage_available => $vitrage,
gnocchi_available => $gnocchi,
@ -334,6 +345,9 @@ class openstack_integration::tempest (
load_balancer_observer_role => 'member',
load_balancer_global_observer_role => 'admin',
load_balancer_test_with_noop => true,
share_multitenancy_enabled => false,
share_enable_protocols => [downcase($share_protocol)],
share_capability_storage_protocol => $share_protocol,
}
if $magnum {

View File

@ -323,6 +323,9 @@ echo "octavia_tempest_plugin.tests.scenario.*standalone_CRUD" >> /tmp/openstack/
echo 'barbican_tempest_plugin.tests.scenario.test_volume_encryption.VolumeEncryptionTest' >> /tmp/openstack/tempest/test-include-list.txt
echo 'barbican_tempest_plugin.tests.scenario.test_image_signing.ImageSigningTest.test_signed_image_upload_and_boot' >> /tmp/openstack/tempest/test-include-list.txt
# Manila
echo 'manila_tempest_tests.tests.api.test_shares.SharesNFSTest.test_create_get_delete_share' >> /tmp/openstack/tempest/test-include-list.txt
if uses_debs; then
echo "mistral_tempest_tests.tests.api.v2.test_executions.ExecutionTestsV2.test_get_list_executions" > /tmp/openstack/tempest/test-exclude-list.txt
echo "telemetry_tempest_plugin.scenario.test_telemetry_integration.TestTelemetryIntegration" >> /tmp/openstack/tempest/test-exclude-list.txt