diff --git a/.zuul.yaml b/.zuul.yaml index b1b0aff..23bf5f6 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,5 +1,4 @@ - project: templates: - - python36-charm-jobs - - 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 522d230..0604425 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -2,33 +2,24 @@ type: charm parts: charm: - build-packages: - - tox - - git - - python3-dev - override-build: | - apt-get install ca-certificates -y - tox -e build-reactive - override-stage: | - echo "Copying charm to staging area: $CHARMCRAFT_STAGE" - NAME=$(ls $CHARMCRAFT_PART_BUILD/build/builds) - cp -r $CHARMCRAFT_PART_BUILD/build/builds/$NAME/* $CHARMCRAFT_STAGE/ - override-prime: | - # For some reason, the normal priming chokes on the fact that there's a - # hooks directory. - cp -r $CHARMCRAFT_STAGE/* . + source: src/ + 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 d35958b..0a2e2d0 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: cinder-lvm 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/build.lock b/src/build.lock deleted file mode 100644 index da3e721..0000000 --- a/src/build.lock +++ /dev/null @@ -1,182 +0,0 @@ -{ - "locks": [ - { - "type": "layer", - "item": "layer:options", - "url": "https://github.com/juju-solutions/layer-options.git", - "vcs": null, - "branch": "refs/heads/master", - "commit": "fcdcea4e5de3e1556c24e6704607862d0ba00a56" - }, - { - "type": "layer", - "item": "layer:basic", - "url": "https://github.com/juju-solutions/layer-basic.git", - "vcs": null, - "branch": "refs/heads/master", - "commit": "fb767dcf0786d1d5364199bb3b40bdc86518b45b" - }, - { - "type": "layer", - "item": "layer:openstack", - "url": "https://github.com/openstack/charm-layer-openstack", - "vcs": null, - "branch": "refs/heads/master", - "commit": "e0f700eacb026235e1a04e7cbc28dfbe9d4e4520" - }, - { - "type": "layer", - "item": "cinder-lvm", - "url": null, - "vcs": null, - "branch": "refs/heads/stable/yoga\nrefs/heads/yoga-updates", - "commit": "refs/heads/stable/yoga\nrefs/heads/yoga-updates" - }, - { - "type": "layer", - "item": "interface:tls-certificates", - "url": "https://github.com/juju-solutions/interface-tls-certificates", - "vcs": null, - "branch": "refs/heads/master", - "commit": "d9850016d930a6d507b9fd45e2598d327922b140" - }, - { - "type": "layer", - "item": "interface:cinder-backend", - "url": "https://github.com/openstack/charm-interface-cinder-backend.git", - "vcs": null, - "branch": "refs/heads/master", - "commit": "baa1b4f61ff610caf60a7b13841e8d68ce3842d1" - }, - { - "type": "python_module", - "package": "wheel", - "vcs": null, - "version": "0.37.1" - }, - { - "type": "python_module", - "package": "charms.openstack", - "url": "git+https://github.com/openstack/charms.openstack.git", - "branch": "refs/heads/master", - "version": "13ef220ce3529fa7b8e11c6e4c5b352d05b6f148", - "vcs": "git" - }, - { - "type": "python_module", - "package": "pyaml", - "vcs": null, - "version": "21.10.1" - }, - { - "type": "python_module", - "package": "MarkupSafe", - "vcs": null, - "version": "2.1.1" - }, - { - "type": "python_module", - "package": "charmhelpers", - "url": "git+https://github.com/juju/charm-helpers.git", - "branch": "refs/heads/stable/yoga", - "version": "971ac5117c96bd1cb4a6a520787e4509564da582", - "vcs": "git" - }, - { - "type": "python_module", - "package": "pbr", - "vcs": null, - "version": "5.8.1" - }, - { - "type": "python_module", - "package": "pip", - "vcs": null, - "version": "22.0.4" - }, - { - "type": "python_module", - "package": "packaging", - "vcs": null, - "version": "21.3" - }, - { - "type": "python_module", - "package": "setuptools_scm", - "vcs": null, - "version": "6.4.2" - }, - { - "type": "python_module", - "package": "flit_core", - "vcs": null, - "version": "3.7.1" - }, - { - "type": "python_module", - "package": "setuptools", - "vcs": null, - "version": "62.1.0" - }, - { - "type": "python_module", - "package": "Jinja2", - "vcs": null, - "version": "3.1.1" - }, - { - "type": "python_module", - "package": "pyparsing", - "vcs": null, - "version": "3.0.8" - }, - { - "type": "python_module", - "package": "psutil", - "vcs": null, - "version": "5.9.0" - }, - { - "type": "python_module", - "package": "PyYAML", - "vcs": null, - "version": "5.3.1" - }, - { - "type": "python_module", - "package": "dnspython", - "vcs": null, - "version": "1.16.0" - }, - { - "type": "python_module", - "package": "Tempita", - "vcs": null, - "version": "0.4" - }, - { - "type": "python_module", - "package": "netifaces", - "vcs": null, - "version": "0.11.0" - }, - { - "type": "python_module", - "package": "charms.reactive", - "vcs": null, - "version": "1.5.0" - }, - { - "type": "python_module", - "package": "netaddr", - "vcs": null, - "version": "0.7.19" - }, - { - "type": "python_module", - "package": "tomli", - "vcs": null, - "version": "2.0.1" - } - ] -} \ No newline at end of file diff --git a/src/metadata.yaml b/src/metadata.yaml index 05dafcc..d959ebd 100644 --- a/src/metadata.yaml +++ b/src/metadata.yaml @@ -11,8 +11,8 @@ tags: - file-servers - misc series: - - focal - jammy + - kinetic subordinate: true provides: storage-backend: diff --git a/src/test-requirements.txt b/src/test-requirements.txt index 7c26a08..9c7afb7 100644 --- a/src/test-requirements.txt +++ b/src/test-requirements.txt @@ -8,5 +8,5 @@ tox # Functional Test Requirements (let Zaza's dependencies solve all dependencies here!) -git+https://github.com/openstack-charmers/zaza.git@stable/yoga#egg=zaza -git+https://github.com/openstack-charmers/zaza-openstack-tests.git@stable/yoga#egg=zaza.openstack +git+https://github.com/openstack-charmers/zaza.git#egg=zaza +git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack diff --git a/src/tests/bundles/focal-yoga.yaml b/src/tests/bundles/focal-yoga.yaml deleted file mode 100644 index 575e5b0..0000000 --- a/src/tests/bundles/focal-yoga.yaml +++ /dev/null @@ -1,84 +0,0 @@ -series: focal -local_overlay_enabled: False - -variables: - openstack-origin: &openstack-origin cloud:focal-yoga -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': - constraints: mem=4G root-disk=16G -relations: - - - keystone:shared-db - - keystone-mysql-router:shared-db - - - keystone-mysql-router:db-router - - mysql-innodb-cluster:db-router - - - cinder:shared-db - - cinder-mysql-router:shared-db - - - cinder-mysql-router:db-router - - mysql-innodb-cluster:db-router - - - cinder:identity-service - - keystone:identity-service - - - cinder:amqp - - rabbitmq-server:amqp - - - cinder:storage-backend - - cinder-lvm:storage-backend -applications: - 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 - options: - openstack-origin: *openstack-origin - num_units: 1 - to: - - '4' - channel: latest/edge - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - cinder: - charm: ch:cinder - storage: - block-devices: '40G' - num_units: 1 - options: - openstack-origin: *openstack-origin - block-device: None - overwrite: "true" - ephemeral-unmount: /mnt - to: - - '5' - channel: latest/edge - cinder-lvm: - charm: ../../../cinder-lvm.charm - options: - block-device: '/tmp/vol1|4G' - alias: zaza-lvm - cinder-mysql-router: - charm: ch:mysql-router - channel: latest/edge diff --git a/src/tests/bundles/focal-xena.yaml b/src/tests/bundles/jammy-zed.yaml similarity index 96% rename from src/tests/bundles/focal-xena.yaml rename to src/tests/bundles/jammy-zed.yaml index eac5fd0..130be4b 100644 --- a/src/tests/bundles/focal-xena.yaml +++ b/src/tests/bundles/jammy-zed.yaml @@ -1,8 +1,8 @@ -series: focal +series: jammy local_overlay_enabled: False variables: - openstack-origin: &openstack-origin cloud:focal-xena + openstack-origin: &openstack-origin cloud:jammy-zed comment: - 'machines section to decide order of deployment. database sooner = faster' machines: diff --git a/src/tests/bundles/impish-xena.yaml b/src/tests/bundles/kinetic-zed.yaml similarity index 99% rename from src/tests/bundles/impish-xena.yaml rename to src/tests/bundles/kinetic-zed.yaml index 423d0f2..10b0ad0 100644 --- a/src/tests/bundles/impish-xena.yaml +++ b/src/tests/bundles/kinetic-zed.yaml @@ -1,4 +1,4 @@ -series: impish +series: kinetic local_overlay_enabled: False variables: diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index 4a18885..323391a 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -4,14 +4,13 @@ tests: configure: - zaza.openstack.charm_tests.keystone.setup.add_demo_user gate_bundles: - - focal-xena - - impish-xena -smoke_bundles: - - focal-xena -dev_bundles: - - focal-yoga - jammy-yoga +smoke_bundles: + - jammy-yoga +dev_bundles: + - jammy-yoga + - jammy-zed + - kinetic-zed tests_options: force_deploy: - - impish-xena - - jammy-yoga + - kinetic-zed diff --git a/test-requirements.txt b/test-requirements.txt index 50eef16..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,29 +12,14 @@ 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 -git+https://github.com/openstack/charms.openstack.git@stable/yoga#egg=charms.openstack +git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack # # Revisit for removal / mock improvement: # 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]