From ede69911b6ce39f52f89c31357f6db318724edaf Mon Sep 17 00:00:00 2001 From: Billy Olsen Date: Fri, 21 Jun 2024 17:52:22 -0700 Subject: [PATCH] Add charmcraft 3 support Update the charmcraft.yaml file to use base and platforms, only allowing noble support. - Update config to default to caracal. - Update osci.yaml to use the charmcraft 3.x/beta - Add noble/oracular to charmhelpers - Drop non-noble tests Change-Id: I06c6c515ee190a63a8bb8be43dc9ffe2a1f92030 --- charmcraft.yaml | 40 +++++-------- charmhelpers/core/host_factory/ubuntu.py | 2 + config.yaml | 2 +- osci.yaml | 8 +-- tests/bundles/jammy-antelope.yaml | 73 ------------------------ tests/bundles/jammy-bobcat.yaml | 73 ------------------------ tests/bundles/jammy-caracal.yaml | 73 ------------------------ tests/bundles/jammy-vault.yaml | 36 ------------ tests/bundles/noble-caracal.yaml | 2 +- tests/tests.yaml | 6 +- 10 files changed, 24 insertions(+), 291 deletions(-) delete mode 100644 tests/bundles/jammy-antelope.yaml delete mode 100644 tests/bundles/jammy-bobcat.yaml delete mode 100644 tests/bundles/jammy-caracal.yaml delete mode 100644 tests/bundles/jammy-vault.yaml diff --git a/charmcraft.yaml b/charmcraft.yaml index 09f03428..eac8e267 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -4,30 +4,18 @@ parts: charm: 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 -bases: - - build-on: - - name: ubuntu - channel: "22.04" - architectures: - - amd64 - run-on: - - name: ubuntu - channel: "22.04" - 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/config.yaml b/config.yaml index b7fc9cd2..87121d07 100644 --- a/config.yaml +++ b/config.yaml @@ -10,7 +10,7 @@ options: Setting this to True will allow supporting services to log to syslog. openstack-origin: type: string - default: bobcat + default: caracal description: | Repository from which to install. May be one of the following: distro (default), ppa:somecustom/ppa, a deb url sources entry, diff --git a/osci.yaml b/osci.yaml index b028831d..304f8e4a 100644 --- a/osci.yaml +++ b/osci.yaml @@ -6,16 +6,16 @@ jobs: # gr tests are disabled due to: # https://bugs.launchpad.net/charm-openstack-dashboard/+bug/1951644 - - jammy-antelope-gr: + - noble-caracal-gr: voting: false vars: needs_charm_build: true charm_build_name: openstack-dashboard build_type: charmcraft - charmcraft_channel: 2.x/stable + charmcraft_channel: 3.x/beta - job: - name: jammy-antelope-gr + name: noble-caracal-gr parent: func-target dependencies: - osci-lint @@ -23,4 +23,4 @@ soft: true - charm-build vars: - tox_extra_args: '-- vault:jammy-vault dashboard:jammy-antelope-cmr-vault' + tox_extra_args: '-- vault:noble-vault dashboard:noble-caracal-cmr-vault' diff --git a/tests/bundles/jammy-antelope.yaml b/tests/bundles/jammy-antelope.yaml deleted file mode 100644 index 3c800dba..00000000 --- a/tests/bundles/jammy-antelope.yaml +++ /dev/null @@ -1,73 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:jammy-antelope - -series: jammy - -comment: - - 'machines section to decide order of deployment. database sooner = faster' - - 'virt-type=kvm is workaround while awaiting new release of python-libjuju' - -machines: - '0': - constraints: virt-type=kvm mem=3072M - '1': - constraints: virt-type=kvm mem=3072M - '2': - constraints: virt-type=kvm mem=3072M - '3': - constraints: virt-type=kvm - '4': - constraints: virt-type=kvm mem=3072M - -applications: - - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - openstack-dashboard-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: 1 - options: - openstack-origin: *openstack-origin - to: - - '3' - channel: 2024.1/edge - - openstack-dashboard: - charm: ../../openstack-dashboard.charm - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '4' - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'openstack-dashboard:shared-db' - - 'openstack-dashboard-mysql-router:shared-db' - - - 'openstack-dashboard-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - - 'openstack-dashboard:identity-service' - - 'keystone:identity-service' diff --git a/tests/bundles/jammy-bobcat.yaml b/tests/bundles/jammy-bobcat.yaml deleted file mode 100644 index 42a243dc..00000000 --- a/tests/bundles/jammy-bobcat.yaml +++ /dev/null @@ -1,73 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:jammy-bobcat - -series: jammy - -comment: - - 'machines section to decide order of deployment. database sooner = faster' - - 'virt-type=kvm is workaround while awaiting new release of python-libjuju' - -machines: - '0': - constraints: virt-type=kvm mem=3072M - '1': - constraints: virt-type=kvm mem=3072M - '2': - constraints: virt-type=kvm mem=3072M - '3': - constraints: virt-type=kvm - '4': - constraints: virt-type=kvm mem=3072M - -applications: - - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - openstack-dashboard-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: 1 - options: - openstack-origin: *openstack-origin - to: - - '3' - channel: 2024.1/edge - - openstack-dashboard: - charm: ../../openstack-dashboard.charm - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '4' - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'openstack-dashboard:shared-db' - - 'openstack-dashboard-mysql-router:shared-db' - - - 'openstack-dashboard-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - - 'openstack-dashboard:identity-service' - - 'keystone:identity-service' diff --git a/tests/bundles/jammy-caracal.yaml b/tests/bundles/jammy-caracal.yaml deleted file mode 100644 index d8c18370..00000000 --- a/tests/bundles/jammy-caracal.yaml +++ /dev/null @@ -1,73 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:jammy-caracal - -series: jammy - -comment: - - 'machines section to decide order of deployment. database sooner = faster' - - 'virt-type=kvm is workaround while awaiting new release of python-libjuju' - -machines: - '0': - constraints: virt-type=kvm mem=3072M - '1': - constraints: virt-type=kvm mem=3072M - '2': - constraints: virt-type=kvm mem=3072M - '3': - constraints: virt-type=kvm - '4': - constraints: virt-type=kvm mem=3072M - -applications: - - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - openstack-dashboard-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: 1 - options: - openstack-origin: *openstack-origin - to: - - '3' - channel: 2024.1/edge - - openstack-dashboard: - charm: ../../openstack-dashboard.charm - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '4' - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'openstack-dashboard:shared-db' - - 'openstack-dashboard-mysql-router:shared-db' - - - 'openstack-dashboard-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - - 'openstack-dashboard:identity-service' - - 'keystone:identity-service' diff --git a/tests/bundles/jammy-vault.yaml b/tests/bundles/jammy-vault.yaml deleted file mode 100644 index 717c9815..00000000 --- a/tests/bundles/jammy-vault.yaml +++ /dev/null @@ -1,36 +0,0 @@ -series: jammy -local_overlay_enabled: false -machines: - '0': - constraints: virt-type=kvm mem=3072M - '1': - constraints: virt-type=kvm mem=3072M - '2': - constraints: virt-type=kvm mem=3072M - '3': -services: - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - options: - source: distro - to: - - '0' - - '1' - - '2' - channel: latest/edge - vault-mysql-router: - charm: ch:mysql-router - channel: latest/edge - vault: - num_units: 1 - series: bionic - charm: ch:vault - to: - - '3' - channel: latest/edge -relations: -- - vault:shared-db - - vault-mysql-router:shared-db -- - vault-mysql-router:db-router - - mysql-innodb-cluster:db-router diff --git a/tests/bundles/noble-caracal.yaml b/tests/bundles/noble-caracal.yaml index 1fe6c21f..b3ad92c5 100644 --- a/tests/bundles/noble-caracal.yaml +++ b/tests/bundles/noble-caracal.yaml @@ -46,7 +46,7 @@ applications: openstack-origin: *openstack-origin to: - '3' - channel: 2024.1/edge + channel: latest/edge openstack-dashboard: charm: ../../openstack-dashboard.charm diff --git a/tests/tests.yaml b/tests/tests.yaml index d8f57103..1cd083f5 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -4,11 +4,9 @@ comment: - '' smoke_bundles: - - jammy-caracal + - noble-caracal gate_bundles: - - jammy-antelope - - jammy-bobcat - - jammy-caracal + - noble-caracal dev_bundles: - noble-caracal configure: