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
- Add 'parts' section to charmcraft.yaml

Change-Id: I502455aff4864bcda16a80c5bf6fbd04acf7d719
This commit is contained in:
Myles Penner 2024-09-05 22:09:45 +00:00
parent 9fb3f1aed4
commit 3b5ec1d5f7
10 changed files with 48 additions and 361 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: ironic-dashboard

View File

@ -1,11 +1,28 @@
type: "charm" type: "charm"
bases:
- build-on: parts:
- name: "ubuntu" charm:
channel: "22.04" source: src/
architectures: plugin: charm
- amd64 build-packages:
run-on: - libpython3-dev
- name: "ubuntu" build-snaps:
channel: "22.04" - charm/latest/edge
architectures: [amd64, s390x, ppc64el, arm64] build-environment:
- CHARM_INTERFACES_DIR: /root/project/interfaces
- CHARM_LAYERS_DIR: /root/project/layers
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

@ -11,10 +11,6 @@ description: |
manage bare metal instances from the Horizon Dashboard. manage bare metal instances from the Horizon Dashboard.
tags: tags:
- openstack - openstack
series:
- focal
- jammy
subordinate: true subordinate: true
requires: requires:

View File

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

View File

@ -1,110 +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':
'6':
applications:
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
openstack-dashboard-mysql-router:
charm: ch:mysql-router
channel: latest/edge
ironic-api-mysql-router:
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
options:
max-connections: 1000
innodb-buffer-pool-size: 256M
to:
- '0'
- '1'
- '2'
channel: latest/edge
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
to:
- '3'
channel: latest/edge
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
channel: 2024.1/edge
ironic-api:
charm: ch:ironic-api
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '5'
channel: 2024.1/edge
openstack-dashboard:
charm: ch:openstack-dashboard
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '6'
channel: 2024.1/edge
ironic-dashboard:
charm: ../../ironic-dashboard.charm
relations:
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'ironic-api:shared-db'
- 'ironic-api-mysql-router:shared-db'
- - 'ironic-api-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'ironic-api:identity-service'
- 'keystone:identity-service'
- - 'ironic-api:amqp'
- 'rabbitmq-server:amqp'
- - 'openstack-dashboard:shared-db'
- 'openstack-dashboard-mysql-router:shared-db'
- - 'openstack-dashboard-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'openstack-dashboard:identity-service'
- 'keystone:identity-service'
- - 'openstack-dashboard:dashboard-plugin'
- 'ironic-dashboard:dashboard'

View File

@ -1,110 +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':
'6':
applications:
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
openstack-dashboard-mysql-router:
charm: ch:mysql-router
channel: latest/edge
ironic-api-mysql-router:
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
options:
max-connections: 1000
innodb-buffer-pool-size: 256M
to:
- '0'
- '1'
- '2'
channel: latest/edge
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
to:
- '3'
channel: latest/edge
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
channel: 2024.1/edge
ironic-api:
charm: ch:ironic-api
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '5'
channel: 2024.1/edge
openstack-dashboard:
charm: ch:openstack-dashboard
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '6'
channel: 2024.1/edge
ironic-dashboard:
charm: ../../ironic-dashboard.charm
relations:
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'ironic-api:shared-db'
- 'ironic-api-mysql-router:shared-db'
- - 'ironic-api-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'ironic-api:identity-service'
- 'keystone:identity-service'
- - 'ironic-api:amqp'
- 'rabbitmq-server:amqp'
- - 'openstack-dashboard:shared-db'
- 'openstack-dashboard-mysql-router:shared-db'
- - 'openstack-dashboard-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'openstack-dashboard:identity-service'
- 'keystone:identity-service'
- - 'openstack-dashboard:dashboard-plugin'
- 'ironic-dashboard:dashboard'

View File

