Add charmcraft 3 support

Summary of changes:

- 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 TEST_JUJU3=1 env var to tox.ini to force Juju 3
- Add noble and oracular to charmhelpers
- Add charmbuild .zuul.yaml

Change-Id: I9c6145bedd04395a10f4bac9403bebeaaeff864e
This commit is contained in:
Myles Penner 2024-09-05 20:23:36 +00:00
parent f7f852d9dd
commit cd1eaa4e96
11 changed files with 35 additions and 429 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: glance-simplestreams-sync

View File

@ -19,13 +19,17 @@ parts:
- metadata.yaml - metadata.yaml
- README.md - README.md
bases: base: ubuntu@24.04
- build-on: platforms:
- name: ubuntu amd64:
channel: "22.04" build-on: amd64
architectures: build-for: amd64
- amd64 arm64:
run-on: build-on: arm64
- name: ubuntu build-for: arm64
channel: "22.04" ppc64el:
architectures: [amd64, s390x, ppc64el, arm64] build-on: ppc64el
build-for: ppc64el
s390x:
build-on: s390x
build-for: s390x

View File

@ -33,6 +33,8 @@ UBUNTU_RELEASES = (
'kinetic', 'kinetic',
'lunar', 'lunar',
'mantic', 'mantic',
'noble',
'oracular',
) )

View File

@ -7,8 +7,6 @@ description: |
tags: tags:
- misc - misc
- openstack - openstack
series:
- jammy
subordinate: false subordinate: false
provides: provides:
simplestreams-image-service: simplestreams-image-service:

View File

@ -6,4 +6,4 @@
needs_charm_build: true needs_charm_build: true
charm_build_name: glance-simplestreams-sync charm_build_name: glance-simplestreams-sync
build_type: charmcraft build_type: charmcraft
charmcraft_channel: 2.x/stable charmcraft_channel: 3.x/stable

View File

@ -1,134 +0,0 @@
variables:
source: &source cloud:jammy-antelope
series: jammy
comment:
- 'machines section to decide order of deployment. database sooner = faster'
machines:
'0':
'1':
'2':
'3':
'4':
'5':
'6':
'7':
'8':
constraints: "mem=2048"
'9':
constraints: "mem=2048"
'10':
constraints: "mem=2048"
'11':
'12':
'13':
applications:
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
glance-mysql-router:
charm: ch:mysql-router
channel: latest/edge
vault-mysql-router:
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
options:
source: *source
to:
- '0'
- '1'
- '2'
channel: latest/edge
vault:
charm: ch:vault
num_units: 1
to:
- '3'
channel: latest/edge
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *source
to:
- '4'
channel: 2024.1/edge
glance:
charm: ch:glance
num_units: 1
options:
openstack-origin: *source
to:
- '5'
channel: 2024.1/edge
glance-simplestreams-sync:
charm: ../../glance-simplestreams-sync.charm
options:
snap-channel: edge
num_units: 1
to:
- '6'
ceph-radosgw:
charm: ch:ceph-radosgw
num_units: 1
options:
source: *source
to:
- '7'
channel: reef/edge
ceph-osd:
charm: ch:ceph-osd
num_units: 3
storage:
osd-devices: 'cinder,10G'
options:
source: *source
to:
- '8'
- '9'
- '10'
channel: reef/edge
ceph-mon:
charm: ch:ceph-mon
num_units: 3
options:
source: *source
to:
- '11'
- '12'
- '13'
channel: reef/edge
relations:
- ['keystone:certificates', 'vault:certificates']
- ['glance:certificates', 'vault:certificates']
- ['glance-simplestreams-sync:certificates', 'vault:certificates']
- ['glance:identity-service', 'keystone:identity-service']
- ['glance-simplestreams-sync:identity-service', 'keystone:identity-service']
- ['keystone:shared-db','keystone-mysql-router:shared-db']
- ['glance:shared-db','glance-mysql-router:shared-db']
- ['glance:ceph', 'ceph-mon:client']
- ['vault:shared-db','vault-mysql-router:shared-db']
- ['keystone-mysql-router:db-router','mysql-innodb-cluster:db-router']
- ['glance-mysql-router:db-router','mysql-innodb-cluster:db-router']
- ['vault-mysql-router:db-router','mysql-innodb-cluster:db-router']
- ['ceph-osd:mon', 'ceph-mon:osd']
- ['ceph-radosgw:mon', 'ceph-mon:radosgw']
- ['ceph-radosgw:identity-service', 'keystone:identity-service']
- ['ceph-radosgw:certificates', 'vault:certificates']

