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: I44154d4220a06dbe544f7600ee7747ab1e056ae1
This commit is contained in:
Myles Penner 2024-09-04 17:23:36 +00:00
parent 261b4bc505
commit f0e325ebfd
13 changed files with 38 additions and 242 deletions

View File

@ -2,3 +2,8 @@
templates:
- openstack-python3-charm-jobs
- openstack-cover-jobs
check:
jobs:
- charmbuild
vars:
charm_build_name: keystone-kerberos

View File

@ -7,18 +7,22 @@ parts:
build-packages:
- libpython3-dev
build-snaps:
- charm
- charm/latest/edge
build-environment:
- CHARM_INTERFACES_DIR: /root/project/interfaces/
- CHARM_LAYERS_DIR: /root/project/layers/
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: keystone-kerberos
build_type: charmcraft
charmcraft_channel: 2.x/stable
charmcraft_channel: 3.x/stable

View File

@ -2,11 +2,6 @@
# within individual charm repos. See the 'global' dir contents for available
# choices of *requirements.txt files for OpenStack Charms:
# https://github.com/openstack-charmers/release-tools
#
# NOTE(lourot): This might look like a duplication of test-requirements.txt but
# some tox targets use only test-requirements.txt whereas charm-build uses only
# requirements.txt
setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85
# NOTE: newer versions of cryptography require a Rust compiler to build,
# see

View File

@ -9,8 +9,6 @@ tags:
- identity
- kerberos
- ldap
series:
- jammy
subordinate: true
provides:
keystone-fid-service-provider:

View File

@ -1,70 +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':
series: focal
'5':
relations:
- - keystone:shared-db
- keystone-mysql-router:shared-db
- - keystone-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - keystone
- keystone-kerberos
applications:
keystone-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
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
token-provider: 'fernet'
token-expiration: 60
to:
- '3'
channel: 2024.1/edge
keystone-kerberos:
charm: ../../../keystone-kerberos.charm
options:
kerberos-realm: 'TESTUBUNTU.COM'
kerberos-server: 'kerberos.testubuntu.com'
kerberos-domain: 'k8s'
resource:
keystone_keytab: keystone.keytab
kerberos-server:
charm: ch:openstack-charmers-next-kerberos-test-fixture
series: focal
num_units: 1
to:
- '4'
ubuntu-test-host:
charm: cs:ubuntu
num_units: 1
to:
- '5'

View File

@ -1,70 +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':
series: focal
'5':
relations:
- - keystone:shared-db
- keystone-mysql-router:shared-db
- - keystone-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - keystone
- keystone-kerberos
applications:
keystone-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
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
token-provider: 'fernet'
token-expiration: 60
to:
- '3'
channel: 2024.1/edge
keystone-kerberos:
charm: ../../../keystone-kerberos.charm
options:
kerberos-realm: 'TESTUBUNTU.COM'
kerberos-server: 'kerberos.testubuntu.com'
kerberos-domain: 'k8s'
resource:
keystone_keytab: keystone.keytab
kerberos-server:
charm: ch:openstack-charmers-next-kerberos-test-fixture
series: focal
num_units: 1
to:
- '4'
ubuntu-test-host:
charm: cs:ubuntu
num_units: 1
to:
- '5'

View File

@ -1,70 +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':
series: focal
'5':
relations:
- - keystone:shared-db
- keystone-mysql-router:shared-db
- - keystone-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - keystone
- keystone-kerberos
applications:
keystone-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
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
token-provider: 'fernet'
token-expiration: 60
to:
- '3'
channel: 2024.1/edge
keystone-kerberos:
charm: ../../../keystone-kerberos.charm
options:
kerberos-realm: 'TESTUBUNTU.COM'
kerberos-server: 'kerberos.testubuntu.com'
kerberos-domain: 'k8s'
resource:
keystone_keytab: keystone.keytab
kerberos-server:
charm: ch:openstack-charmers-next-kerberos-test-fixture
series: focal
num_units: 1
to:
- '4'
ubuntu-test-host:
charm: cs:ubuntu
num_units: 1
to:
- '5'

View File

@ -15,7 +15,7 @@ machines:
constraints: mem=3072M
'3':
'4':
series: focal
series: noble
'5':
relations:
- - keystone:shared-db
@ -47,7 +47,7 @@ applications:
token-expiration: 60
to:
- '3'
channel: 2024.1/edge
channel: latest/edge
keystone-kerberos:
charm: ../../../keystone-kerberos.charm
options:
@ -59,7 +59,7 @@ applications:
kerberos-server:
charm: ch:openstack-charmers-next-kerberos-test-fixture
series: focal
series: noble
num_units: 1
to:
- '4'

View File

@ -1,11 +1,9 @@
charm_name: keystone-kerberos
smoke_bundles:
- jammy-caracal
- noble-caracal
gate_bundles:
- jammy-antelope
- jammy-bobcat
- jammy-caracal
- noble-caracal
dev_bundles:
- noble-caracal
configure:

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

@ -4,7 +4,6 @@
# https://github.com/openstack-charmers/release-tools
#
pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here.
setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85
stestr>=2.2.0

15
tox.ini
View File

@ -62,20 +62,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 +91,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 =