From 06da7398291bee38e9960eaf219873d7f180b24d Mon Sep 17 00:00:00 2001 From: Billy Olsen Date: Thu, 20 Jun 2024 16:27:38 -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: I8e6b4040d84a7022e22305a629a854a22232d65d --- charmcraft.yaml | 58 +++++++++---------- charmhelpers/core/host_factory/ubuntu.py | 2 + osci.yaml | 5 +- tests/bundles/focal-yoga.yaml | 57 ------------------ tests/bundles/jammy-bobcat.yaml | 57 ------------------ .../{jammy-yoga.yaml => noble-caracal.yaml} | 4 +- tests/tests.yaml | 11 +--- 7 files changed, 37 insertions(+), 157 deletions(-) delete mode 100644 tests/bundles/focal-yoga.yaml delete mode 100644 tests/bundles/jammy-bobcat.yaml rename tests/bundles/{jammy-yoga.yaml => noble-caracal.yaml} (96%) diff --git a/charmcraft.yaml b/charmcraft.yaml index 65b8911..767e15b 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -5,34 +5,32 @@ parts: plugin: dump source: . prime: - - actions/* - - charmhelpers/* - - files/* - - hooks/* - - lib/* - - templates/* - - actions.yaml - - config.yaml - - copyright - - icon.svg - - LICENSE - - Makefile - - metadata.yaml - - README.md + - actions/* + - charmhelpers/* + - files/* + - hooks/* + - lib/* + - templates/* + - actions.yaml + - config.yaml + - copyright + - 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.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 732d76c..e87595e 100644 --- a/charmhelpers/core/host_factory/ubuntu.py +++ b/charmhelpers/core/host_factory/ubuntu.py @@ -33,6 +33,8 @@ 'kinetic', 'lunar', 'mantic', + 'noble', + 'oracular', ) diff --git a/osci.yaml b/osci.yaml index f042dc5..f92a529 100644 --- a/osci.yaml +++ b/osci.yaml @@ -1,10 +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: hacluster build_type: charmcraft - charmcraft_channel: 2.x/stable + charmcraft_channel: 3.x/beta diff --git a/tests/bundles/focal-yoga.yaml b/tests/bundles/focal-yoga.yaml deleted file mode 100644 index 3072cc5..0000000 --- a/tests/bundles/focal-yoga.yaml +++ /dev/null @@ -1,57 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:focal-yoga - -series: focal - -machines: - '0': - constraints: mem=3072M - '1': - constraints: mem=3072M - '2': - constraints: mem=3072M - '3': - '4': - '5': - -applications: - - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - options: - source: *openstack-origin - to: - - '0' - - '1' - - '2' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 3 - options: - token-expiration: 60 - openstack-origin: *openstack-origin - to: - - '3' - - '4' - - '5' - channel: yoga/edge - - keystone-hacluster: - charm: ../../hacluster.charm - subordinate-to: - - keystone - -relations: - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-hacluster:ha' - - 'keystone:ha' - - - "keystone-mysql-router:db-router" - - "mysql-innodb-cluster:db-router" diff --git a/tests/bundles/jammy-bobcat.yaml b/tests/bundles/jammy-bobcat.yaml deleted file mode 100644 index bda60f3..0000000 --- a/tests/bundles/jammy-bobcat.yaml +++ /dev/null @@ -1,57 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:jammy-bobcat - -series: jammy - -machines: - '0': - constraints: mem=3072M - '1': - constraints: mem=3072M - '2': - constraints: mem=3072M - '3': - '4': - '5': - -applications: - - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - options: - source: *openstack-origin - to: - - '0' - - '1' - - '2' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 3 - options: - token-expiration: 60 - openstack-origin: *openstack-origin - to: - - '3' - - '4' - - '5' - channel: yoga/edge - - keystone-hacluster: - charm: ../../hacluster.charm - subordinate-to: - - keystone - -relations: - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-hacluster:ha' - - 'keystone:ha' - - - "keystone-mysql-router:db-router" - - "mysql-innodb-cluster:db-router" 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 fcf761b..b57a427 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 machines: '0': @@ -41,7 +41,7 @@ applications: - '3' - '4' - '5' - channel: yoga/edge + channel: latest/edge keystone-hacluster: charm: ../../hacluster.charm diff --git a/tests/tests.yaml b/tests/tests.yaml index c48f99c..fc3c239 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -1,15 +1,13 @@ charm_name: hacluster smoke_bundles: - - focal-yoga + - noble-caracal gate_bundles: - - focal-yoga + - noble-caracal dev_bundles: - - jammy-yoga - - jammy-bobcat - - mantic-bobcat + - noble-caracal configure: - zaza.openstack.charm_tests.keystone.setup.add_demo_user @@ -22,6 +20,3 @@ tests_options: hacluster: principle-app-name: keystone hacluster-charm-name: hacluster - force_deploy: - - jammy-yoga - - mantic-bobcat