diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..70ec075 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.opendev.org +port=29418 +project=openstack/charm-ironic-dashboard.git diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..fd20909 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,4 @@ +- project: + templates: + - openstack-python3-charm-jobs + - openstack-cover-jobs diff --git a/charmcraft.yaml b/charmcraft.yaml index 94ee915..849e865 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -2,21 +2,13 @@ type: "charm" bases: - build-on: - name: "ubuntu" - channel: "20.04" + channel: "22.04" architectures: - amd64 run-on: - name: "ubuntu" - channel: "20.04" + channel: "22.04" + architectures: [amd64, s390x, ppc64el, arm64] + - name: "ubuntu" + channel: "23.04" architectures: [amd64, s390x, ppc64el, arm64] - -#bases: -# - build-on: -# - name: ubuntu -# channel: "22.04" -# architectures: -# - amd64 -# run-on: -# - name: ubuntu -# channel: "22.04" -# architectures: [amd64, s390x, ppc64el, arm64] diff --git a/osci.yaml b/osci.yaml index e066d9c..f1026b2 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-unit-jobs + - charm-functional-jobs vars: needs_charm_build: true charm_build_name: ironic-dashboard build_type: charmcraft + charmcraft_channel: 2.1/stable diff --git a/pip.sh b/pip.sh deleted file mode 100755 index 9a7e6b0..0000000 --- a/pip.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/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/tests/bundles/focal-ussuri.yaml b/tests/bundles/focal-ussuri.yaml deleted file mode 100644 index cb7bcc9..0000000 --- a/tests/bundles/focal-ussuri.yaml +++ /dev/null @@ -1,110 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:focal-ussuri - -local_overlay_enabled: False - -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: ch:mysql-router - channel: latest/edge - - openstack-dashboard-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - ironic-api-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - options: - max-connections: 1000 - innodb-buffer-pool-size: 256M - to: - - '0' - - '1' - - '2' - channel: latest/edge - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '3' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '4' - channel: latest/edge - - ironic-api: - charm: ch:ironic-api - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - channel: latest/edge - - openstack-dashboard: - charm: ch:openstack-dashboard - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '6' - channel: latest/edge - - ironic-dashboard: - charm: ../../../ironic-dashboard.charm - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'ironic-api:shared-db' - - 'ironic-api-mysql-router:shared-db' - - - 'ironic-api-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - 'ironic-api:identity-service' - - 'keystone:identity-service' - - - 'ironic-api:amqp' - - 'rabbitmq-server:amqp' - - - - 'openstack-dashboard:shared-db' - - 'openstack-dashboard-mysql-router:shared-db' - - - 'openstack-dashboard-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'openstack-dashboard:identity-service' - - 'keystone:identity-service' - - - - 'openstack-dashboard:dashboard-plugin' - - 'ironic-dashboard:dashboard' diff --git a/tests/bundles/focal-victoria.yaml b/tests/bundles/focal-victoria.yaml deleted file mode 100644 index f3ad9c1..0000000 --- a/tests/bundles/focal-victoria.yaml +++ /dev/null @@ -1,110 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:focal-victoria - -local_overlay_enabled: False - -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: ch:mysql-router - channel: latest/edge - - openstack-dashboard-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - ironic-api-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - options: - max-connections: 1000 - innodb-buffer-pool-size: 256M - to: - - '0' - - '1' - - '2' - channel: latest/edge - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '3' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '4' - channel: latest/edge - - ironic-api: - charm: ch:ironic-api - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - channel: latest/edge - - openstack-dashboard: - charm: ch:openstack-dashboard - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '6' - channel: latest/edge - - ironic-dashboard: - charm: ../../../ironic-dashboard.charm - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'ironic-api:shared-db' - - 'ironic-api-mysql-router:shared-db' - - - 'ironic-api-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - 'ironic-api:identity-service' - - 'keystone:identity-service' - - - 'ironic-api:amqp' - - 'rabbitmq-server:amqp' - - - - 'openstack-dashboard:shared-db' - - 'openstack-dashboard-mysql-router:shared-db' - - - 'openstack-dashboard-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'openstack-dashboard:identity-service' - - 'keystone:identity-service' - - - - 'openstack-dashboard:dashboard-plugin' - - 'ironic-dashboard:dashboard' diff --git a/tests/bundles/focal-wallaby.yaml b/tests/bundles/focal-wallaby.yaml deleted file mode 100644 index ec2a2cf..0000000 --- a/tests/bundles/focal-wallaby.yaml +++ /dev/null @@ -1,110 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:focal-wallaby - -local_overlay_enabled: False - -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: ch:mysql-router - channel: latest/edge - - openstack-dashboard-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - ironic-api-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - options: - max-connections: 1000 - innodb-buffer-pool-size: 256M - to: - - '0' - - '1' - - '2' - channel: latest/edge - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '3' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '4' - channel: latest/edge - - ironic-api: - charm: ch:ironic-api - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - channel: latest/edge - - openstack-dashboard: - charm: ch:openstack-dashboard - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '6' - channel: latest/edge - - ironic-dashboard: - charm: ../../../ironic-dashboard.charm - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'ironic-api:shared-db' - - 'ironic-api-mysql-router:shared-db' - - - 'ironic-api-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - 'ironic-api:identity-service' - - 'keystone:identity-service' - - - 'ironic-api:amqp' - - 'rabbitmq-server:amqp' - - - - 'openstack-dashboard:shared-db' - - 'openstack-dashboard-mysql-router:shared-db' - - - 'openstack-dashboard-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'openstack-dashboard:identity-service' - - 'keystone:identity-service' - - - - 'openstack-dashboard:dashboard-plugin' - - 'ironic-dashboard:dashboard' diff --git a/tests/bundles/focal-yoga.yaml b/tests/bundles/focal-yoga.yaml deleted file mode 100644 index 62071d9..0000000 --- a/tests/bundles/focal-yoga.yaml +++ /dev/null @@ -1,110 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:focal-yoga - -local_overlay_enabled: False - -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: ch:mysql-router - channel: latest/edge - - openstack-dashboard-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - ironic-api-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - options: - max-connections: 1000 - innodb-buffer-pool-size: 256M - to: - - '0' - - '1' - - '2' - channel: latest/edge - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '3' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '4' - channel: latest/edge - - ironic-api: - charm: ch:ironic-api - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - channel: latest/edge - - openstack-dashboard: - charm: ch:openstack-dashboard - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '6' - channel: latest/edge - - ironic-dashboard: - charm: ../../../ironic-dashboard.charm - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'ironic-api:shared-db' - - 'ironic-api-mysql-router:shared-db' - - - 'ironic-api-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - 'ironic-api:identity-service' - - 'keystone:identity-service' - - - 'ironic-api:amqp' - - 'rabbitmq-server:amqp' - - - - 'openstack-dashboard:shared-db' - - 'openstack-dashboard-mysql-router:shared-db' - - - 'openstack-dashboard-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'openstack-dashboard:identity-service' - - 'keystone:identity-service' - - - - 'openstack-dashboard:dashboard-plugin' - - 'ironic-dashboard:dashboard' diff --git a/tests/bundles/focal-xena.yaml b/tests/bundles/jammy-antelope.yaml similarity index 95% rename from tests/bundles/focal-xena.yaml rename to tests/bundles/jammy-antelope.yaml index 505e52e..4491904 100644 --- a/tests/bundles/focal-xena.yaml +++ b/tests/bundles/jammy-antelope.yaml @@ -1,9 +1,9 @@ variables: - openstack-origin: &openstack-origin cloud:focal-xena + openstack-origin: &openstack-origin cloud:jammy-antelope local_overlay_enabled: False -series: focal +series: jammy comment: - 'machines section to decide order of deployment. database sooner = faster' @@ -80,7 +80,7 @@ applications: channel: latest/edge ironic-dashboard: - charm: ../../../ironic-dashboard.charm + charm: ../../ironic-dashboard.charm relations: diff --git a/tests/bundles/jammy-zed.yaml b/tests/bundles/jammy-zed.yaml index 06fe511..3d32d9e 100644 --- a/tests/bundles/jammy-zed.yaml +++ b/tests/bundles/jammy-zed.yaml @@ -80,7 +80,7 @@ applications: channel: latest/edge ironic-dashboard: - charm: ../../../ironic-dashboard.charm + charm: ../../ironic-dashboard.charm relations: diff --git a/tests/bundles/kinetic-zed.yaml b/tests/bundles/kinetic-zed.yaml deleted file mode 100644 index aa46e44..0000000 --- a/tests/bundles/kinetic-zed.yaml +++ /dev/null @@ -1,110 +0,0 @@ -variables: - openstack-origin: &openstack-origin distro - -local_overlay_enabled: False - -series: kinetic - -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: ch:mysql-router - channel: latest/edge - - openstack-dashboard-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - ironic-api-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - options: - max-connections: 1000 - innodb-buffer-pool-size: 256M - to: - - '0' - - '1' - - '2' - channel: latest/edge - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '3' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '4' - channel: latest/edge - - ironic-api: - charm: ch:ironic-api - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - channel: latest/edge - - openstack-dashboard: - charm: ch:openstack-dashboard - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '6' - channel: latest/edge - - ironic-dashboard: - charm: ../../../ironic-dashboard.charm - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'ironic-api:shared-db' - - 'ironic-api-mysql-router:shared-db' - - - 'ironic-api-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - 'ironic-api:identity-service' - - 'keystone:identity-service' - - - 'ironic-api:amqp' - - 'rabbitmq-server:amqp' - - - - 'openstack-dashboard:shared-db' - - 'openstack-dashboard-mysql-router:shared-db' - - - 'openstack-dashboard-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'openstack-dashboard:identity-service' - - 'keystone:identity-service' - - - - 'openstack-dashboard:dashboard-plugin' - - 'ironic-dashboard:dashboard' diff --git a/tests/bundles/jammy-yoga.yaml b/tests/bundles/lunar-antelope.yaml similarity index 97% rename from tests/bundles/jammy-yoga.yaml rename to tests/bundles/lunar-antelope.yaml index 9ac7063..3996c12 100644 --- a/tests/bundles/jammy-yoga.yaml +++ b/tests/bundles/lunar-antelope.yaml @@ -3,7 +3,7 @@ variables: local_overlay_enabled: False -series: jammy +series: lunar comment: - 'machines section to decide order of deployment. database sooner = faster' @@ -80,7 +80,7 @@ applications: channel: latest/edge ironic-dashboard: - charm: ../../../ironic-dashboard.charm + charm: ../../ironic-dashboard.charm relations: diff --git a/tests/tests.yaml b/tests/tests.yaml index 55b7997..2297126 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -1,14 +1,14 @@ charm_name: ironic-dashboard smoke_bundles: -- focal-xena +- jammy-antelope gate_bundles: -- focal-xena -- impish-xena +- jammy-zed +- jammy-antelope +- lunar-antelope dev_bundles: -- focal-yoga -- jammy-yoga +- jammy-antelope target_deploy_status: {} @@ -20,5 +20,4 @@ tests: tests_options: force_deploy: - - impish-xena - - jammy-yoga + - lunar-antelope diff --git a/tox.ini b/tox.ini index b725802..685ca5d 100644 --- a/tox.ini +++ b/tox.ini @@ -16,14 +16,19 @@ skip_missing_interpreters = False setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 TERM=linux -passenv = http_proxy https_proxy -install_command = - {toxinidir}/pip.sh install {opts} {packages} +passenv = + http_proxy + https_proxy + HOME + TERM + CS_* + OS_* + TEST_* allowlist_externals = charmcraft bash tox - rename.sh + {toxinidir}/rename.sh deps = -r{toxinidir}/requirements.txt @@ -67,10 +72,9 @@ commands = flake8 {posargs} src unit_tests [testenv:func-target] basepython = python3 -passenv = HOME TERM CS_* OS_* TEST_* deps = -r{toxinidir}/test-requirements.txt commands = - bash -c "if [ ! -f ../*.charm ]; then echo 'Charm does not exist. Run tox -e build'; exit 1; fi" + bash -c "if [ ! -f ./*.charm ]; then echo 'Charm does not exist. Run tox -e build'; exit 1; fi" functest-run-suite --keep-model --bundle {posargs} [testenv:cover]