Add updates for bringing this updated to antelope

* Enable running under tox 4
* add jammy-antelope, and jammy-zed bundles; remove focal-ussuri
* Update osci.yaml so that it runs with charmcraft 2.1/stable

Change-Id: I3422b0f215137240cd6960eea62923117c0ee91c
This commit is contained in:
Alex Kavanagh 2023-04-27 17:31:42 +01:00
parent 527fe5f2aa
commit 248711e287
11 changed files with 112 additions and 89 deletions

View File

@ -1,4 +1,4 @@
- project:
templates:
- openstack-python3-charm-yoga-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

@ -22,7 +22,7 @@ parts:
bases:
- build-on:
- name: ubuntu
channel: "20.04"
channel: "22.04"
architectures:
- amd64
- s390x
@ -30,6 +30,4 @@ bases:
- arm64
run-on:
- name: ubuntu
channel: "20.04"
- name: ubuntu
channel: "21.10"
channel: "22.04"

View File

@ -12,7 +12,7 @@ tags:
- file-servers
- misc
series:
- focal
- jammy
subordinate: true
provides:
storage-backend:

View File

@ -1,8 +1,8 @@
- project:
templates:
- charm-unit-jobs-py38
- charm-unit-jobs-py39
- charm-unit-jobs-py310
vars:
needs_charm_build: true
charm_build_name: infinidat2
charm_build_name: infinidat-tools
build_type: charmcraft
charmcraft_channel: 2.1/stable

18
pip.sh
View File

@ -1,18 +0,0 @@
#!/usr/bin/env bash
#
# This file is managed centrally by release-tools and should not be modified
# within individual charm repos. See the 'global' dir contents for available
# choices of tox.ini for OpenStack Charms:
# https://github.com/openstack-charmers/release-tools
#
# setuptools 58.0 dropped the support for use_2to3=true which is needed to
# install blessings (an indirect dependency of charm-tools).
#
# More details on the beahvior of tox and virtualenv creation can be found at
# https://github.com/tox-dev/tox/issues/448
#
# This script is wrapper to force the use of the pinned versions early in the
# process when the virtualenv was created and upgraded before installing the
# depedencies declared in the target.
pip install 'pip<20.3' 'setuptools<50.0.0'
pip "$@"

View File

@ -1,7 +1,7 @@
# This file is managed centrally. If you find the need to modify this as a
# one-off, please don't. Intead, consult #openstack-charms and ask about
# requirements management in charms via bot-control. Thank you.
charm-tools>=2.4.4
# charm-tools>=2.4.4
coverage>=3.6
mock>=1.2
flake8>=4.0.1; python_version >= '3.6'

View File

@ -0,0 +1,64 @@
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':
local_overlay_enabled: false
applications:
mysql:
charm: ch:mysql-innodb-cluster
channel: 8.0/edge
num_units: 3
to:
- '0'
- '1'
- '2'
keystone:
charm: ch:keystone
channel: latest/edge
num_units: 1
options:
openstack-origin: cloud:jammy-antelope
to:
- '3'
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
cinder:
charm: ch:cinder
channel: latest/edge
num_units: 1
options:
openstack-origin: cloud:jammy-antelope
to:
- '4'
cinder-mysql-router:
charm: ch:mysql-router
channel: latest/edge
infinidat-tools:
charm: ../../infinidat-tools.charm
# options:
rabbitmq-server:
charm: ch:rabbitmq-server
channel: latest/edge
num_units: 1
to:
- '5'
relations:
- [ keystone:shared-db, keystone-mysql-router:shared-db ]
- [ cinder:shared-db, cinder-mysql-router:shared-db ]
- [ cinder:identity-service, keystone:identity-service ]
- [ cinder:amqp, rabbitmq-server:amqp ]
- [ cinder:juju-info, infinidat-tools:juju-info ]
- [ mysql:db-router, keystone-mysql-router:db-router]
- [ mysql:db-router, cinder-mysql-router:db-router]

View File

