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
- Drop non-noble tests
- Update constraints file from -2024.1.txt to -noble.txt
- Add charmbuild to .zuul.yaml
- Update flake to 7.1.1
- Add Py312 tox target
- Remove setup_tools pinning

Change-Id: Idd6c6524ea9f0da006af6916ce6ac4569c225a28
This commit is contained in:
Jadon Naas 2024-09-06 17:25:45 -04:00
parent 3b1518d306
commit 9c040be542
13 changed files with 39 additions and 314 deletions

View File

@ -2,3 +2,8 @@
templates: templates:
- openstack-python3-charm-jobs - openstack-python3-charm-jobs
- openstack-cover-jobs - openstack-cover-jobs
check:
jobs:
- charmbuild
vars:
charm_build_name: cinder-purestorage

View File

@ -20,36 +20,17 @@ parts:
build-environment: build-environment:
- CHARM_INTERFACES_DIR: $CRAFT_PROJECT_DIR/interfaces/ - CHARM_INTERFACES_DIR: $CRAFT_PROJECT_DIR/interfaces/
- CHARM_LAYERS_DIR: $CRAFT_PROJECT_DIR/layers/ - CHARM_LAYERS_DIR: $CRAFT_PROJECT_DIR/layers/
bases: base: ubuntu@24.04
- build-on: platforms:
- name: ubuntu amd64:
channel: "22.04" build-on: amd64
architectures: [amd64] build-for: amd64
run-on: arm64:
- name: ubuntu build-on: arm64
channel: "22.04" build-for: arm64
architectures: [amd64] ppc64el:
- build-on: build-on: ppc64el
- name: ubuntu build-for: ppc64el
channel: "22.04" s390x:
architectures: [s390x] build-on: s390x
run-on: build-for: s390x
- name: ubuntu
channel: "22.04"
architectures: [s390x]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [ppc64el]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [ppc64el]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [arm64]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [arm64]

View File

@ -6,4 +6,4 @@
needs_charm_build: true needs_charm_build: true
charm_build_name: cinder-purestorage charm_build_name: cinder-purestorage
build_type: charmcraft build_type: charmcraft
charmcraft_channel: 2.x/stable charmcraft_channel: 3.x/stable

View File

@ -3,10 +3,6 @@
# choices of *requirements.txt files for OpenStack Charms: # choices of *requirements.txt files for OpenStack Charms:
# https://github.com/openstack-charmers/release-tools # https://github.com/openstack-charmers/release-tools
# #
# NOTE(lourot): This might look like a duplication of test-requirements.txt but
# some tox targets use only test-requirements.txt whereas charm-build uses only
# requirements.txt
setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85
# Build requirements # Build requirements
git+https://github.com/juju/charm-tools.git git+https://github.com/juju/charm-tools.git

View File

@ -10,8 +10,6 @@ tags:
- storage - storage
- file-servers - file-servers
- misc - misc
series:
- jammy
subordinate: true subordinate: true
provides: provides:
storage-backend: storage-backend:

View File

@ -1,87 +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':
relations:
- - 'cinder:identity-service'
- 'keystone:identity-service'
- - 'cinder:amqp'
- 'rabbitmq-server:amqp'
- - 'cinder:storage-backend'
- 'cinder-purestorage:storage-backend'
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'cinder:shared-db'
- 'cinder-mysql-router:shared-db'
- - 'cinder-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
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
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
cinder:
charm: ch:cinder
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
channel: 2024.1/edge
cinder-purestorage:
charm: ../../../cinder-purestorage_ubuntu-22.04-amd64.charm
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
to:
- '5'
channel: latest/edge

View File

@ -1,87 +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':
relations:
- - 'cinder:identity-service'
- 'keystone:identity-service'
- - 'cinder:amqp'
- 'rabbitmq-server:amqp'
- - 'cinder:storage-backend'
- 'cinder-purestorage:storage-backend'
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'cinder:shared-db'
- 'cinder-mysql-router:shared-db'
- - 'cinder-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
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
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
cinder:
charm: ch:cinder
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
channel: 2024.1/edge
cinder-purestorage:
charm: ../../../cinder-purestorage_ubuntu-22.04-amd64.charm
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
to:
- '5'
channel: latest/edge

View File

