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: I545954fe10601c7d20c333c701b2aebffd0ec40a
This commit is contained in:
Alex Kavanagh 2023-04-26 17:59:34 +01:00
parent a925493257
commit ac7af8bf4e
12 changed files with 379 additions and 96 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

@ -11,7 +11,7 @@ tags:
- file-servers
- misc
series:
- focal
- jammy
subordinate: true
provides:
manila-plugin:

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: infinidat
charm_build_name: manila-infinidat
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

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import OrderedDict
from collections import OrderedDict
from ops_openstack.core import OSBaseCharm
from ops.main import main

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>=3.0.6
coverage>=3.6
mock>=1.2
flake8>=4.0.1; python_version >= '3.6'

View File

@ -0,0 +1,341 @@
# Please refer to the OpenStack Charms Deployment Guide for more information.
# https://docs.openstack.org/project-deploy-guide/charm-deployment-guide
#
# NOTE: Please review the value for the configuration option
# `bridge-interface-mappings` for the `ovn-chassis` charm (see `data-port` variable).
# Refer to the [Open Virtual Network (OVN)](https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/app-ovn.html)
# section of the [OpenStack Charms Deployment Guide](https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/)
# for more information.
series: jammy
variables:
openstack-origin: &openstack-origin cloud:jammy-antelope
data-port: &data-port br-ex:ext
worker-multiplier: &worker-multiplier 0.25
osd-devices: &osd-devices /dev/sdb /dev/vdb /dev/sdc
expected-osd-count: &expected-osd-count 3
expected-mon-count: &expected-mon-count 3
ovn-channel: &ovn-channel latest/edge
openstack-channel: &openstack-channel latest/edge
mysql-channel: &mysql-channel 8.0/edge
repo-infinidat-apt-key: &repo-infinidat-apt-key |
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)
mQENBFESDRIBCADMR7MQMbH4GdCQqfrOMt35MhBwwH4wv9kb1WRSTxa0CmuzYaBB
1nJ0nLaMAwHsEr9CytPWDpMngm/3nt+4F2hJcsOEkQkqeJ31gScJewM+AOUV3DEl
qOeXXYLcP+jUY6pPjlZpOw0p7moUQPXHn+7amVrk7cXGQ8O3B+5a5wjN86LT2hlX
DlBlV5bX/DYluiPUbvQLOknmwO53KpaeDeZc4a8iIOCYWu2ntuAMddBkTps0El5n
JJZMTf6os2ZzngWMZRMDiVJgqVRi2b+8SgFQlQy0cAmne/mpgPrRq0ZMX3DokGG5
hnIg1mF82laTxd+9qtiOxupzJqf8mncQHdaTABEBAAG0IWFwcF9yZXBvIChDb21t
ZW50KSA8bm9AZW1haWwuY29tPokBOAQTAQIAIgUCURINEgIbLwYLCQgHAwIGFQgC
CQoLBBYCAwECHgECF4AACgkQem2D/j05RYSrcggAsCc4KppV/SZX5XI/CWFXIAXw
+HaNsh2EwYKf9DhtoGbTOuwePvrPGcgFYM3Tu+m+rziPnnFl0bs0xwQyNEVQ9yDw
t465pSgmXwEHbBkoISV1e4WYtZAsnTNne9ieJ49Ob/WY4w3AkdPRK/41UP5Ct6lR
HHRXrSWJYHVq5Rh6BakRuMJyJLz/KvcJAaPkA4U6VrPD7PFtSecMTaONPjGCcomq
b7q84G5ZfeJWb742PWBTS8fJdC+Jd4y5fFdJS9fQwIo52Ff9In2QBpJt5Wdc02SI
fvQnuh37D2P8OcIfMxMfoFXpAMWjrMYc5veyQY1GXD/EOkfjjLne6qWPLfNojA==
=w5Os
-----END PGP PUBLIC KEY BLOCK-----
machines:
'0':
constraints: tags=os-nodes
'1':
constraints: tags=os-nodes
'2':
constraints: tags=os-nodes
'3':
constraints: tags=os-nodes
relations:
- - nova-compute:amqp
- rabbitmq-server:amqp
- - nova-cloud-controller:identity-service
- keystone:identity-service
- - glance:identity-service
- keystone:identity-service
- - neutron-api:identity-service
- keystone:identity-service
- - neutron-api:amqp
- rabbitmq-server:amqp
- - glance:amqp
- rabbitmq-server:amqp
- - nova-cloud-controller:image-service
- glance:image-service
- - nova-compute:image-service
- glance:image-service
- - nova-cloud-controller:cloud-compute
- nova-compute:cloud-compute
- - nova-cloud-controller:amqp
- rabbitmq-server:amqp
- - openstack-dashboard:identity-service
- keystone:identity-service
- - nova-cloud-controller:neutron-api
- neutron-api:neutron-api
- - cinder:image-service
- glance:image-service
- - cinder:amqp
- rabbitmq-server:amqp
- - cinder:identity-service
- keystone:identity-service
- - cinder:cinder-volume-service
- nova-cloud-controller:cinder-volume-service
- - ntp:juju-info
- nova-compute:juju-info
- - placement:identity-service
- keystone:identity-service
- - placement:placement
- nova-cloud-controller:placement
- - keystone:shared-db
- keystone-mysql-router:shared-db
- - cinder:shared-db
- cinder-mysql-router:shared-db
- - glance:shared-db
- glance-mysql-router:shared-db
- - nova-cloud-controller:shared-db
- nova-mysql-router:shared-db
- - neutron-api:shared-db
- neutron-mysql-router:shared-db
- - openstack-dashboard:shared-db
- dashboard-mysql-router:shared-db
- - placement:shared-db
- placement-mysql-router:shared-db
- - vault:shared-db
- vault-mysql-router:shared-db
- - keystone-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - cinder-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - nova-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - glance-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - neutron-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - dashboard-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - placement-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - vault-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - neutron-api-plugin-ovn:neutron-plugin
- neutron-api:neutron-plugin-api-subordinate
- - ovn-central:certificates
- vault:certificates
- - ovn-central:ovsdb-cms
- neutron-api-plugin-ovn:ovsdb-cms
- - neutron-api:certificates
- vault:certificates
- - ovn-chassis:nova-compute
- nova-compute:neutron-plugin
- - ovn-chassis:certificates
- vault:certificates
- - ovn-chassis:ovsdb
- ovn-central:ovsdb
- - vault:certificates
- neutron-api-plugin-ovn:certificates
- - vault:certificates
- cinder:certificates
- - vault:certificates
- glance:certificates
- - vault:certificates
- keystone:certificates
- - vault:certificates
- nova-cloud-controller:certificates
- - vault:certificates
- openstack-dashboard:certificates
- - vault:certificates
- placement:certificates
- - vault:certificates
- mysql-innodb-cluster:certificates
- - manila:shared-db
- manila-mysql-router:shared-db
- - manila-mysql-router:db-router
- mysql-innodb-cluster:db-router
- - manila
- rabbitmq-server
- - manila
- keystone
- - manila:manila-plugin
- manila-infinidat:manila-plugin
- - manila:certificates
- vault:certificates
applications:
cinder-mysql-router:
charm: mysql-router
channel: *mysql-channel
cinder:
charm: cinder
channel: *openstack-channel
num_units: 1
options:
block-device: None
glance-api-version: 2
worker-multiplier: *worker-multiplier
openstack-origin: *openstack-origin
to:
- '3' # cinder can't be deployed to LXD, if iscsi is used
glance-mysql-router:
charm: mysql-router
channel: *mysql-channel
glance:
charm: glance
channel: *openstack-channel
num_units: 1
options:
worker-multiplier: *worker-multiplier
openstack-origin: *openstack-origin
to:
- 'lxd:1'
keystone-mysql-router:
charm: mysql-router
channel: *mysql-channel
keystone:
charm: keystone
channel: *openstack-channel
num_units: 1
options:
worker-multiplier: *worker-multiplier
openstack-origin: *openstack-origin
to:
- 'lxd:2'
neutron-mysql-router:
charm: mysql-router
channel: *mysql-channel
neutron-api-plugin-ovn:
charm: neutron-api-plugin-ovn
channel: *openstack-channel
neutron-api:
charm: neutron-api
channel: *openstack-channel
num_units: 1
options:
neutron-security-groups: true
flat-network-providers: physnet1
worker-multiplier: *worker-multiplier
openstack-origin: *openstack-origin
to:
- 'lxd:0'
placement-mysql-router:
charm: mysql-router
channel: *mysql-channel
placement:
charm: placement
channel: *openstack-channel
num_units: 1
options:
worker-multiplier: *worker-multiplier
openstack-origin: *openstack-origin
to:
- 'lxd:1'
nova-mysql-router:
charm: mysql-router
channel: *mysql-channel
nova-cloud-controller:
charm: nova-cloud-controller
channel: *openstack-channel
num_units: 1
options:
network-manager: Neutron
worker-multiplier: *worker-multiplier
openstack-origin: *openstack-origin
to:
- 'lxd:3'
nova-compute:
charm: nova-compute
channel: *openstack-channel
num_units: 3
options:
config-flags: default_ephemeral_format=ext4
enable-live-migration: true
enable-resize: true
migration-auth-type: ssh
openstack-origin: *openstack-origin
to:
- '0'
- '1'
- '2'
ntp:
charm: ntp
num_units: 0
dashboard-mysql-router:
charm: mysql-router
channel: *mysql-channel
openstack-dashboard:
charm: openstack-dashboard
channel: *openstack-channel
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- 'lxd:3'
rabbitmq-server:
charm: rabbitmq-server
channel: 3.8/edge
num_units: 1
to:
- 'lxd:1'
mysql-innodb-cluster:
charm: mysql-innodb-cluster
channel: *mysql-channel
num_units: 3
options:
enable-binlogs: true
innodb-buffer-pool-size: 8G
max-connections: 4000
wait-timeout: 3600
to:
- 'lxd:0'
- 'lxd:1'
- 'lxd:2'
ovn-central:
charm: ovn-central
channel: *ovn-channel
num_units: 3
options:
source: *openstack-origin
to:
- 'lxd:0'
- 'lxd:1'
- 'lxd:2'
ovn-chassis:
charm: ovn-chassis
channel: *ovn-channel
# Please update the `bridge-interface-mappings` to values suitable for the
# hardware used in your deployment. See the referenced documentation at the
# top of this file.
options:
ovn-bridge-mappings: physnet1:br-ex
bridge-interface-mappings: *data-port
vault-mysql-router:
charm: mysql-router
channel: *mysql-channel
vault:
charm: vault
channel: latest/edge
options:
auto-generate-root-ca-cert: false
num_units: 1
to:
- 'lxd:2'
manila:
charm: manila
num_units: 1
channel: *openstack-channel
options:
openstack-origin: *openstack-origin
default-share-backend: 'nas'
to:
- 'lxd:0'
manila-mysql-router:
charm: mysql-router
channel: *mysql-channel
manila-infinidat:
charm: ../../manila-infinidat.charm
options:
install_keys: *repo-infinidat-apt-key
pool-name: manila
# network space of type NAS on the Infinibox side
nas-network-space-name: nas

