From bc9425339814d113de364f679a19cdba6b366242 Mon Sep 17 00:00:00 2001 From: Billy Olsen Date: Fri, 21 Jun 2024 11:09:51 -0700 Subject: [PATCH] Add charmcraft 3 support Update the charmcraft.yaml file to use base and platforms, only allowing noble support. - Update osci.yaml to use the charmcraft 3.x/beta - Add noble/oracular to charmhelpers - Drop non-noble tests Change-Id: If23d82a0c31ccdc3f383d83c29761cddcfdafbd0 --- charmcraft.yaml | 63 +++++------ charmhelpers/core/host_factory/ubuntu.py | 2 + osci.yaml | 4 +- tests/bundles/focal-yoga.yaml | 104 ------------------ .../{jammy-yoga.yaml => noble-caracal.yaml} | 6 +- tests/tests.yaml | 10 +- 6 files changed, 39 insertions(+), 150 deletions(-) delete mode 100644 tests/bundles/focal-yoga.yaml rename tests/bundles/{jammy-yoga.yaml => noble-caracal.yaml} (96%) diff --git a/charmcraft.yaml b/charmcraft.yaml index f48a7e18..73129d5d 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -5,38 +5,33 @@ parts: plugin: dump source: . prime: - - actions/* - - charmhelpers/* - - files/* - - hooks/* - - lib/* - - templates/* - - actions.yaml - - config.yaml - - copyright - - hardening.yaml - - icon.svg - - LICENSE - - Makefile - - metadata.yaml - - README.md + - actions/* + - charmhelpers/* + - files/* + - hooks/* + - lib/* + - templates/* + - actions.yaml + - config.yaml + - copyright + - hardening.yaml + - icon.svg + - LICENSE + - Makefile + - metadata.yaml + - README.md -bases: - - build-on: - - name: ubuntu - channel: "20.04" - architectures: - - amd64 - run-on: - - name: ubuntu - channel: "20.04" - architectures: [amd64, s390x, ppc64el, arm64] - - name: ubuntu - channel: "22.04" - architectures: [amd64, s390x, ppc64el, arm64] - - name: ubuntu - channel: "23.04" - architectures: [amd64, s390x, ppc64el, arm64] - - name: ubuntu - channel: "23.10" - architectures: [amd64, s390x, ppc64el, arm64] +base: ubuntu@24.04 +platforms: + amd64: + build-on: amd64 + build-for: amd64 + arm64: + build-on: arm64 + build-for: arm64 + ppc64el: + build-on: ppc64el + build-for: ppc64el + s390x: + build-on: s390x + build-for: s390x diff --git a/charmhelpers/core/host_factory/ubuntu.py b/charmhelpers/core/host_factory/ubuntu.py index 732d76c3..e87595e4 100644 --- a/charmhelpers/core/host_factory/ubuntu.py +++ b/charmhelpers/core/host_factory/ubuntu.py @@ -33,6 +33,8 @@ UBUNTU_RELEASES = ( 'kinetic', 'lunar', 'mantic', + 'noble', + 'oracular', ) diff --git a/osci.yaml b/osci.yaml index 255c9b3e..35ab96f4 100644 --- a/osci.yaml +++ b/osci.yaml @@ -1,9 +1,9 @@ - project: templates: - - charm-unit-jobs-py38 - charm-unit-jobs-py310 - - charm-yoga-functional-jobs + - charm-functional-jobs vars: needs_charm_build: true charm_build_name: rabbitmq-server build_type: charmcraft + charmcraft_channel: 3.x/beta diff --git a/tests/bundles/focal-yoga.yaml b/tests/bundles/focal-yoga.yaml deleted file mode 100644 index a5f91f15..00000000 --- a/tests/bundles/focal-yoga.yaml +++ /dev/null @@ -1,104 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:focal-yoga - -series: focal - -comment: -- 'machines section to decide order of deployment. database sooner = faster' -machines: - '0': - constraints: mem=3072M - '1': - constraints: mem=3072M - '2': - constraints: mem=3072M - '3': - '4': - '5': - '6': - '7': - '8': - series: bionic # nagios not supported on focal yet - - -applications: - - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - cinder-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - to: - - '0' - - '1' - - '2' - channel: latest/edge - - rabbitmq-server: - charm: ../../rabbitmq-server.charm - num_units: 3 - constraints: - cpu-cores=2 - options: - min-cluster-size: 3 - max-cluster-tries: 6 - ssl: "off" - management_plugin: "False" - stats_cron_schedule: "*/1 * * * *" - to: - - '3' - - '4' - - '5' - - cinder: - charm: ch:cinder - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '6' - channel: yoga/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - admin-password: openstack - to: - - '7' - channel: yoga/edge - - nagios: - charm: ch:nagios - series: bionic # not supported on focal yet - num_units: 1 - to: - - '8' - - nrpe: - charm: ch:nrpe - -relations: - - - - 'cinder:amqp' - - 'rabbitmq-server:amqp' - - - 'cinder:shared-db' - - 'cinder-mysql-router:shared-db' - - - 'cinder-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - 'cinder:identity-service' - - 'keystone:identity-service' - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - 'nrpe:nrpe-external-master' - - 'rabbitmq-server:nrpe-external-master' - - - 'nrpe:monitors' - - 'nagios:monitors' diff --git a/tests/bundles/jammy-yoga.yaml b/tests/bundles/noble-caracal.yaml similarity index 96% rename from tests/bundles/jammy-yoga.yaml rename to tests/bundles/noble-caracal.yaml index f637b58c..10e96883 100644 --- a/tests/bundles/jammy-yoga.yaml +++ b/tests/bundles/noble-caracal.yaml @@ -1,7 +1,7 @@ variables: openstack-origin: &openstack-origin distro -series: jammy +series: noble comment: - 'machines section to decide order of deployment. database sooner = faster' @@ -59,7 +59,7 @@ applications: openstack-origin: *openstack-origin to: - '6' - channel: yoga/edge + channel: latest/edge keystone: charm: ch:keystone @@ -69,7 +69,7 @@ applications: admin-password: openstack to: - '7' - channel: yoga/edge + channel: latest/edge relations: diff --git a/tests/tests.yaml b/tests/tests.yaml index 08d5b685..2b0953d2 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -1,20 +1,16 @@ charm_name: rabbitmq-server smoke_bundles: - - focal-yoga + - noble-caracal gate_bundles: - - focal-yoga + - noble-caracal dev_bundles: - - jammy-yoga + - noble-caracal tests: - zaza.openstack.charm_tests.rabbitmq_server.tests.RabbitMQDeferredRestartTest - zaza.openstack.charm_tests.rabbitmq_server.tests.RmqTests - zaza.openstack.charm_tests.rabbitmq_server.tests.RmqRotateServiceUserPasswordTests -tests_options: - force_deploy: - # nrpe charm doesn't support hirsute->jammy and needs to be force installed - - jammy-yoga