@ -1,37 +1,49 @@
series: focal
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':
local_overlay_enabled: false
applications:
mysql:
charm: ch:percona-cluster
channel: latest/edge
num_units: 1
charm: ch:mysql-innodb-cluster
channel: 8.0/edge
num_units: 3
to:
- '0'
- '1'
- '2'
keystone:
charm: ch:keystone
channel: yoga/edge
channel: latest/edge
num_units: 1
options:
openstack-origin: cloud:focal-ussuri
openstack-origin: cloud:jammy-zed
to:
- '1'
- '3'
keystone-mysql-router:
charm: ch:mysql-router
channel: latest/edge
cinder:
charm: ch:cinder
channel: yoga/edge
channel: latest/edge
num_units: 1
options:
openstack-origin: cloud:focal-ussuri
openstack-origin: cloud:jammy-zed
to:
- '2'
- '4'
cinder-mysql-router:
charm: ch:mysql-router
channel: latest/edge
infinidat-tools:
charm: ../../infinidat-tools.charm
# options:
@ -40,11 +52,13 @@ applications:
channel: latest/edge
num_units: 1
to:
- '3'
- '5'
relations:
- [ keystone:shared-db, mysql:shared-db ]
- [ cinder:shared-db, mysql:shared-db ]
- [ keystone:shared-db, keystone-mysql-router:shared-db ]
- [ cinder:shared-db, cinder-mysql-router:shared-db ]
- [ cinder:identity-service, keystone:identity-service ]
- [ cinder:amqp, rabbitmq-server:amqp ]
- [ cinder:juju-info, infinidat-tools:juju-info ]
- [ mysql:db-router, keystone-mysql-router:db-router]
- [ mysql:db-router, cinder-mysql-router:db-router]

View File

@ -4,6 +4,7 @@ tests:
configure:
- zaza.openstack.charm_tests.keystone.setup.add_demo_user
gate_bundles:
- focal-ussuri
- jammy-antelope
- jammy-zed
smoke_bundles:
- focal-ussuri
- jammy-antelope

49
tox.ini
View File

@ -7,20 +7,6 @@ skipsdist = True
sitepackages = False
# NOTE: Avoid false positives by not skipping missing interpreters.
skip_missing_interpreters = False
# NOTES:
# * We avoid the new dependency resolver by pinning pip < 20.3, see
# https://github.com/pypa/pip/issues/9187
# * Pinning dependencies requires tox >= 3.2.0, see
# https://tox.readthedocs.io/en/latest/config.html#conf-requires
# * It is also necessary to pin virtualenv as a newer virtualenv would still
# lead to fetching the latest pip in the func* tox targets, see
# https://stackoverflow.com/a/38133283
# * It is necessary to declare setuptools as a dependency otherwise tox will
# fail very early at not being able to load it. The version pinning is in
# line with `pip.sh`.
requires = pip < 20.3
virtualenv < 20.0
setuptools < 50.0.0
# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci
minversion = 3.2.0
@ -35,36 +21,21 @@ allowlist_externals =
git
bash
charmcraft
rename.sh
passenv = HOME TERM CS_* OS_* TEST_*
{toxinidir}/rename.sh
passenv =
HOME
TERM
CS_*
OS_*
TEST_*
deps = -r{toxinidir}/test-requirements.txt
[testenv:py35]
basepython = python3.5
# python3.5 is irrelevant on a focal+ charm.
commands = /bin/true
[testenv:py36]
basepython = python3.6
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:py37]
basepython = python3.7
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:py38]
basepython = python3.8
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:py39]
basepython = python3.9
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:py10]
[testenv:py310]
basepython = python3.10
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
@ -114,7 +85,7 @@ commands = {posargs}
[testenv:build]
basepython = python3
deps = -r{toxinidir}/build-requirements.txt
deps =
# NOTE(lourot): charmcraft 1.0.0 used to generate
# cinder-infinidat2.charm, which is the behaviour expected
# by OSCI. However charmcraft 1.2.1 now generates
@ -122,7 +93,7 @@ deps = -r{toxinidir}/build-requirements.txt
# In order to keep the old behaviour we rename the file at the end.
commands =
charmcraft clean
charmcraft -v build
charmcraft -v pack
{toxinidir}/rename.sh
[testenv:func-noop]