View File

@ -7,17 +7,17 @@
# section of the [OpenStack Charms Deployment Guide](https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/)
# for more information.
series: focal
series: jammy
variables:
openstack-origin: &openstack-origin distro
openstack-origin: &openstack-origin cloud:jammy-zed
data-port: &data-port br-ex:ext
worker-multiplier: &worker-multiplier 0.25
osd-devices: &osd-devices /dev/sdb /dev/vdb /dev/sdc
expected-osd-count: &expected-osd-count 3
expected-mon-count: &expected-mon-count 3
ovn-channel: &ovn-channel latest/stable
openstack-channel: &openstack-channel ussuri/edge
mysql-channel: &mysql-channel 8.0/stable
ovn-channel: &ovn-channel latest/edge
openstack-channel: &openstack-channel zed/edge
mysql-channel: &mysql-channel 8.0/edge
repo-infinidat-apt-key: &repo-infinidat-apt-key |
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)
@ -164,7 +164,7 @@ relations:
applications:
cinder-mysql-router:
charm: mysql-router
channel: latest/edge
channel: *mysql-channel
cinder:
charm: cinder
channel: *openstack-channel
@ -178,7 +178,7 @@ applications:
- '3' # cinder can't be deployed to LXD, if iscsi is used
glance-mysql-router:
charm: mysql-router
channel: latest/edge
channel: *mysql-channel
glance:
charm: glance
channel: *openstack-channel
@ -190,7 +190,7 @@ applications:
- 'lxd:1'
keystone-mysql-router:
charm: mysql-router
channel: latest/edge
channel: *mysql-channel
keystone:
charm: keystone
channel: *openstack-channel
@ -202,7 +202,7 @@ applications:
- 'lxd:2'
neutron-mysql-router:
charm: mysql-router
channel: latest/edge
channel: *mysql-channel
neutron-api-plugin-ovn:
charm: neutron-api-plugin-ovn
channel: *openstack-channel
@ -219,7 +219,7 @@ applications:
- 'lxd:0'
placement-mysql-router:
charm: mysql-router
channel: latest/edge
channel: *mysql-channel
placement:
charm: placement
channel: *openstack-channel
@ -231,7 +231,7 @@ applications:
- 'lxd:1'
nova-mysql-router:
charm: mysql-router
channel: latest/edge
channel: *mysql-channel
nova-cloud-controller:
charm: nova-cloud-controller
channel: *openstack-channel
@ -261,7 +261,7 @@ applications:
num_units: 0
dashboard-mysql-router:
charm: mysql-router
channel: latest/edge
channel: *mysql-channel
openstack-dashboard:
charm: openstack-dashboard
channel: *openstack-channel
@ -272,7 +272,7 @@ applications:
- 'lxd:3'
rabbitmq-server:
charm: rabbitmq-server
channel: 3.8/stable
channel: latest/edge
num_units: 1
to:
- 'lxd:1'
@ -309,14 +309,12 @@ applications:
ovn-bridge-mappings: physnet1:br-ex
bridge-interface-mappings: *data-port
vault-mysql-router:
#charm: cs:mysql-router-15
charm: mysql-router
channel: latest/edge
channel: *mysql-channel
vault:
charm: vault
channel: 1.7/stable
channel: latest/edge
options:
# init and unseal is done by zaza
auto-generate-root-ca-cert: false
num_units: 1
to:
@ -332,7 +330,7 @@ applications:
- 'lxd:0'
manila-mysql-router:
charm: mysql-router
channel: latest/edge
channel: *mysql-channel
manila-infinidat:
charm: ../../manila-infinidat.charm

View File

@ -27,6 +27,7 @@ configure:
- zaza.openstack.charm_tests.nova.setup.manage_ssh_key
- tests.tests.configure_infinidat_share_type
gate_bundles:
- focal-ussuri
- jammy-antelope
- lunar-antelope
smoke_bundles:
- focal-ussuri
- jammy-antelope

48
tox.ini
View File

@ -7,21 +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
[testenv]
@ -35,35 +20,20 @@ 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:py310]
basepython = python3.10
deps = -r{toxinidir}/requirements.txt
@ -115,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
# manila-infinidat.charm, which is the behaviour expected
# by OSCI. However charmcraft 1.2.1 now generates
@ -123,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]