diff --git a/.zuul.yaml b/.zuul.yaml index 7ffc71c..fd20909 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,4 +1,4 @@ - project: templates: - - openstack-python3-charm-yoga-jobs + - openstack-python3-charm-jobs - openstack-cover-jobs diff --git a/build-requirements.txt b/build-requirements.txt deleted file mode 100644 index b6d2452..0000000 --- a/build-requirements.txt +++ /dev/null @@ -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. diff --git a/charmcraft.yaml b/charmcraft.yaml index ff59b02..fa7de3a 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -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" diff --git a/metadata.yaml b/metadata.yaml index 2b354a8..a27ce42 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -11,7 +11,7 @@ tags: - file-servers - misc series: - - focal + - jammy subordinate: true provides: storage-backend: diff --git a/osci.yaml b/osci.yaml index 0cb98f8..9181ad8 100644 --- a/osci.yaml +++ b/osci.yaml @@ -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: cinder-infinidat build_type: charmcraft + charmcraft_channel: 2.1/stable diff --git a/pip.sh b/pip.sh deleted file mode 100755 index 9a7e6b0..0000000 --- a/pip.sh +++ /dev/null @@ -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 "$@" diff --git a/tests/bundles/jammy-antelope.yaml b/tests/bundles/jammy-antelope.yaml new file mode 100644 index 0000000..f7185fc --- /dev/null +++ b/tests/bundles/jammy-antelope.yaml @@ -0,0 +1,330 @@ +# 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 2023.1/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 +- - nova-compute + - infinidat-tools +- - cinder + - cinder-infinidat +- - cinder + - infinidat-tools + +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/stable + 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: cs:mysql-router-15 + charm: *mysql-channel + channel: latest/edge + vault: + charm: vault + channel: 1.8/stable + options: + # init and unseal is done by zaza + auto-generate-root-ca-cert: false + num_units: 1 + to: + - 'lxd:2' + infinidat-tools: + expose: True + charm: ../../infinidat-tools.charm + options: + install_keys: *repo-infinidat-apt-key + cinder-infinidat: + expose: True + charm: ../../cinder-infinidat.charm + options: + install_keys: *repo-infinidat-apt-key + iscsi-netspaces: iscsi + pool-name: cinder diff --git a/tests/bundles/focal-ussuri.yaml b/tests/bundles/jammy-zed.yaml similarity index 95% rename from tests/bundles/focal-ussuri.yaml rename to tests/bundles/jammy-zed.yaml index 0ad3adf..6fe5f0c 100644 --- a/tests/bundles/focal-ussuri.yaml +++ b/tests/bundles/jammy-zed.yaml @@ -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) @@ -159,7 +159,7 @@ relations: applications: cinder-mysql-router: charm: mysql-router - channel: latest/edge + channel: *mysql-channel cinder: charm: cinder channel: *openstack-channel @@ -173,7 +173,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 @@ -185,7 +185,7 @@ applications: - 'lxd:1' keystone-mysql-router: charm: mysql-router - channel: latest/edge + channel: *mysql-channel keystone: charm: keystone channel: *openstack-channel @@ -197,7 +197,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 @@ -214,7 +214,7 @@ applications: - 'lxd:0' placement-mysql-router: charm: mysql-router - channel: latest/edge + channel: *mysql-channel placement: charm: placement channel: *openstack-channel @@ -226,7 +226,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 @@ -256,7 +256,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 @@ -305,11 +305,11 @@ applications: bridge-interface-mappings: *data-port vault-mysql-router: #charm: cs:mysql-router-15 - charm: mysql-router + charm: *mysql-channel channel: latest/edge vault: charm: vault - channel: 1.7/stable + channel: 1.8/stable options: # init and unseal is done by zaza auto-generate-root-ca-cert: false diff --git a/tests/tests.yaml b/tests/tests.yaml index 72baba7..b29c89c 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -26,7 +26,7 @@ configure: - zaza.openstack.charm_tests.neutron.setup.basic_overcloud_network - zaza.openstack.charm_tests.nova.setup.manage_ssh_key gate_bundles: - - focal-ussuri + - jammy-antelope smoke_bundles: - - focal-ussuri + - jammy-zed diff --git a/tox.ini b/tox.ini index 4d26005..48f3dc5 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -114,7 +84,7 @@ commands = {posargs} [testenv:build] basepython = python3 -deps = -r{toxinidir}/build-requirements.txt +deps = # NOTE(lourot): charmcraft 1.0.0 used to generate # cinder-Infinidat.charm, which is the behaviour expected # by OSCI. However charmcraft 1.2.1 now generates @@ -122,7 +92,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]