diff --git a/.zuul.yaml b/.zuul.yaml index 7ffc71c..23bf5f6 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,4 +1,4 @@ - project: templates: - - openstack-python3-charm-yoga-jobs + - openstack-python3-charm-zed-jobs - openstack-cover-jobs diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 0000000..17575d9 --- /dev/null +++ b/bindep.txt @@ -0,0 +1,4 @@ +libffi-dev [platform:dpkg] +libpq-dev [platform:dpkg] +libxml2-dev [platform:dpkg] +libxslt1-dev [platform:dpkg] diff --git a/charmcraft.yaml b/charmcraft.yaml index 92de663..0604425 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -6,17 +6,20 @@ parts: plugin: reactive build-snaps: - charm + build-environment: + - CHARM_INTERFACES_DIR: /root/project/interfaces/ + - CHARM_LAYERS_DIR: /root/project/layers/ bases: - build-on: - name: ubuntu - channel: "20.04" + channel: "22.04" architectures: - amd64 run-on: - - name: ubuntu - channel: "20.04" - architectures: [amd64, s390x, ppc64el, arm64] - name: ubuntu channel: "22.04" architectures: [amd64, s390x, ppc64el, arm64] + - name: ubuntu + channel: "22.10" + architectures: [amd64, s390x, ppc64el, arm64] diff --git a/osci.yaml b/osci.yaml index 51e7d54..21cb0b6 100644 --- a/osci.yaml +++ b/osci.yaml @@ -1,10 +1,9 @@ - project: templates: - - charm-unit-jobs-py38 - charm-unit-jobs-py310 - - charm-xena-functional-jobs - - charm-yoga-functional-jobs + - charm-zed-functional-jobs vars: needs_charm_build: true charm_build_name: aodh build_type: charmcraft + charmcraft_channel: 2.0/stable diff --git a/requirements.txt b/requirements.txt index 7755b95..b3dc23f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,16 +15,6 @@ setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb # cryptography<3.4 -# Build requirements -cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. -git+https://github.com/juju/charm-tools#egg=charm-tools +git+https://github.com/juju/charm-tools.git simplejson - -# Newer versions use keywords that didn't exist in python 3.5 yet (e.g. -# "ModuleNotFoundError") -# NOTE(lourot): This might look like a duplication of test-requirements.txt but -# some tox targets use only test-requirements.txt whereas charm-build uses only -# requirements.txt -importlib-metadata<3.0.0; python_version < '3.6' -importlib-resources<3.0.0; python_version < '3.6' diff --git a/src/config.yaml b/src/config.yaml index 01f4515..f4c1b91 100644 --- a/src/config.yaml +++ b/src/config.yaml @@ -22,4 +22,4 @@ options: description: | Comma separated list of nagios servicegroups for the service checks. openstack-origin: - default: yoga + default: zed diff --git a/src/metadata.yaml b/src/metadata.yaml index 6e34e85..3eaa8db 100644 --- a/src/metadata.yaml +++ b/src/metadata.yaml @@ -13,8 +13,8 @@ description: | tags: - openstack series: -- focal - jammy +- kinetic subordinate: false requires: mongodb: diff --git a/src/tests/bundles/focal-yoga.yaml b/src/tests/bundles/focal-yoga.yaml deleted file mode 100644 index 321eabe..0000000 --- a/src/tests/bundles/focal-yoga.yaml +++ /dev/null @@ -1,184 +0,0 @@ -local_overlay_enabled: False - -variables: - openstack-origin: &openstack-origin cloud:focal-yoga - -series: focal - -machines: - 0: - constraints: "mem=3072M" - 1: - constraints: "mem=3072M" - 2: - constraints: "mem=3072M" - 3: - 4: - 5: - 6: - 7: - 8: - 9: - 10: - 11: - 12: - 13: - 14: - series: bionic - -# We specify machine placements for these to improve iteration -# time, given that machine "0" comes up way before machine "7" -applications: - - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - aodh-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 - options: - source: *openstack-origin - to: - - '0' - - '1' - - '2' - channel: latest/edge - - aodh: - charm: ../../../aodh.charm - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '3' - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - options: - source: *openstack-origin - to: - - '4' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - channel: latest/edge - - ceilometer: - charm: ch:ceilometer - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '6' - channel: latest/edge - - ceph-osd: - charm: ch:ceph-osd - num_units: 3 - storage: - osd-devices: 'cinder,10G' - options: - source: *openstack-origin - to: - - '7' - - '8' - - '9' - channel: latest/edge - - ceph-mon: - charm: ch:ceph-mon - num_units: 3 - options: - expected-osd-count: 3 - monitor-count: '3' - source: *openstack-origin - to: - - '10' - - '11' - - '12' - channel: latest/edge - - gnocchi: - charm: ch:gnocchi - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '13' - channel: latest/edge - - memcached: - charm: ch:memcached - num_units: 1 - # Note that holding memcached at bionic as it's not available at focal yet. - series: bionic - to: - - '14' - - nrpe: - charm: cs:nrpe - -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' - - - - 'aodh:shared-db' - - 'aodh-mysql-router:shared-db' - - - 'aodh-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'aodh:amqp' - - 'rabbitmq-server:amqp' - - - - 'aodh:identity-service' - - 'keystone:identity-service' - - - - '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' - - - - 'aodh:nrpe-external-master' - - 'nrpe:nrpe-external-master' diff --git a/src/tests/bundles/jammy-yoga.yaml b/src/tests/bundles/jammy-yoga.yaml index 763ed5c..2bf2be1 100644 --- a/src/tests/bundles/jammy-yoga.yaml +++ b/src/tests/bundles/jammy-yoga.yaml @@ -24,7 +24,7 @@ machines: 12: 13: 14: - series: bionic + series: focal # We specify machine placements for these to improve iteration # time, given that machine "0" comes up way before machine "7" @@ -124,13 +124,14 @@ applications: memcached: charm: ch:memcached num_units: 1 - # Note that holding memcached at bionic as it's not available at focal yet. - series: bionic + # Note that holding memcached at focal as it's not available at jammy yet. + series: focal to: - '14' nrpe: - charm: cs:nrpe + charm: ch:nrpe + channel: latest/edge relations: diff --git a/src/tests/bundles/focal-xena.yaml b/src/tests/bundles/jammy-zed.yaml similarity index 93% rename from src/tests/bundles/focal-xena.yaml rename to src/tests/bundles/jammy-zed.yaml index 306b032..b07929d 100644 --- a/src/tests/bundles/focal-xena.yaml +++ b/src/tests/bundles/jammy-zed.yaml @@ -1,9 +1,9 @@ local_overlay_enabled: False variables: - openstack-origin: &openstack-origin cloud:focal-xena + openstack-origin: &openstack-origin cloud:jammy-zed -series: focal +series: jammy machines: 0: @@ -24,7 +24,7 @@ machines: 12: 13: 14: - series: bionic + series: focal # We specify machine placements for these to improve iteration # time, given that machine "0" comes up way before machine "7" @@ -124,13 +124,14 @@ applications: memcached: charm: ch:memcached num_units: 1 - # Note that holding memcached at bionic as it's not available at focal yet. - series: bionic + # Note that holding memcached at focal as it's not available at jammy yet. + series: focal to: - '14' nrpe: - charm: cs:nrpe + charm: ch:nrpe + channel: latest/edge relations: diff --git a/src/tests/bundles/impish-xena.yaml b/src/tests/bundles/kinetic-zed.yaml similarity index 94% rename from src/tests/bundles/impish-xena.yaml rename to src/tests/bundles/kinetic-zed.yaml index 60101b5..9d25c5a 100644 --- a/src/tests/bundles/impish-xena.yaml +++ b/src/tests/bundles/kinetic-zed.yaml @@ -3,7 +3,7 @@ local_overlay_enabled: False variables: openstack-origin: &openstack-origin distro -series: impish +series: kinetic machines: 0: @@ -24,7 +24,7 @@ machines: 12: 13: 14: - series: bionic + series: focal # We specify machine placements for these to improve iteration # time, given that machine "0" comes up way before machine "7" @@ -124,13 +124,14 @@ applications: memcached: charm: ch:memcached num_units: 1 - # Note that holding memcached at bionic as it's not available at focal yet. - series: bionic + # Note that holding memcached at focal as it's not available at kinetic yet. + series: focal to: - '14' nrpe: - charm: cs:nrpe + charm: ch:nrpe + channel: latest/edge relations: diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index 78e6742..5427c46 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -1,13 +1,13 @@ charm_name: aodh gate_bundles: - - focal-xena - - impish-xena -dev_bundles: - - focal-yoga - jammy-yoga +dev_bundles: + - jammy-yoga + - jammy-zed + - kinetic-zed smoke_bundles: - - focal-xena + - jammy-yoga tests: - zaza.openstack.charm_tests.aodh.tests.AodhTest configure: @@ -24,5 +24,8 @@ target_deploy_status: workload-status-message-prefix: "Nagios server not configured or related" tests_options: force_deploy: - - impish-xena + # nrpe charm doesn't support jammy+ and needs to be force installed + # https://bugs.launchpad.net/charm-nrpe/+bug/1968008 - jammy-yoga + - jammy-zed + - kinetic-zed diff --git a/test-requirements.txt b/test-requirements.txt index a11a7d0..a7936e6 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,6 @@ # https://github.com/openstack-charmers/release-tools # pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here. -cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 stestr>=2.2.0 @@ -13,25 +12,10 @@ stestr>=2.2.0 # https://github.com/mtreinish/stestr/issues/145 cliff<3.0.0 -# Dependencies of stestr. Newer versions use keywords that didn't exist in -# python 3.5 yet (e.g. "ModuleNotFoundError") -importlib-metadata<3.0.0; python_version < '3.6' -importlib-resources<3.0.0; python_version < '3.6' - -# Some Zuul nodes sometimes pull newer versions of these dependencies which -# dropped support for python 3.5: -osprofiler<2.7.0;python_version<'3.6' -stevedore<1.31.0;python_version<'3.6' -debtcollector<1.22.0;python_version<'3.6' -oslo.utils<=3.41.0;python_version<'3.6' - requests>=2.18.4 charms.reactive -# Newer mock seems to have some syntax which is newer than python3.5 (e.g. -# f'{something}' -mock>=1.2,<4.0.0; python_version < '3.6' -mock>=1.2; python_version >= '3.6' +mock>=1.2 nose>=1.3.7 coverage>=3.6 diff --git a/tox.ini b/tox.ini index e22fe48..bdde110 100644 --- a/tox.ini +++ b/tox.ini @@ -31,10 +31,8 @@ minversion = 3.18.0 setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 TERM=linux - LAYER_PATH={toxinidir}/layers - INTERFACE_PATH={toxinidir}/interfaces JUJU_REPOSITORY={toxinidir}/build -passenv = http_proxy https_proxy INTERFACE_PATH LAYER_PATH JUJU_REPOSITORY +passenv = no_proxy http_proxy https_proxy JUJU_REPOSITORY install_command = {toxinidir}/pip.sh install {opts} {packages} allowlist_externals = @@ -50,7 +48,7 @@ basepython = python3 deps = -r{toxinidir}/build-requirements.txt commands = charmcraft clean - charmcraft -v build + charmcraft -v pack {toxinidir}/rename.sh [testenv:build-reactive] @@ -68,21 +66,6 @@ basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} -[testenv:py36] -basepython = python3.6 -deps = -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - -[testenv:py38] -basepython = python3.8 -deps = -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - -[testenv:py39] -basepython = python3.9 -deps = -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - [testenv:py310] basepython = python3.10 deps = -r{toxinidir}/test-requirements.txt @@ -91,7 +74,7 @@ commands = stestr run --slowest {posargs} [testenv:pep8] basepython = python3 deps = flake8==3.9.2 - charm-tools==2.8.3 + git+https://github.com/juju/charm-tools.git commands = flake8 {posargs} src unit_tests [testenv:func-target]