Ininital func test bundle

This commit is contained in:
Nikolay Vinogradov 2022-10-20 03:11:43 +03:00
parent 5c40ba4718
commit 29fad12c79
5 changed files with 503 additions and 48 deletions

View File

@ -3,7 +3,8 @@ options:
type: string
default: "deb https://repo.infinidat.com/packages/main-stable/apt/linux-ubuntu {distrib_codename} main"
description: |
Optional configuration to support use of additional sources such as:
The APT repository with Infinidat tools. The following formats are supported
- deb http://my.archive.com/ubuntu {distrib_codename} main
- ppa:myteam/ppa
- cloud:trusty-proposed/kilo
- http://my.archive.com/ubuntu main

View File

@ -1,50 +1,426 @@
# Please refer to the OpenStack Charms Deployment Guide for more information.
# https://docs.openstack.org/project-deploy-guide/charm-deployment-guide
#
# NOTE: Please review the value for the configuration option
# `bridge-interface-mappings` for the `ovn-chassis` charm (see `data-port` variable).
# Refer to the [Open Virtual Network (OVN)](https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/app-ovn.html)
# section of the [OpenStack Charms Deployment Guide](https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/)
# for more information.
series: focal
comment:
- 'machines section to decide order of deployment. database sooner = faster'
variables:
openstack-origin: &openstack-origin distro
data-port: &data-port br-ex:ext
worker-multiplier: &worker-multiplier 0.25
osd-devices: &osd-devices /dev/sdb /dev/vdb /dev/sdc
expected-osd-count: &expected-osd-count 3
expected-mon-count: &expected-mon-count 3
ovn-channel: &ovn-channel latest/stable
openstack-channel: &openstack-channel ussuri/edge
mysql-channel: &mysql-channel 8.0/stable
machines:
'0':
constraints: mem=3072M
constraints: tags=os-nodes
'1':
constraints: tags=os-nodes
'2':
constraints: tags=os-nodes
'3':
local_overlay_enabled: false
applications:
mysql:
charm: ch:percona-cluster
channel: latest/edge
num_units: 1
to:
- '0'
keystone:
charm: ch:keystone
channel: yoga/edge
num_units: 1
options:
openstack-origin: cloud:focal-ussuri
to:
- '1'
cinder:
charm: ch:cinder
channel: yoga/edge
num_units: 1
options:
openstack-origin: cloud:focal-ussuri
to:
- '2'
cinder-infinidat:
charm: ../../cinder-infinidat.charm
# options:
rabbitmq-server:
charm: ch:rabbitmq-server
channel: latest/edge
num_units: 1
to:
- '3'
constraints: tags=os-nodes
relations:
- [ keystone:shared-db, mysql:shared-db ]
- [ cinder:shared-db, mysql:shared-db ]
- [ cinder:identity-service, keystone:identity-service ]
- [ cinder:amqp, rabbitmq-server:amqp ]
- [ cinder:storage-backend, cinder-infinidat:storage-backend ]
- - nova-compute:amqp
- rabbitmq-server:amqp
- - nova-cloud-controller:identity-service
- keystone:identity-service
- - glance:identity-service
- keystone:identity-service
- - neutron-api:identity-service
- keystone:identity-service
- - neutron-api:amqp
- rabbitmq-server:amqp
- - glance:amqp
- rabbitmq-server:amqp
- - nova-cloud-controller:image-service
- glance:image-service
- - nova-compute:image-service
- glance:image-service
- - nova-cloud-controller:cloud-compute
- nova-compute:cloud-compute
- - nova-cloud-controller:amqp
- rabbitmq-server:amqp
- - openstack-dashboard:identity-service
- keystone:identity-service
- - nova-cloud-controller:neutron-api
- neutron-api:neutron-api
- - cinder:image-service
- glance:image-service
- - cinder:amqp
- rabbitmq-server:amqp
- - cinder:identity-service
- keystone:identity-service
- - cinder:cinder-volume-service
- nova-cloud-controller:cinder-volume-service
- - cinder-ceph:storage-backend
- cinder:storage-backend
- - ceph-mon:client
- nova-compute:ceph
- - nova-compute:ceph-access
- cinder-ceph:ceph-access
- - ceph-mon:client
- cinder-ceph:ceph
- - ceph-mon:client
- glance:ceph
- - ceph-osd:mon
- ceph-mon:osd
- - ntp:juju-info
- nova-compute:juju-info
- - ceph-radosgw:mon
- ceph-mon:radosgw
- - ceph-radosgw:identity-service
- keystone:identity-service
- - placement:identity-service
- keystone:identity-service
- - placement:placement
- nova-cloud-controller:placement
- - keystone:shared-db
- keystone-mysql-router:shared-db
- - cinder:shared-db
- cinder-mysql-router:shared-db
- - glance:shared-db
- glance-mysql-router:shared-db
- - nova-cloud-controller:shared-db
- nova-mysql-router:shared-db
- - neutron-api:shared-db
- neutron-mysql-router:shared-db
- - openstack-dashboard:shared-db
- dashboard-mysql-router:shared-db
- - placement:shared-db
- placement-mysql-router:shared-db
- - vault:shared-db
- vault-mysql-router:shared-db
- - keystone-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - cinder-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - nova-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - glance-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - neutron-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - dashboard-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - placement-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - vault-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - neutron-api-plugin-ovn:neutron-plugin
- neutron-api:neutron-plugin-api-subordinate
- - ovn-central:certificates
- vault:certificates
- - ovn-central:ovsdb-cms
- neutron-api-plugin-ovn:ovsdb-cms
- - neutron-api:certificates
- vault:certificates
- - ovn-chassis:nova-compute
- nova-compute:neutron-plugin
- - ovn-chassis:certificates
- vault:certificates
- - ovn-chassis:ovsdb
- ovn-central:ovsdb
- - vault:certificates
- neutron-api-plugin-ovn:certificates
- - vault:certificates
- cinder:certificates
- - vault:certificates
- glance:certificates
- - vault:certificates
- keystone:certificates
- - vault:certificates
- nova-cloud-controller:certificates
- - vault:certificates
- openstack-dashboard:certificates
- - vault:certificates
- placement:certificates
- - vault:certificates
- ceph-radosgw:certificates
- - vault:certificates
- mysql-innodb-cluster:certificates
- - cinder
- advanced-routing
- - keystone
- advanced-routing
- - nova-compute
- advanced-routing
- - glance
- advanced-routing
- - cinder
- cinder-infinidat
- - cinder
- infinidat-tools
- - nova-compute
- infinidat-tools
applications:
advanced-routing:
charm: advanced-routing
options:
enable-advanced-routing: true
advanced-routing-config: |
[
{
"type": "route",
"net": "10.246.152.0/24",
"gateway": "172.27.104.95"
},
{
"type": "route",
"net": "10.246.156.0/24",
"gateway": "172.27.104.95"
}
]
ceph-mon:
charm: ceph-mon
channel: octopus/edge
num_units: 3
options:
expected-osd-count: *expected-osd-count
monitor-count: *expected-mon-count
source: *openstack-origin
to:
- 'lxd:0'
- 'lxd:1'
- 'lxd:2'
ceph-osd:
charm: ceph-osd
channel: octopus/edge
num_units: 3
options:
osd-devices: *osd-devices
source: *openstack-origin
to:
- '0'
- '1'
- '2'
ceph-radosgw:
charm: ceph-radosgw
channel: octopus/edge
num_units: 1
options:
source: *openstack-origin
to:
- 'lxd:3'
cinder-mysql-router:
charm: mysql-router
channel: latest/edge
cinder:
charm: cinder
channel: *openstack-channel
num_units: 1
options:
block-device: None
glance-api-version: 2
worker-multiplier: *worker-multiplier
openstack-origin: *openstack-origin
to:
- '3' # cinder can't be deployed to LXD, if iscsi is used
cinder-ceph:
charm: cinder-ceph
channel: *openstack-channel
num_units: 0
glance-mysql-router:
charm: mysql-router
channel: latest/edge
glance:
charm: glance
channel: *openstack-channel
num_units: 1
options:
worker-multiplier: *worker-multiplier
openstack-origin: *openstack-origin
to:
- 'lxd:1'
keystone-mysql-router:
charm: mysql-router
channel: latest/edge
keystone:
charm: keystone
channel: *openstack-channel
num_units: 1
options:
worker-multiplier: *worker-multiplier
openstack-origin: *openstack-origin
to:
- 'lxd:2'
neutron-mysql-router:
charm: mysql-router
channel: latest/edge
neutron-api-plugin-ovn:
charm: neutron-api-plugin-ovn
channel: *openstack-channel
neutron-api:
charm: neutron-api
channel: *openstack-channel
num_units: 1
options:
neutron-security-groups: true
flat-network-providers: physnet1
worker-multiplier: *worker-multiplier
openstack-origin: *openstack-origin
to:
- 'lxd:0'
placement-mysql-router:
charm: mysql-router
channel: latest/edge
placement:
charm: placement
channel: *openstack-channel
num_units: 1
options:
worker-multiplier: *worker-multiplier
openstack-origin: *openstack-origin
to:
- 'lxd:1'
nova-mysql-router:
charm: mysql-router
channel: latest/edge
nova-cloud-controller:
charm: nova-cloud-controller
channel: *openstack-channel
num_units: 1
options:
network-manager: Neutron
worker-multiplier: *worker-multiplier
openstack-origin: *openstack-origin
to:
- 'lxd:3'
nova-compute:
charm: nova-compute
channel: *openstack-channel
num_units: 3
options:
config-flags: default_ephemeral_format=ext4
enable-live-migration: true
enable-resize: true
migration-auth-type: ssh
openstack-origin: *openstack-origin
to:
- '0'
- '1'
- '2'
ntp:
charm: ntp
num_units: 0
dashboard-mysql-router:
charm: mysql-router
channel: latest/edge
openstack-dashboard:
charm: openstack-dashboard
channel: *openstack-channel
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- 'lxd:3'
rabbitmq-server:
charm: rabbitmq-server
channel: 3.8/stable
num_units: 1
to:
- 'lxd:1'
mysql-innodb-cluster:
charm: mysql-innodb-cluster
channel: *mysql-channel
num_units: 3
options:
enable-binlogs: true
innodb-buffer-pool-size: 8G
max-connections: 4000
wait-timeout: 3600
to:
- 'lxd:0'
- 'lxd:1'
- 'lxd:2'
ovn-central:
charm: ovn-central
channel: *ovn-channel
num_units: 3
options:
source: *openstack-origin
to:
- 'lxd:0'
- 'lxd:1'
- 'lxd:2'
ovn-chassis:
charm: ovn-chassis
channel: *ovn-channel
# Please update the `bridge-interface-mappings` to values suitable for the
# hardware used in your deployment. See the referenced documentation at the
# top of this file.
options:
ovn-bridge-mappings: physnet1:br-ex
bridge-interface-mappings: *data-port
vault-mysql-router:
#charm: cs:mysql-router-15
charm: mysql-router
channel: latest/edge
vault:
charm: vault
channel: 1.7/stable
options:
# init and unseal is done by zaza
auto-generate-root-ca-cert: false
num_units: 1
to:
- 'lxd:2'
infinidat-tools:
expose: True
charm: ../../infinidat-tools.charm
options:
install_keys: |
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)
mQENBFESDRIBCADMR7MQMbH4GdCQqfrOMt35MhBwwH4wv9kb1WRSTxa0CmuzYaBB
1nJ0nLaMAwHsEr9CytPWDpMngm/3nt+4F2hJcsOEkQkqeJ31gScJewM+AOUV3DEl
qOeXXYLcP+jUY6pPjlZpOw0p7moUQPXHn+7amVrk7cXGQ8O3B+5a5wjN86LT2hlX
DlBlV5bX/DYluiPUbvQLOknmwO53KpaeDeZc4a8iIOCYWu2ntuAMddBkTps0El5n
JJZMTf6os2ZzngWMZRMDiVJgqVRi2b+8SgFQlQy0cAmne/mpgPrRq0ZMX3DokGG5
hnIg1mF82laTxd+9qtiOxupzJqf8mncQHdaTABEBAAG0IWFwcF9yZXBvIChDb21t
ZW50KSA8bm9AZW1haWwuY29tPokBOAQTAQIAIgUCURINEgIbLwYLCQgHAwIGFQgC
CQoLBBYCAwECHgECF4AACgkQem2D/j05RYSrcggAsCc4KppV/SZX5XI/CWFXIAXw
+HaNsh2EwYKf9DhtoGbTOuwePvrPGcgFYM3Tu+m+rziPnnFl0bs0xwQyNEVQ9yDw
t465pSgmXwEHbBkoISV1e4WYtZAsnTNne9ieJ49Ob/WY4w3AkdPRK/41UP5Ct6lR
HHRXrSWJYHVq5Rh6BakRuMJyJLz/KvcJAaPkA4U6VrPD7PFtSecMTaONPjGCcomq
b7q84G5ZfeJWb742PWBTS8fJdC+Jd4y5fFdJS9fQwIo52Ff9In2QBpJt5Wdc02SI
fvQnuh37D2P8OcIfMxMfoFXpAMWjrMYc5veyQY1GXD/EOkfjjLne6qWPLfNojA==
=w5Os
-----END PGP PUBLIC KEY BLOCK-----
cinder-infinidat:
expose: True
charm: ../../cinder-infinidat.charm
options:
install_keys: |
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)
mQENBFESDRIBCADMR7MQMbH4GdCQqfrOMt35MhBwwH4wv9kb1WRSTxa0CmuzYaBB
1nJ0nLaMAwHsEr9CytPWDpMngm/3nt+4F2hJcsOEkQkqeJ31gScJewM+AOUV3DEl
qOeXXYLcP+jUY6pPjlZpOw0p7moUQPXHn+7amVrk7cXGQ8O3B+5a5wjN86LT2hlX
DlBlV5bX/DYluiPUbvQLOknmwO53KpaeDeZc4a8iIOCYWu2ntuAMddBkTps0El5n
JJZMTf6os2ZzngWMZRMDiVJgqVRi2b+8SgFQlQy0cAmne/mpgPrRq0ZMX3DokGG5
hnIg1mF82laTxd+9qtiOxupzJqf8mncQHdaTABEBAAG0IWFwcF9yZXBvIChDb21t
ZW50KSA8bm9AZW1haWwuY29tPokBOAQTAQIAIgUCURINEgIbLwYLCQgHAwIGFQgC
CQoLBBYCAwECHgECF4AACgkQem2D/j05RYSrcggAsCc4KppV/SZX5XI/CWFXIAXw
+HaNsh2EwYKf9DhtoGbTOuwePvrPGcgFYM3Tu+m+rziPnnFl0bs0xwQyNEVQ9yDw
t465pSgmXwEHbBkoISV1e4WYtZAsnTNne9ieJ49Ob/WY4w3AkdPRK/41UP5Ct6lR
HHRXrSWJYHVq5Rh6BakRuMJyJLz/KvcJAaPkA4U6VrPD7PFtSecMTaONPjGCcomq
b7q84G5ZfeJWb742PWBTS8fJdC+Jd4y5fFdJS9fQwIo52Ff9In2QBpJt5Wdc02SI
fvQnuh37D2P8OcIfMxMfoFXpAMWjrMYc5veyQY1GXD/EOkfjjLne6qWPLfNojA==
=w5Os
-----END PGP PUBLIC KEY BLOCK-----
iscsi-netspaces: iscsi
pool-name: cinder

