Browse Source

Migrate charm-ceph-mon testing to Zaza

Closes-Bug: #1828424
Change-Id: Ie46129f02566f17eabbf2eb0cae217fa0e886a4f
changes/34/656634/8
Chris MacNaughton 5 months ago
parent
commit
01fb37ebee

+ 2
- 0
test-requirements.txt View File

@@ -27,3 +27,5 @@ git+https://github.com/juju/charm-helpers.git#egg=charmhelpers
27 27
 # NOTE: workaround for 14.04 pip/tox
28 28
 pytz
29 29
 pyudev  # for ceph-* charm unit tests (not mocked?)
30
+git+https://github.com/openstack-charmers/zaza.git@remove-namespaced-tests#egg=zaza;python_version>'3.4'
31
+git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack;python_version>'3.4'

+ 0
- 9
tests/README.md View File

@@ -1,9 +0,0 @@
1
-# Overview
2
-
3
-This directory provides Amulet tests to verify basic deployment functionality
4
-from the perspective of this charm, its requirements and its features, as
5
-exercised in a subset of the full OpenStack deployment test bundle topology.
6
-
7
-For full details on functional testing of OpenStack charms please refer to
8
-the [functional testing](http://docs.openstack.org/developer/charm-guide/testing.html#functional-testing)
9
-section of the OpenStack Charm Guide.

+ 0
- 835
tests/basic_deployment.py View File

@@ -1,835 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-import amulet
18
-import re
19
-import time
20
-import json
21
-
22
-import keystoneclient
23
-from keystoneclient.v3 import client as keystone_client_v3
24
-from novaclient import client as nova_client
25
-
26
-from charmhelpers.contrib.openstack.amulet.deployment import (
27
-    OpenStackAmuletDeployment
28
-)
29
-from charmhelpers.contrib.openstack.amulet.utils import (  # noqa
30
-    OpenStackAmuletUtils,
31
-    DEBUG,
32
-    # ERROR
33
-    )
34
-
35
-# Use DEBUG to turn on debug logging
36
-u = OpenStackAmuletUtils(DEBUG)
37
-
38
-
39
-class CephBasicDeployment(OpenStackAmuletDeployment):
40
-    """Amulet tests on a basic ceph deployment."""
41
-
42
-    def __init__(self, series=None, openstack=None, source=None, stable=False):
43
-        """Deploy the entire test environment."""
44
-        super(CephBasicDeployment, self).__init__(series, openstack, source,
45
-                                                  stable)
46
-        self._add_services()
47
-        self._add_relations()
48
-        self._configure_services()
49
-        self._deploy()
50
-
51
-        u.log.info('Waiting on extended status checks...')
52
-        exclude_services = []
53
-
54
-        # Wait for deployment ready msgs, except exclusions
55
-        self._auto_wait_for_status(exclude_services=exclude_services)
56
-
57
-        self.d.sentry.wait()
58
-        self._initialize_tests()
59
-
60
-    def _add_services(self):
61
-        """Add services
62
-
63
-           Add the services that we're testing, where ceph is local,
64
-           and the rest of the service are from lp branches that are
65
-           compatible with the local charm (e.g. stable or next).
66
-           """
67
-        this_service = {'name': 'ceph-mon', 'units': 3}
68
-        other_services = [
69
-            {'name': 'percona-cluster'},
70
-            {'name': 'keystone'},
71
-            {'name': 'ceph-osd',
72
-             'units': 3,
73
-             'storage': {'osd-devices': 'cinder,10G'}},
74
-            {'name': 'rabbitmq-server'},
75
-            {'name': 'nova-compute'},
76
-            {'name': 'glance'},
77
-            {'name': 'cinder'},
78
-            {'name': 'cinder-ceph'},
79
-            {'name': 'nova-cloud-controller'},
80
-        ]
81
-        super(CephBasicDeployment, self)._add_services(this_service,
82
-                                                       other_services)
83
-
84
-    def _add_relations(self):
85
-        """Add all of the relations for the services."""
86
-        relations = {
87
-            'nova-compute:amqp': 'rabbitmq-server:amqp',
88
-            'nova-compute:image-service': 'glance:image-service',
89
-            'nova-compute:ceph': 'ceph-mon:client',
90
-            'keystone:shared-db': 'percona-cluster:shared-db',
91
-            'glance:shared-db': 'percona-cluster:shared-db',
92
-            'glance:identity-service': 'keystone:identity-service',
93
-            'glance:amqp': 'rabbitmq-server:amqp',
94
-            'glance:ceph': 'ceph-mon:client',
95
-            'cinder:shared-db': 'percona-cluster:shared-db',
96
-            'cinder:identity-service': 'keystone:identity-service',
97
-            'cinder:amqp': 'rabbitmq-server:amqp',
98
-            'cinder:image-service': 'glance:image-service',
99
-            'cinder-ceph:storage-backend': 'cinder:storage-backend',
100
-            'cinder-ceph:ceph': 'ceph-mon:client',
101
-            'ceph-osd:mon': 'ceph-mon:osd',
102
-            'nova-cloud-controller:shared-db': 'percona-cluster:shared-db',
103
-            'nova-cloud-controller:amqp': 'rabbitmq-server:amqp',
104
-            'nova-cloud-controller:identity-service': 'keystone:'
105
-                                                      'identity-service',
106
-            'nova-cloud-controller:cloud-compute': 'nova-compute:'
107
-                                                   'cloud-compute',
108
-            'nova-cloud-controller:image-service': 'glance:image-service',
109
-        }
110
-        super(CephBasicDeployment, self)._add_relations(relations)
111
-
112
-    def _configure_services(self):
113
-        """Configure all of the services."""
114
-        keystone_config = {'admin-password': 'openstack',
115
-                           'admin-token': 'ubuntutesting'}
116
-        cinder_config = {'block-device': 'None', 'glance-api-version': '2'}
117
-
118
-        pxc_config = {
119
-            'max-connections': 1000,
120
-        }
121
-
122
-        # Include a non-existent device as osd-devices is a whitelist,
123
-        # and this will catch cases where proposals attempt to change that.
124
-        ceph_config = {
125
-            'monitor-count': '3',
126
-            'auth-supported': 'none',
127
-        }
128
-
129
-        ceph_osd_config = {
130
-            'osd-devices': '/srv/ceph /dev/test-non-existent',
131
-        }
132
-        configs = {'keystone': keystone_config,
133
-                   'percona-cluster': pxc_config,
134
-                   'cinder': cinder_config,
135
-                   'ceph-mon': ceph_config,
136
-                   'ceph-osd': ceph_osd_config,
137
-                   }
138
-        super(CephBasicDeployment, self)._configure_services(configs)
139
-
140
-    def _initialize_tests(self):
141
-        """Perform final initialization before tests get run."""
142
-        # Access the sentries for inspecting service units
143
-        self.pxc_sentry = self.d.sentry['percona-cluster'][0]
144
-        self.keystone_sentry = self.d.sentry['keystone'][0]
145
-        self.rabbitmq_sentry = self.d.sentry['rabbitmq-server'][0]
146
-        self.nova_sentry = self.d.sentry['nova-compute'][0]
147
-        self.glance_sentry = self.d.sentry['glance'][0]
148
-        self.cinder_sentry = self.d.sentry['cinder'][0]
149
-        self.cinder_ceph_sentry = self.d.sentry['cinder-ceph'][0]
150
-        self.ceph_osd_sentry = self.d.sentry['ceph-osd'][0]
151
-        self.ceph0_sentry = self.d.sentry['ceph-mon'][0]
152
-        self.ceph1_sentry = self.d.sentry['ceph-mon'][1]
153
-        self.ceph2_sentry = self.d.sentry['ceph-mon'][2]
154
-        u.log.debug('openstack release val: {}'.format(
155
-            self._get_openstack_release()))
156
-        u.log.debug('openstack release str: {}'.format(
157
-            self._get_openstack_release_string()))
158
-
159
-        # Authenticate admin with keystone
160
-        self.keystone_session, self.keystone = u.get_default_keystone_session(
161
-            self.keystone_sentry,
162
-            openstack_release=self._get_openstack_release())
163
-
164
-        # Authenticate admin with cinder endpoint
165
-        self.cinder = u.authenticate_cinder_admin(self.keystone)
166
-
167
-        force_v1_client = False
168
-        if self._get_openstack_release() == self.trusty_icehouse:
169
-            # Updating image properties (such as arch or hypervisor) using the
170
-            # v2 api in icehouse results in:
171
-            # https://bugs.launchpad.net/python-glanceclient/+bug/1371559
172
-            u.log.debug('Forcing glance to use v1 api')
173
-            force_v1_client = True
174
-
175
-        # Authenticate admin with glance endpoint
176
-        self.glance = u.authenticate_glance_admin(
177
-            self.keystone,
178
-            force_v1_client=force_v1_client)
179
-
180
-        # Authenticate admin with nova endpoint
181
-        self.nova = nova_client.Client(2, session=self.keystone_session)
182
-
183
-        keystone_ip = self.keystone_sentry.info['public-address']
184
-
185
-        # Create a demo tenant/role/user
186
-        self.demo_tenant = 'demoTenant'
187
-        self.demo_role = 'demoRole'
188
-        self.demo_user = 'demoUser'
189
-        self.demo_project = 'demoProject'
190
-        self.demo_domain = 'demoDomain'
191
-        if self._get_openstack_release() >= self.xenial_queens:
192
-            self.create_users_v3()
193
-            self.demo_user_session, auth = u.get_keystone_session(
194
-                keystone_ip,
195
-                self.demo_user,
196
-                'password',
197
-                api_version=3,
198
-                user_domain_name=self.demo_domain,
199
-                project_domain_name=self.demo_domain,
200
-                project_name=self.demo_project
201
-            )
202
-            self.keystone_demo = keystone_client_v3.Client(
203
-                session=self.demo_user_session)
204
-            self.nova_demo = nova_client.Client(
205
-                2,
206
-                session=self.demo_user_session)
207
-        else:
208
-            self.create_users_v2()
209
-            # Authenticate demo user with keystone
210
-            self.keystone_demo = \
211
-                u.authenticate_keystone_user(
212
-                    self.keystone, user=self.demo_user,
213
-                    password='password',
214
-                    tenant=self.demo_tenant)
215
-            # Authenticate demo user with nova-api
216
-            self.nova_demo = u.authenticate_nova_user(self.keystone,
217
-                                                      user=self.demo_user,
218
-                                                      password='password',
219
-                                                      tenant=self.demo_tenant)
220
-
221
-    def create_users_v3(self):
222
-        try:
223
-            self.keystone.projects.find(name=self.demo_project)
224
-        except keystoneclient.exceptions.NotFound:
225
-            domain = self.keystone.domains.create(
226
-                self.demo_domain,
227
-                description='Demo Domain',
228
-                enabled=True
229
-            )
230
-            project = self.keystone.projects.create(
231
-                self.demo_project,
232
-                domain,
233
-                description='Demo Project',
234
-                enabled=True,
235
-            )
236
-            user = self.keystone.users.create(
237
-                self.demo_user,
238
-                domain=domain.id,
239
-                project=self.demo_project,
240
-                password='password',
241
-                email='demov3@demo.com',
242
-                description='Demo',
243
-                enabled=True)
244
-            role = self.keystone.roles.find(name='Admin')
245
-            self.keystone.roles.grant(
246
-                role.id,
247
-                user=user.id,
248
-                project=project.id)
249
-
250
-    def create_users_v2(self):
251
-        if not u.tenant_exists(self.keystone, self.demo_tenant):
252
-            tenant = self.keystone.tenants.create(tenant_name=self.demo_tenant,
253
-                                                  description='demo tenant',
254
-                                                  enabled=True)
255
-
256
-            self.keystone.roles.create(name=self.demo_role)
257
-            self.keystone.users.create(name=self.demo_user,
258
-                                       password='password',
259
-                                       tenant_id=tenant.id,
260
-                                       email='demo@demo.com')
261
-
262
-    def test_100_ceph_processes(self):
263
-        """Verify that the expected service processes are running
264
-        on each ceph unit."""
265
-
266
-        # Process name and quantity of processes to expect on each unit
267
-        ceph_processes = {
268
-            'ceph-mon': 1
269
-        }
270
-
271
-        # Units with process names and PID quantities expected
272
-        expected_processes = {
273
-            self.ceph0_sentry: ceph_processes,
274
-            self.ceph1_sentry: ceph_processes,
275
-            self.ceph2_sentry: ceph_processes
276
-        }
277
-
278
-        actual_pids = u.get_unit_process_ids(expected_processes)
279
-        ret = u.validate_unit_process_ids(expected_processes, actual_pids)
280
-        if ret:
281
-            amulet.raise_status(amulet.FAIL, msg=ret)
282
-
283
-    def test_102_services(self):
284
-        """Verify the expected services are running on the service units."""
285
-
286
-        services = {
287
-            self.rabbitmq_sentry: ['rabbitmq-server'],
288
-            self.nova_sentry: ['nova-compute'],
289
-            self.keystone_sentry: ['keystone'],
290
-            self.glance_sentry: ['glance-api'],
291
-            self.cinder_sentry: ['cinder-scheduler',
292
-                                 'cinder-volume'],
293
-        }
294
-
295
-        if self._get_openstack_release() < self.xenial_ocata:
296
-            services[self.cinder_sentry].append('cinder-api')
297
-
298
-        if self._get_openstack_release() < self.xenial_mitaka:
299
-            # For upstart systems only.  Ceph services under systemd
300
-            # are checked by process name instead.
301
-            ceph_services = [
302
-                'ceph-mon-all',
303
-                'ceph-mon id=`hostname`'
304
-            ]
305
-            services[self.ceph0_sentry] = ceph_services
306
-            services[self.ceph1_sentry] = ceph_services
307
-            services[self.ceph2_sentry] = ceph_services
308
-
309
-            ceph_osd_services = [
310
-                'ceph-osd id={}'.format(u.get_ceph_osd_id_cmd(0)),
311
-                'ceph-osd id={}'.format(u.get_ceph_osd_id_cmd(1))
312
-            ]
313
-
314
-            services[self.ceph_osd_sentry] = ceph_osd_services
315
-
316
-        if self._get_openstack_release() >= self.trusty_liberty:
317
-            services[self.keystone_sentry] = ['apache2']
318
-
319
-        ret = u.validate_services_by_name(services)
320
-        if ret:
321
-            amulet.raise_status(amulet.FAIL, msg=ret)
322
-
323
-    def test_200_ceph_nova_client_relation(self):
324
-        """Verify the ceph to nova ceph-client relation data."""
325
-        u.log.debug('Checking ceph:nova-compute ceph-mon relation data...')
326
-        unit = self.ceph0_sentry
327
-        relation = ['client', 'nova-compute:ceph']
328
-        expected = {
329
-            'private-address': u.valid_ip,
330
-            'auth': 'none',
331
-            'key': u.not_null
332
-        }
333
-
334
-        ret = u.validate_relation_data(unit, relation, expected)
335
-        if ret:
336
-            message = u.relation_error('ceph-mon to nova ceph-client', ret)
337
-            amulet.raise_status(amulet.FAIL, msg=message)
338
-
339
-    def test_201_nova_ceph_client_relation(self):
340
-        """Verify the nova to ceph client relation data."""
341
-        u.log.debug('Checking nova-compute:ceph ceph-client relation data...')
342
-        unit = self.nova_sentry
343
-        relation = ['ceph', 'ceph-mon:client']
344
-        expected = {
345
-            'private-address': u.valid_ip
346
-        }
347
-
348
-        ret = u.validate_relation_data(unit, relation, expected)
349
-        if ret:
350
-            message = u.relation_error('nova to ceph ceph-client', ret)
351
-            amulet.raise_status(amulet.FAIL, msg=message)
352
-
353
-    def test_202_ceph_glance_client_relation(self):
354
-        """Verify the ceph to glance ceph-client relation data."""
355
-        u.log.debug('Checking ceph:glance client relation data...')
356
-        unit = self.ceph1_sentry
357
-        relation = ['client', 'glance:ceph']
358
-        expected = {
359
-            'private-address': u.valid_ip,
360
-            'auth': 'none',
361
-            'key': u.not_null
362
-        }
363
-
364
-        ret = u.validate_relation_data(unit, relation, expected)
365
-        if ret:
366
-            message = u.relation_error('ceph to glance ceph-client', ret)
367
-            amulet.raise_status(amulet.FAIL, msg=message)
368
-
369
-    def test_203_glance_ceph_client_relation(self):
370
-        """Verify the glance to ceph client relation data."""
371
-        u.log.debug('Checking glance:ceph client relation data...')
372
-        unit = self.glance_sentry
373
-        relation = ['ceph', 'ceph-mon:client']
374
-        expected = {
375
-            'private-address': u.valid_ip
376
-        }
377
-
378
-        ret = u.validate_relation_data(unit, relation, expected)
379
-        if ret:
380
-            message = u.relation_error('glance to ceph ceph-client', ret)
381
-            amulet.raise_status(amulet.FAIL, msg=message)
382
-
383
-    def test_204_ceph_cinder_client_relation(self):
384
-        """Verify the ceph to cinder ceph-client relation data."""
385
-        u.log.debug('Checking ceph:cinder ceph relation data...')
386
-        unit = self.ceph2_sentry
387
-        relation = ['client', 'cinder-ceph:ceph']
388
-        expected = {
389
-            'private-address': u.valid_ip,
390
-            'auth': 'none',
391
-            'key': u.not_null
392
-        }
393
-
394
-        ret = u.validate_relation_data(unit, relation, expected)
395
-        if ret:
396
-            message = u.relation_error('ceph to cinder ceph-client', ret)
397
-            amulet.raise_status(amulet.FAIL, msg=message)
398
-
399
-    def test_205_cinder_ceph_client_relation(self):
400
-        """Verify the cinder to ceph ceph-client relation data."""
401
-        u.log.debug('Checking cinder:ceph ceph relation data...')
402
-        unit = self.cinder_ceph_sentry
403
-        relation = ['ceph', 'ceph-mon:client']
404
-        expected = {
405
-            'private-address': u.valid_ip
406
-        }
407
-
408
-        ret = u.validate_relation_data(unit, relation, expected)
409
-        if ret:
410
-            message = u.relation_error('cinder to ceph ceph-client', ret)
411
-            amulet.raise_status(amulet.FAIL, msg=message)
412
-
413
-    def test_300_ceph_config(self):
414
-        """Verify the data in the ceph config file."""
415
-        u.log.debug('Checking ceph config file data...')
416
-        unit = self.ceph0_sentry
417
-        conf = '/etc/ceph/ceph.conf'
418
-        expected = {
419
-            'global': {
420
-                'log to syslog': 'false',
421
-                'err to syslog': 'false',
422
-                'clog to syslog': 'false',
423
-                'mon cluster log to syslog': 'false',
424
-                'auth cluster required': 'none',
425
-                'auth service required': 'none',
426
-                'auth client required': 'none'
427
-            },
428
-            'mon': {
429
-                'keyring': '/var/lib/ceph/mon/$cluster-$id/keyring'
430
-            },
431
-            'mds': {
432
-                'keyring': '/var/lib/ceph/mds/$cluster-$id/keyring'
433
-            },
434
-        }
435
-
436
-        for section, pairs in expected.iteritems():
437
-            ret = u.validate_config_data(unit, conf, section, pairs)
438
-            if ret:
439
-                message = "ceph config error: {}".format(ret)
440
-                amulet.raise_status(amulet.FAIL, msg=message)
441
-
442
-    def test_302_cinder_rbd_config(self):
443
-        """Verify the cinder config file data regarding ceph."""
444
-        u.log.debug('Checking cinder (rbd) config file data...')
445
-        unit = self.cinder_sentry
446
-        conf = '/etc/cinder/cinder.conf'
447
-        section_key = 'cinder-ceph'
448
-        expected = {
449
-            section_key: {
450
-                'volume_driver': 'cinder.volume.drivers.rbd.RBDDriver'
451
-            }
452
-        }
453
-        for section, pairs in expected.iteritems():
454
-            ret = u.validate_config_data(unit, conf, section, pairs)
455
-            if ret:
456
-                message = "cinder (rbd) config error: {}".format(ret)
457
-                amulet.raise_status(amulet.FAIL, msg=message)
458
-
459
-    def test_304_glance_rbd_config(self):
460
-        """Verify the glance config file data regarding ceph."""
461
-        u.log.debug('Checking glance (rbd) config file data...')
462
-        unit = self.glance_sentry
463
-        conf = '/etc/glance/glance-api.conf'
464
-        config = {
465
-            'default_store': 'rbd',
466
-            'rbd_store_ceph_conf': '/etc/ceph/ceph.conf',
467
-            'rbd_store_user': 'glance',
468
-            'rbd_store_pool': 'glance',
469
-            'rbd_store_chunk_size': '8'
470
-        }
471
-
472
-        if self._get_openstack_release() >= self.trusty_kilo:
473
-            # Kilo or later
474
-            config['stores'] = ('glance.store.filesystem.Store,'
475
-                                'glance.store.http.Store,'
476
-                                'glance.store.rbd.Store')
477
-            section = 'glance_store'
478
-        else:
479
-            # Juno or earlier
480
-            section = 'DEFAULT'
481
-
482
-        expected = {section: config}
483
-        for section, pairs in expected.iteritems():
484
-            ret = u.validate_config_data(unit, conf, section, pairs)
485
-            if ret:
486
-                message = "glance (rbd) config error: {}".format(ret)
487
-                amulet.raise_status(amulet.FAIL, msg=message)
488
-
489
-    def test_306_nova_rbd_config(self):
490
-        """Verify the nova config file data regarding ceph."""
491
-        u.log.debug('Checking nova (rbd) config file data...')
492
-        unit = self.nova_sentry
493
-        conf = '/etc/nova/nova.conf'
494
-        expected = {
495
-            'libvirt': {
496
-                'rbd_user': 'nova-compute',
497
-                'rbd_secret_uuid': u.not_null
498
-            }
499
-        }
500
-        for section, pairs in expected.iteritems():
501
-            ret = u.validate_config_data(unit, conf, section, pairs)
502
-            if ret:
503
-                message = "nova (rbd) config error: {}".format(ret)
504
-                amulet.raise_status(amulet.FAIL, msg=message)
505
-
506
-    def test_400_ceph_check_osd_pools(self):
507
-        """Check osd pools on all ceph units, expect them to be
508
-        identical, and expect specific pools to be present."""
509
-        u.log.debug('Checking pools on ceph units...')
510
-
511
-        expected_pools = self.get_ceph_expected_pools()
512
-        results = []
513
-        sentries = [
514
-            self.ceph0_sentry,
515
-            self.ceph1_sentry,
516
-            self.ceph2_sentry
517
-        ]
518
-
519
-        # Check for presence of expected pools on each unit
520
-        u.log.debug('Expected pools: {}'.format(expected_pools))
521
-        for sentry_unit in sentries:
522
-            pools = u.get_ceph_pools(sentry_unit)
523
-            results.append(pools)
524
-
525
-            for expected_pool in expected_pools:
526
-                if expected_pool not in pools:
527
-                    msg = ('{} does not have pool: '
528
-                           '{}'.format(sentry_unit.info['unit_name'],
529
-                                       expected_pool))
530
-                    amulet.raise_status(amulet.FAIL, msg=msg)
531
-            u.log.debug('{} has (at least) the expected '
532
-                        'pools.'.format(sentry_unit.info['unit_name']))
533
-
534
-        # Check that all units returned the same pool name:id data
535
-        ret = u.validate_list_of_identical_dicts(results)
536
-        if ret:
537
-            u.log.debug('Pool list results: {}'.format(results))
538
-            msg = ('{}; Pool list results are not identical on all '
539
-                   'ceph units.'.format(ret))
540
-            amulet.raise_status(amulet.FAIL, msg=msg)
541
-        else:
542
-            u.log.debug('Pool list on all ceph units produced the '
543
-                        'same results (OK).')
544
-
545
-    def test_402_pause_resume_actions(self):
546
-        """Veryfy that pause/resume works"""
547
-        u.log.debug("Testing pause")
548
-        cmd = "ceph -s"
549
-
550
-        sentry_unit = self.ceph0_sentry
551
-        action_id = u.run_action(sentry_unit, 'pause-health')
552
-        assert u.wait_on_action(action_id), "Pause health action failed."
553
-
554
-        output, code = sentry_unit.run(cmd)
555
-        if 'nodown' not in output or 'noout' not in output:
556
-            amulet.raise_status(amulet.FAIL, msg="Missing noout,nodown")
557
-
558
-        u.log.debug("Testing resume")
559
-        action_id = u.run_action(sentry_unit, 'resume-health')
560
-        assert u.wait_on_action(action_id), "Resume health action failed."
561
-
562
-        output, code = sentry_unit.run(cmd)
563
-        if 'nodown' in output or 'noout' in output:
564
-            amulet.raise_status(amulet.FAIL, msg="Still has noout,nodown")
565
-
566
-    def test_501_security_checklist_action(self):
567
-        """Verify expected result on a default install"""
568
-        u.log.debug("Testing security-checklist")
569
-        sentry_unit = self.ceph0_sentry
570
-
571
-        action_id = u.run_action(sentry_unit, "security-checklist")
572
-        u.wait_on_action(action_id)
573
-        data = amulet.actions.get_action_output(action_id, full_output=True)
574
-        assert data.get(u"status") == "completed", \
575
-            "Security check is expected to pass by default"
576
-
577
-    @staticmethod
578
-    def find_pool(sentry_unit, pool_name):
579
-        """
580
-        This will do a ceph osd dump and search for pool you specify
581
-        :param sentry_unit: The unit to run this command from.
582
-        :param pool_name: str.  The name of the Ceph pool to query
583
-        :return: str or None.  The ceph pool or None if not found
584
-        """
585
-        output, dump_code = sentry_unit.run("ceph osd dump")
586
-        if dump_code is not 0:
587
-            amulet.raise_status(
588
-                amulet.FAIL,
589
-                msg="ceph osd dump failed with output: {}".format(
590
-                    output))
591
-        for line in output.split('\n'):
592
-            match = re.search(r"pool\s+\d+\s+'(?P<pool_name>.*)'", line)
593
-            if match:
594
-                name = match.group('pool_name')
595
-                if name == pool_name:
596
-                    return line
597
-        return None
598
-
599
-    def test_403_cache_tier_actions(self):
600
-        """Verify that cache tier add/remove works"""
601
-        u.log.debug("Testing cache tiering")
602
-
603
-        sentry_unit = self.ceph0_sentry
604
-        # Create our backer pool
605
-        output, code = sentry_unit.run("ceph osd pool create cold 128 128 ")
606
-        if code is not 0:
607
-            amulet.raise_status(
608
-                amulet.FAIL,
609
-                msg="ceph osd pool create cold failed with output: {}".format(
610
-                    output))
611
-
612
-        # Create our cache pool
613
-        output, code = sentry_unit.run("ceph osd pool create hot 128 128 ")
614
-        if code is not 0:
615
-            amulet.raise_status(
616
-                amulet.FAIL,
617
-                msg="ceph osd pool create hot failed with output: {}".format(
618
-                    output))
619
-
620
-        action_id = u.run_action(sentry_unit,
621
-                                 'create-cache-tier',
622
-                                 params={
623
-                                     'backer-pool': 'cold',
624
-                                     'cache-pool': 'hot',
625
-                                     'cache-mode': 'writeback'})
626
-        assert u.wait_on_action(action_id), \
627
-            "Create cache tier action failed."
628
-
629
-        pool_line = self.find_pool(
630
-            sentry_unit=sentry_unit,
631
-            pool_name='hot')
632
-
633
-        assert "cache_mode writeback" in pool_line, \
634
-            "cache_mode writeback not found in cache pool"
635
-        remove_action_id = u.run_action(sentry_unit,
636
-                                        'remove-cache-tier',
637
-                                        params={
638
-                                            'backer-pool': 'cold',
639
-                                            'cache-pool': 'hot'})
640
-        assert u.wait_on_action(remove_action_id), \
641
-            "Remove cache tier action failed"
642
-        pool_line = self.find_pool(sentry_unit=sentry_unit, pool_name='hot')
643
-        assert "cache_mode" not in pool_line, \
644
-            "cache_mode is still enabled on cache pool"
645
-
646
-    def test_404_set_noout_actions(self):
647
-        """Verify that set/unset noout works"""
648
-        u.log.debug("Testing set noout")
649
-        cmd = "ceph -s"
650
-
651
-        sentry_unit = self.ceph0_sentry
652
-        action_id = u.run_action(sentry_unit, 'set-noout')
653
-        assert u.wait_on_action(action_id), "Set noout action failed."
654
-
655
-        output, code = sentry_unit.run(cmd)
656
-        if 'noout' not in output:
657
-            amulet.raise_status(amulet.FAIL, msg="Missing noout")
658
-
659
-        u.log.debug("Testing unset noout")
660
-        action_id = u.run_action(sentry_unit, 'unset-noout')
661
-        assert u.wait_on_action(action_id), "Unset noout action failed."
662
-
663
-        output, code = sentry_unit.run(cmd)
664
-        if 'noout' in output:
665
-            amulet.raise_status(amulet.FAIL, msg="Still has noout")
666
-
667
-    def test_410_ceph_cinder_vol_create(self):
668
-        """Create and confirm a ceph-backed cinder volume, and inspect
669
-        ceph cinder pool object count as the volume is created
670
-        and deleted."""
671
-        sentry_unit = self.ceph0_sentry
672
-        obj_count_samples = []
673
-        pool_size_samples = []
674
-        pools = u.get_ceph_pools(self.ceph0_sentry)
675
-        cinder_pool = pools['cinder-ceph']
676
-
677
-        # Check ceph cinder pool object count, disk space usage and pool name
678
-        u.log.debug('Checking ceph cinder pool original samples...')
679
-        pool_name, obj_count, kb_used = u.get_ceph_pool_sample(sentry_unit,
680
-                                                               cinder_pool)
681
-        obj_count_samples.append(obj_count)
682
-        pool_size_samples.append(kb_used)
683
-
684
-        expected = 'cinder-ceph'
685
-        if pool_name != expected:
686
-            msg = ('Ceph pool {} unexpected name (actual, expected): '
687
-                   '{}. {}'.format(cinder_pool, pool_name, expected))
688
-            amulet.raise_status(amulet.FAIL, msg=msg)
689
-
690
-        # Create ceph-backed cinder volume
691
-        cinder_vol = u.create_cinder_volume(self.cinder)
692
-
693
-        # Re-check ceph cinder pool object count and disk usage
694
-        time.sleep(10)
695
-        u.log.debug('Checking ceph cinder pool samples after volume create...')
696
-        pool_name, obj_count, kb_used = u.get_ceph_pool_sample(sentry_unit,
697
-                                                               cinder_pool)
698
-        obj_count_samples.append(obj_count)
699
-        pool_size_samples.append(kb_used)
700
-
701
-        # Delete ceph-backed cinder volume
702
-        u.delete_resource(self.cinder.volumes, cinder_vol, msg="cinder volume")
703
-
704
-        # Final check, ceph cinder pool object count and disk usage
705
-        time.sleep(10)
706
-        u.log.debug('Checking ceph cinder pool after volume delete...')
707
-        pool_name, obj_count, kb_used = u.get_ceph_pool_sample(sentry_unit,
708
-                                                               cinder_pool)
709
-        obj_count_samples.append(obj_count)
710
-        pool_size_samples.append(kb_used)
711
-
712
-        # Validate ceph cinder pool object count samples over time
713
-        ret = u.validate_ceph_pool_samples(obj_count_samples,
714
-                                           "cinder pool object count")
715
-        if ret:
716
-            amulet.raise_status(amulet.FAIL, msg=ret)
717
-
718
-        # Luminous (pike) ceph seems more efficient at disk usage so we cannot
719
-        # grantee the ordering of kb_used
720
-        if self._get_openstack_release() < self.xenial_pike:
721
-            # Validate ceph cinder pool disk space usage samples over time
722
-            ret = u.validate_ceph_pool_samples(pool_size_samples,
723
-                                               "cinder pool disk usage")
724
-        if ret:
725
-            amulet.raise_status(amulet.FAIL, msg=ret)
726
-
727
-    def test_412_ceph_glance_image_create_delete(self):
728
-        """Create and confirm a ceph-backed glance image, and inspect
729
-        ceph glance pool object count as the image is created
730
-        and deleted."""
731
-        sentry_unit = self.ceph0_sentry
732
-        obj_count_samples = []
733
-        pool_size_samples = []
734
-        pools = u.get_ceph_pools(self.ceph0_sentry)
735
-        glance_pool = pools['glance']
736
-
737
-        # Check ceph glance pool object count, disk space usage and pool name
738
-        u.log.debug('Checking ceph glance pool original samples...')
739
-        pool_name, obj_count, kb_used = u.get_ceph_pool_sample(sentry_unit,
740
-                                                               glance_pool)
741
-        obj_count_samples.append(obj_count)
742
-        pool_size_samples.append(kb_used)
743
-
744
-        expected = 'glance'
745
-        if pool_name != expected:
746
-            msg = ('Ceph glance pool {} unexpected name (actual, '
747
-                   'expected): {}. {}'.format(glance_pool,
748
-                                              pool_name, expected))
749
-            amulet.raise_status(amulet.FAIL, msg=msg)
750
-
751
-        # Create ceph-backed glance image
752
-        glance_img = u.create_cirros_image(self.glance, "cirros-image-1")
753
-
754
-        # Re-check ceph glance pool object count and disk usage
755
-        time.sleep(10)
756
-        u.log.debug('Checking ceph glance pool samples after image create...')
757
-        pool_name, obj_count, kb_used = u.get_ceph_pool_sample(sentry_unit,
758
-                                                               glance_pool)
759
-        obj_count_samples.append(obj_count)
760
-        pool_size_samples.append(kb_used)
761
-
762
-        # Delete ceph-backed glance image
763
-        u.delete_resource(self.glance.images,
764
-                          glance_img.id, msg="glance image")
765
-
766
-        # Final check, ceph glance pool object count and disk usage
767
-        time.sleep(10)
768
-        u.log.debug('Checking ceph glance pool samples after image delete...')
769
-        pool_name, obj_count, kb_used = u.get_ceph_pool_sample(sentry_unit,
770
-                                                               glance_pool)
771
-        obj_count_samples.append(obj_count)
772
-        pool_size_samples.append(kb_used)
773
-
774
-        # Validate ceph glance pool object count samples over time
775
-        ret = u.validate_ceph_pool_samples(obj_count_samples,
776
-                                           "glance pool object count")
777
-        if ret:
778
-            amulet.raise_status(amulet.FAIL, msg=ret)
779
-
780
-        # Validate ceph glance pool disk space usage samples over time
781
-        ret = u.validate_ceph_pool_samples(pool_size_samples,
782
-                                           "glance pool disk usage")
783
-        if ret:
784
-            amulet.raise_status(amulet.FAIL, msg=ret)
785
-
786
-    def test_414_get_health_action(self):
787
-        """Verify that getting health works"""
788
-        u.log.debug("Testing get-health")
789
-
790
-        sentry_unit = self.ceph0_sentry
791
-        action_id = u.run_action(sentry_unit, 'get-health')
792
-        assert u.wait_on_action(action_id), "HEALTH_OK"
793
-
794
-    def test_420_show_disk_free_action(self):
795
-        """Verify show-disk-free"""
796
-        u.log.debug("Testing show-disk-free")
797
-        if self._get_openstack_release() < self.trusty_kilo:
798
-            u.log.info(
799
-                "show-disk-free only supported in >=kilo, skipping")
800
-            return
801
-        sentry_unit = self.ceph0_sentry
802
-        action_id = u.run_action(sentry_unit,
803
-                                 'show-disk-free',
804
-                                 params={'format': 'json'})
805
-        assert u.wait_on_action(action_id), "Show-disk-free action failed."
806
-        data = amulet.actions.get_action_output(action_id, full_output=True)
807
-        assert data.get(u"status") == "completed", "Show-disk-free failed"
808
-        message = data.get(u"results").get(u"message")
809
-        assert message is not None
810
-        jsonout = json.loads(message.strip())
811
-        nodes = jsonout.get(u"nodes")
812
-        assert nodes is not None, "Show-disk-free: no 'nodes' elem"
813
-        assert len(nodes) > 0, "Show-disk-free action: 0 nodes"
814
-
815
-    def test_499_ceph_cmds_exit_zero(self):
816
-        """Check basic functionality of ceph cli commands against
817
-        all ceph units."""
818
-        sentry_units = [
819
-            self.ceph0_sentry,
820
-            self.ceph1_sentry,
821
-            self.ceph2_sentry
822
-        ]
823
-        commands = [
824
-            'sudo ceph health',
825
-            'sudo ceph mds stat',
826
-            'sudo ceph pg stat',
827
-            'sudo ceph osd stat',
828
-            'sudo ceph mon stat',
829
-        ]
830
-        ret = u.check_commands_on_units(commands, sentry_units)
831
-        if ret:
832
-            amulet.raise_status(amulet.FAIL, msg=ret)
833
-
834
-            # FYI: No restart check as ceph services do not restart
835
-            # when charm config changes, unless monitor count increases.

+ 90
- 0
tests/bundles/bionic-queens.yaml View File

@@ -0,0 +1,90 @@
1
+series: bionic
2
+applications:
3
+  ceph-osd:
4
+    charm: cs:~openstack-charmers-next/ceph-osd
5
+    num_units: 3
6
+    storage:
7
+      osd-devices: 'cinder,10G'
8
+    options:
9
+      osd-devices: '/srv/ceph /dev/test-non-existent'
10
+  ceph-mon:
11
+    charm: cs:~openstack-charmers-next/ceph-mon
12
+    series: bionic
13
+    num_units: 3
14
+    options:
15
+      monitor-count: '3'
16
+      auth-supported: 'none'
17
+  percona-cluster:
18
+    charm: cs:~openstack-charmers-next/percona-cluster
19
+    num_units: 1
20
+    options:
21
+      dataset-size: 25%
22
+      max-connections: 1000
23
+  rabbitmq-server:
24
+    charm: cs:~openstack-charmers-next/rabbitmq-server
25
+    num_units: 1
26
+  keystone:
27
+    expose: True
28
+    charm: cs:~openstack-charmers-next/keystone
29
+    num_units: 1
30
+  nova-compute:
31
+    charm: cs:~openstack-charmers-next/nova-compute
32
+    num_units: 1
33
+  glance:
34
+    expose: True
35
+    charm: cs:~openstack-charmers-next/glance
36
+    num_units: 1
37
+  cinder:
38
+    expose: True
39
+    charm: cs:~openstack-charmers-next/cinder
40
+    num_units: 1
41
+    options:
42
+      block-device: 'None'
43
+      glance-api-version: '2'
44
+  cinder-ceph:
45
+    charm: cs:~openstack-charmers-next/cinder-ceph
46
+  nova-cloud-controller:
47
+    expose: True
48
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
49
+    num_units: 1
50
+relations:
51
+- - nova-compute:amqp
52
+  - rabbitmq-server:amqp
53
+- - nova-compute:image-service
54
+  - glance:image-service
55
+- - nova-compute:ceph
56
+  - ceph-mon:client
57
+- - keystone:shared-db
58
+  - percona-cluster:shared-db
59
+- - glance:shared-db
60
+  - percona-cluster:shared-db
61
+- - glance:identity-service
62
+  - keystone:identity-service
63
+- - glance:amqp
64
+  - rabbitmq-server:amqp
65
+- - glance:ceph
66
+  - ceph-mon:client
67
+- - cinder:shared-db
68
+  - percona-cluster:shared-db
69
+- - cinder:identity-service
70
+  - keystone:identity-service
71
+- - cinder:amqp
72
+  - rabbitmq-server:amqp
73
+- - cinder:image-service
74
+  - glance:image-service
75
+- - cinder-ceph:storage-backend
76
+  - cinder:storage-backend
77
+- - cinder-ceph:ceph
78
+  - ceph-mon:client
79
+- - ceph-osd:mon
80
+  - ceph-mon:osd
81
+- - nova-cloud-controller:shared-db
82
+  - percona-cluster:shared-db
83
+- - nova-cloud-controller:identity-service
84
+  - keystone:identity-service
85
+- - nova-cloud-controller:amqp
86
+  - rabbitmq-server:amqp
87
+- - nova-cloud-controller:cloud-compute
88
+  - nova-compute:cloud-compute
89
+- - nova-cloud-controller:image-service
90
+  - glance:image-service

+ 104
- 0
tests/bundles/bionic-rocky.yaml View File

@@ -0,0 +1,104 @@
1
+series: bionic
2
+applications:
3
+  ceph-osd:
4
+    charm: cs:~openstack-charmers-next/ceph-osd
5
+    num_units: 3
6
+    storage:
7
+      osd-devices: 'cinder,10G'
8
+    options:
9
+      osd-devices: '/srv/ceph /dev/test-non-existent'
10
+      source: cloud:bionic-rocky
11
+  ceph-mon:
12
+    charm: ceph-mon
13
+    series: bionic
14
+    num_units: 3
15
+    options:
16
+      monitor-count: '3'
17
+      auth-supported: 'none'
18
+      source: cloud:bionic-rocky
19
+  percona-cluster:
20
+    charm: cs:~openstack-charmers-next/percona-cluster
21
+    num_units: 1
22
+    options:
23
+      dataset-size: 25%
24
+      max-connections: 1000
25
+      source: cloud:bionic-rocky
26
+  rabbitmq-server:
27
+    charm: cs:~openstack-charmers-next/rabbitmq-server
28
+    num_units: 1
29
+    options:
30
+      source: cloud:bionic-rocky
31
+  keystone:
32
+    expose: True
33
+    charm: cs:~openstack-charmers-next/keystone
34
+    num_units: 1
35
+    options:
36
+      openstack-origin: cloud:bionic-rocky
37
+  nova-compute:
38
+    charm: cs:~openstack-charmers-next/nova-compute
39
+    num_units: 1
40
+    options:
41
+      openstack-origin: cloud:bionic-rocky
42
+  glance:
43
+    expose: True
44
+    charm: cs:~openstack-charmers-next/glance
45
+    num_units: 1
46
+    options:
47
+      openstack-origin: cloud:bionic-rocky
48
+  cinder:
49
+    expose: True
50
+    charm: cs:~openstack-charmers-next/cinder
51
+    num_units: 1
52
+    options:
53
+      block-device: 'None'
54
+      glance-api-version: '2'
55
+      openstack-origin: cloud:bionic-rocky
56
+  cinder-ceph:
57
+    charm: cs:~openstack-charmers-next/cinder-ceph
58
+  nova-cloud-controller:
59
+    expose: True
60
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
61
+    num_units: 1
62
+    options:
63
+      openstack-origin: cloud:bionic-rocky
64
+relations:
65
+- - nova-compute:amqp
66
+  - rabbitmq-server:amqp
67
+- - nova-compute:image-service
68
+  - glance:image-service
69
+- - nova-compute:ceph
70
+  - ceph-mon:client
71
+- - keystone:shared-db
72
+  - percona-cluster:shared-db
73
+- - glance:shared-db
74
+  - percona-cluster:shared-db
75
+- - glance:identity-service
76
+  - keystone:identity-service
77
+- - glance:amqp
78
+  - rabbitmq-server:amqp
79
+- - glance:ceph
80
+  - ceph-mon:client
81
+- - cinder:shared-db
82
+  - percona-cluster:shared-db
83
+- - cinder:identity-service
84
+  - keystone:identity-service
85
+- - cinder:amqp
86
+  - rabbitmq-server:amqp
87
+- - cinder:image-service
88
+  - glance:image-service
89
+- - cinder-ceph:storage-backend
90
+  - cinder:storage-backend
91
+- - cinder-ceph:ceph
92
+  - ceph-mon:client
93
+- - ceph-osd:mon
94
+  - ceph-mon:osd
95
+- - nova-cloud-controller:shared-db
96
+  - percona-cluster:shared-db
97
+- - nova-cloud-controller:identity-service
98
+  - keystone:identity-service
99
+- - nova-cloud-controller:amqp
100
+  - rabbitmq-server:amqp
101
+- - nova-cloud-controller:cloud-compute
102
+  - nova-compute:cloud-compute
103
+- - nova-cloud-controller:image-service
104
+  - glance:image-service

+ 104
- 0
tests/bundles/bionic-stein.yaml View File

@@ -0,0 +1,104 @@
1
+series: bionic
2
+applications:
3
+  ceph-osd:
4
+    charm: cs:~openstack-charmers-next/ceph-osd
5
+    num_units: 3
6
+    storage:
7
+      osd-devices: 'cinder,10G'
8
+    options:
9
+      osd-devices: '/srv/ceph /dev/test-non-existent'
10
+      source: cloud:bionic-stein
11
+  ceph-mon:
12
+    charm: ceph-mon
13
+    series: bionic
14
+    num_units: 3
15
+    options:
16
+      monitor-count: '3'
17
+      auth-supported: 'none'
18
+      source: cloud:bionic-stein
19
+  percona-cluster:
20
+    charm: cs:~openstack-charmers-next/percona-cluster
21
+    num_units: 1
22
+    options:
23
+      dataset-size: 25%
24
+      max-connections: 1000
25
+      source: cloud:bionic-stein
26
+  rabbitmq-server:
27
+    charm: cs:~openstack-charmers-next/rabbitmq-server
28
+    num_units: 1
29
+    options:
30
+      source: cloud:bionic-stein
31
+  keystone:
32
+    expose: True
33
+    charm: cs:~openstack-charmers-next/keystone
34
+    num_units: 1
35
+    options:
36
+      openstack-origin: cloud:bionic-stein
37
+  nova-compute:
38
+    charm: cs:~openstack-charmers-next/nova-compute
39
+    num_units: 1
40
+    options:
41
+      openstack-origin: cloud:bionic-stein
42
+  glance:
43
+    expose: True
44
+    charm: cs:~openstack-charmers-next/glance
45
+    num_units: 1
46
+    options:
47
+      openstack-origin: cloud:bionic-stein
48
+  cinder:
49
+    expose: True
50
+    charm: cs:~openstack-charmers-next/cinder
51
+    num_units: 1
52
+    options:
53
+      block-device: 'None'
54
+      glance-api-version: '2'
55
+      openstack-origin: cloud:bionic-stein
56
+  cinder-ceph:
57
+    charm: cs:~openstack-charmers-next/cinder-ceph
58
+  nova-cloud-controller:
59
+    expose: True
60
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
61
+    num_units: 1
62
+    options:
63
+      openstack-origin: cloud:bionic-stein
64
+relations:
65
+- - nova-compute:amqp
66
+  - rabbitmq-server:amqp
67
+- - nova-compute:image-service
68
+  - glance:image-service
69
+- - nova-compute:ceph
70
+  - ceph-mon:client
71
+- - keystone:shared-db
72
+  - percona-cluster:shared-db
73
+- - glance:shared-db
74
+  - percona-cluster:shared-db
75
+- - glance:identity-service
76
+  - keystone:identity-service
77
+- - glance:amqp
78
+  - rabbitmq-server:amqp
79
+- - glance:ceph
80
+  - ceph-mon:client
81
+- - cinder:shared-db
82
+  - percona-cluster:shared-db
83
+- - cinder:identity-service
84
+  - keystone:identity-service
85
+- - cinder:amqp
86
+  - rabbitmq-server:amqp
87
+- - cinder:image-service
88
+  - glance:image-service
89
+- - cinder-ceph:storage-backend
90
+  - cinder:storage-backend
91
+- - cinder-ceph:ceph
92
+  - ceph-mon:client
93
+- - ceph-osd:mon
94
+  - ceph-mon:osd
95
+- - nova-cloud-controller:shared-db
96
+  - percona-cluster:shared-db
97
+- - nova-cloud-controller:identity-service
98
+  - keystone:identity-service
99
+- - nova-cloud-controller:amqp
100
+  - rabbitmq-server:amqp
101
+- - nova-cloud-controller:cloud-compute
102
+  - nova-compute:cloud-compute
103
+- - nova-cloud-controller:image-service
104
+  - glance:image-service

+ 90
- 0
tests/bundles/cosmic-rocky.yaml View File

@@ -0,0 +1,90 @@
1
+series: cosmic
2
+applications:
3
+  ceph-osd:
4
+    charm: cs:~openstack-charmers-next/ceph-osd
5
+    num_units: 3
6
+    storage:
7
+      osd-devices: 'cinder,10G'
8
+    options:
9
+      osd-devices: '/srv/ceph /dev/test-non-existent'
10
+  ceph-mon:
11
+    charm: ceph-mon
12
+    series: cosmic
13
+    num_units: 3
14
+    options:
15
+      monitor-count: '3'
16
+      auth-supported: 'none'
17
+  percona-cluster:
18
+    charm: cs:~openstack-charmers-next/percona-cluster
19
+    num_units: 1
20
+    options:
21
+      dataset-size: 25%
22
+      max-connections: 1000
23
+  rabbitmq-server:
24
+    charm: cs:~openstack-charmers-next/rabbitmq-server
25
+    num_units: 1
26
+  keystone:
27
+    expose: True
28
+    charm: cs:~openstack-charmers-next/keystone
29
+    num_units: 1
30
+  nova-compute:
31
+    charm: cs:~openstack-charmers-next/nova-compute
32
+    num_units: 1
33
+  glance:
34
+    expose: True
35
+    charm: cs:~openstack-charmers-next/glance
36
+    num_units: 1
37
+  cinder:
38
+    expose: True
39
+    charm: cs:~openstack-charmers-next/cinder
40
+    num_units: 1
41
+    options:
42
+      block-device: 'None'
43
+      glance-api-version: '2'
44
+  cinder-ceph:
45
+    charm: cs:~openstack-charmers-next/cinder-ceph
46
+  nova-cloud-controller:
47
+    expose: True
48
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
49
+    num_units: 1
50
+relations:
51
+- - nova-compute:amqp
52
+  - rabbitmq-server:amqp
53
+- - nova-compute:image-service
54
+  - glance:image-service
55
+- - nova-compute:ceph
56
+  - ceph-mon:client
57
+- - keystone:shared-db
58
+  - percona-cluster:shared-db
59
+- - glance:shared-db
60
+  - percona-cluster:shared-db
61
+- - glance:identity-service
62
+  - keystone:identity-service
63
+- - glance:amqp
64
+  - rabbitmq-server:amqp
65
+- - glance:ceph
66
+  - ceph-mon:client
67
+- - cinder:shared-db
68
+  - percona-cluster:shared-db
69
+- - cinder:identity-service
70
+  - keystone:identity-service
71
+- - cinder:amqp
72
+  - rabbitmq-server:amqp
73
+- - cinder:image-service
74
+  - glance:image-service
75
+- - cinder-ceph:storage-backend
76
+  - cinder:storage-backend
77
+- - cinder-ceph:ceph
78
+  - ceph-mon:client
79
+- - ceph-osd:mon
80
+  - ceph-mon:osd
81
+- - nova-cloud-controller:shared-db
82
+  - percona-cluster:shared-db
83
+- - nova-cloud-controller:identity-service
84
+  - keystone:identity-service
85
+- - nova-cloud-controller:amqp
86
+  - rabbitmq-server:amqp
87
+- - nova-cloud-controller:cloud-compute
88
+  - nova-compute:cloud-compute
89
+- - nova-cloud-controller:image-service
90
+  - glance:image-service

+ 90
- 0
tests/bundles/disco-stein.yaml View File

@@ -0,0 +1,90 @@
1
+series: disco
2
+applications:
3
+  ceph-osd:
4
+    charm: cs:~openstack-charmers-next/ceph-osd
5
+    num_units: 3
6
+    storage:
7
+      osd-devices: 'cinder,10G'
8
+    options:
9
+      osd-devices: '/srv/ceph /dev/test-non-existent'
10
+  ceph-mon:
11
+    charm: ceph-mon
12
+    series: disco
13
+    num_units: 3
14
+    options:
15
+      monitor-count: '3'
16
+      auth-supported: 'none'
17
+  percona-cluster:
18
+    charm: cs:~openstack-charmers-next/percona-cluster
19
+    num_units: 1
20
+    options:
21
+      dataset-size: 25%
22
+      max-connections: 1000
23
+  rabbitmq-server:
24
+    charm: cs:~openstack-charmers-next/rabbitmq-server
25
+    num_units: 1
26
+  keystone:
27
+    expose: True
28
+    charm: cs:~openstack-charmers-next/keystone
29
+    num_units: 1
30
+  nova-compute:
31
+    charm: cs:~openstack-charmers-next/nova-compute
32
+    num_units: 1
33
+  glance:
34
+    expose: True
35
+    charm: cs:~openstack-charmers-next/glance
36
+    num_units: 1
37
+  cinder:
38
+    expose: True
39
+    charm: cs:~openstack-charmers-next/cinder
40
+    num_units: 1
41
+    options:
42
+      block-device: 'None'
43
+      glance-api-version: '2'
44
+  cinder-ceph:
45
+    charm: cs:~openstack-charmers-next/cinder-ceph
46
+  nova-cloud-controller:
47
+    expose: True
48
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
49
+    num_units: 1
50
+relations:
51
+- - nova-compute:amqp
52
+  - rabbitmq-server:amqp
53
+- - nova-compute:image-service
54
+  - glance:image-service
55
+- - nova-compute:ceph
56
+  - ceph-mon:client
57
+- - keystone:shared-db
58
+  - percona-cluster:shared-db
59
+- - glance:shared-db
60
+  - percona-cluster:shared-db
61
+- - glance:identity-service
62
+  - keystone:identity-service
63
+- - glance:amqp
64
+  - rabbitmq-server:amqp
65
+- - glance:ceph
66
+  - ceph-mon:client
67
+- - cinder:shared-db
68
+  - percona-cluster:shared-db
69
+- - cinder:identity-service
70
+  - keystone:identity-service
71
+- - cinder:amqp
72
+  - rabbitmq-server:amqp
73
+- - cinder:image-service
74
+  - glance:image-service
75
+- - cinder-ceph:storage-backend
76
+  - cinder:storage-backend
77
+- - cinder-ceph:ceph
78
+  - ceph-mon:client
79
+- - ceph-osd:mon
80
+  - ceph-mon:osd
81
+- - nova-cloud-controller:shared-db
82
+  - percona-cluster:shared-db
83
+- - nova-cloud-controller:identity-service
84
+  - keystone:identity-service
85
+- - nova-cloud-controller:amqp
86
+  - rabbitmq-server:amqp
87
+- - nova-cloud-controller:cloud-compute
88
+  - nova-compute:cloud-compute
89
+- - nova-cloud-controller:image-service
90
+  - glance:image-service

+ 140
- 0
tests/bundles/trusty-mitaka.yaml View File

@@ -0,0 +1,140 @@
1
+series: trusty
2
+applications:
3
+  ceph-osd:
4
+    charm: cs:~openstack-charmers-next/ceph-osd
5
+    num_units: 3
6
+    storage:
7
+      osd-devices: 'cinder,10G'
8
+    options:
9
+      osd-devices: '/srv/ceph /dev/test-non-existent'
10
+      source: cloud:trusty-mitaka
11
+    # workaround while awaiting release of next version of python-libjuju with
12
+    # model-constraints support
13
+    constraints:
14
+      virt-type=kvm
15
+  ceph-mon:
16
+    charm: ceph-mon
17
+    series: trusty
18
+    num_units: 3
19
+    options:
20
+      monitor-count: '3'
21
+      auth-supported: 'none'
22
+      source: cloud:trusty-mitaka
23
+    # workaround while awaiting release of next version of python-libjuju with
24
+    # model-constraints support
25
+    constraints:
26
+      virt-type=kvm
27
+  percona-cluster:
28
+    charm: cs:~openstack-charmers-next/percona-cluster
29
+    num_units: 1
30
+    options:
31
+      dataset-size: 25%
32
+      max-connections: 1000
33
+      source: cloud:trusty-mitaka
34
+    # workaround while awaiting release of next version of python-libjuju with
35
+    # model-constraints support
36
+    constraints:
37
+      virt-type=kvm
38
+  rabbitmq-server:
39
+    charm: cs:~openstack-charmers-next/rabbitmq-server
40
+    num_units: 1
41
+    options:
42
+      source: cloud:trusty-mitaka
43
+    # workaround while awaiting release of next version of python-libjuju with
44
+    # model-constraints support
45
+    constraints:
46
+      virt-type=kvm
47
+  keystone:
48
+    expose: True
49
+    charm: cs:~openstack-charmers-next/keystone
50
+    num_units: 1
51
+    options:
52
+      openstack-origin: cloud:trusty-mitaka
53
+    # workaround while awaiting release of next version of python-libjuju with
54
+    # model-constraints support
55
+    constraints:
56
+      virt-type=kvm
57
+  nova-compute:
58
+    charm: cs:~openstack-charmers-next/nova-compute
59
+    num_units: 1
60
+    options:
61
+      openstack-origin: cloud:trusty-mitaka
62
+    # workaround while awaiting release of next version of python-libjuju with
63
+    # model-constraints support
64
+    constraints:
65
+      virt-type=kvm
66
+  glance:
67
+    expose: True
68
+    charm: cs:~openstack-charmers-next/glance
69
+    num_units: 1
70
+    options:
71
+      openstack-origin: cloud:trusty-mitaka
72
+    # workaround while awaiting release of next version of python-libjuju with
73
+    # model-constraints support
74
+    constraints:
75
+      virt-type=kvm
76
+  cinder:
77
+    expose: True
78
+    charm: cs:~openstack-charmers-next/cinder
79
+    num_units: 1
80
+    options:
81
+      block-device: 'None'
82
+      glance-api-version: '2'
83
+      openstack-origin: cloud:trusty-mitaka
84
+    # workaround while awaiting release of next version of python-libjuju with
85
+    # model-constraints support
86
+    constraints:
87
+      virt-type=kvm
88
+  cinder-ceph:
89
+    charm: cs:~openstack-charmers-next/cinder-ceph
90
+  nova-cloud-controller:
91
+    expose: True
92
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
93
+    num_units: 1
94
+    options:
95
+      openstack-origin: cloud:trusty-mitaka
96
+    # workaround while awaiting release of next version of python-libjuju with
97
+    # model-constraints support
98
+    constraints:
99
+      virt-type=kvm
100
+relations:
101
+- - nova-compute:amqp
102
+  - rabbitmq-server:amqp
103
+- - nova-compute:image-service
104
+  - glance:image-service
105
+- - nova-compute:ceph
106
+  - ceph-mon:client
107
+- - keystone:shared-db
108
+  - percona-cluster:shared-db
109
+- - glance:shared-db
110
+  - percona-cluster:shared-db
111
+- - glance:identity-service
112
+  - keystone:identity-service
113
+- - glance:amqp
114
+  - rabbitmq-server:amqp
115
+- - glance:ceph
116
+  - ceph-mon:client
117
+- - cinder:shared-db
118
+  - percona-cluster:shared-db
119
+- - cinder:identity-service
120
+  - keystone:identity-service
121
+- - cinder:amqp
122
+  - rabbitmq-server:amqp
123
+- - cinder:image-service
124
+  - glance:image-service
125
+- - cinder-ceph:storage-backend
126
+  - cinder:storage-backend
127
+- - cinder-ceph:ceph
128
+  - ceph-mon:client
129
+- - ceph-osd:mon
130
+  - ceph-mon:osd
131
+- - nova-cloud-controller:shared-db
132
+  - percona-cluster:shared-db
133
+- - nova-cloud-controller:identity-service
134
+  - keystone:identity-service
135
+- - nova-cloud-controller:amqp
136
+  - rabbitmq-server:amqp
137
+- - nova-cloud-controller:cloud-compute
138
+  - nova-compute:cloud-compute
139
+- - nova-cloud-controller:image-service
140
+  - glance:image-service

+ 90
- 0
tests/bundles/xenial-mitaka.yaml View File

@@ -0,0 +1,90 @@
1
+series: xenial
2
+applications:
3
+  ceph-osd:
4
+    charm: cs:~openstack-charmers-next/ceph-osd
5
+    num_units: 3
6
+    storage:
7
+      osd-devices: 'cinder,10G'
8
+    options:
9
+      osd-devices: '/srv/ceph /dev/test-non-existent'
10
+  ceph-mon:
11
+    charm: ceph-mon
12
+    series: xenial
13
+    num_units: 3
14
+    options:
15
+      monitor-count: '3'
16
+      auth-supported: 'none'
17
+  percona-cluster:
18
+    charm: cs:~openstack-charmers-next/percona-cluster
19
+    num_units: 1
20
+    options:
21
+      dataset-size: 25%
22
+      max-connections: 1000
23
+  rabbitmq-server:
24
+    charm: cs:~openstack-charmers-next/rabbitmq-server
25
+    num_units: 1
26
+  keystone:
27
+    expose: True
28
+    charm: cs:~openstack-charmers-next/keystone
29
+    num_units: 1
30
+  nova-compute:
31
+    charm: cs:~openstack-charmers-next/nova-compute
32
+    num_units: 1
33
+  glance:
34
+    expose: True
35
+    charm: cs:~openstack-charmers-next/glance
36
+    num_units: 1
37
+  cinder:
38
+    expose: True
39
+    charm: cs:~openstack-charmers-next/cinder
40
+    num_units: 1
41
+    options:
42
+      block-device: 'None'
43
+      glance-api-version: '2'
44
+  cinder-ceph:
45
+    charm: cs:~openstack-charmers-next/cinder-ceph
46
+  nova-cloud-controller:
47
+    expose: True
48
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
49
+    num_units: 1
50
+relations:
51
+- - nova-compute:amqp
52
+  - rabbitmq-server:amqp
53
+- - nova-compute:image-service
54
+  - glance:image-service
55
+- - nova-compute:ceph
56
+  - ceph-mon:client
57
+- - keystone:shared-db
58
+  - percona-cluster:shared-db
59
+- - glance:shared-db
60
+  - percona-cluster:shared-db
61
+- - glance:identity-service
62
+  - keystone:identity-service
63
+- - glance:amqp
64
+  - rabbitmq-server:amqp
65
+- - glance:ceph
66
+  - ceph-mon:client
67
+- - cinder:shared-db
68
+  - percona-cluster:shared-db
69
+- - cinder:identity-service
70
+  - keystone:identity-service
71
+- - cinder:amqp
72
+  - rabbitmq-server:amqp
73
+- - cinder:image-service
74
+  - glance:image-service
75
+- - cinder-ceph:storage-backend
76
+  - cinder:storage-backend
77
+- - cinder-ceph:ceph
78
+  - ceph-mon:client
79
+- - ceph-osd:mon
80
+  - ceph-mon:osd
81
+- - nova-cloud-controller:shared-db
82
+  - percona-cluster:shared-db
83
+- - nova-cloud-controller:identity-service
84
+  - keystone:identity-service
85
+- - nova-cloud-controller:amqp
86
+  - rabbitmq-server:amqp
87
+- - nova-cloud-controller:cloud-compute
88
+  - nova-compute:cloud-compute
89
+- - nova-cloud-controller:image-service
90
+  - glance:image-service

+ 104
- 0
tests/bundles/xenial-ocata.yaml View File

@@ -0,0 +1,104 @@
1
+series: xenial
2
+applications:
3
+  ceph-osd:
4
+    charm: cs:~openstack-charmers-next/ceph-osd
5
+    num_units: 3
6
+    storage:
7
+      osd-devices: 'cinder,10G'
8
+    options:
9
+      osd-devices: '/srv/ceph /dev/test-non-existent'
10
+      source: cloud:xenial-ocata
11
+  ceph-mon:
12
+    charm: ceph-mon
13
+    series: xenial
14
+    num_units: 3
15
+    options:
16
+      monitor-count: '3'
17
+      auth-supported: 'none'
18
+      source: cloud:xenial-ocata
19
+  percona-cluster:
20
+    charm: cs:~openstack-charmers-next/percona-cluster
21
+    num_units: 1
22
+    options:
23
+      dataset-size: 25%
24
+      max-connections: 1000
25
+      source: cloud:xenial-ocata
26
+  rabbitmq-server:
27
+    charm: cs:~openstack-charmers-next/rabbitmq-server
28
+    num_units: 1
29
+    options:
30
+      source: cloud:xenial-ocata
31
+  keystone:
32
+    expose: True
33
+    charm: cs:~openstack-charmers-next/keystone
34
+    num_units: 1
35
+    options:
36
+      openstack-origin: cloud:xenial-ocata
37
+  nova-compute:
38
+    charm: cs:~openstack-charmers-next/nova-compute
39
+    num_units: 1
40
+    options:
41
+      openstack-origin: cloud:xenial-ocata
42
+  glance:
43
+    expose: True
44
+    charm: cs:~openstack-charmers-next/glance
45
+    num_units: 1
46
+    options:
47
+      openstack-origin: cloud:xenial-ocata
48
+  cinder:
49
+    expose: True
50
+    charm: cs:~openstack-charmers-next/cinder
51
+    num_units: 1
52
+    options:
53
+      block-device: 'None'
54
+      glance-api-version: '2'
55
+      openstack-origin: cloud:xenial-ocata
56
+  cinder-ceph:
57
+    charm: cs:~openstack-charmers-next/cinder-ceph
58
+  nova-cloud-controller:
59
+    expose: True
60
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
61
+    num_units: 1
62
+    options:
63
+      openstack-origin: cloud:xenial-ocata
64
+relations:
65
+- - nova-compute:amqp
66
+  - rabbitmq-server:amqp
67
+- - nova-compute:image-service
68
+  - glance:image-service
69
+- - nova-compute:ceph
70
+  - ceph-mon:client
71
+- - keystone:shared-db
72
+  - percona-cluster:shared-db
73
+- - glance:shared-db
74
+  - percona-cluster:shared-db
75
+- - glance:identity-service
76
+  - keystone:identity-service
77
+- - glance:amqp
78
+  - rabbitmq-server:amqp
79
+- - glance:ceph
80
+  - ceph-mon:client
81
+- - cinder:shared-db
82
+  - percona-cluster:shared-db
83
+- - cinder:identity-service
84
+  - keystone:identity-service
85
+- - cinder:amqp
86
+  - rabbitmq-server:amqp
87
+- - cinder:image-service
88
+  - glance:image-service
89
+- - cinder-ceph:storage-backend
90
+  - cinder:storage-backend
91
+- - cinder-ceph:ceph
92
+  - ceph-mon:client
93
+- - ceph-osd:mon
94
+  - ceph-mon:osd
95
+- - nova-cloud-controller:shared-db
96
+  - percona-cluster:shared-db
97
+- - nova-cloud-controller:identity-service
98
+  - keystone:identity-service
99
+- - nova-cloud-controller:amqp
100
+  - rabbitmq-server:amqp
101
+- - nova-cloud-controller:cloud-compute
102
+  - nova-compute:cloud-compute
103
+- - nova-cloud-controller:image-service
104
+  - glance:image-service

+ 104
- 0
tests/bundles/xenial-pike.yaml View File

@@ -0,0 +1,104 @@
1
+series: xenial
2
+applications:
3
+  ceph-osd:
4
+    charm: cs:~openstack-charmers-next/ceph-osd
5
+    num_units: 3
6
+    storage:
7
+      osd-devices: 'cinder,10G'
8
+    options:
9
+      osd-devices: '/srv/ceph /dev/test-non-existent'
10
+      source: cloud:xenial-pike
11
+  ceph-mon:
12
+    charm: ceph-mon
13
+    series: xenial
14
+    num_units: 3
15
+    options:
16
+      monitor-count: '3'
17
+      auth-supported: 'none'
18
+      source: cloud:xenial-pike
19
+  percona-cluster:
20
+    charm: cs:~openstack-charmers-next/percona-cluster
21
+    num_units: 1
22
+    options:
23
+      dataset-size: 25%
24
+      max-connections: 1000
25
+      source: cloud:xenial-pike
26
+  rabbitmq-server:
27
+    charm: cs:~openstack-charmers-next/rabbitmq-server
28
+    num_units: 1
29
+    options:
30
+      source: cloud:xenial-pike
31
+  keystone:
32
+    expose: True
33
+    charm: cs:~openstack-charmers-next/keystone
34
+    num_units: 1
35
+    options:
36
+      openstack-origin: cloud:xenial-pike
37
+  nova-compute:
38
+    charm: cs:~openstack-charmers-next/nova-compute
39
+    num_units: 1
40
+    options:
41
+      openstack-origin: cloud:xenial-pike
42
+  glance:
43
+    expose: True
44
+    charm: cs:~openstack-charmers-next/glance
45
+    num_units: 1
46
+    options:
47
+      openstack-origin: cloud:xenial-pike
48
+  cinder:
49
+    expose: True
50
+    charm: cs:~openstack-charmers-next/cinder
51
+    num_units: 1
52
+    options:
53
+      block-device: 'None'
54
+      glance-api-version: '2'
55
+      openstack-origin: cloud:xenial-pike
56
+  cinder-ceph:
57
+    charm: cs:~openstack-charmers-next/cinder-ceph
58
+  nova-cloud-controller:
59
+    expose: True
60
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
61
+    num_units: 1
62
+    options:
63
+      openstack-origin: cloud:xenial-pike
64
+relations:
65
+- - nova-compute:amqp
66
+  - rabbitmq-server:amqp
67
+- - nova-compute:image-service
68
+  - glance:image-service
69
+- - nova-compute:ceph
70
+  - ceph-mon:client
71
+- - keystone:shared-db
72
+  - percona-cluster:shared-db
73
+- - glance:shared-db
74
+  - percona-cluster:shared-db
75
+- - glance:identity-service
76
+  - keystone:identity-service
77
+- - glance:amqp
78
+  - rabbitmq-server:amqp
79
+- - glance:ceph
80
+  - ceph-mon:client
81
+- - cinder:shared-db
82
+  - percona-cluster:shared-db
83
+- - cinder:identity-service
84
+  - keystone:identity-service
85
+- - cinder:amqp
86
+  - rabbitmq-server:amqp
87
+- - cinder:image-service
88
+  - glance:image-service
89
+- - cinder-ceph:storage-backend
90
+  - cinder:storage-backend
91
+- - cinder-ceph:ceph
92
+  - ceph-mon:client
93
+- - ceph-osd:mon
94
+  - ceph-mon:osd
95
+- - nova-cloud-controller:shared-db
96
+  - percona-cluster:shared-db
97
+- - nova-cloud-controller:identity-service
98
+  - keystone:identity-service
99
+- - nova-cloud-controller:amqp
100
+  - rabbitmq-server:amqp
101
+- - nova-cloud-controller:cloud-compute
102
+  - nova-compute:cloud-compute
103
+- - nova-cloud-controller:image-service
104
+  - glance:image-service

+ 104
- 0
tests/bundles/xenial-queens.yaml View File

@@ -0,0 +1,104 @@
1
+series: xenial
2
+applications:
3
+  ceph-osd:
4
+    charm: cs:~openstack-charmers-next/ceph-osd
5
+    num_units: 3
6
+    storage:
7
+      osd-devices: 'cinder,10G'
8
+    options:
9
+      osd-devices: '/srv/ceph /dev/test-non-existent'
10
+      source: cloud:xenial-queens
11
+  ceph-mon:
12
+    charm: ceph-mon
13
+    series: xenial
14
+    num_units: 3
15
+    options:
16
+      monitor-count: '3'
17
+      auth-supported: 'none'
18
+      source: cloud:xenial-queens
19
+  percona-cluster:
20
+    charm: cs:~openstack-charmers-next/percona-cluster
21
+    num_units: 1
22
+    options:
23
+      dataset-size: 25%
24
+      max-connections: 1000
25
+      source: cloud:xenial-queens
26
+  rabbitmq-server:
27
+    charm: cs:~openstack-charmers-next/rabbitmq-server
28
+    num_units: 1
29
+    options:
30
+      source: cloud:xenial-queens
31
+  keystone:
32
+    expose: True
33
+    charm: cs:~openstack-charmers-next/keystone
34
+    num_units: 1
35
+    options:
36
+      openstack-origin: cloud:xenial-queens
37
+  nova-compute:
38
+    charm: cs:~openstack-charmers-next/nova-compute
39
+    num_units: 1
40
+    options:
41
+      openstack-origin: cloud:xenial-queens
42
+  glance:
43
+    expose: True
44
+    charm: cs:~openstack-charmers-next/glance
45
+    num_units: 1
46
+    options:
47
+      openstack-origin: cloud:xenial-queens
48
+  cinder:
49
+    expose: True
50
+    charm: cs:~openstack-charmers-next/cinder
51
+    num_units: 1
52
+    options:
53
+      block-device: 'None'
54
+      glance-api-version: '2'
55
+      openstack-origin: cloud:xenial-queens
56
+  cinder-ceph:
57
+    charm: cs:~openstack-charmers-next/cinder-ceph
58
+  nova-cloud-controller:
59
+    expose: True
60
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
61
+    num_units: 1
62
+    options:
63
+      openstack-origin: cloud:xenial-queens
64
+relations:
65
+- - nova-compute:amqp
66
+  - rabbitmq-server:amqp
67
+- - nova-compute:image-service
68
+  - glance:image-service
69
+- - nova-compute:ceph
70
+  - ceph-mon:client
71
+- - keystone:shared-db
72
+  - percona-cluster:shared-db
73
+- - glance:shared-db
74
+  - percona-cluster:shared-db
75
+- - glance:identity-service
76
+  - keystone:identity-service
77
+- - glance:amqp
78
+  - rabbitmq-server:amqp
79
+- - glance:ceph
80
+  - ceph-mon:client
81
+- - cinder:shared-db
82
+  - percona-cluster:shared-db
83
+- - cinder:identity-service
84
+  - keystone:identity-service
85
+- - cinder:amqp
86
+  - rabbitmq-server:amqp
87
+- - cinder:image-service
88
+  - glance:image-service
89
+- - cinder-ceph:storage-backend
90
+  - cinder:storage-backend
91
+- - cinder-ceph:ceph
92
+  - ceph-mon:client
93
+- - ceph-osd:mon
94
+  - ceph-mon:osd
95
+- - nova-cloud-controller:shared-db
96
+  - percona-cluster:shared-db
97
+- - nova-cloud-controller:identity-service
98
+  - keystone:identity-service
99
+- - nova-cloud-controller:amqp
100
+  - rabbitmq-server:amqp
101
+- - nova-cloud-controller:cloud-compute
102
+  - nova-compute:cloud-compute
103
+- - nova-cloud-controller:image-service
104
+  - glance:image-service

+ 0
- 23
tests/dev-basic-cosmic-rocky View File

@@ -1,23 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic ceph deployment on cosmic-rocky."""
18
-
19
-from basic_deployment import CephBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = CephBasicDeployment(series='cosmic')
23
-    deployment.run_tests()

+ 0
- 23
tests/dev-basic-disco-stein View File

@@ -1,23 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic ceph deployment on disco-stein."""
18
-
19
-from basic_deployment import CephBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = CephBasicDeployment(series='disco')
23
-    deployment.run_tests()

+ 0
- 23
tests/gate-basic-bionic-queens View File

@@ -1,23 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic ceph deployment on bionic-queens."""
18
-
19
-from basic_deployment import CephBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = CephBasicDeployment(series='bionic')
23
-    deployment.run_tests()

+ 0
- 25
tests/gate-basic-bionic-rocky View File

@@ -1,25 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic ceph deployment on bionic-rocky."""
18
-
19
-from basic_deployment import CephBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = CephBasicDeployment(series='bionic',
23
-                                     openstack='cloud:bionic-rocky',
24
-                                     source='cloud:bionic-updates/rocky')
25
-    deployment.run_tests()

+ 0
- 25
tests/gate-basic-bionic-stein View File

@@ -1,25 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic ceph deployment on bionic-stein."""
18
-
19
-from basic_deployment import CephBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = CephBasicDeployment(series='bionic',
23
-                                     openstack='cloud:bionic-stein',
24
-                                     source='cloud:bionic-stein')
25
-    deployment.run_tests()

+ 0
- 25
tests/gate-basic-trusty-mitaka View File

@@ -1,25 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic ceph deployment on trusty-mitaka."""
18
-
19
-from basic_deployment import CephBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = CephBasicDeployment(series='trusty',
23
-                                     openstack='cloud:trusty-mitaka',
24
-                                     source='cloud:trusty-updates/mitaka')
25
-    deployment.run_tests()

+ 0
- 23
tests/gate-basic-xenial-mitaka View File

@@ -1,23 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic ceph deployment on xenial-mitaka."""
18
-
19
-from basic_deployment import CephBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = CephBasicDeployment(series='xenial')
23
-    deployment.run_tests()

+ 0
- 25
tests/gate-basic-xenial-ocata View File

@@ -1,25 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic ceph deployment on xenial-ocata."""
18
-
19
-from basic_deployment import CephBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = CephBasicDeployment(series='xenial',
23
-                                     openstack='cloud:xenial-ocata',
24
-                                     source='cloud:xenial-updates/ocata')
25
-    deployment.run_tests()

+ 0
- 25
tests/gate-basic-xenial-pike View File

@@ -1,25 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic ceph deployment on xenial-pike."""
18
-
19
-from basic_deployment import CephBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = CephBasicDeployment(series='xenial',
23
-                                     openstack='cloud:xenial-pike',
24
-                                     source='cloud:xenial-updates/pike')
25
-    deployment.run_tests()

+ 0
- 25
tests/gate-basic-xenial-queens View File

@@ -1,25 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic ceph deployment on xenial-queens."""
18
-
19
-from basic_deployment import CephBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = CephBasicDeployment(series='xenial',
23
-                                     openstack='cloud:xenial-queens',
24
-                                     source='cloud:xenial-updates/queens')
25
-    deployment.run_tests()

+ 22
- 18
tests/tests.yaml View File

@@ -1,18 +1,22 @@
1
-# Bootstrap the model if necessary.
2
-bootstrap: True
3
-# Re-use bootstrap node.
4
-reset: True
5
-# Use tox/requirements to drive the venv instead of bundletester's venv feature.
6
-virtualenv: False
7
-# Leave makefile empty, otherwise unit/lint tests will rerun ahead of amulet.
8
-makefile: []
9
-# Do not specify juju PPA sources.  Juju is presumed to be pre-installed
10
-# and configured in all test runner environments.
11
-#sources:
12
-# Do not specify or rely on system packages.
13
-#packages:
14
-# Do not specify python packages here.  Use test-requirements.txt
15
-# and tox instead.  ie. The venv is constructed before bundletester
16
-# is invoked.
17
-#python-packages:
18
-reset_timeout: 600
1
+charm_name: ceph-mon
2
+gate_bundles:
3
+  - bionic-stein
4
+  - bionic-rocky
5
+  - bionic-queens
6
+  - xenial-queens
7
+  - xenial-pike
8
+  - xenial-ocata
9
+  - xenial-mitaka
10
+  - trusty-mitaka
11
+smoke_bundles:
12
+  - bionic-queens
13
+dev_bundles:
14
+  - cosmic-rocky
15
+  - disco-stein
16
+configure:
17
+  - zaza.openstack.charm_tests.glance.setup.add_lts_image
18
+tests:
19
+  - zaza.openstack.charm_tests.ceph.tests.CephLowLevelTest
20
+  - zaza.openstack.charm_tests.ceph.tests.CephRelationTest
21
+  - zaza.openstack.charm_tests.ceph.tests.CephTest
22
+  - zaza.openstack.charm_tests.ceph.osd.tests.SecurityTest

+ 10
- 37
tox.ini View File

@@ -15,6 +15,7 @@ install_command =
15 15
 commands = stestr run {posargs}
16 16
 whitelist_externals = juju
17 17
 passenv = HOME TERM AMULET_* CS_API_*
18
+deps = -r{toxinidir}/test-requirements.txt
18 19
 
19 20
 [testenv:py27]
20 21
 basepython = python2.7
@@ -78,49 +79,21 @@ omit =
78 79
 basepython = python3
79 80
 commands = {posargs}
80 81
 
81
-[testenv:func27-noop]
82
-# DRY RUN - For Debug
83
-basepython = python2.7
84
-deps = -r{toxinidir}/requirements.txt
85
-       -r{toxinidir}/test-requirements.txt
86
-commands =
87
-    bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" -n --no-destroy
88 82
 
89
-[testenv:func27]
90
-# Charm Functional Test
91
-# Run all gate tests which are +x (expected to always pass)
92
-basepython = python2.7
93
-deps = -r{toxinidir}/requirements.txt
94
-       -r{toxinidir}/test-requirements.txt
95
-commands =
96
-    bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" --no-destroy
97
-
98
-[testenv:func27-smoke]
99
-# Charm Functional Test
100
-# Run a specific test as an Amulet smoke test (expected to always pass)
101
-basepython = python2.7
102
-deps = -r{toxinidir}/requirements.txt
103
-       -r{toxinidir}/test-requirements.txt
83
+[testenv:func]
84
+basepython = python3
104 85
 commands =
105
-    bundletester -vl DEBUG -r json -o func-results.json gate-basic-bionic-queens --no-destroy
86
+    functest-run-suite --keep-model
106 87
 
107
-[testenv:func27-dfs]
108
-# Charm Functional Test
109
-# Run all deploy-from-source tests which are +x (may not always pass!)
110
-basepython = python2.7
111
-deps = -r{toxinidir}/requirements.txt
112
-       -r{toxinidir}/test-requirements.txt
88
+[testenv:func-smoke]
89
+basepython = python3
113 90
 commands =
114
-    bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dfs-*" --no-destroy
91
+    functest-run-suite --keep-model --smoke
115 92
 
116
-[testenv:func27-dev]
117
-# Charm Functional Test
118
-# Run all development test targets which are +x (may not always pass!)
119
-basepython = python2.7
120
-deps = -r{toxinidir}/requirements.txt
121
-       -r{toxinidir}/test-requirements.txt
93
+[testenv:func-dev]
94
+basepython = python3
122 95
 commands =
123
-    bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dev-*" --no-destroy
96
+    functest-run-suite --keep-model --dev
124 97
 
125 98
 [flake8]
126 99
 ignore = E402,E226

Loading…
Cancel
Save