@ -1,87 +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':
relations:
- - 'cinder:identity-service'
- 'keystone:identity-service'
- - 'cinder:amqp'
- 'rabbitmq-server:amqp'
- - 'cinder:storage-backend'
- 'cinder-purestorage:storage-backend'
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'cinder:shared-db'
- 'cinder-mysql-router:shared-db'
- - 'cinder-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
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
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
cinder:
charm: ch:cinder
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
channel: 2024.1/edge
cinder-purestorage:
charm: ../../../cinder-purestorage_ubuntu-22.04-amd64.charm
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
to:
- '5'
channel: latest/edge

View File

@ -63,7 +63,7 @@ applications:
openstack-origin: *openstack-origin openstack-origin: *openstack-origin
to: to:
- '3' - '3'
channel: 2024.1/edge channel: latest/edge
cinder: cinder:
charm: ch:cinder charm: ch:cinder
num_units: 1 num_units: 1
@ -71,9 +71,9 @@ applications:
openstack-origin: *openstack-origin openstack-origin: *openstack-origin
to: to:
- '4' - '4'
channel: 2024.1/edge channel: latest/edge
cinder-purestorage: cinder-purestorage:
charm: ../../../cinder-purestorage_ubuntu-22.04-amd64.charm charm: ../../../cinder-purestorage.charm
options: options:
# Add config options here # Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable driver-source: ppa:openstack-charmers/purestorage-stable

View File

@ -6,11 +6,9 @@ tests:
configure: configure:
- zaza.openstack.charm_tests.keystone.setup.add_demo_user - zaza.openstack.charm_tests.keystone.setup.add_demo_user
gate_bundles: gate_bundles:
- jammy-antelope - noble-caracal
- jammy-bobcat
- jammy-caracal
smoke_bundles: smoke_bundles:
- jammy-caracal - noble-caracal
dev_bundles: dev_bundles:
- noble-caracal - noble-caracal
tests_options: tests_options:

View File

@ -26,7 +26,7 @@ passenv =
OS_* OS_*
TEST_* TEST_*
deps = 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 -r{toxinidir}/test-requirements.txt
[testenv:pep8] [testenv:pep8]

View File

@ -4,7 +4,6 @@
# https://github.com/openstack-charmers/release-tools # https://github.com/openstack-charmers/release-tools
# #
pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here. pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here.
setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85
stestr>=2.2.0 stestr>=2.2.0

17
tox.ini
View File

@ -22,6 +22,7 @@ setenv = VIRTUAL_ENV={envdir}
CHARM_LAYERS_DIR={toxinidir}/layers CHARM_LAYERS_DIR={toxinidir}/layers
CHARM_INTERFACES_DIR={toxinidir}/interfaces CHARM_INTERFACES_DIR={toxinidir}/interfaces
JUJU_REPOSITORY={toxinidir}/build JUJU_REPOSITORY={toxinidir}/build
TEST_JUJU3=1 # Note(jadonn): Force Juju 3
passenv = passenv =
no_proxy no_proxy
http_proxy http_proxy
@ -33,6 +34,7 @@ allowlist_externals =
charmcraft charmcraft
bash bash
tox tox
{toxinidir}/rename.sh
deps = deps =
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
@ -61,20 +63,27 @@ commands =
[testenv:py3] [testenv:py3]
basepython = python3 basepython = python3
deps = 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 -r{toxinidir}/test-requirements.txt
commands = stestr run --slowest {posargs} commands = stestr run --slowest {posargs}
[testenv:py310] [testenv:py310]
basepython = python3.10 basepython = python3.10
deps = 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-noble.txt}
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
commands = stestr run --slowest {posargs} commands = stestr run --slowest {posargs}
[testenv:pep8] [testenv:pep8]
basepython = python3 basepython = python3
deps = flake8==3.9.2 deps = flake8==7.1.1
git+https://github.com/juju/charm-tools.git git+https://github.com/juju/charm-tools.git
commands = flake8 {posargs} src unit_tests commands = flake8 {posargs} src unit_tests
@ -83,7 +92,7 @@ commands = flake8 {posargs} src unit_tests
# https://github.com/openstack/nova/blob/master/tox.ini # https://github.com/openstack/nova/blob/master/tox.ini
basepython = python3 basepython = python3
deps = 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}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
setenv = setenv =