View File

@ -0,0 +1,10 @@
applications
cinder-infinidat:
charm: ../../cinder-infinidat.charm
options:
infinibox-ip: {{ OS_INFINIBOX_IP }}
infinibox-login: {{ OS_INFINIBOX_LOGIN }}
infinibox-password: {{ OS_INFINIBOX_PASSWORD }}
# Name of the network space of type iscsi on the Infinibox
iscsi-netspaces: {{ OS_INFINIBOX_ISCSI_NETSPACE | default('iscsi') }}
pool-name: {{ OS_INFINIBOX_POOL_NAME | default('cinder') }}

View File

@ -16,15 +16,59 @@
"""Encapsulate cinder-infinidat testing."""
import zaza.charm_lifecycle.utils as lifecycle_utils
import zaza.openstack.utilities.openstack as openstack
import zaza.openstack.utilities.generic as generic
from zaza.openstack.charm_tests.cinder_backend.tests import CinderBackendTest
from zaza.openstack.charm_tests.cinder.tests import CinderTests
class CinderInfinidatTest(CinderBackendTest):
import zaza.model as zaza_model
BACKEND_NAME='cinder-infinidat'
def configure_default_volume_type():
session = openstack.get_overcloud_keystone_session()
cinder = openstack.get_cinder_session_client(session, version=3)
type_name = '__DEFAULT__'
try:
vol_type = cinder.volume_types.find(name=type_name)
vol_type.set_keys(metadata={
'volume_backend_name': BACKEND_NAME,
})
except cinder_exceptions.NotFound:
raise
class CinderInfinidatBackendTest(CinderBackendTest):
"""Encapsulate Infinidat tests."""
backend_name = 'Infinidat'
backend_name = BACKEND_NAME
expected_config_content = {
'Infinidat': {
'volume-backend-name': ['Infinidat'],
'cinder-infinidat': {
'infinidat_storage_protocol': ['iscsi'],
'volume_backend_name': [BACKEND_NAME],
'volume_driver':
['cinder.volume.drivers.infinidat.InfiniboxVolumeDriver'],
}}
def test_create_volume(self):
return super().test_create_volume()
class CinderInfinidatTest(CinderTests):
"""
Re-use most relevant existing Cinder tests,
skip tests that cover only Cinder itself
"""
def test_901_pause_resume(self):
return
def test_900_restart_on_config_change(self):
return

View File

@ -1,9 +1,33 @@
charm_name: cinder-infinidat
target_deploy_status:
vault:
workload-status: blocked
workload-status-message-prefix: Vault needs to be initialized
ovn-chassis:
workload-status: waiting
workload-status-message-prefix: "'certificates' awaiting server certificate data"
ovn-central:
workload-status: waiting
workload-status-message-prefix: "'ovsdb-peer' incomplete, 'certificates' awaiting server certificate data"
neutron-api-plugin-ovn:
workload-status: waiting
workload-status-message-prefix: "'certificates' awaiting server certificate data, 'ovsdb-cms' incomplete"
ntp:
workload-status-message-prefix: "chrony: Ready"
tests:
- tests.tests.CinderInfinidatBackendTest
- tests.tests.CinderInfinidatTest
configure:
- zaza.openstack.charm_tests.keystone.setup.add_demo_user
- zaza.openstack.charm_tests.vault.setup.auto_initialize_no_validation
- zaza.openstack.charm_tests.keystone.setup.wait_for_cacert
# Needed for volume attachment tests
- zaza.openstack.charm_tests.glance.setup.add_lts_image
- zaza.openstack.charm_tests.nova.setup.create_flavors
- zaza.openstack.charm_tests.neutron.setup.basic_overcloud_network
- zaza.openstack.charm_tests.nova.setup.manage_ssh_key
- tests.tests.configure_default_volume_type
gate_bundles:
- focal-ussuri
smoke_bundles:
- focal-ussuri