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: I98d3beee200783db9303772d6df81f46ce455c3e
This commit is contained in:
Myles Penner 2024-09-05 18:52:48 +00:00
parent 08b2754fdc
commit 79664a6261
10 changed files with 40 additions and 697 deletions

View File

@ -2,3 +2,9 @@
templates:
- openstack-python3-charm-jobs
- openstack-cover-jobs
check:
jobs:
- charmbuild
vars:
charm_build_name: nova-compute-nvidia-vgpu

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

@ -6,4 +6,4 @@
needs_charm_build: true
charm_build_name: nova-compute-nvidia-vgpu
build_type: charmcraft
charmcraft_channel: 2.x/stable
charmcraft_channel: 3.x/stable

View File

@ -1,224 +0,0 @@
local_overlay_enabled: False
variables:
openstack-origin: &openstack-origin cloud:jammy-antelope
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':
constraints: mem=4096M
'5':
'6':
'7':
'8':
'9':
'10':
constraints: mem=4096M cores=4
applications:
nova-cloud-controller-mysql-router:
charm: ch:mysql-router
channel: latest/edge
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
glance-mysql-router:
charm: ch:mysql-router
channel: latest/edge
neutron-api-mysql-router:
charm: ch:mysql-router
channel: latest/edge
placement-mysql-router:
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
to:
- '0'
- '1'
- '2'
channel: latest/edge
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
to:
- '3'
channel: latest/edge
nova-cloud-controller:
charm: ch:nova-cloud-controller
num_units: 1
options:
openstack-origin: *openstack-origin
network-manager: Neutron
debug: true
to:
- '4'
channel: 2024.1/edge
neutron-api:
charm: ch:neutron-api
num_units: 1
options:
manage-neutron-plugin-legacy-mode: true
openstack-origin: *openstack-origin
flat-network-providers: physnet1
neutron-security-groups: true
to:
- '5'
channel: 2024.1/edge
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '6'
channel: 2024.1/edge
neutron-gateway:
charm: ch:neutron-gateway
num_units: 1
options:
openstack-origin: *openstack-origin
bridge-mappings: physnet1:br-ex
to:
- '7'
channel: 2024.1/edge
glance:
charm: ch:glance
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '8'
channel: 2024.1/edge
neutron-openvswitch:
charm: ch:neutron-openvswitch
channel: 2024.1/edge
placement:
charm: ch:placement
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '9'
channel: 2024.1/edge
nova-compute:
charm: ch:nova-compute
num_units: 1
storage:
ephemeral-device: '40G'
options:
openstack-origin: *openstack-origin
config-flags: auto_assign_floating_ip=False
enable-live-migration: false
aa-profile-mode: enforce
debug: true
to:
- '10'
channel: 2024.1/edge
nova-compute-nvidia-vgpu:
charm: ../../nova-compute-nvidia-vgpu.charm
options:
vgpu-device-mappings: "{'nvidia-108': ['0000:c1:00.0']}"
relations:
- - 'nova-compute:image-service'
- 'glance:image-service'
- - 'nova-compute:amqp'
- 'rabbitmq-server:amqp'
- - 'nova-cloud-controller:shared-db'
- 'nova-cloud-controller-mysql-router:shared-db'
- - 'nova-cloud-controller-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'nova-cloud-controller:identity-service'
- 'keystone:identity-service'
- - 'nova-cloud-controller:amqp'
- 'rabbitmq-server:amqp'
- - 'nova-cloud-controller:cloud-compute'
- 'nova-compute:cloud-compute'
- - 'nova-cloud-controller:image-service'
- 'glance:image-service'
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'glance:identity-service'
- 'keystone:identity-service'
- - 'glance:shared-db'
- 'glance-mysql-router:shared-db'
- - 'glance-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'glance:amqp'
- 'rabbitmq-server:amqp'
- - 'neutron-gateway:amqp'
- 'rabbitmq-server:amqp'
- - 'nova-cloud-controller:quantum-network-service'
- 'neutron-gateway:quantum-network-service'
- - 'neutron-api:shared-db'
- 'neutron-api-mysql-router:shared-db'
- - 'neutron-api-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'neutron-api:amqp'
- 'rabbitmq-server:amqp'
- - 'neutron-api:neutron-api'
- 'nova-cloud-controller:neutron-api'
- - 'neutron-api:identity-service'
- 'keystone:identity-service'
- - 'nova-compute:neutron-plugin'
- 'neutron-openvswitch:neutron-plugin'
- - 'rabbitmq-server:amqp'
- 'neutron-openvswitch:amqp'
- - 'placement:shared-db'
- 'placement-mysql-router:shared-db'
- - 'placement-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'placement:identity-service'
- 'keystone:identity-service'
- - 'placement:placement'
- 'nova-cloud-controller:placement'
- - 'nova-compute:nova-vgpu'
- 'nova-compute-nvidia-vgpu:nova-vgpu'

