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 charmbuild to .zuul.yaml

Change-Id: Iac9e98f28cb904c3d2e6fd18cde8f30432ad9bcc
This commit is contained in:
Myles Penner 2024-09-05 22:37:49 +00:00
parent 4eac6c8999
commit eab31a7080
11 changed files with 38 additions and 252 deletions

View File

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

View File

@ -19,13 +19,17 @@ parts:
apt install -y ca-certificates
update-ca-certificates
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

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

View File

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

View File

@ -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]

View File

@ -1,76 +0,0 @@
series: jammy
variables:
openstack-origin: &openstack-origin cloud:jammy-antelope
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':
constraints: mem=4G root-disk=16G
applications:
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
channel: latest/edge
num_units: 3
options:
source: *openstack-origin
to:
- '0'
- '1'
- '2'
rabbitmq-server:
charm: ch:rabbitmq-server
channel: latest/edge
num_units: 1
options:
source: *openstack-origin
to:
- '3'
keystone:
charm: ch:keystone
channel: 2024.1/edge
options:
openstack-origin: *openstack-origin
num_units: 1
to:
- '4'
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
cinder:
charm: ch:cinder
channel: 2024.1/edge
num_units: 1
storage:
block-devices: '40G'
options:
openstack-origin: *openstack-origin
block-device: None
overwrite: "true"
to:
- '5'
cinder-mysql-router:
charm: ch:mysql-router
channel: latest/edge
cinder-solidfire:
charm: ../../cinder-solidfire.charm
relations:
- [ 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 ]
- [ cinder:identity-service, keystone:identity-service ]
- [ cinder:amqp, rabbitmq-server:amqp ]
- [ cinder:storage-backend, cinder-solidfire:storage-backend ]

View File

@ -1,76 +0,0 @@
series: jammy
variables:
openstack-origin: &openstack-origin cloud:jammy-bobcat
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':
constraints: mem=4G root-disk=16G
applications:
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
channel: latest/edge
num_units: 3
options:
source: *openstack-origin
to:
- '0'
- '1'
- '2'
rabbitmq-server:
charm: ch:rabbitmq-server
channel: latest/edge
num_units: 1
options:
source: *openstack-origin
to:
- '3'
keystone:
charm: ch:keystone
channel: 2024.1/edge
options:
openstack-origin: *openstack-origin
num_units: 1
to:
- '4'
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
cinder:
charm: ch:cinder
channel: 2024.1/edge
num_units: 1
storage:
block-devices: '40G'
options:
openstack-origin: *openstack-origin
block-device: None
overwrite: "true"
to:
- '5'
cinder-mysql-router:
charm: ch:mysql-router
channel: latest/edge
cinder-solidfire:
charm: ../../cinder-solidfire.charm
relations:
- [ 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 ]
- [ cinder:identity-service, keystone:identity-service ]
- [ cinder:amqp, rabbitmq-server:amqp ]
- [ cinder:storage-backend, cinder-solidfire:storage-backend ]

View File

@ -1,76 +0,0 @@
series: jammy
variables:
openstack-origin: &openstack-origin cloud:jammy-caracal
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':
constraints: mem=4G root-disk=16G
applications:
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
channel: latest/edge
num_units: 3
options:
source: *openstack-origin
to:
- '0'
- '1'
- '2'
rabbitmq-server:
charm: ch:rabbitmq-server
channel: latest/edge
num_units: 1
options:
source: *openstack-origin
to:
- '3'
keystone:
charm: ch:keystone
channel: 2024.1/edge
options:
openstack-origin: *openstack-origin
num_units: 1
to:
- '4'
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
cinder:
charm: ch:cinder
channel: 2024.1/edge
num_units: 1
storage:
block-devices: '40G'
options:
openstack-origin: *openstack-origin
block-device: None
overwrite: "true"
to:
- '5'
cinder-mysql-router:
charm: ch:mysql-router
channel: latest/edge
cinder-solidfire:
charm: ../../cinder-solidfire.charm
relations:
- [ 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 ]
- [ cinder:identity-service, keystone:identity-service ]
- [ cinder:amqp, rabbitmq-server:amqp ]
- [ cinder:storage-backend, cinder-solidfire:storage-backend ]

View File

@ -37,7 +37,7 @@ applications:
- '3'
keystone:
charm: ch:keystone
channel: 2024.1/edge
channel: latest/edge
options:
openstack-origin: *openstack-origin
num_units: 1
@ -48,7 +48,7 @@ applications:
channel: latest/edge
cinder:
charm: ch:cinder
channel: 2024.1/edge
channel: latest/edge
num_units: 1
storage:
block-devices: '40G'

View File

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

16
tox.ini
View File

@ -22,6 +22,7 @@ setenv = VIRTUAL_ENV={envdir}
CHARM_LAYERS_DIR={toxinidir}/layers
CHARM_INTERFACES_DIR={toxinidir}/interfaces
JUJU_REPOSITORY={toxinidir}/build
TEST_JUJU3=1 # Note(mylesjp): Force Juju 3
passenv =
no_proxy
http_proxy
@ -62,20 +63,27 @@ 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: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}
[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
commands = stestr run --slowest {posargs}
[testenv:pep8]
basepython = python3
deps = flake8==3.9.2
deps = flake8==7.1.1
git+https://github.com/juju/charm-tools.git
commands = flake8 {posargs} src unit_tests
@ -84,7 +92,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 =