View File

@ -1,134 +0,0 @@
variables:
source: &source cloud:jammy-bobcat
series: jammy
comment:
- 'machines section to decide order of deployment. database sooner = faster'
machines:
'0':
'1':
'2':
'3':
'4':
'5':
'6':
'7':
'8':
constraints: "mem=2048"
'9':
constraints: "mem=2048"
'10':
constraints: "mem=2048"
'11':
'12':
'13':
applications:
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
glance-mysql-router:
charm: ch:mysql-router
channel: latest/edge
vault-mysql-router:
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
options:
source: *source
to:
- '0'
- '1'
- '2'
channel: latest/edge
vault:
charm: ch:vault
num_units: 1
to:
- '3'
channel: latest/edge
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *source
to:
- '4'
channel: 2024.1/edge
glance:
charm: ch:glance
num_units: 1
options:
openstack-origin: *source
to:
- '5'
channel: 2024.1/edge
glance-simplestreams-sync:
charm: ../../glance-simplestreams-sync.charm
options:
snap-channel: edge
num_units: 1
to:
- '6'
ceph-radosgw:
charm: ch:ceph-radosgw
num_units: 1
options:
source: *source
to:
- '7'
channel: reef/edge
ceph-osd:
charm: ch:ceph-osd
num_units: 3
storage:
osd-devices: 'cinder,10G'
options:
source: *source
to:
- '8'
- '9'
- '10'
channel: reef/edge
ceph-mon:
charm: ch:ceph-mon
num_units: 3
options:
source: *source
to:
- '11'
- '12'
- '13'
channel: reef/edge
relations:
- ['keystone:certificates', 'vault:certificates']
- ['glance:certificates', 'vault:certificates']
- ['glance-simplestreams-sync:certificates', 'vault:certificates']
- ['glance:identity-service', 'keystone:identity-service']
- ['glance-simplestreams-sync:identity-service', 'keystone:identity-service']
- ['keystone:shared-db','keystone-mysql-router:shared-db']
- ['glance:shared-db','glance-mysql-router:shared-db']
- ['glance:ceph', 'ceph-mon:client']
- ['vault:shared-db','vault-mysql-router:shared-db']
- ['keystone-mysql-router:db-router','mysql-innodb-cluster:db-router']
- ['glance-mysql-router:db-router','mysql-innodb-cluster:db-router']
- ['vault-mysql-router:db-router','mysql-innodb-cluster:db-router']
- ['ceph-osd:mon', 'ceph-mon:osd']
- ['ceph-radosgw:mon', 'ceph-mon:radosgw']
- ['ceph-radosgw:identity-service', 'keystone:identity-service']
- ['ceph-radosgw:certificates', 'vault:certificates']

View File

@ -1,134 +0,0 @@
variables:
source: &source cloud:jammy-caracal
series: jammy
comment:
- 'machines section to decide order of deployment. database sooner = faster'
machines:
'0':
'1':
'2':
'3':
'4':
'5':
'6':
'7':
'8':
constraints: "mem=2048"
'9':
constraints: "mem=2048"
'10':
constraints: "mem=2048"
'11':
'12':
'13':
applications:
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
glance-mysql-router:
charm: ch:mysql-router
channel: latest/edge
vault-mysql-router:
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
options:
source: *source
to:
- '0'
- '1'
- '2'
channel: latest/edge
vault:
charm: ch:vault
num_units: 1
to:
- '3'
channel: latest/edge
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *source
to:
- '4'
channel: 2024.1/edge
glance:
charm: ch:glance
num_units: 1
options:
openstack-origin: *source
to:
- '5'
channel: 2024.1/edge
glance-simplestreams-sync:
charm: ../../glance-simplestreams-sync.charm
options:
snap-channel: edge
num_units: 1
to:
- '6'
ceph-radosgw:
charm: ch:ceph-radosgw
num_units: 1
options:
source: *source
to:
- '7'
channel: reef/edge
ceph-osd:
charm: ch:ceph-osd
num_units: 3
storage:
osd-devices: 'cinder,10G'
options:
source: *source
to:
- '8'
- '9'
- '10'
channel: reef/edge
ceph-mon:
charm: ch:ceph-mon
num_units: 3
options:
source: *source
to:
- '11'
- '12'
- '13'
channel: reef/edge
relations:
- ['keystone:certificates', 'vault:certificates']
- ['glance:certificates', 'vault:certificates']
- ['glance-simplestreams-sync:certificates', 'vault:certificates']
- ['glance:identity-service', 'keystone:identity-service']
- ['glance-simplestreams-sync:identity-service', 'keystone:identity-service']
- ['keystone:shared-db','keystone-mysql-router:shared-db']
- ['glance:shared-db','glance-mysql-router:shared-db']
- ['glance:ceph', 'ceph-mon:client']
- ['vault:shared-db','vault-mysql-router:shared-db']
- ['keystone-mysql-router:db-router','mysql-innodb-cluster:db-router']
- ['glance-mysql-router:db-router','mysql-innodb-cluster:db-router']
- ['vault-mysql-router:db-router','mysql-innodb-cluster:db-router']
- ['ceph-osd:mon', 'ceph-mon:osd']
- ['ceph-radosgw:mon', 'ceph-mon:radosgw']
- ['ceph-radosgw:identity-service', 'keystone:identity-service']
- ['ceph-radosgw:certificates', 'vault:certificates']