View File

@ -1,224 +0,0 @@
local_overlay_enabled: False
variables:
openstack-origin: &openstack-origin cloud:jammy-bobcat
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':
constraints: mem=4096M
'5':
'6':
'7':
'8':
'9':
'10':
constraints: mem=4096M cores=4
applications:
nova-cloud-controller-mysql-router:
charm: ch:mysql-router
channel: latest/edge
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
glance-mysql-router:
charm: ch:mysql-router
channel: latest/edge
neutron-api-mysql-router:
charm: ch:mysql-router
channel: latest/edge
placement-mysql-router:
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
to:
- '0'
- '1'
- '2'
channel: latest/edge
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
to:
- '3'
channel: latest/edge
nova-cloud-controller:
charm: ch:nova-cloud-controller
num_units: 1
options:
openstack-origin: *openstack-origin
network-manager: Neutron
debug: true
to:
- '4'
channel: 2024.1/edge
neutron-api:
charm: ch:neutron-api
num_units: 1
options:
manage-neutron-plugin-legacy-mode: true
openstack-origin: *openstack-origin
flat-network-providers: physnet1
neutron-security-groups: true
to:
- '5'
channel: 2024.1/edge
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '6'
channel: 2024.1/edge
neutron-gateway:
charm: ch:neutron-gateway
num_units: 1
options:
openstack-origin: *openstack-origin
bridge-mappings: physnet1:br-ex
to:
- '7'
channel: 2024.1/edge
glance:
charm: ch:glance
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '8'
channel: 2024.1/edge
neutron-openvswitch:
charm: ch:neutron-openvswitch
channel: 2024.1/edge
placement:
charm: ch:placement
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '9'
channel: 2024.1/edge
nova-compute:
charm: ch:nova-compute
num_units: 1
storage:
ephemeral-device: '40G'
options:
openstack-origin: *openstack-origin
config-flags: auto_assign_floating_ip=False
enable-live-migration: false
aa-profile-mode: enforce
debug: true
to:
- '10'
channel: 2024.1/edge
nova-compute-nvidia-vgpu:
charm: ../../nova-compute-nvidia-vgpu.charm
options:
vgpu-device-mappings: "{'nvidia-108': ['0000:c1:00.0']}"
relations:
- - 'nova-compute:image-service'
- 'glance:image-service'
- - 'nova-compute:amqp'
- 'rabbitmq-server:amqp'
- - 'nova-cloud-controller:shared-db'
- 'nova-cloud-controller-mysql-router:shared-db'
- - 'nova-cloud-controller-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'nova-cloud-controller:identity-service'
- 'keystone:identity-service'
- - 'nova-cloud-controller:amqp'
- 'rabbitmq-server:amqp'
- - 'nova-cloud-controller:cloud-compute'
- 'nova-compute:cloud-compute'
- - 'nova-cloud-controller:image-service'
- 'glance:image-service'
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'glance:identity-service'
- 'keystone:identity-service'
- - 'glance:shared-db'
- 'glance-mysql-router:shared-db'
- - 'glance-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'glance:amqp'
- 'rabbitmq-server:amqp'
- - 'neutron-gateway:amqp'
- 'rabbitmq-server:amqp'
- - 'nova-cloud-controller:quantum-network-service'
- 'neutron-gateway:quantum-network-service'
- - 'neutron-api:shared-db'
- 'neutron-api-mysql-router:shared-db'
- - 'neutron-api-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'neutron-api:amqp'
- 'rabbitmq-server:amqp'
- - 'neutron-api:neutron-api'
- 'nova-cloud-controller:neutron-api'
- - 'neutron-api:identity-service'
- 'keystone:identity-service'
- - 'nova-compute:neutron-plugin'
- 'neutron-openvswitch:neutron-plugin'
- - 'rabbitmq-server:amqp'
- 'neutron-openvswitch:amqp'
- - 'placement:shared-db'
- 'placement-mysql-router:shared-db'
- - 'placement-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'placement:identity-service'
- 'keystone:identity-service'
- - 'placement:placement'
- 'nova-cloud-controller:placement'
- - 'nova-compute:nova-vgpu'
- 'nova-compute-nvidia-vgpu:nova-vgpu'

