diff --git a/osci.yaml b/osci.yaml index 11de533..3c0d3b6 100644 --- a/osci.yaml +++ b/osci.yaml @@ -10,16 +10,24 @@ - focal-ussuri - focal-victoria - focal-wallaby + - focal-xena: + voting: false - groovy-victoria - hirsute-wallaby + - impish-xena: + voting: false - test-s3-bionic-stein-s3 - test-s3-bionic-train-s3 - test-s3-bionic-ussuri-s3 - test-s3-focal-ussuri-s3 - test-s3-focal-victoria-s3 - test-s3-focal-wallaby-s3 + - test-s3-focal-xena-s3: + voting: false - test-s3-groovy-victoria-s3 - test-s3-hirsute-wallaby-s3 + - test-s3-impish-xena-s3: + voting: false vars: needs_charm_build: true charm_build_name: gnocchi @@ -61,6 +69,12 @@ dependencies: *smoke-jobs vars: tox_extra_args: test-s3:focal-wallaby-s3 +- job: + name: test-s3-focal-xena-s3 + parent: func-target + dependencies: *smoke-jobs + vars: + tox_extra_args: test-s3:focal-xena-s3 - job: name: test-s3-groovy-victoria-s3 parent: func-target @@ -73,3 +87,9 @@ dependencies: *smoke-jobs vars: tox_extra_args: test-s3:hirsute-wallaby-s3 +- job: + name: test-s3-impish-xena-s3 + parent: func-target + dependencies: *smoke-jobs + vars: + tox_extra_args: test-s3:impish-xena-s3 diff --git a/pip.sh b/pip.sh new file mode 100755 index 0000000..9a7e6b0 --- /dev/null +++ b/pip.sh @@ -0,0 +1,18 @@ +#!/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/rebuild b/rebuild index df5870e..447e0a5 100644 --- a/rebuild +++ b/rebuild @@ -2,4 +2,4 @@ # when dependencies of the charm change, # but nothing in the charm needs to. # simply change the uuid to something new -f9ee6bce-b3eb-11eb-bbfe-6bce97d054ab +53bf780c-1178-11ec-bc16-bb24856e98b0 diff --git a/src/tests/bundles/focal-xena-s3.yaml b/src/tests/bundles/focal-xena-s3.yaml new file mode 100644 index 0000000..23a0c48 --- /dev/null +++ b/src/tests/bundles/focal-xena-s3.yaml @@ -0,0 +1,145 @@ +variables: + openstack-origin: &openstack-origin cloud:focal-xena + +series: &series focal + +machines: + 0: + constraints: "mem=3072M" + 1: + constraints: "mem=3072M" + 2: + constraints: "mem=3072M" + 3: {} + 4: {} + 5: {} + 6: {} + 7: {} + 8: {} + 9: {} + 10: + series: bionic + +# We specify machine placements for these to improve iteration +# time, given that machine "0" comes up way before machine "6" +applications: + + keystone-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + gnocchi-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + vault-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + + mysql-innodb-cluster: + charm: cs:~openstack-charmers-next/mysql-innodb-cluster + num_units: 3 + options: + source: *openstack-origin + to: + - '0' + - '1' + - '2' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + options: + source: *openstack-origin + to: + - '3' + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '4' + ceilometer: + charm: cs:~openstack-charmers-next/ceilometer + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '5' + gnocchi: + series: *series + charm: ../../../gnocchi + num_units: 1 + options: + openstack-origin: *openstack-origin + storage-backend: s3 + to: + - '6' + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + # holding at bionic as memcached doesn't support focal yet + series: bionic + to: + - '10' + #swift-proxy is used to test gnocchi against an S3 storage backend + swift-proxy: + charm: swift-proxy + num_units: 1 + options: + zone-assignment: manual + replicas: 1 + swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae + openstack-origin: *openstack-origin + to: + - '7' + swift-storage: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + storage: + block-devices: 'cinder,10G' + options: + openstack-origin: *openstack-origin + zone: 1 + to: + - '8' + vault: + charm: cs:~openstack-charmers-next/vault + num_units: 1 + series: *series + to: + - '9' +relations: + - - keystone:shared-db + - keystone-mysql-router:shared-db + - - keystone-mysql-router:db-router + - mysql-innodb-cluster:db-router + - - gnocchi:shared-db + - gnocchi-mysql-router:shared-db + - - gnocchi-mysql-router:db-router + - mysql-innodb-cluster:db-router + - - 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:coordinator-memcached + - memcached:cache + - - swift-proxy:identity-service + - keystone:identity-service + - - swift-storage:swift-storage + - swift-proxy:swift-storage + - - vault:shared-db + - vault-mysql-router:shared-db + - - vault-mysql-router:db-router + - mysql-innodb-cluster:db-router + - - vault:certificates + - swift-proxy:certificates + - - vault:certificates + - gnocchi:certificates + - - vault:certificates + - ceilometer:certificates + - - vault:certificates + - keystone:certificates + - - vault:certificates + - rabbitmq-server:certificates diff --git a/src/tests/bundles/focal-xena.yaml b/src/tests/bundles/focal-xena.yaml new file mode 100644 index 0000000..07d2c2d --- /dev/null +++ b/src/tests/bundles/focal-xena.yaml @@ -0,0 +1,144 @@ +variables: + openstack-origin: &openstack-origin cloud:focal-xena + +series: &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': + series: bionic + +# We specify machine placements for these to improve iteration +# time, given that machine "0" comes up way before machine "6" +applications: + + keystone-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + gnocchi-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + + mysql-innodb-cluster: + charm: cs:~openstack-charmers-next/mysql-innodb-cluster + num_units: 3 + options: + source: *openstack-origin + to: + - '0' + - '1' + - '2' + + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + options: + source: *openstack-origin + to: + - '3' + + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '4' + + ceilometer: + charm: cs:~openstack-charmers-next/ceilometer + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '5' + + ceph-osd: + charm: cs:~openstack-charmers-next/ceph-osd + num_units: 3 + storage: + osd-devices: 'cinder,10G' + options: + source: *openstack-origin + to: + - '6' + - '7' + - '8' + + ceph-mon: + charm: cs:~openstack-charmers-next/ceph-mon + num_units: 3 + options: + expected-osd-count: 3 + monitor-count: '3' + source: *openstack-origin + to: + - '9' + - '10' + - '11' + + gnocchi: + series: *series + charm: ../../../gnocchi + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '12' + + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + # holding at bionic as memcached doesn't support focal yet + series: bionic + to: + - '13' + +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' + + - - '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' diff --git a/src/tests/bundles/impish-xena-s3.yaml b/src/tests/bundles/impish-xena-s3.yaml new file mode 100644 index 0000000..d2dee7f --- /dev/null +++ b/src/tests/bundles/impish-xena-s3.yaml @@ -0,0 +1,145 @@ +variables: + openstack-origin: &openstack-origin distro + +series: &series impish + +machines: + 0: + constraints: "mem=3072M" + 1: + constraints: "mem=3072M" + 2: + constraints: "mem=3072M" + 3: {} + 4: {} + 5: {} + 6: {} + 7: {} + 8: {} + 9: {} + 10: + series: bionic + +# We specify machine placements for these to improve iteration +# time, given that machine "0" comes up way before machine "6" +applications: + + keystone-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + gnocchi-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + vault-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + + mysql-innodb-cluster: + charm: cs:~openstack-charmers-next/mysql-innodb-cluster + num_units: 3 + options: + source: *openstack-origin + to: + - '0' + - '1' + - '2' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + options: + source: *openstack-origin + to: + - '3' + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '4' + ceilometer: + charm: cs:~openstack-charmers-next/ceilometer + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '5' + gnocchi: + series: *series + charm: ../../../gnocchi + num_units: 1 + options: + openstack-origin: *openstack-origin + storage-backend: s3 + to: + - '6' + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + # holding at bionic as memcached doesn't support focal/groovy yet + series: bionic + to: + - '10' + #swift-proxy is used to test gnocchi against an S3 storage backend + swift-proxy: + charm: swift-proxy + num_units: 1 + options: + zone-assignment: manual + replicas: 1 + swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae + openstack-origin: *openstack-origin + to: + - '7' + swift-storage: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + storage: + block-devices: 'cinder,10G' + options: + openstack-origin: *openstack-origin + zone: 1 + to: + - '8' + vault: + charm: cs:~openstack-charmers-next/vault + num_units: 1 + series: *series + to: + - '9' +relations: + - - keystone:shared-db + - keystone-mysql-router:shared-db + - - keystone-mysql-router:db-router + - mysql-innodb-cluster:db-router + - - gnocchi:shared-db + - gnocchi-mysql-router:shared-db + - - gnocchi-mysql-router:db-router + - mysql-innodb-cluster:db-router + - - 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:coordinator-memcached + - memcached:cache + - - swift-proxy:identity-service + - keystone:identity-service + - - swift-storage:swift-storage + - swift-proxy:swift-storage + - - vault:shared-db + - vault-mysql-router:shared-db + - - vault-mysql-router:db-router + - mysql-innodb-cluster:db-router + - - vault:certificates + - swift-proxy:certificates + - - vault:certificates + - gnocchi:certificates + - - vault:certificates + - ceilometer:certificates + - - vault:certificates + - keystone:certificates + - - vault:certificates + - rabbitmq-server:certificates diff --git a/src/tests/bundles/impish-xena.yaml b/src/tests/bundles/impish-xena.yaml new file mode 100644 index 0000000..2122101 --- /dev/null +++ b/src/tests/bundles/impish-xena.yaml @@ -0,0 +1,144 @@ +variables: + openstack-origin: &openstack-origin distro + +series: &series impish + +machines: + '0': + constraints: mem=3072M + '1': + constraints: mem=3072M + '2': + constraints: mem=3072M + '3': + '4': + '5': + '6': + '7': + '8': + '9': + '10': + '11': + '12': + '13': + series: bionic + +# We specify machine placements for these to improve iteration +# time, given that machine "0" comes up way before machine "6" +applications: + + keystone-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + gnocchi-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + + mysql-innodb-cluster: + charm: cs:~openstack-charmers-next/mysql-innodb-cluster + num_units: 3 + options: + source: *openstack-origin + to: + - '0' + - '1' + - '2' + + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + options: + source: *openstack-origin + to: + - '3' + + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '4' + + ceilometer: + charm: cs:~openstack-charmers-next/ceilometer + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '5' + + ceph-osd: + charm: cs:~openstack-charmers-next/ceph-osd + num_units: 3 + storage: + osd-devices: 'cinder,10G' + options: + source: *openstack-origin + to: + - '6' + - '7' + - '8' + + ceph-mon: + charm: cs:~openstack-charmers-next/ceph-mon + num_units: 3 + options: + expected-osd-count: 3 + monitor-count: '3' + source: *openstack-origin + to: + - '9' + - '10' + - '11' + + gnocchi: + series: *series + charm: ../../../gnocchi + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '12' + + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + # holding at bionic as memcached doesn't support focal/groovy yet + series: bionic + to: + - '13' + +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' + + - - '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' diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index e390561..27e1d4e 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -6,15 +6,14 @@ gate_bundles: - bionic-train - bionic-ussuri - focal-ussuri - - focal-victoria - focal-wallaby - - groovy-victoria + - focal-xena - test-s3: bionic-stein-s3 - test-s3: bionic-train-s3 - test-s3: bionic-ussuri-s3 - test-s3: focal-ussuri-s3 - - test-s3: focal-victoria-s3 - test-s3: focal-wallaby-s3 + - test-s3: focal-xena-s3 - test-s3: groovy-victoria-s3 smoke_bundles: - focal-ussuri @@ -23,6 +22,9 @@ dev_bundles: - xenial-pike - xenial-queens - bionic-rocky + - focal-victoria + - test-s3: focal-victoria-s3 + - groovy-victoria - hirsute-wallaby - test-s3: hirsute-wallaby-s3 configure: @@ -54,5 +56,6 @@ target_deploy_status: workload-status-message: Mandatory S3 configuration parameters missing. tests_options: force_deploy: - - hirsute-wallaby - - hirsute-wallaby-s3 + - groovy-victoria + - impish-xena + - impish-xena-s3 diff --git a/src/tox.ini b/src/tox.ini index e763047..b40d295 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -22,12 +22,12 @@ skip_missing_interpreters = False requires = pip < 20.3 virtualenv < 20.0 # NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci -minversion = 3.2.0 +minversion = 3.18.0 [testenv] setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 -whitelist_externals = juju +allowlist_externals = juju passenv = HOME TERM CS_* OS_* TEST_* deps = -r{toxinidir}/test-requirements.txt install_command = diff --git a/tox.ini b/tox.ini index 5c81801..22159df 100644 --- a/tox.ini +++ b/tox.ini @@ -11,6 +11,21 @@ envlist = pep8,py3 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 +requires = + pip < 20.3 + virtualenv < 20.0 + setuptools<50.0.0 + +# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci +minversion = 3.18.0 [testenv] setenv = VIRTUAL_ENV={envdir} @@ -21,7 +36,7 @@ setenv = VIRTUAL_ENV={envdir} JUJU_REPOSITORY={toxinidir}/build passenv = http_proxy https_proxy INTERFACE_PATH LAYER_PATH JUJU_REPOSITORY install_command = - pip install {opts} {packages} + {toxinidir}/pip.sh install {opts} {packages} deps = -r{toxinidir}/requirements.txt