View File

@ -63,7 +63,7 @@ applications:
openstack-origin: *source openstack-origin: *source
to: to:
- '4' - '4'
channel: 2024.1/edge channel: latest/edge
glance: glance:
charm: ch:glance charm: ch:glance
@ -72,7 +72,7 @@ applications:
openstack-origin: *source openstack-origin: *source
to: to:
- '5' - '5'
channel: 2024.1/edge channel: latest/edge
glance-simplestreams-sync: glance-simplestreams-sync:
charm: ../../glance-simplestreams-sync.charm charm: ../../glance-simplestreams-sync.charm
@ -89,7 +89,7 @@ applications:
source: *source source: *source
to: to:
- '7' - '7'
channel: reef/edge channel: latest/edge
ceph-osd: ceph-osd:
charm: ch:ceph-osd charm: ch:ceph-osd
@ -102,7 +102,7 @@ applications:
- '8' - '8'
- '9' - '9'
- '10' - '10'
channel: reef/edge channel: latest/edge
ceph-mon: ceph-mon:
charm: ch:ceph-mon charm: ch:ceph-mon
@ -113,7 +113,7 @@ applications:
- '11' - '11'
- '12' - '12'
- '13' - '13'
channel: reef/edge channel: latest/edge
relations: relations:
- ['keystone:certificates', 'vault:certificates'] - ['keystone:certificates', 'vault:certificates']

View File

@ -6,16 +6,14 @@ comment:
# functest-run-suite ... # functest-run-suite ...
# functest-deploy --bundle /path/to/gate/bundle # functest-deploy --bundle /path/to/gate/bundle
gate_bundles: gate_bundles:
- jammy-antelope - noble-caracal
- jammy-bobcat
- jammy-caracal
dev_bundles: dev_bundles:
- noble-caracal - noble-caracal
tests_options: tests_options:
force_deploy: force_deploy:
- noble-caracal - noble-caracal
smoke_bundles: smoke_bundles:
- jammy-caracal - noble-caracal
target_deploy_status: target_deploy_status:
vault: vault:
# vault will be blocked with functest-deploy, this is ok to move on # vault will be blocked with functest-deploy, this is ok to move on

11
tox.ini
View File

@ -22,6 +22,7 @@ skip_install = True
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0 PYTHONHASHSEED=0
CHARM_DIR={envdir} CHARM_DIR={envdir}
TEST_JUJU3=1 # Note(mylesjp): Force Juju 3
commands = stestr run --slowest {posargs} commands = stestr run --slowest {posargs}
allowlist_externals = allowlist_externals =
charmcraft charmcraft
@ -33,7 +34,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:build] [testenv:build]
@ -52,21 +53,21 @@ commands =
[testenv:py312] [testenv:py312]
basepython = python3.12 basepython = python3.12
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
[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}/requirements.txt -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
[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}/requirements.txt -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
@ -82,7 +83,7 @@ commands = flake8 {posargs} hooks unit_tests tests actions lib files
# 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 =