View File

@ -1,224 +0,0 @@
local_overlay_enabled: False
variables:
openstack-origin: &openstack-origin cloud:jammy-caracal
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':
constraints: mem=4096M
'5':
'6':
'7':
'8':
'9':
'10':
constraints: mem=4096M cores=4
applications:
nova-cloud-controller-mysql-router:
charm: ch:mysql-router
channel: latest/edge
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
glance-mysql-router:
charm: ch:mysql-router
channel: latest/edge
neutron-api-mysql-router:
charm: ch:mysql-router
channel: latest/edge
placement-mysql-router:
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
to:
- '0'
- '1'
- '2'
channel: latest/edge
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
to:
- '3'
channel: latest/edge
nova-cloud-controller:
charm: ch:nova-cloud-controller
num_units: 1
options:
openstack-origin: *openstack-origin
network-manager: Neutron
debug: true
to:
- '4'
channel: 2024.1/edge
neutron-api:
charm: ch:neutron-api
num_units: 1
options:
manage-neutron-plugin-legacy-mode: true
openstack-origin: *openstack-origin
flat-network-providers: physnet1
neutron-security-groups: true
to:
- '5'
channel: 2024.1/edge
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '6'
channel: 2024.1/edge
neutron-gateway:
charm: ch:neutron-gateway
num_units: 1
options:
openstack-origin: *openstack-origin
bridge-mappings: physnet1:br-ex
to:
- '7'
channel: 2024.1/edge
glance:
charm: ch:glance
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '8'
channel: 2024.1/edge
neutron-openvswitch:
charm: ch:neutron-openvswitch
channel: 2024.1/edge
placement:
charm: ch:placement
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '9'
channel: 2024.1/edge
nova-compute:
charm: ch:nova-compute
num_units: 1
storage:
ephemeral-device: '40G'
options:
openstack-origin: *openstack-origin
config-flags: auto_assign_floating_ip=False
enable-live-migration: false
aa-profile-mode: enforce
debug: true
to:
- '10'
channel: 2024.1/edge
nova-compute-nvidia-vgpu:
charm: ../../nova-compute-nvidia-vgpu.charm
options:
vgpu-device-mappings: "{'nvidia-108': ['0000:c1:00.0']}"
relations:
- - 'nova-compute:image-service'
- 'glance:image-service'
- - 'nova-compute:amqp'
- 'rabbitmq-server:amqp'
- - 'nova-cloud-controller:shared-db'
- 'nova-cloud-controller-mysql-router:shared-db'
- - 'nova-cloud-controller-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'nova-cloud-controller:identity-service'
- 'keystone:identity-service'
- - 'nova-cloud-controller:amqp'
- 'rabbitmq-server:amqp'
- - 'nova-cloud-controller:cloud-compute'
- 'nova-compute:cloud-compute'
- - 'nova-cloud-controller:image-service'
- 'glance:image-service'
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'glance:identity-service'
- 'keystone:identity-service'
- - 'glance:shared-db'
- 'glance-mysql-router:shared-db'
- - 'glance-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'glance:amqp'
- 'rabbitmq-server:amqp'
- - 'neutron-gateway:amqp'
- 'rabbitmq-server:amqp'
- - 'nova-cloud-controller:quantum-network-service'
- 'neutron-gateway:quantum-network-service'
- - 'neutron-api:shared-db'
- 'neutron-api-mysql-router:shared-db'
- - 'neutron-api-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'neutron-api:amqp'
- 'rabbitmq-server:amqp'
- - 'neutron-api:neutron-api'
- 'nova-cloud-controller:neutron-api'
- - 'neutron-api:identity-service'
- 'keystone:identity-service'
- - 'nova-compute:neutron-plugin'
- 'neutron-openvswitch:neutron-plugin'
- - 'rabbitmq-server:amqp'
- 'neutron-openvswitch:amqp'
- - 'placement:shared-db'
- 'placement-mysql-router:shared-db'
- - 'placement-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'placement:identity-service'
- 'keystone:identity-service'
- - 'placement:placement'
- 'nova-cloud-controller:placement'
- - 'nova-compute:nova-vgpu'
- 'nova-compute-nvidia-vgpu:nova-vgpu'

