From 3a3a3f9f2ae81880f09c4a5dc5904ace13d734a4 Mon Sep 17 00:00:00 2001 From: Luciano Lo Giudice Date: Fri, 10 Sep 2021 23:56:50 -0300 Subject: [PATCH] Add the bundles and overlay for the functional tests This charm requires an overlay to properly set the access and credentials to connect to a NetApp instance. Additionally, add the functional bundles following the blueprint set by the cinder charm. --- src/tests/bundles/bionic-queens.yaml | 47 +++++++++ src/tests/bundles/bionic-rocky.yaml | 50 ++++++++++ src/tests/bundles/bionic-stein.yaml | 50 ++++++++++ src/tests/bundles/bionic-train.yaml | 51 ++++++++++ src/tests/bundles/bionic-ussuri.yaml | 16 ++- src/tests/bundles/focal-ussuri.yaml | 97 +++++++++++-------- src/tests/bundles/focal-victoria.yaml | 96 ++++++++++-------- src/tests/bundles/groovy-victoria.yaml | 70 +++++++++++++ src/tests/bundles/hirsute-wallaby.yaml | 56 +++++++++++ .../bundles/overlays/netapp-overlay.yaml.j2 | 8 ++ 10 files changed, 447 insertions(+), 94 deletions(-) create mode 100644 src/tests/bundles/bionic-queens.yaml create mode 100644 src/tests/bundles/bionic-rocky.yaml create mode 100644 src/tests/bundles/bionic-stein.yaml create mode 100644 src/tests/bundles/bionic-train.yaml create mode 100644 src/tests/bundles/groovy-victoria.yaml create mode 100644 src/tests/bundles/hirsute-wallaby.yaml create mode 100644 src/tests/bundles/overlays/netapp-overlay.yaml.j2 diff --git a/src/tests/bundles/bionic-queens.yaml b/src/tests/bundles/bionic-queens.yaml new file mode 100644 index 0000000..50e4d2c --- /dev/null +++ b/src/tests/bundles/bionic-queens.yaml @@ -0,0 +1,47 @@ +series: bionic +comment: +- 'machines section to decide order of deployment. database sooner = faster' +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': +relations: +- - keystone:shared-db + - mysql:shared-db +- - cinder:shared-db + - mysql:shared-db +- - cinder:identity-service + - keystone:identity-service +- - cinder:amqp + - rabbitmq-server:amqp +- - cinder:storage-backend + - cinder-netapp:storage-backend +applications: + mysql: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + to: + - '1' + cinder: + series: bionic + num_units: 1 + options: + block-device: /dev/vdb + overwrite: "true" + ephemeral-unmount: /mnt + to: + - '2' + cinder-netapp: + charm: cinder-netapp + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' diff --git a/src/tests/bundles/bionic-rocky.yaml b/src/tests/bundles/bionic-rocky.yaml new file mode 100644 index 0000000..0a364ab --- /dev/null +++ b/src/tests/bundles/bionic-rocky.yaml @@ -0,0 +1,50 @@ +series: bionic +comment: +- 'machines section to decide order of deployment. database sooner = faster' +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': +relations: +- - keystone:shared-db + - mysql:shared-db +- - cinder:shared-db + - mysql:shared-db +- - cinder:identity-service + - keystone:identity-service +- - cinder:amqp + - rabbitmq-server:amqp +- - cinder:storage-backend + - cinder-netapp:storage-backend +applications: + mysql: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + options: + openstack-origin: cloud:bionic-rocky + num_units: 1 + to: + - '1' + cinder: + series: bionic + num_units: 1 + options: + openstack-origin: cloud:bionic-rocky + block-device: /dev/vdb + overwrite: "true" + ephemeral-unmount: /mnt + to: + - '2' + cinder-netapp: + charm: cinder-netapp + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' diff --git a/src/tests/bundles/bionic-stein.yaml b/src/tests/bundles/bionic-stein.yaml new file mode 100644 index 0000000..b0963d0 --- /dev/null +++ b/src/tests/bundles/bionic-stein.yaml @@ -0,0 +1,50 @@ +series: bionic +comment: +- 'machines section to decide order of deployment. database sooner = faster' +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': +relations: +- - keystone:shared-db + - mysql:shared-db +- - cinder:shared-db + - mysql:shared-db +- - cinder:identity-service + - keystone:identity-service +- - cinder:amqp + - rabbitmq-server:amqp +- - cinder:storage-backend + - cinder-netapp:storage-backend +applications: + mysql: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + options: + openstack-origin: cloud:bionic-stein + num_units: 1 + to: + - '1' + cinder: + series: bionic + num_units: 1 + options: + openstack-origin: cloud:bionic-stein + block-device: /dev/vdb + overwrite: "true" + ephemeral-unmount: /mnt + to: + - '2' + cinder-netapp: + charm: cinder-netapp + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' diff --git a/src/tests/bundles/bionic-train.yaml b/src/tests/bundles/bionic-train.yaml new file mode 100644 index 0000000..2324854 --- /dev/null +++ b/src/tests/bundles/bionic-train.yaml @@ -0,0 +1,51 @@ +series: bionic +comment: +- 'machines section to decide order of deployment. database sooner = faster' +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': +relations: +- - keystone:shared-db + - mysql:shared-db +- - cinder:shared-db + - mysql:shared-db +- - cinder:identity-service + - keystone:identity-service +- - cinder:amqp + - rabbitmq-server:amqp +- - cinder:storage-backend + - cinder-netapp:storage-backend +applications: + mysql: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + options: + openstack-origin: cloud:bionic-train + num_units: 1 + to: + - '1' + cinder: + series: bionic + num_units: 1 + storage: + block-devices: '40G' + options: + openstack-origin: cloud:bionic-train + block-device: None + overwrite: "true" + to: + - '2' + cinder-netapp: + charm: cinder-netapp + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' diff --git a/src/tests/bundles/bionic-ussuri.yaml b/src/tests/bundles/bionic-ussuri.yaml index e84f8aa..c5bde6b 100644 --- a/src/tests/bundles/bionic-ussuri.yaml +++ b/src/tests/bundles/bionic-ussuri.yaml @@ -26,27 +26,25 @@ applications: - '0' keystone: charm: cs:~openstack-charmers-next/keystone - num_units: 1 options: openstack-origin: cloud:bionic-ussuri + num_units: 1 to: - '1' cinder: - charm: cs:~openstack-charmers-next/cinder + series: bionic num_units: 1 + storage: + block-devices: '40G' options: openstack-origin: cloud:bionic-ussuri + block-device: None + overwrite: "true" + ephemeral-unmount: /mnt to: - '2' cinder-netapp: - series: bionic charm: cinder-netapp - options: - netapp-vserver: 'svm01' - netapp-server-hostname: '10.246.115.6' - netapp-server-port: '80' - netapp-login: 'vsadmin' - netapp-password: 'Ubuntu123' rabbitmq-server: charm: cs:~openstack-charmers-next/rabbitmq-server num_units: 1 diff --git a/src/tests/bundles/focal-ussuri.yaml b/src/tests/bundles/focal-ussuri.yaml index 99feedb..dc89753 100644 --- a/src/tests/bundles/focal-ussuri.yaml +++ b/src/tests/bundles/focal-ussuri.yaml @@ -1,59 +1,70 @@ series: focal +variables: + openstack-origin: &openstack-origin distro 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': relations: -- - keystone:shared-db - - mysql:shared-db -- - cinder:shared-db - - mysql:shared-db -- - cinder:identity-service - - keystone:identity-service -- - cinder:amqp - - rabbitmq-server:amqp -- - cinder:storage-backend - - cinder-netapp:storage-backend + - - 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-netapp:storage-backend applications: - mysql: - charm: cs:~openstack-charmers-next/percona-cluster - num_units: 1 - to: - - '0' - keystone: - charm: cs:~openstack-charmers-next/keystone - num_units: 1 + mysql-innodb-cluster: + charm: cs:~openstack-charmers/mysql-innodb-cluster + num_units: 3 options: - openstack-origin: distro + source: *openstack-origin to: - - '1' - cinder: - charm: cs:~openstack-charmers-next/cinder - num_units: 1 - options: - openstack-origin: distro - to: - - '2' - cinder-netapp: - series: focal - charm: cinder-netapp - options: - netapp-storage-family: ontap_cluster - netapp-storage-protocol: iscsi - netapp-vserver: 'hou-cloud' - netapp-server-hostname: '10.10.10.10' - volume-backend-name: cinder-netapp - netapp-server-port: 80 - netapp-login: admin - netapp-password: Passw0rd - use-multipath: True - + - '0' + - '1' + - '2' rabbitmq-server: - charm: cs:~openstack-charmers-next/rabbitmq-server + charm: cs:~openstack-charmers/rabbitmq-server + num_units: 1 + options: + source: *openstack-origin + to: + - '3' + keystone: + charm: cs:~openstack-charmers/keystone + options: + openstack-origin: *openstack-origin num_units: 1 to: - - '3' + - '4' + keystone-mysql-router: + charm: cs:~openstack-charmers/mysql-router + cinder: + num_units: 1 + storage: + block-devices: '40G' + options: + openstack-origin: *openstack-origin + block-device: None + overwrite: "true" + to: + - '5' + cinder-netapp: + charm: cinder-netapp + cinder-mysql-router: + charm: cs:~openstack-charmers/mysql-router diff --git a/src/tests/bundles/focal-victoria.yaml b/src/tests/bundles/focal-victoria.yaml index d95c659..99c899f 100644 --- a/src/tests/bundles/focal-victoria.yaml +++ b/src/tests/bundles/focal-victoria.yaml @@ -1,58 +1,70 @@ series: focal +variables: + openstack-origin: &openstack-origin cloud:focal-victoria 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': relations: -- - keystone:shared-db - - mysql:shared-db -- - cinder:shared-db - - mysql:shared-db -- - cinder:identity-service - - keystone:identity-service -- - cinder:amqp - - rabbitmq-server:amqp -- - cinder:storage-backend - - cinder-netapp:storage-backend + - - 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-netapp:storage-backend applications: - mysql: - charm: cs:~openstack-charmers-next/percona-cluster - num_units: 1 - to: - - '0' - keystone: - charm: cs:~openstack-charmers-next/keystone - num_units: 1 + mysql-innodb-cluster: + charm: cs:~openstack-charmers/mysql-innodb-cluster + num_units: 3 options: - openstack-origin: distro + source: *openstack-origin to: - - '1' - cinder: - charm: cs:~openstack-charmers-next/cinder - num_units: 1 - options: - openstack-origin: distro - to: - - '2' - cinder-netapp: - series: focal - charm: cinder-netapp - options: - netapp-storage-family: ontap_cluster - netapp-storage-protocol: iscsi - netapp-vserver: 'hou-cloud' - netapp-server-hostname: '10.10.10.10' - volume-backend-name: cinder-netapp - netapp-server-port: 80 - netapp-login: admin - netapp-password: Passw0rd - use-multipath: True + - '0' + - '1' + - '2' rabbitmq-server: - charm: cs:~openstack-charmers-next/rabbitmq-server + charm: cs:~openstack-charmers/rabbitmq-server + num_units: 1 + options: + source: *openstack-origin + to: + - '3' + keystone: + charm: cs:~openstack-charmers/keystone + options: + openstack-origin: *openstack-origin num_units: 1 to: - - '3' + - '4' + keystone-mysql-router: + charm: cs:~openstack-charmers/mysql-router + cinder: + storage: + block-devices: '40G' + num_units: 1 + options: + openstack-origin: *openstack-origin + block-device: None + overwrite: "true" + to: + - '5' + cinder-netapp: + charm: cinder-netapp + cinder-mysql-router: + charm: cs:~openstack-charmers/mysql-router diff --git a/src/tests/bundles/groovy-victoria.yaml b/src/tests/bundles/groovy-victoria.yaml new file mode 100644 index 0000000..c017848 --- /dev/null +++ b/src/tests/bundles/groovy-victoria.yaml @@ -0,0 +1,70 @@ +series: groovy +variables: + openstack-origin: &openstack-origin distro +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': +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-netapp:storage-backend +applications: + mysql-innodb-cluster: + charm: cs:~openstack-charmers/mysql-innodb-cluster + num_units: 3 + options: + source: *openstack-origin + to: + - '0' + - '1' + - '2' + rabbitmq-server: + charm: cs:~openstack-charmers/rabbitmq-server + num_units: 1 + options: + source: *openstack-origin + to: + - '3' + keystone: + charm: cs:~openstack-charmers/keystone + options: + openstack-origin: *openstack-origin + num_units: 1 + to: + - '4' + keystone-mysql-router: + charm: cs:~openstack-charmers/mysql-router + cinder: + storage: + block-devices: '40G' + num_units: 1 + options: + openstack-origin: *openstack-origin + block-device: None + overwrite: "true" + to: + - '5' + cinder-netapp: + charm: cinder-netapp + cinder-mysql-router: + charm: cs:~openstack-charmers/mysql-router diff --git a/src/tests/bundles/hirsute-wallaby.yaml b/src/tests/bundles/hirsute-wallaby.yaml new file mode 100644 index 0000000..16e2f0d --- /dev/null +++ b/src/tests/bundles/hirsute-wallaby.yaml @@ -0,0 +1,56 @@ +variables: + openstack-origin: &openstack-origin distro + +series: hirsute +comment: +- 'machines section to decide order of deployment. database sooner = faster' +machines: + '0': + constraints: mem=3072M + series: bionic + '1': + '2': + '3': +relations: +- - keystone:shared-db + - mysql:shared-db +- - cinder:shared-db + - mysql:shared-db +- - cinder:identity-service + - keystone:identity-service +- - cinder:amqp + - rabbitmq-server:amqp +- - cinder:storage-backend + - cinder-netapp:storage-backend +applications: + mysql: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + series: bionic + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + options: + openstack-origin: *openstack-origin + num_units: 1 + to: + - '1' + cinder: + num_units: 1 + storage: + block-devices: '40G' + options: + openstack-origin: *openstack-origin + block-device: None + overwrite: "true" + to: + - '2' + cinder-netapp: + charm: cinder-netapp + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + source: *openstack-origin + to: + - '3' diff --git a/src/tests/bundles/overlays/netapp-overlay.yaml.j2 b/src/tests/bundles/overlays/netapp-overlay.yaml.j2 new file mode 100644 index 0000000..5a2ceaa --- /dev/null +++ b/src/tests/bundles/overlays/netapp-overlay.yaml.j2 @@ -0,0 +1,8 @@ +applications: + cinder-netapp: + options: + netapp-vserver: {{ NETAPP_VSERVER }} + netapp-server-hostname: {{ NETAPP_SERVER_HOSTNAME }} + netapp-server-port: {{ NETAPP_SERVER_PORT }} + netapp-login: {{ NETAPP_LOGIN }} + netapp-password: {{ NETAPP_PASSWORD }}