@ -1,110 +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':
'6':
applications:
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
openstack-dashboard-mysql-router:
charm: ch:mysql-router
channel: latest/edge
ironic-api-mysql-router:
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
options:
max-connections: 1000
innodb-buffer-pool-size: 256M
to:
- '0'
- '1'
- '2'
channel: latest/edge
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
to:
- '3'
channel: latest/edge
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
channel: 2024.1/edge
ironic-api:
charm: ch:ironic-api
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '5'
channel: 2024.1/edge
openstack-dashboard:
charm: ch:openstack-dashboard
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '6'
channel: 2024.1/edge
ironic-dashboard:
charm: ../../ironic-dashboard.charm
relations:
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'ironic-api:shared-db'
- 'ironic-api-mysql-router:shared-db'
- - 'ironic-api-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'ironic-api:identity-service'
- 'keystone:identity-service'
- - 'ironic-api:amqp'
- 'rabbitmq-server:amqp'
- - 'openstack-dashboard:shared-db'
- 'openstack-dashboard-mysql-router:shared-db'
- - 'openstack-dashboard-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'openstack-dashboard:identity-service'
- 'keystone:identity-service'
- - 'openstack-dashboard:dashboard-plugin'
- 'ironic-dashboard:dashboard'

View File

@ -59,7 +59,7 @@ applications:
openstack-origin: *openstack-origin openstack-origin: *openstack-origin
to: to:
- '4' - '4'
channel: 2024.1/edge channel: latest/edge
ironic-api: ironic-api:
charm: ch:ironic-api charm: ch:ironic-api
@ -68,7 +68,7 @@ applications:
openstack-origin: *openstack-origin openstack-origin: *openstack-origin
to: to:
- '5' - '5'
channel: 2024.1/edge channel: latest/edge
openstack-dashboard: openstack-dashboard:
charm: ch:openstack-dashboard charm: ch:openstack-dashboard
@ -77,7 +77,7 @@ applications:
openstack-origin: *openstack-origin openstack-origin: *openstack-origin
to: to:
- '6' - '6'
channel: 2024.1/edge channel: latest/edge
ironic-dashboard: ironic-dashboard:
charm: ../../ironic-dashboard.charm charm: ../../ironic-dashboard.charm

View File

@ -1,10 +1,8 @@
charm_name: ironic-dashboard charm_name: ironic-dashboard
smoke_bundles: smoke_bundles:
- jammy-caracal - noble-caracal
gate_bundles: gate_bundles:
- jammy-antelope - noble-caracal
- jammy-bobcat
- jammy-caracal
dev_bundles: dev_bundles:
- noble-caracal - noble-caracal
target_deploy_status: {} target_deploy_status: {}

19
tox.ini
View File

@ -16,6 +16,7 @@ skip_missing_interpreters = False
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0 PYTHONHASHSEED=0
TERM=linux TERM=linux
TEST_JUJU3=1 # Note(mylesjp): Force Juju 3
passenv = passenv =
http_proxy http_proxy
https_proxy https_proxy
@ -35,7 +36,7 @@ deps =
[testenv:build] [testenv:build]
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 = commands =
charmcraft clean charmcraft clean
@ -45,42 +46,42 @@ 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:py36] [testenv:py36]
basepython = python3.6 basepython = python3.6
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:py38] [testenv:py38]
basepython = python3.8 basepython = python3.8
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:py39] [testenv:py39]
basepython = python3.9 basepython = python3.9
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 -r{toxinidir}/test-requirements.txt
commands = stestr run --slowest {posargs} commands = stestr run --slowest {posargs}
[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}/test-requirements.txt -r{toxinidir}/test-requirements.txt
commands = stestr run --slowest {posargs} commands = stestr run --slowest {posargs}
@ -92,7 +93,7 @@ commands = flake8 {posargs} src unit_tests
[testenv:func-target] [testenv:func-target]
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 = commands =
bash -c "if [ ! -f ./*.charm ]; then echo 'Charm does not exist. Run tox -e build'; exit 1; fi" bash -c "if [ ! -f ./*.charm ]; then echo 'Charm does not exist. Run tox -e build'; exit 1; fi"
@ -103,7 +104,7 @@ commands =
# 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}/test-requirements.txt -r{toxinidir}/test-requirements.txt
setenv = setenv =
{[testenv]setenv} {[testenv]setenv}