From 3c6194d536604fb35716c3741e310aae32287ceb Mon Sep 17 00:00:00 2001 From: David Negreira Date: Wed, 5 Jul 2023 10:34:39 +0200 Subject: [PATCH] Add support for lunar As lunar introduces python3.11, psycopg2 version needs to be at least version 2.9.5 to support it. Modify the tests to run on Lunar and remove the Kinetic ones. Closes-Bug: #2025983 Change-Id: Iaf459368a092f09d3455b014289eca6e7bf4d047 Signed-off-by: David Negreira --- osci.yaml | 28 ++++++ src/tests/bundles/lunar-mysql8.yaml | 107 ++++++++++++++++++++++ src/tests/bundles/lunar-raft-cluster.yaml | 102 +++++++++++++++++++++ src/tests/bundles/lunar-raft.yaml | 98 ++++++++++++++++++++ src/tests/tests.yaml | 6 ++ src/wheelhouse.txt | 5 +- 6 files changed, 344 insertions(+), 2 deletions(-) create mode 100644 src/tests/bundles/lunar-mysql8.yaml create mode 100644 src/tests/bundles/lunar-raft-cluster.yaml create mode 100644 src/tests/bundles/lunar-raft.yaml diff --git a/osci.yaml b/osci.yaml index 6106304..5327e1a 100644 --- a/osci.yaml +++ b/osci.yaml @@ -6,6 +6,12 @@ - jammy-mysql8 - jammy-raft - jammy-raft-cluster + - lunar-mysql8: + voting: false + - lunar-raft: + voting: false + - lunar-raft-cluster: + voting: false - mantic-mysql8: voting: false - mantic-raft: @@ -42,6 +48,27 @@ - jammy-mysql8 vars: tox_extra_args: '-- jammy-raft-cluster' +- job: + name: lunar-mysql8 + parent: func-target + dependencies: + - jammy-mysql8 + vars: + tox_extra_args: '-- lunar-mysql8' +- job: + name: lunar-raft + parent: func-target + dependencies: + - jammy-mysql8 + vars: + tox_extra_args: '-- lunar-raft' +- job: + name: lunar-raft-cluster + parent: func-target + dependencies: + - jammy-mysql8 + vars: + tox_extra_args: '-- lunar-raft-cluster' - job: name: mantic-mysql8 parent: func-target @@ -63,3 +90,4 @@ - jammy-mysql8 vars: tox_extra_args: '-- mantic-raft-cluster' + diff --git a/src/tests/bundles/lunar-mysql8.yaml b/src/tests/bundles/lunar-mysql8.yaml new file mode 100644 index 0000000..8731f11 --- /dev/null +++ b/src/tests/bundles/lunar-mysql8.yaml @@ -0,0 +1,107 @@ +variables: + openstack-origin: &openstack-origin distro + +local_overlay_enabled: False + +series: lunar + +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': + '6': + '7': + '8': + '9': + '10': + +applications: + + keystone-mysql-router: + charm: ch:mysql-router + channel: latest/edge + vault-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 + + vault: + num_units: 1 + charm: ../../../vault_ubuntu-23.10-amd64.charm + to: + - '3' + + keystone: + charm: ch:keystone + num_units: 1 + options: + admin-password: openstack + openstack-origin: *openstack-origin + to: + - '4' + channel: latest/edge + + ceph-mon: + charm: ch:ceph-mon + num_units: 3 + options: + source: *openstack-origin + to: + - '5' + - '6' + - '7' + channel: latest/edge + + ceph-osd: + charm: ch:ceph-osd + num_units: 3 + options: + osd-encrypt: true + osd-encrypt-keymanager: vault + source: *openstack-origin + storage: + osd-devices: 10G,2 + to: + - '8' + - '9' + - '10' + channel: latest/edge + +relations: + - - 'vault:shared-db' + - 'vault-mysql-router:shared-db' + - - 'vault-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + + - - 'keystone:shared-db' + - 'keystone-mysql-router:shared-db' + - - 'keystone-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'vault:certificates' + - 'keystone:certificates' + + - - 'vault:secrets' + - 'ceph-osd:secrets-storage' + + - - 'ceph-mon:osd' + - 'ceph-osd:mon' diff --git a/src/tests/bundles/lunar-raft-cluster.yaml b/src/tests/bundles/lunar-raft-cluster.yaml new file mode 100644 index 0000000..5a5ce51 --- /dev/null +++ b/src/tests/bundles/lunar-raft-cluster.yaml @@ -0,0 +1,102 @@ +variables: + openstack-origin: &openstack-origin distro + +local_overlay_enabled: False + +series: lunar + +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': + '6': + '7': + '8': + '9': + '10': + '11': + '12': + +applications: + + keystone-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 + + vault: + num_units: 3 + charm: ../../../vault_ubuntu-23.10-amd64.charm + to: + - '3' + - '11' + - '12' + + keystone: + charm: ch:keystone + num_units: 1 + options: + admin-password: openstack + openstack-origin: *openstack-origin + to: + - '4' + channel: latest/edge + + ceph-mon: + charm: ch:ceph-mon + num_units: 3 + options: + source: *openstack-origin + to: + - '5' + - '6' + - '7' + channel: latest/edge + + ceph-osd: + charm: ch:ceph-osd + num_units: 3 + options: + osd-encrypt: true + osd-encrypt-keymanager: vault + source: *openstack-origin + storage: + osd-devices: 10G,2 + to: + - '8' + - '9' + - '10' + channel: latest/edge + +relations: + - - 'keystone:shared-db' + - 'keystone-mysql-router:shared-db' + - - 'keystone-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'vault:certificates' + - 'keystone:certificates' + + - - 'vault:secrets' + - 'ceph-osd:secrets-storage' + + - - 'ceph-mon:osd' + - 'ceph-osd:mon' diff --git a/src/tests/bundles/lunar-raft.yaml b/src/tests/bundles/lunar-raft.yaml new file mode 100644 index 0000000..04e537f --- /dev/null +++ b/src/tests/bundles/lunar-raft.yaml @@ -0,0 +1,98 @@ +variables: + openstack-origin: &openstack-origin distro + +local_overlay_enabled: False + +series: lunar + +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': + '6': + '7': + '8': + '9': + '10': + +applications: + + keystone-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 + + vault: + num_units: 1 + charm: ../../../vault_ubuntu-23.10-amd64.charm + to: + - '3' + + keystone: + charm: ch:keystone + num_units: 1 + options: + admin-password: openstack + openstack-origin: *openstack-origin + to: + - '4' + channel: latest/edge + + ceph-mon: + charm: ch:ceph-mon + num_units: 3 + options: + source: *openstack-origin + to: + - '5' + - '6' + - '7' + channel: latest/edge + + ceph-osd: + charm: ch:ceph-osd + num_units: 3 + options: + osd-encrypt: true + osd-encrypt-keymanager: vault + source: *openstack-origin + storage: + osd-devices: 10G,2 + to: + - '8' + - '9' + - '10' + channel: latest/edge + +relations: + - - 'keystone:shared-db' + - 'keystone-mysql-router:shared-db' + - - 'keystone-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'vault:certificates' + - 'keystone:certificates' + + - - 'vault:secrets' + - 'ceph-osd:secrets-storage' + + - - 'ceph-mon:osd' + - 'ceph-osd:mon' diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index a17740c..b02781a 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -9,6 +9,9 @@ gate_bundles: - jammy-mysql8 dev_bundles: +- lunar-raft +- lunar-raft-cluster +- lunar-mysql8 - mantic-raft - mantic-raft-cluster - mantic-mysql8 @@ -39,6 +42,9 @@ tests: tests_options: force_deploy: + - lunar-raft + - lunar-raft-cluster + - lunar-mysql8 - mantic-raft - mantic-raft-cluster - mantic-mysql8 diff --git a/src/wheelhouse.txt b/src/wheelhouse.txt index 3b07459..f74e203 100644 --- a/src/wheelhouse.txt +++ b/src/wheelhouse.txt @@ -3,8 +3,9 @@ hvac<0.12.0 # for xenial support, tenacity 8.0.0+ drops support for py35 tenacity<8.0.0 pbr -# for xenial support, psycopg 2.9.0 drops support for py35 -psycopg2<2.9.0 +# for lunar support, psycopg 2.9.5 adds support for py311 +psycopg2<2.9.5;python_version<'3.11' +psycopg2>=2.9.5;python_version>='3.11' # for xenial support, requests 2.26.0 drops support for py35 requests<2.26.0