From 733f8d979130014d3ada09586aa6f5541e4ce39f Mon Sep 17 00:00:00 2001 From: Alex Kavanagh Date: Thu, 27 Jan 2022 17:06:39 +0000 Subject: [PATCH] Migrate charm to charmhub latest/edge track Update to classic charms to build using charmcraft in CI This update is to ensure that the Zuul Canonical CI builds the charm before functional tests and ensure that that artifact is used for the functional tests. This is to try to ensure that the charm that gets landed to the charmhub is the same charm that was tested with. Bundle fix needed since z-o-t: https://github.com/openstack-charmers/zaza-openstack-tests/commit/2bb4271530a5a957f98b24af8d6e6b63bfb94a84 Change-Id: I0067ff7941037b7e87dbfc1fb92b48bb380bb22d Co-authored-by: Aurelien Lourot --- .gitignore | 1 + build-requirements.txt | 7 ++ charmcraft.yaml | 29 ++++++ metadata.yaml | 3 - osci.yaml | 96 ++++-------------- rename.sh | 13 +++ tests/bundles/bionic-queens.yaml | 44 --------- tests/bundles/bionic-rocky.yaml | 51 ---------- tests/bundles/bionic-stein.yaml | 51 ---------- tests/bundles/bionic-train-gr-r1.yaml | 76 -------------- tests/bundles/bionic-train-gr-r2.yaml | 47 --------- tests/bundles/bionic-train.yaml | 51 ---------- tests/bundles/bionic-ussuri.yaml | 51 ---------- tests/bundles/focal-ussuri-gr-r1.yaml | 83 ---------------- tests/bundles/focal-ussuri-gr-r2.yaml | 47 --------- tests/bundles/focal-ussuri.yaml | 99 ------------------- tests/bundles/focal-victoria.yaml | 99 ------------------- tests/bundles/focal-wallaby.yaml | 99 ------------------- tests/bundles/focal-xena.yaml | 22 +++-- tests/bundles/focal-yoga.yaml | 22 +++-- tests/bundles/hirsute-wallaby.yaml | 99 ------------------- tests/bundles/impish-xena.yaml | 22 +++-- tests/bundles/jammy-yoga.yaml | 22 +++-- .../overlays/bionic-train-gr-r1.yaml.j2 | 28 ------ .../overlays/bionic-train-gr-r2.yaml.j2 | 31 ------ tests/tests.yaml | 18 +--- tox.ini | 12 ++- 27 files changed, 135 insertions(+), 1088 deletions(-) create mode 100644 build-requirements.txt create mode 100644 charmcraft.yaml create mode 100755 rename.sh delete mode 100644 tests/bundles/bionic-queens.yaml delete mode 100644 tests/bundles/bionic-rocky.yaml delete mode 100644 tests/bundles/bionic-stein.yaml delete mode 100644 tests/bundles/bionic-train-gr-r1.yaml delete mode 100644 tests/bundles/bionic-train-gr-r2.yaml delete mode 100644 tests/bundles/bionic-train.yaml delete mode 100644 tests/bundles/bionic-ussuri.yaml delete mode 100644 tests/bundles/focal-ussuri-gr-r1.yaml delete mode 100644 tests/bundles/focal-ussuri-gr-r2.yaml delete mode 100644 tests/bundles/focal-ussuri.yaml delete mode 100644 tests/bundles/focal-victoria.yaml delete mode 100644 tests/bundles/focal-wallaby.yaml delete mode 100644 tests/bundles/hirsute-wallaby.yaml delete mode 100644 tests/bundles/overlays/bionic-train-gr-r1.yaml.j2 delete mode 100644 tests/bundles/overlays/bionic-train-gr-r2.yaml.j2 diff --git a/.gitignore b/.gitignore index 8f6cf84..f47391f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ bin tags *.sw[nop] *.pyc +*.charm func-results.json __pycache__ diff --git a/build-requirements.txt b/build-requirements.txt new file mode 100644 index 0000000..b6d2452 --- /dev/null +++ b/build-requirements.txt @@ -0,0 +1,7 @@ +# 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 new file mode 100644 index 0000000..45c5f22 --- /dev/null +++ b/charmcraft.yaml @@ -0,0 +1,29 @@ +type: charm + +parts: + charm: + plugin: dump + source: . + prime: + - actions/* + - charmhelpers/* + - files/* + - hooks/* + - lib/* + - swift_manager/* + - templates/* + - actions.yaml + - config.yaml + - copyright + - hardening.yaml + - icon.svg + - LICENSE + - Makefile + - metadata.yaml + - README.md + +bases: + - name: ubuntu + channel: "20.04" + architectures: + - amd64 diff --git a/metadata.yaml b/metadata.yaml index 9828f54..2bd90ae 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -18,10 +18,7 @@ tags: - openstack - cache-proxy series: -- bionic - focal -- groovy -- hirsute - impish extra-bindings: public: diff --git a/osci.yaml b/osci.yaml index 31a2dee..9a5b920 100644 --- a/osci.yaml +++ b/osci.yaml @@ -1,111 +1,49 @@ - project: templates: - - charm-yoga-unit-jobs + - charm-unit-jobs-py38 + - charm-unit-jobs-py39 check: jobs: - - test-s3api-bionic-queens - - test-s3api-bionic-stein - - test-s3api-bionic-train - - test-s3api-bionic-ussuri - - focal-ussuri-gr_swift-proxy - - test-s3api-focal-ussuri - - test-s3api-focal-victoria - - test-s3api-focal-wallaby - test-s3api-focal-xena - test-s3api-focal-yoga: voting: false - - test-s3api-hirsute-wallaby - test-s3api-impish-xena: voting: false - test-s3api-jammy-yoga: voting: false + vars: + needs_charm_build: true + charm_build_name: swift-proxy + build_type: charmcraft -- job: - name: test-s3api-bionic-queens - parent: func-target - dependencies: &smoke-jobs - - test-s3api-focal-ussuri - vars: - tox_extra_args: test-s3api:bionic-queens -- job: - name: test-s3api-bionic-rocky - parent: func-target - dependencies: *smoke-jobs - vars: - tox_extra_args: test-s3api:bionic-rocky -- job: - name: test-s3api-bionic-stein - parent: func-target - dependencies: *smoke-jobs - vars: - tox_extra_args: test-s3api:bionic-stein -- job: - name: test-s3api-bionic-train - parent: func-target - dependencies: *smoke-jobs - vars: - tox_extra_args: test-s3api:bionic-train -- job: - name: focal-ussuri-gr_swift-proxy - parent: func-target - dependencies: *smoke-jobs - vars: - tox_extra_args: swift_gr_region1:focal-ussuri-gr-r1 swift_gr_region2:focal-ussuri-gr-r2 -- job: - name: test-s3api-bionic-ussuri - parent: func-target - dependencies: *smoke-jobs - vars: - tox_extra_args: test-s3api:bionic-ussuri -- job: - name: test-s3api-focal-ussuri - parent: func-target - dependencies: - - osci-lint - - tox-py36 - - tox-py38 - - tox-py39 - vars: - tox_extra_args: test-s3api:focal-ussuri -- job: - name: test-s3api-focal-victoria - parent: func-target - dependencies: *smoke-jobs - vars: - tox_extra_args: test-s3api:focal-victoria -- job: - name: test-s3api-focal-wallaby - parent: func-target - dependencies: *smoke-jobs - vars: - tox_extra_args: test-s3api:focal-wallaby - job: name: test-s3api-focal-xena parent: func-target - dependencies: *smoke-jobs + dependencies: + - charm-build + - osci-lint + - tox-py38 + - tox-py39 vars: tox_extra_args: test-s3api:focal-xena - job: name: test-s3api-focal-yoga parent: func-target - dependencies: *smoke-jobs + dependencies: + - test-s3api-focal-xena vars: tox_extra_args: test-s3api:focal-yoga -- job: - name: test-s3api-hirsute-wallaby - parent: func-target - dependencies: *smoke-jobs - vars: - tox_extra_args: test-s3api:hirsute-wallaby - job: name: test-s3api-impish-xena parent: func-target - dependencies: *smoke-jobs + dependencies: + - test-s3api-focal-xena vars: tox_extra_args: test-s3api:impish-xena - job: name: test-s3api-jammy-yoga parent: func-target - dependencies: *smoke-jobs + dependencies: + - test-s3api-focal-xena vars: tox_extra_args: test-s3api:jammy-yoga diff --git a/rename.sh b/rename.sh new file mode 100755 index 0000000..d0c35c9 --- /dev/null +++ b/rename.sh @@ -0,0 +1,13 @@ +#!/bin/bash +charm=$(grep "charm_build_name" osci.yaml | awk '{print $2}') +echo "renaming ${charm}_*.charm to ${charm}.charm" +echo -n "pwd: " +pwd +ls -al +echo "Removing bad downloaded charm maybe?" +if [[ -e "${charm}.charm" ]]; +then + rm "${charm}.charm" +fi +echo "Renaming charm here." +mv ${charm}_*.charm ${charm}.charm diff --git a/tests/bundles/bionic-queens.yaml b/tests/bundles/bionic-queens.yaml deleted file mode 100644 index 1f1caee..0000000 --- a/tests/bundles/bionic-queens.yaml +++ /dev/null @@ -1,44 +0,0 @@ -series: bionic -applications: - swift-proxy: - charm: swift-proxy - series: bionic - num_units: 1 - options: - zone-assignment: manual - replicas: 1 - swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae - percona-cluster: - charm: cs:~openstack-charmers-next/percona-cluster - num_units: 1 - options: - dataset-size: 25% - max-connections: 1000 - keystone: - expose: True - charm: cs:~openstack-charmers-next/keystone - num_units: 1 - glance: - expose: True - charm: cs:~openstack-charmers-next/glance - num_units: 1 - swift-storage: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - storage: - block-devices: 'cinder,10G' - options: - zone: 1 -relations: -- - keystone:shared-db - - percona-cluster:shared-db -- - glance:shared-db - - percona-cluster:shared-db -- - glance:identity-service - - keystone:identity-service -- - swift-proxy:identity-service - - keystone:identity-service -- - swift-storage:swift-storage - - swift-proxy:swift-storage -- - glance:object-store - - swift-proxy:object-store diff --git a/tests/bundles/bionic-rocky.yaml b/tests/bundles/bionic-rocky.yaml deleted file mode 100644 index b1ad006..0000000 --- a/tests/bundles/bionic-rocky.yaml +++ /dev/null @@ -1,51 +0,0 @@ -series: bionic -applications: - swift-proxy: - charm: swift-proxy - series: bionic - num_units: 1 - options: - zone-assignment: manual - replicas: 1 - swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae - openstack-origin: cloud:bionic-rocky - percona-cluster: - charm: cs:~openstack-charmers-next/percona-cluster - num_units: 1 - options: - dataset-size: 25% - max-connections: 1000 - source: cloud:bionic-rocky - keystone: - expose: True - charm: cs:~openstack-charmers-next/keystone - num_units: 1 - options: - openstack-origin: cloud:bionic-rocky - glance: - expose: True - charm: cs:~openstack-charmers-next/glance - num_units: 1 - options: - openstack-origin: cloud:bionic-rocky - swift-storage: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - storage: - block-devices: 'cinder,10G' - options: - openstack-origin: cloud:bionic-rocky - zone: 1 -relations: -- - keystone:shared-db - - percona-cluster:shared-db -- - glance:shared-db - - percona-cluster:shared-db -- - glance:identity-service - - keystone:identity-service -- - swift-proxy:identity-service - - keystone:identity-service -- - swift-storage:swift-storage - - swift-proxy:swift-storage -- - glance:object-store - - swift-proxy:object-store diff --git a/tests/bundles/bionic-stein.yaml b/tests/bundles/bionic-stein.yaml deleted file mode 100644 index d92bb7c..0000000 --- a/tests/bundles/bionic-stein.yaml +++ /dev/null @@ -1,51 +0,0 @@ -series: bionic -applications: - swift-proxy: - charm: swift-proxy - series: bionic - num_units: 1 - options: - zone-assignment: manual - replicas: 1 - swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae - openstack-origin: cloud:bionic-stein - percona-cluster: - charm: cs:~openstack-charmers-next/percona-cluster - num_units: 1 - options: - dataset-size: 25% - max-connections: 1000 - source: cloud:bionic-stein - keystone: - expose: True - charm: cs:~openstack-charmers-next/keystone - num_units: 1 - options: - openstack-origin: cloud:bionic-stein - glance: - expose: True - charm: cs:~openstack-charmers-next/glance - num_units: 1 - options: - openstack-origin: cloud:bionic-stein - swift-storage: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - storage: - block-devices: 'cinder,10G' - options: - openstack-origin: cloud:bionic-stein - zone: 1 -relations: -- - keystone:shared-db - - percona-cluster:shared-db -- - glance:shared-db - - percona-cluster:shared-db -- - glance:identity-service - - keystone:identity-service -- - swift-proxy:identity-service - - keystone:identity-service -- - swift-storage:swift-storage - - swift-proxy:swift-storage -- - glance:object-store - - swift-proxy:object-store diff --git a/tests/bundles/bionic-train-gr-r1.yaml b/tests/bundles/bionic-train-gr-r1.yaml deleted file mode 100644 index edf8dd6..0000000 --- a/tests/bundles/bionic-train-gr-r1.yaml +++ /dev/null @@ -1,76 +0,0 @@ -series: bionic -local_overlay_enabled: false -applications: - swift-proxy-region1: - charm: ../../. - num_units: 1 - options: - region: RegionOne - zone-assignment: manual - replicas: 2 - enable-multi-region: true - swift-hash: "global-cluster" - read-affinity: "r1=100, r2=200" - write-affinity: "r1, r2" - write-affinity-node-count: '1' - openstack-origin: cloud:bionic-train - swift-storage-region1-zone1: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - options: - storage-region: 1 - zone: 1 - block-device: /etc/swift/storage.img|2G - openstack-origin: cloud:bionic-train - swift-storage-region1-zone2: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - options: - storage-region: 1 - zone: 2 - block-device: /etc/swift/storage.img|2G - openstack-origin: cloud:bionic-train - swift-storage-region1-zone3: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - options: - storage-region: 1 - zone: 3 - block-device: /etc/swift/storage.img|2G - openstack-origin: cloud:bionic-train - percona-cluster: - charm: cs:~openstack-charmers-next/percona-cluster - num_units: 1 - options: - dataset-size: 25% - max-connections: 1000 - source: cloud:bionic-train - keystone: - expose: True - charm: cs:~openstack-charmers-next/keystone - num_units: 1 - options: - openstack-origin: cloud:bionic-train - glance: - expose: True - charm: cs:~openstack-charmers-next/glance - num_units: 1 - options: - openstack-origin: cloud:bionic-train -relations: - - - swift-proxy-region1:swift-storage - - swift-storage-region1-zone1:swift-storage - - - swift-proxy-region1:swift-storage - - swift-storage-region1-zone2:swift-storage - - - swift-proxy-region1:swift-storage - - swift-storage-region1-zone3:swift-storage - - - keystone:shared-db - - percona-cluster:shared-db - - - glance:shared-db - - percona-cluster:shared-db - - - glance:identity-service - - keystone:identity-service - - - swift-proxy-region1:identity-service - - keystone:identity-service - - - glance:object-store - - swift-proxy-region1:object-store diff --git a/tests/bundles/bionic-train-gr-r2.yaml b/tests/bundles/bionic-train-gr-r2.yaml deleted file mode 100644 index 4d513f8..0000000 --- a/tests/bundles/bionic-train-gr-r2.yaml +++ /dev/null @@ -1,47 +0,0 @@ -series: bionic -local_overlay_enabled: false -applications: - swift-proxy-region2: - charm: ../../. - num_units: 1 - options: - region: RegionTwo - zone-assignment: manual - replicas: 2 - enable-multi-region: true - swift-hash: "global-cluster" - read-affinity: "r1=100, r2=200" - write-affinity: "r1, r2" - write-affinity-node-count: '1' - openstack-origin: cloud:bionic-train - swift-storage-region2-zone1: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - options: - storage-region: 2 - zone: 1 - block-device: /etc/swift/storage.img|2G - openstack-origin: cloud:bionic-train - swift-storage-region2-zone2: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - options: - storage-region: 2 - zone: 2 - block-device: /etc/swift/storage.img|2G - openstack-origin: cloud:bionic-train - swift-storage-region2-zone3: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - options: - storage-region: 2 - zone: 3 - block-device: /etc/swift/storage.img|2G - openstack-origin: cloud:bionic-train -relations: - - - swift-proxy-region2:swift-storage - - swift-storage-region2-zone1:swift-storage - - - swift-proxy-region2:swift-storage - - swift-storage-region2-zone2:swift-storage - - - swift-proxy-region2:swift-storage - - swift-storage-region2-zone3:swift-storage diff --git a/tests/bundles/bionic-train.yaml b/tests/bundles/bionic-train.yaml deleted file mode 100644 index 2dcb89e..0000000 --- a/tests/bundles/bionic-train.yaml +++ /dev/null @@ -1,51 +0,0 @@ -series: bionic -applications: - swift-proxy: - charm: swift-proxy - series: bionic - num_units: 1 - options: - zone-assignment: manual - replicas: 1 - swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae - openstack-origin: cloud:bionic-train - percona-cluster: - charm: cs:~openstack-charmers-next/percona-cluster - num_units: 1 - options: - dataset-size: 25% - max-connections: 1000 - source: cloud:bionic-train - keystone: - expose: True - charm: cs:~openstack-charmers-next/keystone - num_units: 1 - options: - openstack-origin: cloud:bionic-train - glance: - expose: True - charm: cs:~openstack-charmers-next/glance - num_units: 1 - options: - openstack-origin: cloud:bionic-train - swift-storage: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - storage: - block-devices: 'cinder,10G' - options: - openstack-origin: cloud:bionic-train - zone: 1 -relations: -- - keystone:shared-db - - percona-cluster:shared-db -- - glance:shared-db - - percona-cluster:shared-db -- - glance:identity-service - - keystone:identity-service -- - swift-proxy:identity-service - - keystone:identity-service -- - swift-storage:swift-storage - - swift-proxy:swift-storage -- - glance:object-store - - swift-proxy:object-store diff --git a/tests/bundles/bionic-ussuri.yaml b/tests/bundles/bionic-ussuri.yaml deleted file mode 100644 index 24f40ea..0000000 --- a/tests/bundles/bionic-ussuri.yaml +++ /dev/null @@ -1,51 +0,0 @@ -series: bionic -applications: - swift-proxy: - charm: swift-proxy - series: bionic - num_units: 1 - options: - zone-assignment: manual - replicas: 1 - swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae - openstack-origin: cloud:bionic-ussuri - percona-cluster: - charm: cs:~openstack-charmers-next/percona-cluster - num_units: 1 - options: - dataset-size: 25% - max-connections: 1000 - source: cloud:bionic-ussuri - keystone: - expose: True - charm: cs:~openstack-charmers-next/keystone - num_units: 1 - options: - openstack-origin: cloud:bionic-ussuri - glance: - expose: True - charm: cs:~openstack-charmers-next/glance - num_units: 1 - options: - openstack-origin: cloud:bionic-ussuri - swift-storage: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - storage: - block-devices: 'cinder,10G' - options: - openstack-origin: cloud:bionic-ussuri - zone: 1 -relations: -- - keystone:shared-db - - percona-cluster:shared-db -- - glance:shared-db - - percona-cluster:shared-db -- - glance:identity-service - - keystone:identity-service -- - swift-proxy:identity-service - - keystone:identity-service -- - swift-storage:swift-storage - - swift-proxy:swift-storage -- - glance:object-store - - swift-proxy:object-store diff --git a/tests/bundles/focal-ussuri-gr-r1.yaml b/tests/bundles/focal-ussuri-gr-r1.yaml deleted file mode 100644 index d692dad..0000000 --- a/tests/bundles/focal-ussuri-gr-r1.yaml +++ /dev/null @@ -1,83 +0,0 @@ -series: focal -local_overlay_enabled: false -applications: - keystone-mysql-router: - charm: cs:~openstack-charmers-next/mysql-router - glance-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: distro - swift-proxy-region1: - charm: ../../. - num_units: 1 - options: - region: RegionOne - zone-assignment: manual - replicas: 2 - enable-multi-region: true - swift-hash: "global-cluster" - read-affinity: "r1=100, r2=200" - write-affinity: "r1, r2" - write-affinity-node-count: '1' - openstack-origin: distro - swift-storage-region1-zone1: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - options: - storage-region: 1 - zone: 1 - block-device: /etc/swift/storage.img|2G - openstack-origin: distro - swift-storage-region1-zone2: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - options: - storage-region: 1 - zone: 2 - block-device: /etc/swift/storage.img|2G - openstack-origin: distro - swift-storage-region1-zone3: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - options: - storage-region: 1 - zone: 3 - block-device: /etc/swift/storage.img|2G - openstack-origin: distro - keystone: - expose: True - charm: cs:~openstack-charmers-next/keystone - num_units: 1 - options: - openstack-origin: distro - glance: - expose: True - charm: cs:~openstack-charmers-next/glance - num_units: 1 - options: - openstack-origin: distro -relations: - - - keystone:shared-db - - keystone-mysql-router:shared-db - - - keystone-mysql-router:db-router - - mysql-innodb-cluster:db-router - - - glance:shared-db - - glance-mysql-router:shared-db - - - glance-mysql-router:db-router - - mysql-innodb-cluster:db-router - - - swift-proxy-region1:swift-storage - - swift-storage-region1-zone1:swift-storage - - - swift-proxy-region1:swift-storage - - swift-storage-region1-zone2:swift-storage - - - swift-proxy-region1:swift-storage - - swift-storage-region1-zone3:swift-storage - - - glance:identity-service - - keystone:identity-service - - - swift-proxy-region1:identity-service - - keystone:identity-service - - - glance:object-store - - swift-proxy-region1:object-store diff --git a/tests/bundles/focal-ussuri-gr-r2.yaml b/tests/bundles/focal-ussuri-gr-r2.yaml deleted file mode 100644 index 6e3b928..0000000 --- a/tests/bundles/focal-ussuri-gr-r2.yaml +++ /dev/null @@ -1,47 +0,0 @@ -series: focal -local_overlay_enabled: false -applications: - swift-proxy-region2: - charm: ../../. - num_units: 1 - options: - region: RegionTwo - zone-assignment: manual - replicas: 2 - enable-multi-region: true - swift-hash: "global-cluster" - read-affinity: "r1=100, r2=200" - write-affinity: "r1, r2" - write-affinity-node-count: '1' - openstack-origin: distro - swift-storage-region2-zone1: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - options: - storage-region: 2 - zone: 1 - block-device: /etc/swift/storage.img|2G - openstack-origin: distro - swift-storage-region2-zone2: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - options: - storage-region: 2 - zone: 2 - block-device: /etc/swift/storage.img|2G - openstack-origin: distro - swift-storage-region2-zone3: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - options: - storage-region: 2 - zone: 3 - block-device: /etc/swift/storage.img|2G - openstack-origin: distro -relations: - - - swift-proxy-region2:swift-storage - - swift-storage-region2-zone1:swift-storage - - - swift-proxy-region2:swift-storage - - swift-storage-region2-zone2:swift-storage - - - swift-proxy-region2:swift-storage - - swift-storage-region2-zone3:swift-storage diff --git a/tests/bundles/focal-ussuri.yaml b/tests/bundles/focal-ussuri.yaml deleted file mode 100644 index 8c5612b..0000000 --- a/tests/bundles/focal-ussuri.yaml +++ /dev/null @@ -1,99 +0,0 @@ -variables: - openstack-origin: &openstack-origin distro - -series: focal - -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': - -applications: - - keystone-mysql-router: - charm: cs:~openstack-charmers-next/mysql-router - glance-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' - - keystone: - expose: True - charm: cs:~openstack-charmers-next/keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '3' - - 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: - - '4' - - glance: - expose: True - charm: cs:~openstack-charmers-next/glance - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - - swift-storage: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - storage: - block-devices: 'cinder,10G' - options: - zone: 1 - openstack-origin: *openstack-origin - to: - - '6' - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'glance:shared-db' - - 'glance-mysql-router:shared-db' - - - 'glance-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'glance:identity-service' - - 'keystone:identity-service' - - - - 'swift-proxy:identity-service' - - 'keystone:identity-service' - - - - 'swift-storage:swift-storage' - - 'swift-proxy:swift-storage' - - - - 'glance:object-store' - - 'swift-proxy:object-store' diff --git a/tests/bundles/focal-victoria.yaml b/tests/bundles/focal-victoria.yaml deleted file mode 100644 index 2fff45f..0000000 --- a/tests/bundles/focal-victoria.yaml +++ /dev/null @@ -1,99 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:focal-victoria - -series: focal - -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': - -applications: - - keystone-mysql-router: - charm: cs:~openstack-charmers-next/mysql-router - glance-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' - - keystone: - expose: True - charm: cs:~openstack-charmers-next/keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '3' - - 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: - - '4' - - glance: - expose: True - charm: cs:~openstack-charmers-next/glance - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - - swift-storage: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - storage: - block-devices: 'cinder,10G' - options: - zone: 1 - openstack-origin: *openstack-origin - to: - - '6' - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'glance:shared-db' - - 'glance-mysql-router:shared-db' - - - 'glance-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'glance:identity-service' - - 'keystone:identity-service' - - - - 'swift-proxy:identity-service' - - 'keystone:identity-service' - - - - 'swift-storage:swift-storage' - - 'swift-proxy:swift-storage' - - - - 'glance:object-store' - - 'swift-proxy:object-store' diff --git a/tests/bundles/focal-wallaby.yaml b/tests/bundles/focal-wallaby.yaml deleted file mode 100644 index 1e72922..0000000 --- a/tests/bundles/focal-wallaby.yaml +++ /dev/null @@ -1,99 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:focal-wallaby - -series: focal - -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': - -applications: - - keystone-mysql-router: - charm: cs:~openstack-charmers-next/mysql-router - glance-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' - - keystone: - expose: True - charm: cs:~openstack-charmers-next/keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '3' - - 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: - - '4' - - glance: - expose: True - charm: cs:~openstack-charmers-next/glance - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - - swift-storage: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - storage: - block-devices: 'cinder,10G' - options: - zone: 1 - openstack-origin: *openstack-origin - to: - - '6' - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'glance:shared-db' - - 'glance-mysql-router:shared-db' - - - 'glance-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'glance:identity-service' - - 'keystone:identity-service' - - - - 'swift-proxy:identity-service' - - 'keystone:identity-service' - - - - 'swift-storage:swift-storage' - - 'swift-proxy:swift-storage' - - - - 'glance:object-store' - - 'swift-proxy:object-store' diff --git a/tests/bundles/focal-xena.yaml b/tests/bundles/focal-xena.yaml index 5668295..6f56490 100644 --- a/tests/bundles/focal-xena.yaml +++ b/tests/bundles/focal-xena.yaml @@ -20,12 +20,14 @@ machines: applications: keystone-mysql-router: - charm: cs:~openstack-charmers-next/mysql-router + charm: ch:mysql-router + channel: latest/edge glance-mysql-router: - charm: cs:~openstack-charmers-next/mysql-router + charm: ch:mysql-router + channel: latest/edge mysql-innodb-cluster: - charm: cs:~openstack-charmers-next/mysql-innodb-cluster + charm: ch:mysql-innodb-cluster num_units: 3 options: source: *openstack-origin @@ -33,18 +35,20 @@ applications: - '0' - '1' - '2' + channel: latest/edge keystone: expose: True - charm: cs:~openstack-charmers-next/keystone + charm: ch:keystone num_units: 1 options: openstack-origin: *openstack-origin to: - '3' + channel: yoga/edge swift-proxy: - charm: swift-proxy + charm: ../../swift-proxy.charm num_units: 1 options: zone-assignment: manual @@ -56,23 +60,25 @@ applications: glance: expose: True - charm: cs:~openstack-charmers-next/glance + charm: ch:glance num_units: 1 options: openstack-origin: *openstack-origin to: - '5' + channel: yoga/edge swift-storage: - charm: cs:~openstack-charmers-next/swift-storage + charm: ch:swift-storage num_units: 1 storage: - block-devices: 'cinder,10G' + block-devices: 'cinder,2G,2' options: zone: 1 openstack-origin: *openstack-origin to: - '6' + channel: yoga/edge relations: diff --git a/tests/bundles/focal-yoga.yaml b/tests/bundles/focal-yoga.yaml index b4483cf..e2dd0b7 100644 --- a/tests/bundles/focal-yoga.yaml +++ b/tests/bundles/focal-yoga.yaml @@ -20,12 +20,14 @@ machines: applications: keystone-mysql-router: - charm: cs:~openstack-charmers-next/mysql-router + charm: ch:mysql-router + channel: latest/edge glance-mysql-router: - charm: cs:~openstack-charmers-next/mysql-router + charm: ch:mysql-router + channel: latest/edge mysql-innodb-cluster: - charm: cs:~openstack-charmers-next/mysql-innodb-cluster + charm: ch:mysql-innodb-cluster num_units: 3 options: source: *openstack-origin @@ -33,18 +35,20 @@ applications: - '0' - '1' - '2' + channel: latest/edge keystone: expose: True - charm: cs:~openstack-charmers-next/keystone + charm: ch:keystone num_units: 1 options: openstack-origin: *openstack-origin to: - '3' + channel: yoga/edge swift-proxy: - charm: swift-proxy + charm: ../../swift-proxy.charm num_units: 1 options: zone-assignment: manual @@ -56,23 +60,25 @@ applications: glance: expose: True - charm: cs:~openstack-charmers-next/glance + charm: ch:glance num_units: 1 options: openstack-origin: *openstack-origin to: - '5' + channel: yoga/edge swift-storage: - charm: cs:~openstack-charmers-next/swift-storage + charm: ch:swift-storage num_units: 1 storage: - block-devices: 'cinder,10G' + block-devices: 'cinder,2G,2' options: zone: 1 openstack-origin: *openstack-origin to: - '6' + channel: yoga/edge relations: diff --git a/tests/bundles/hirsute-wallaby.yaml b/tests/bundles/hirsute-wallaby.yaml deleted file mode 100644 index 83b777d..0000000 --- a/tests/bundles/hirsute-wallaby.yaml +++ /dev/null @@ -1,99 +0,0 @@ -variables: - openstack-origin: &openstack-origin distro - -series: hirsute - -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': - -applications: - - keystone-mysql-router: - charm: cs:~openstack-charmers-next/mysql-router - glance-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' - - keystone: - expose: True - charm: cs:~openstack-charmers-next/keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '3' - - 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: - - '4' - - glance: - expose: True - charm: cs:~openstack-charmers-next/glance - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - - swift-storage: - charm: cs:~openstack-charmers-next/swift-storage - num_units: 1 - storage: - block-devices: 'cinder,10G' - options: - zone: 1 - openstack-origin: *openstack-origin - to: - - '6' - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'glance:shared-db' - - 'glance-mysql-router:shared-db' - - - 'glance-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'glance:identity-service' - - 'keystone:identity-service' - - - - 'swift-proxy:identity-service' - - 'keystone:identity-service' - - - - 'swift-storage:swift-storage' - - 'swift-proxy:swift-storage' - - - - 'glance:object-store' - - 'swift-proxy:object-store' diff --git a/tests/bundles/impish-xena.yaml b/tests/bundles/impish-xena.yaml index d559eac..1db5985 100644 --- a/tests/bundles/impish-xena.yaml +++ b/tests/bundles/impish-xena.yaml @@ -20,12 +20,14 @@ machines: applications: keystone-mysql-router: - charm: cs:~openstack-charmers-next/mysql-router + charm: ch:mysql-router + channel: latest/edge glance-mysql-router: - charm: cs:~openstack-charmers-next/mysql-router + charm: ch:mysql-router + channel: latest/edge mysql-innodb-cluster: - charm: cs:~openstack-charmers-next/mysql-innodb-cluster + charm: ch:mysql-innodb-cluster num_units: 3 options: source: *openstack-origin @@ -33,18 +35,20 @@ applications: - '0' - '1' - '2' + channel: latest/edge keystone: expose: True - charm: cs:~openstack-charmers-next/keystone + charm: ch:keystone num_units: 1 options: openstack-origin: *openstack-origin to: - '3' + channel: yoga/edge swift-proxy: - charm: swift-proxy + charm: ../../swift-proxy.charm num_units: 1 options: zone-assignment: manual @@ -56,23 +60,25 @@ applications: glance: expose: True - charm: cs:~openstack-charmers-next/glance + charm: ch:glance num_units: 1 options: openstack-origin: *openstack-origin to: - '5' + channel: yoga/edge swift-storage: - charm: cs:~openstack-charmers-next/swift-storage + charm: ch:swift-storage num_units: 1 storage: - block-devices: 'cinder,10G' + block-devices: 'cinder,2G,2' options: zone: 1 openstack-origin: *openstack-origin to: - '6' + channel: yoga/edge relations: diff --git a/tests/bundles/jammy-yoga.yaml b/tests/bundles/jammy-yoga.yaml index d953a34..4f369b9 100644 --- a/tests/bundles/jammy-yoga.yaml +++ b/tests/bundles/jammy-yoga.yaml @@ -20,12 +20,14 @@ machines: applications: keystone-mysql-router: - charm: cs:~openstack-charmers-next/mysql-router + charm: ch:mysql-router + channel: latest/edge glance-mysql-router: - charm: cs:~openstack-charmers-next/mysql-router + charm: ch:mysql-router + channel: latest/edge mysql-innodb-cluster: - charm: cs:~openstack-charmers-next/mysql-innodb-cluster + charm: ch:mysql-innodb-cluster num_units: 3 options: source: *openstack-origin @@ -33,18 +35,20 @@ applications: - '0' - '1' - '2' + channel: latest/edge keystone: expose: True - charm: cs:~openstack-charmers-next/keystone + charm: ch:keystone num_units: 1 options: openstack-origin: *openstack-origin to: - '3' + channel: yoga/edge swift-proxy: - charm: swift-proxy + charm: ../../swift-proxy.charm num_units: 1 options: zone-assignment: manual @@ -56,23 +60,25 @@ applications: glance: expose: True - charm: cs:~openstack-charmers-next/glance + charm: ch:glance num_units: 1 options: openstack-origin: *openstack-origin to: - '5' + channel: yoga/edge swift-storage: - charm: cs:~openstack-charmers-next/swift-storage + charm: ch:swift-storage num_units: 1 storage: - block-devices: 'cinder,10G' + block-devices: 'cinder,2G,2' options: zone: 1 openstack-origin: *openstack-origin to: - '6' + channel: yoga/edge relations: diff --git a/tests/bundles/overlays/bionic-train-gr-r1.yaml.j2 b/tests/bundles/overlays/bionic-train-gr-r1.yaml.j2 deleted file mode 100644 index 5e142a9..0000000 --- a/tests/bundles/overlays/bionic-train-gr-r1.yaml.j2 +++ /dev/null @@ -1,28 +0,0 @@ -applications: - keystone: - offers: - keystone: - endpoints: - - identity-service - swift-proxy-region1: - charm: {{ charm_location }} - offers: - swift-proxy-region1: - endpoints: - - swift-storage - - rings-distributor - swift-storage-region1-zone1: - offers: - swift-storage-region1-zone1: - endpoints: - - swift-storage - swift-storage-region1-zone2: - offers: - swift-storage-region1-zone2: - endpoints: - - swift-storage - swift-storage-region1-zone3: - offers: - swift-storage-region1-zone3: - endpoints: - - swift-storage diff --git a/tests/bundles/overlays/bionic-train-gr-r2.yaml.j2 b/tests/bundles/overlays/bionic-train-gr-r2.yaml.j2 deleted file mode 100644 index 689e703..0000000 --- a/tests/bundles/overlays/bionic-train-gr-r2.yaml.j2 +++ /dev/null @@ -1,31 +0,0 @@ -applications: - swift-proxy-region2: - charm: {{ charm_location }} -relations: -- - swift-proxy-region2:identity-service - - keystone:identity-service -- - swift-proxy-region2:swift-storage - - swift-storage-region1-zone1:swift-storage -- - swift-proxy-region2:swift-storage - - swift-storage-region1-zone2:swift-storage -- - swift-proxy-region2:swift-storage - - swift-storage-region1-zone3:swift-storage -- - swift-storage-region2-zone1:swift-storage - - swift-proxy-region1:swift-storage -- - swift-storage-region2-zone2:swift-storage - - swift-proxy-region1:swift-storage -- - swift-storage-region2-zone3:swift-storage - - swift-proxy-region1:swift-storage -- - swift-proxy-region2:rings-consumer - - swift-proxy-region1:rings-distributor -saas: - keystone: - url: admin/{{ swift_gr_region1 }}.keystone - swift-proxy-region1: - url: admin/{{ swift_gr_region1 }}.swift-proxy-region1 - swift-storage-region1-zone1: - url: admin/{{ swift_gr_region1 }}.swift-storage-region1-zone1 - swift-storage-region1-zone2: - url: admin/{{ swift_gr_region1 }}.swift-storage-region1-zone2 - swift-storage-region1-zone3: - url: admin/{{ swift_gr_region1 }}.swift-storage-region1-zone3 diff --git a/tests/tests.yaml b/tests/tests.yaml index 73d593e..5cc205b 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -1,31 +1,16 @@ charm_name: swift-proxy gate_bundles: - - test-s3api: bionic-queens - - test-s3api: bionic-stein - - test-s3api: bionic-ussuri - - test-s3api: focal-ussuri - - focal-ussuri-gr: - - swift_gr_region1: focal-ussuri-gr-r1 - - swift_gr_region2: focal-ussuri-gr-r2 - - test-s3api: focal-victoria - - test-s3api: focal-wallaby - test-s3api: focal-xena - - test-s3api: hirsute-wallaby - test-s3api: impish-xena dev_bundles: - - test-s3api: bionic-rocky - - test-s3api: bionic-train - - bionic-train-gr: - - swift_gr_region1: bionic-train-gr-r1 - - swift_gr_region2: bionic-train-gr-r2 - test-s3api: focal-yoga - test-s3api: jammy-yoga smoke_bundles: # Use no s3api test for smoke - - focal-ussuri + - focal-xena configure: - swift_gr_region1: @@ -44,7 +29,6 @@ tests: tests_options: force_deploy: - - hirsute-wallaby - impish-xena - jammy-yoga policyd: diff --git a/tox.ini b/tox.ini index 86d1e90..81fd249 100644 --- a/tox.ini +++ b/tox.ini @@ -37,10 +37,20 @@ setenv = VIRTUAL_ENV={envdir} install_command = {toxinidir}/pip.sh install {opts} {packages} commands = stestr run --slowest {posargs} -allowlist_externals = juju +allowlist_externals = + charmcraft + rename.sh passenv = HOME TERM CS_* OS_* TEST_* deps = -r{toxinidir}/test-requirements.txt +[testenv:build] +basepython = python3 +deps = -r{toxinidir}/build-requirements.txt +commands = + charmcraft clean + charmcraft -v build + {toxinidir}/rename.sh + [testenv:py35] basepython = python3.5 deps = -r{toxinidir}/requirements.txt