View File

@ -68,7 +68,7 @@ applications:
debug: true
to:
- '4'
channel: 2024.1/edge
channel: latest/edge
neutron-api:
charm: ch:neutron-api
@ -80,7 +80,7 @@ applications:
neutron-security-groups: true
to:
- '5'
channel: 2024.1/edge
channel: latest/edge
keystone:
charm: ch:keystone
@ -89,7 +89,7 @@ applications:
openstack-origin: *openstack-origin
to:
- '6'
channel: 2024.1/edge
channel: latest/edge
neutron-gateway:
charm: ch:neutron-gateway
@ -99,7 +99,7 @@ applications:
bridge-mappings: physnet1:br-ex
to:
- '7'
channel: 2024.1/edge
channel: latest/edge
glance:
charm: ch:glance
@ -108,11 +108,11 @@ applications:
openstack-origin: *openstack-origin
to:
- '8'
channel: 2024.1/edge
channel: latest/edge
neutron-openvswitch:
charm: ch:neutron-openvswitch
channel: 2024.1/edge
channel: latest/edge
placement:
charm: ch:placement
@ -121,7 +121,7 @@ applications:
openstack-origin: *openstack-origin
to:
- '9'
channel: 2024.1/edge
channel: latest/edge
nova-compute:
charm: ch:nova-compute
@ -136,7 +136,7 @@ applications:
debug: true
to:
- '10'
channel: 2024.1/edge
channel: latest/edge
nova-compute-nvidia-vgpu:
charm: ../../nova-compute-nvidia-vgpu.charm

View File

@ -1,11 +1,9 @@
charm_name: nova-compute-nvidia-vgpu
smoke_bundles:
- jammy-caracal
- noble-caracal
gate_bundles:
- jammy-antelope
- jammy-bobcat
- jammy-caracal
- noble-caracal
dev_bundles:
- noble-caracal
configure:

View File

@ -28,6 +28,7 @@ minversion = 3.2.0
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
CHARM_DIR={envdir}
TEST_JUJU3=1 # Note(mylesjp): Force Juju 3
install_command =
pip install {opts} {packages}
commands = stestr run --slowest {posargs}
@ -43,7 +44,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:py35]
@ -87,6 +88,12 @@ deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:py312]
basepython = python3.12
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:py3]
basepython = python3
deps =

View File

@ -178,7 +178,7 @@ class TestCharmUtils(unittest.TestCase):
}
charm_utils.set_principal_unit_relation_data(
relation_data_to_be_set, charm_config, charm_services)
self.assertEquals(
self.assertEqual(
'{"nova": {"/etc/nova/nova.conf": {"sections": {"devices": '
'[["enabled_mdev_types", ""]]}}}}',
relation_data_to_be_set['subordinate_configuration'])