Add Antelope support

* sync charm-helpers to classic charms
* change openstack-origin/source default to antelope
* align testing with antelope
* add new antelope bundles
* add antelope bundles to tests.yaml
* add antelope tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases

Change-Id: I4aba961c11a7fa774f134e65ad1a7225fbc4fd46
This commit is contained in:
Corey Bryant 2023-02-14 21:26:00 +00:00
parent b33b6a213f
commit e294222ae3
15 changed files with 255 additions and 222 deletions

View File

@ -1,4 +1,4 @@
- project:
templates:
- openstack-python3-charm-zed-jobs
- openstack-python3-charm-jobs
- openstack-cover-jobs

View File

@ -1,7 +0,0 @@
# NOTES(lourot):
# * We don't install charmcraft via pip anymore because it anyway spins up a
# container and scp the system's charmcraft snap inside it. So the charmcraft
# snap is necessary on the system anyway.
# * `tox -e build` successfully validated with charmcraft 1.2.1
cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35.

View File

@ -2,24 +2,79 @@ type: charm
parts:
charm:
source: src/
plugin: reactive
reactive-charm-build-arguments:
- --binary-wheels-from-source
build-packages:
- tox
- git
- python3-dev
- libffi-dev
- libssl-dev
- libxml2-dev
- libxslt1-dev
- rustc
- cargo
source: src/
build-snaps:
- charm
- charm/latest/edge
build-environment:
- CHARM_INTERFACES_DIR: /root/project/interfaces/
- CHARM_LAYERS_DIR: /root/project/layers/
- CHARM_INTERFACES_DIR: $CRAFT_PROJECT_DIR/interfaces/
- CHARM_LAYERS_DIR: $CRAFT_PROJECT_DIR/layers/
bases:
- build-on:
- name: ubuntu
channel: "22.04"
architectures:
- amd64
architectures: [amd64]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [amd64, s390x, ppc64el, arm64]
architectures: [amd64]
- name: ubuntu
channel: "22.10"
architectures: [amd64, s390x, ppc64el, arm64]
architectures: [amd64]
- name: ubuntu
channel: "23.04"
architectures: [amd64]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [arm64]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [arm64]
- name: ubuntu
channel: "22.10"
architectures: [arm64]
- name: ubuntu
channel: "23.04"
architectures: [arm64]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [ppc64el]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [ppc64el]
- name: ubuntu
channel: "22.10"
architectures: [ppc64el]
- name: ubuntu
channel: "23.04"
architectures: [ppc64el]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [s390x]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [s390x]
- name: ubuntu
channel: "22.10"
architectures: [s390x]
- name: ubuntu
channel: "23.04"
architectures: [s390x]

View File

@ -1,27 +1,22 @@
- project:
templates:
- charm-unit-jobs-py310
- charm-zed-functional-jobs
- charm-functional-jobs
check:
jobs:
- test-s3-jammy-yoga-s3
- test-s3-jammy-zed-s3:
voting: false
- test-s3-jammy-zed-s3
- test-s3-kinetic-zed-s3:
voting: false
- test-s3-jammy-antelope-s3:
voting: false
- test-s3-lunar-antelope-s3:
voting: false
vars:
needs_charm_build: true
charm_build_name: gnocchi
build_type: charmcraft
charmcraft_channel: 2.1/stable
- job:
name: test-s3-jammy-yoga-s3
parent: func-target
dependencies:
- jammy-yoga
vars:
tox_extra_args: '-- test-s3:jammy-yoga-s3'
- job:
name: test-s3-jammy-zed-s3
parent: func-target
@ -33,6 +28,20 @@
name: test-s3-kinetic-zed-s3
parent: func-target
dependencies:
- kinetic-zed
- jammy-zed
vars:
tox_extra_args: '-- test-s3:kinetic-zed-s3'
- job:
name: test-s3-jammy-antelope-s3
parent: func-target
dependencies:
- jammy-zed
vars:
tox_extra_args: '-- test-s3:jammy-antelope-s3'
- job:
name: test-s3-lunar-antelope-s3
parent: func-target
dependencies:
- jammy-zed
vars:
tox_extra_args: '-- test-s3:lunar-antelope-s3'

View File

@ -122,4 +122,4 @@ options:
Value of bluestore compression max blob size for solid state media on
pools requested by this charm.
openstack-origin:
default: zed
default: antelope

View File

@ -12,6 +12,7 @@ tags:
series:
- jammy
- kinetic
- lunar
provides:
metric-service:
interface: gnocchi

View File

