From 2ed90d66560099bbacca9e8a01d8d3d47219759b Mon Sep 17 00:00:00 2001 From: Myles Penner Date: Mon, 2 Sep 2024 20:49:48 +0000 Subject: [PATCH] Add charmcraft 3 support Summary of changes: - Update the charmcraft.yaml file to use base and platforms, only allowing noble support. - Update osci.yaml to use the charmcraft 3.x/beta - Drop non-noble tests - Update constraints file from -2024.1.txt to -noble.txt - Add charmbuild to .zuul.yaml Change-Id: Iea66ab06772d39bf1046af6859968c2d10426a8b --- .zuul.yaml | 5 ++ charmcraft.yaml | 26 ++++--- osci.yaml | 2 +- src/metadata.yaml | 2 - src/tests/bundles/jammy-antelope.yaml | 108 -------------------------- src/tests/bundles/jammy-bobcat.yaml | 108 -------------------------- src/tests/bundles/jammy-caracal.yaml | 108 -------------------------- src/tests/bundles/noble-caracal.yaml | 6 +- src/tests/tests.yaml | 6 +- src/tox.ini | 2 +- tox.ini | 8 +- 11 files changed, 31 insertions(+), 350 deletions(-) delete mode 100644 src/tests/bundles/jammy-antelope.yaml delete mode 100644 src/tests/bundles/jammy-bobcat.yaml delete mode 100644 src/tests/bundles/jammy-caracal.yaml diff --git a/.zuul.yaml b/.zuul.yaml index fd20909..73f15d7 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -2,3 +2,8 @@ templates: - openstack-python3-charm-jobs - openstack-cover-jobs + check: + jobs: + - charmbuild + vars: + charm_build_name: manila-dashboard diff --git a/charmcraft.yaml b/charmcraft.yaml index c31dea1..c31545a 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -7,18 +7,22 @@ parts: build-packages: - libpython3-dev build-snaps: - - charm + - charm/latest/edge build-environment: - CHARM_INTERFACES_DIR: /root/project/interfaces/ - CHARM_LAYERS_DIR: /root/project/layers/ -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/osci.yaml b/osci.yaml index 4dc3a20..81aea71 100644 --- a/osci.yaml +++ b/osci.yaml @@ -6,4 +6,4 @@ needs_charm_build: true charm_build_name: manila-dashboard build_type: charmcraft - charmcraft_channel: 2.x/stable + charmcraft_channel: 3.x/stable diff --git a/src/metadata.yaml b/src/metadata.yaml index 654a855..949e974 100644 --- a/src/metadata.yaml +++ b/src/metadata.yaml @@ -6,8 +6,6 @@ description: | service, Manila. tags: - openstack -series: - - jammy subordinate: true requires: dashboard: diff --git a/src/tests/bundles/jammy-antelope.yaml b/src/tests/bundles/jammy-antelope.yaml deleted file mode 100644 index 0f2983c..0000000 --- a/src/tests/bundles/jammy-antelope.yaml +++ /dev/null @@ -1,108 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:jammy-antelope - -local_overlay_enabled: False - -series: jammy - -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': - -applications: - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - manila-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 - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '3' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '4' - channel: 2024.1/edge - - manila: - charm: ch:manila - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - channel: 2024.1/edge - - openstack-dashboard: - charm: ch:openstack-dashboard - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '6' - channel: 2024.1/edge - - manila-dashboard: - charm: ../../../manila-dashboard.charm - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'manila:shared-db' - - 'manila-mysql-router:shared-db' - - - 'manila-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'manila:amqp' - - 'rabbitmq-server:amqp' - - - - 'manila:identity-service' - - 'keystone:identity-service' - - - - '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' - - - - 'openstack-dashboard:dashboard-plugin' - - 'manila-dashboard:dashboard' diff --git a/src/tests/bundles/jammy-bobcat.yaml b/src/tests/bundles/jammy-bobcat.yaml deleted file mode 100644 index fdafbb8..0000000 --- a/src/tests/bundles/jammy-bobcat.yaml +++ /dev/null @@ -1,108 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:jammy-bobcat - -local_overlay_enabled: False - -series: jammy - -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': - -applications: - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - manila-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 - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '3' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '4' - channel: 2024.1/edge - - manila: - charm: ch:manila - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - channel: 2024.1/edge - - openstack-dashboard: - charm: ch:openstack-dashboard - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '6' - channel: 2024.1/edge - - manila-dashboard: - charm: ../../../manila-dashboard.charm - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'manila:shared-db' - - 'manila-mysql-router:shared-db' - - - 'manila-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'manila:amqp' - - 'rabbitmq-server:amqp' - - - - 'manila:identity-service' - - 'keystone:identity-service' - - - - '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' - - - - 'openstack-dashboard:dashboard-plugin' - - 'manila-dashboard:dashboard' diff --git a/src/tests/bundles/jammy-caracal.yaml b/src/tests/bundles/jammy-caracal.yaml deleted file mode 100644 index 9552a79..0000000 --- a/src/tests/bundles/jammy-caracal.yaml +++ /dev/null @@ -1,108 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:jammy-caracal - -local_overlay_enabled: False - -series: jammy - -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': - -applications: - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - manila-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 - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '3' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '4' - channel: 2024.1/edge - - manila: - charm: ch:manila - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - channel: 2024.1/edge - - openstack-dashboard: - charm: ch:openstack-dashboard - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '6' - channel: 2024.1/edge - - manila-dashboard: - charm: ../../../manila-dashboard.charm - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'manila:shared-db' - - 'manila-mysql-router:shared-db' - - - 'manila-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'manila:amqp' - - 'rabbitmq-server:amqp' - - - - 'manila:identity-service' - - 'keystone:identity-service' - - - - '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' - - - - 'openstack-dashboard:dashboard-plugin' - - 'manila-dashboard:dashboard' diff --git a/src/tests/bundles/noble-caracal.yaml b/src/tests/bundles/noble-caracal.yaml index b5ca106..bc7bc1a 100644 --- a/src/tests/bundles/noble-caracal.yaml +++ b/src/tests/bundles/noble-caracal.yaml @@ -55,7 +55,7 @@ applications: openstack-origin: *openstack-origin to: - '4' - channel: 2024.1/edge + channel: latest/edge manila: charm: ch:manila @@ -64,7 +64,7 @@ applications: openstack-origin: *openstack-origin to: - '5' - channel: 2024.1/edge + channel: latest/edge openstack-dashboard: charm: ch:openstack-dashboard @@ -73,7 +73,7 @@ applications: openstack-origin: *openstack-origin to: - '6' - channel: 2024.1/edge + channel: latest/edge manila-dashboard: charm: ../../../manila-dashboard.charm diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index 8e433fa..cdc5623 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -1,11 +1,9 @@ charm_name: manila-dashboard smoke_bundles: - - jammy-caracal + - noble-caracal gate_bundles: - - jammy-antelope - - jammy-bobcat - - jammy-caracal + - noble-caracal dev_bundles: - noble-caracal target_deploy_status: diff --git a/src/tox.ini b/src/tox.ini index 2ddcccd..3ce5e85 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -26,7 +26,7 @@ passenv = OS_* TEST_* deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/test-requirements.txt [testenv:pep8] diff --git a/tox.ini b/tox.ini index dfa7936..81302e8 100644 --- a/tox.ini +++ b/tox.ini @@ -62,21 +62,21 @@ commands = [testenv:py3] basepython = python3 deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} [testenv:py312] basepython = python3.12 deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} [testenv:py310] basepython = python3.10 deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} @@ -91,7 +91,7 @@ commands = flake8 {posargs} src unit_tests # https://github.com/openstack/nova/blob/master/tox.ini basepython = python3 deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt setenv =