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
- Removed setuptools pinning in wheelhouse.txt
- Add charmbuild to .zuul.yaml
- Add rename.sh to build process

Change-Id: Id4f27a1eea470397ddebee2db7be76bcf5f37466
This commit is contained in:
Myles Penner 2024-08-30 17:58:01 +00:00
parent a2da50a903
commit a2e57445dc
13 changed files with 51 additions and 497 deletions

View File

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

View File

@ -19,36 +19,18 @@ parts:
build-environment:
- CHARM_INTERFACES_DIR: $CRAFT_PROJECT_DIR/interfaces/
- CHARM_LAYERS_DIR: $CRAFT_PROJECT_DIR/layers/
bases:
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [amd64]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [amd64]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [s390x]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [s390x]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [ppc64el]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [ppc64el]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [arm64]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [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: designate-bind
build_type: charmcraft
charmcraft_channel: 2.x/stable
charmcraft_channel: 3.x/stable

13
rename.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
charm=$(grep "charm_build_name" osci.yaml | awk '{print $2}')
echo "renaming ${charm}_*.charm to ${charm}.charm"
echo -n "pwd: "
pwd
ls -al
echo "Removing bad downloaded charm maybe?"
if [[ -e "${charm}.charm" ]];
then
rm "${charm}.charm"
fi
echo "Renaming charm here."
mv ${charm}_*.charm ${charm}.charm

View File

@ -11,8 +11,6 @@ description: |
tags:
- openstack
- dns
series:
- jammy
subordinate: false
extra-bindings:
dns-frontend:

View File

@ -1,148 +0,0 @@
variables:
openstack-origin: &openstack-origin cloud:jammy-antelope
local_overlay_enabled: False
series: jammy
machines:
'0':
constraints: mem=3072M
'1':
constraints: mem=3072M
'2':
constraints: mem=3072M
'3':
'4':
'5':
'6':
'7':
series: focal
'8':
applications:
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
designate-mysql-router:
charm: ch:mysql-router
channel: latest/edge
neutron-api-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
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
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
to:
- '5'
channel: 2024.1/edge
designate-bind:
charm: ../../../designate-bind_ubuntu-22.04-amd64.charm
num_units: 1
# NOTE(ajkavanagh) apparently it has no openstack origin!
#options:
#openstack-origin: *openstack-origin
to:
- '6'
memcached:
charm: ch:memcached
num_units: 1
# Note that holding memcached at focal as it's not available at jammy yet.
series: focal
to:
- '7'
designate:
charm: ch:designate
num_units: 1
options:
nameservers: 'ns1.amuletexample.com. ns2.amuletexample.com.'
openstack-origin: *openstack-origin
to:
- '8'
channel: 2024.1/edge
nrpe:
charm: ch:nrpe
channel: latest/edge
designate-bind-hacluster:
charm: ch:hacluster
options:
cluster_count: 1
channel: latest/edge
relations:
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'designate:shared-db'
- 'designate-mysql-router:shared-db'
- - 'designate-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'designate:amqp'
- 'rabbitmq-server:amqp'
- - 'designate:identity-service'
- 'keystone:identity-service'
- - 'designate:dns-backend'
- 'designate-bind:dns-backend'
- - 'designate:coordinator-memcached'
- 'memcached:cache'
- - 'designate:dnsaas'
- 'neutron-api:external-dns'
- - 'neutron-api:identity-service'
- 'keystone:identity-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'
- - 'designate:nrpe-external-master'
- 'nrpe:nrpe-external-master'
- - 'designate-bind'
- 'designate-bind-hacluster'

View File

@ -1,148 +0,0 @@
variables:
openstack-origin: &openstack-origin cloud:jammy-bobcat
local_overlay_enabled: False
series: jammy
machines:
'0':
constraints: mem=3072M
'1':
constraints: mem=3072M
'2':
constraints: mem=3072M
'3':
'4':
'5':
'6':
'7':
series: focal
'8':
applications:
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
designate-mysql-router:
charm: ch:mysql-router
channel: latest/edge
neutron-api-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
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
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
to:
- '5'
channel: 2024.1/edge
designate-bind:
charm: ../../../designate-bind_ubuntu-22.04-amd64.charm
num_units: 1
# NOTE(ajkavanagh) apparently it has no openstack origin!
#options:
#openstack-origin: *openstack-origin
to:
- '6'
memcached:
charm: ch:memcached
num_units: 1
# Note that holding memcached at focal as it's not available at jammy yet.
series: focal
to:
- '7'
designate:
charm: ch:designate
num_units: 1
options:
nameservers: 'ns1.amuletexample.com. ns2.amuletexample.com.'
openstack-origin: *openstack-origin
to:
- '8'
channel: 2024.1/edge
nrpe:
charm: ch:nrpe
channel: latest/edge
designate-bind-hacluster:
charm: ch:hacluster
options:
cluster_count: 1
channel: latest/edge
relations:
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'designate:shared-db'
- 'designate-mysql-router:shared-db'
- - 'designate-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'designate:amqp'
- 'rabbitmq-server:amqp'
- - 'designate:identity-service'
- 'keystone:identity-service'
- - 'designate:dns-backend'
- 'designate-bind:dns-backend'
- - 'designate:coordinator-memcached'
- 'memcached:cache'
- - 'designate:dnsaas'
- 'neutron-api:external-dns'
- - 'neutron-api:identity-service'
- 'keystone:identity-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'
- - 'designate:nrpe-external-master'
- 'nrpe:nrpe-external-master'
- - 'designate-bind'
- 'designate-bind-hacluster'

View File

@ -1,148 +0,0 @@
variables:
openstack-origin: &openstack-origin cloud:jammy-caracal
local_overlay_enabled: False
series: jammy
machines:
'0':
constraints: mem=3072M
'1':
constraints: mem=3072M
'2':
constraints: mem=3072M
'3':
'4':
'5':
'6':
'7':
series: focal
'8':
applications:
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
designate-mysql-router:
charm: ch:mysql-router
channel: latest/edge
neutron-api-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
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
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
to:
- '5'
channel: 2024.1/edge
designate-bind:
charm: ../../../designate-bind_ubuntu-22.04-amd64.charm
num_units: 1
# NOTE(ajkavanagh) apparently it has no openstack origin!
#options:
#openstack-origin: *openstack-origin
to:
- '6'
memcached:
charm: ch:memcached
num_units: 1
# Note that holding memcached at focal as it's not available at jammy yet.
series: focal
to:
- '7'
designate:
charm: ch:designate
num_units: 1
options:
nameservers: 'ns1.amuletexample.com. ns2.amuletexample.com.'
openstack-origin: *openstack-origin
to:
- '8'
channel: 2024.1/edge
nrpe:
charm: ch:nrpe
channel: latest/edge
designate-bind-hacluster:
charm: ch:hacluster
options:
cluster_count: 1
channel: latest/edge
relations:
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'designate:shared-db'
- 'designate-mysql-router:shared-db'
- - 'designate-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'designate:amqp'
- 'rabbitmq-server:amqp'
- - 'designate:identity-service'
- 'keystone:identity-service'
- - 'designate:dns-backend'
- 'designate-bind:dns-backend'
- - 'designate:coordinator-memcached'
- 'memcached:cache'
- - 'designate:dnsaas'
- 'neutron-api:external-dns'
- - 'neutron-api:identity-service'
- 'keystone:identity-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'
- - 'designate:nrpe-external-master'
- 'nrpe:nrpe-external-master'
- - 'designate-bind'
- 'designate-bind-hacluster'

View File

@ -17,7 +17,8 @@ machines:
'5':
'6':
'7':
series: focal
# Note: memcached locked to jammy
series: jammy
'8':
applications:
@ -55,7 +56,7 @@ applications:
openstack-origin: *openstack-origin
to:
- '4'
channel: 2024.1/edge
channel: latest/edge
neutron-api:
charm: ch:neutron-api
@ -65,10 +66,10 @@ applications:
openstack-origin: *openstack-origin
to:
- '5'
channel: 2024.1/edge
channel: latest/edge
designate-bind:
charm: ../../../designate-bind_ubuntu-22.04-amd64.charm
charm: ../../../designate-bind.charm
num_units: 1
# NOTE(ajkavanagh) apparently it has no openstack origin!
#options:
@ -79,8 +80,8 @@ applications:
memcached:
charm: ch:memcached
num_units: 1
# Note that holding memcached at focal as it's not available at jammy yet.
series: focal
# Note that holding memcached at jammy as it's not available at jammy yet.
series: jammy
to:
- '7'
@ -92,7 +93,7 @@ applications:
openstack-origin: *openstack-origin
to:
- '8'
channel: 2024.1/edge
channel: latest/edge
nrpe:
charm: ch:nrpe

View File

@ -1,11 +1,9 @@
charm_name: designate-bind
smoke_bundles:
- jammy-caracal
- noble-caracal
gate_bundles:
- jammy-antelope
- jammy-bobcat
- jammy-caracal
- noble-caracal
dev_bundles:
- noble-caracal
tests:

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,5 +1,4 @@
psutil
setuptools < 50.0
git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack

10
tox.ini
View File

@ -33,6 +33,7 @@ allowlist_externals =
charmcraft
bash
tox
{toxinidir}/rename.sh
deps =
-r{toxinidir}/requirements.txt
@ -45,6 +46,7 @@ basepython = python3
commands =
charmcraft clean
charmcraft -v pack
{toxinidir}/rename.sh
charmcraft clean
[testenv:build-reactive]
@ -60,21 +62,21 @@ 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: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}/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}
@ -89,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 =