@ -0,0 +1,150 @@
variables:
openstack-origin: &openstack-origin cloud:jammy-antelope
local_overlay_enabled: False
series: &series jammy
machines:
'0':
constraints: mem=3072M
'1':
constraints: mem=3072M
'2':
constraints: mem=3072M
'3':
'4':
'5':
'6':
'7':
'8':
'9':
'10':
'11':
'12':
'13':
series: focal
# We specify machine placements for these to improve iteration
# time, given that machine "0" comes up way before machine "6"
applications:
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
gnocchi-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: latest/edge
ceilometer:
charm: ch:ceilometer
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '5'
channel: latest/edge
ceph-osd:
charm: ch:ceph-osd
num_units: 3
storage:
osd-devices: 'cinder,10G'
options:
source: *openstack-origin
to:
- '6'
- '7'
- '8'
channel: latest/edge
ceph-mon:
charm: ch:ceph-mon
num_units: 3
options:
expected-osd-count: 3
monitor-count: '3'
source: *openstack-origin
to:
- '9'
- '10'
- '11'
channel: latest/edge
gnocchi:
series: *series
charm: ../../../gnocchi_ubuntu-22.04-amd64_ubuntu-22.10-amd64_ubuntu-23.04-amd64.charm
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '12'
memcached:
charm: ch:memcached
num_units: 1
# Note that holding memcached at focal as it's not available at jammy yet.
series: focal
to:
- '13'
relations:
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'ceph-osd:mon'
- 'ceph-mon:osd'
- - 'ceilometer:amqp'
- 'rabbitmq-server:amqp'
- - 'ceilometer:identity-credentials'
- 'keystone:identity-credentials'
- - 'ceilometer:identity-notifications'
- 'keystone:identity-notifications'
- - 'ceilometer:metric-service'
- 'gnocchi:metric-service'
- - 'gnocchi:identity-service'
- 'keystone:identity-service'
- - 'gnocchi:shared-db'
- 'gnocchi-mysql-router:shared-db'
- - 'gnocchi-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'gnocchi:storage-ceph'
- 'ceph-mon:client'
- - 'gnocchi:coordinator-memcached'
- 'memcached:cache'

View File

@ -1,157 +0,0 @@
variables:
openstack-origin: &openstack-origin distro
local_overlay_enabled: False
series: &series jammy
machines:
0:
constraints: "mem=3072M"
1:
constraints: "mem=3072M"
2:
constraints: "mem=3072M"
3: {}
4: {}
5: {}
6: {}
7: {}
8: {}
9: {}
10:
series: focal
# We specify machine placements for these to improve iteration
# time, given that machine "0" comes up way before machine "6"
applications:
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
gnocchi-mysql-router:
charm: ch:mysql-router
channel: latest/edge
vault-mysql-router:
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
options:
source: *openstack-origin
to:
- '0'
- '1'
- '2'
channel: latest/edge
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
options:
source: *openstack-origin
to:
- '3'
channel: latest/edge
keystone:
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
channel: latest/edge
ceilometer:
charm: ch:ceilometer
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '5'
channel: latest/edge
gnocchi:
series: *series
charm: ../../../gnocchi.charm
num_units: 1
options:
openstack-origin: *openstack-origin
storage-backend: s3
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:
- '10'
#swift-proxy is used to test gnocchi against an S3 storage backend
swift-proxy:
charm: ch:swift-proxy
num_units: 1
options:
zone-assignment: manual
replicas: 1
swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae
openstack-origin: *openstack-origin
to:
- '7'
channel: latest/edge
swift-storage:
charm: ch:swift-storage
num_units: 1
storage:
block-devices: 'cinder,10G'
options:
openstack-origin: *openstack-origin
zone: 1
to:
- '8'
channel: latest/edge
vault:
charm: ch:vault
num_units: 1
series: *series
to:
- '9'
channel: latest/edge
relations:
- - keystone:shared-db
- keystone-mysql-router:shared-db
- - keystone-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - gnocchi:shared-db
- gnocchi-mysql-router:shared-db
- - gnocchi-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - ceilometer:amqp
- rabbitmq-server:amqp
- - ceilometer:identity-credentials
- keystone:identity-credentials
- - ceilometer:identity-notifications
- keystone:identity-notifications
- - ceilometer:metric-service
- gnocchi:metric-service
- - gnocchi:identity-service
- keystone:identity-service
- - gnocchi:coordinator-memcached
- memcached:cache
- - swift-proxy:identity-service
- keystone:identity-service
- - swift-storage:swift-storage
- swift-proxy:swift-storage
- - vault:shared-db
- vault-mysql-router:shared-db
- - vault-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - vault:certificates
- swift-proxy:certificates
- - vault:certificates
- gnocchi:certificates
- - vault:certificates
- ceilometer:certificates
- - vault:certificates
- keystone:certificates
- - vault:certificates
- rabbitmq-server:certificates

View File

@ -39,8 +39,6 @@ applications:
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
options:
source: *openstack-origin
to:
- '0'
- '1'
@ -49,8 +47,6 @@ applications:
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
options:
source: *openstack-origin
to:
- '3'
channel: latest/edge
@ -72,7 +68,7 @@ applications:
channel: latest/edge
gnocchi:
series: *series
charm: ../../../gnocchi.charm
charm: ../../../gnocchi_ubuntu-22.04-amd64_ubuntu-22.10-amd64_ubuntu-23.04-amd64.charm
num_units: 1
options:
openstack-origin: *openstack-origin

