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:
- openstack-python3-charm-jobs
- openstack-cover-jobs
check:
jobs:
- charmbuild
vars:
charm_build_name: glance-simplestreams-sync

View File

@ -19,13 +19,17 @@ parts:
- 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

View File

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

View File

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

View File

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

View File

@ -6,16 +6,14 @@ comment:
# functest-run-suite ...
# functest-deploy --bundle /path/to/gate/bundle
gate_bundles:
- jammy-antelope
- jammy-bobcat
- jammy-caracal
- noble-caracal
dev_bundles:
- noble-caracal
tests_options:
force_deploy:
- noble-caracal
smoke_bundles:
- jammy-caracal
- noble-caracal
target_deploy_status:
vault:
# 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}
PYTHONHASHSEED=0
CHARM_DIR={envdir}
TEST_JUJU3=1 # Note(mylesjp): Force Juju 3
commands = stestr run --slowest {posargs}
allowlist_externals =
charmcraft
@ -33,7 +34,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:build]
@ -52,21 +53,21 @@ commands =
[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}/requirements.txt
-r{toxinidir}/test-requirements.txt
[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}/requirements.txt
-r{toxinidir}/test-requirements.txt
[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}/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
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 =