View File

@ -39,8 +39,6 @@ applications:
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
options:
source: *openstack-origin
to:
- '0'
- '1'
@ -50,8 +48,6 @@ applications:
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
options:
source: *openstack-origin
to:
- '3'
channel: latest/edge
@ -102,7 +98,7 @@ applications:
gnocchi:
series: *series
charm: ../../../gnocchi.charm
charm: ../../../gnocchi_ubuntu-22.04-amd64_ubuntu-22.10-amd64_ubuntu-23.04-amd64.charm
num_units: 1
options:
openstack-origin: *openstack-origin

View File

@ -72,7 +72,7 @@ applications:
channel: latest/edge
gnocchi:
series: *series
charm: ../../../gnocchi.charm
charm: ../../../gnocchi_ubuntu-22.04-amd64_ubuntu-22.10-amd64_ubuntu-23.04-amd64.charm
num_units: 1
options:
openstack-origin: *openstack-origin

View File

@ -102,7 +102,7 @@ applications:
gnocchi:
series: *series
charm: ../../../gnocchi.charm
charm: ../../../gnocchi_ubuntu-22.04-amd64_ubuntu-22.10-amd64_ubuntu-23.04-amd64.charm
num_units: 1
options:
openstack-origin: *openstack-origin

View File

@ -3,7 +3,7 @@ variables:
local_overlay_enabled: False
series: &series jammy
series: &series lunar
machines:
'0':
@ -102,7 +102,7 @@ applications:
gnocchi:
series: *series
charm: ../../../gnocchi.charm
charm: ../../../gnocchi_ubuntu-22.04-amd64_ubuntu-22.10-amd64_ubuntu-23.04-amd64.charm
num_units: 1
options:
openstack-origin: *openstack-origin
@ -112,7 +112,7 @@ applications:
memcached:
charm: ch:memcached
num_units: 1
# Note that holding memcached at focal as it's not available at jammy yet.
# Note that holding memcached at focal as it's not available at lunar yet.
series: focal
to:
- '13'

View File

@ -1,15 +1,15 @@
charm_name: gnocchi
gate_bundles:
- test-s3: jammy-yoga-s3
- test-s3: jammy-zed-s3
smoke_bundles:
- test-s3: jammy-yoga-s3
- test-s3: jammy-zed-s3
dev_bundles:
- test-s3: jammy-yoga-s3
- test-s3: jammy-zed-s3
- test-s3: jammy-antelope-s3
- test-s3: kinetic-zed-s3
- test-s3: lunar-antelope-s3
configure:
- zaza.openstack.charm_tests.ceilometer.setup.basic_setup
@ -44,3 +44,4 @@ target_deploy_status:
tests_options:
force_deploy:
- kinetic-zed-s3
- lunar-antelope-s3

21
tox.ini
View File

@ -19,23 +19,25 @@ skip_install = True
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
TERM=linux
CHARM_LAYERS_DIR={toxinidir}/layers
CHARM_INTERFACES_DIR={toxinidir}/interfaces
JUJU_REPOSITORY={toxinidir}/build
passenv =
no_proxy
http_proxy
https_proxy
CHARM_INTERFACES_DIR
CHARM_LAYERS_DIR
JUJU_REPOSITORY
allowlist_externals =
charmcraft
bash
tox
{toxinidir}/rename.sh
deps =
-r{toxinidir}/requirements.txt
[testenv:build]
basepython = python3
deps = -r{toxinidir}/build-requirements.txt
# charmcraft clean is done to ensure that
# `tox -e build` always performs a clean, repeatable build.
# For faster rebuilds during development,
@ -43,13 +45,12 @@ deps = -r{toxinidir}/build-requirements.txt
commands =
charmcraft clean
charmcraft -v pack
{toxinidir}/rename.sh
charmcraft clean
[testenv:build-reactive]
basepython = python3
commands =
charm-build --log-level DEBUG --use-lock-file-branches -o {toxinidir}/build/builds src {posargs}
charm-build --log-level DEBUG --use-lock-file-branches --binary-wheels-from-source -o {toxinidir}/build/builds src {posargs}
[testenv:add-build-lock-file]
basepython = python3
@ -72,18 +73,6 @@ deps = flake8==3.9.2
git+https://github.com/juju/charm-tools.git
commands = flake8 {posargs} src unit_tests
[testenv:func-target]
# Hack to get functional tests working in the charmcraft
# world. We should fix this.
basepython = python3
passenv = HOME TERM CS_* OS_* TEST_*
deps = -r{toxinidir}/src/test-requirements.txt
changedir = {toxinidir}/src
commands =
bash -c "if [ ! -f ../*.charm ]; then echo 'Charm does not exist. Run tox -e build'; exit 1; fi"
tox --version
tox -e func-target {posargs}
[testenv:cover]
# Technique based heavily upon
# https://github.com/openstack/nova/blob/master/tox.ini