diff --git a/cinder/templates/configmap-bin.yaml b/cinder/templates/configmap-bin.yaml index 9dbb71c4f7..751c762fa6 100644 --- a/cinder/templates/configmap-bin.yaml +++ b/cinder/templates/configmap-bin.yaml @@ -16,6 +16,7 @@ limitations under the License. {{- if .Values.manifests.configmap_bin }} {{- $envAll := . }} +{{- $rallyTests := .Values.conf.rally_tests }} --- apiVersion: v1 kind: ConfigMap @@ -23,7 +24,7 @@ metadata: name: cinder-bin data: rally-test.sh: | -{{- include "helm-toolkit.scripts.rally_test" . | indent 4 }} +{{ tuple $rallyTests | include "helm-toolkit.scripts.rally_test" | indent 4 }} db-init.py: | {{- include "helm-toolkit.scripts.db_init" . | indent 4 }} db-sync.sh: | diff --git a/cinder/templates/configmap-etc.yaml b/cinder/templates/configmap-etc.yaml index b8d3da074d..2e082ec413 100644 --- a/cinder/templates/configmap-etc.yaml +++ b/cinder/templates/configmap-etc.yaml @@ -70,7 +70,17 @@ metadata: name: cinder-etc data: rally_tests.yaml: |+ +{{ if .Values.conf.rally_tests.override -}} +{{ .Values.conf.rally_tests.override | indent 4 }} +{{- else -}} +{{- if .Values.conf.rally_tests.prefix -}} +{{ .Values.conf.rally_tests.prefix | indent 4 }} +{{- end }} {{ tuple "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} +{{- end }} +{{- if .Values.conf.rally_tests.append -}} +{{ .Values.conf.rally_tests.append | indent 4 }} +{{- end }} cinder.conf: |+ {{ if .Values.conf.cinder.override -}} {{ .Values.conf.cinder.override | indent 4 }} diff --git a/cinder/values.yaml b/cinder/values.yaml index 5983784b73..579eb5be71 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -26,7 +26,7 @@ labels: release_group: null images: - test: docker.io/kolla/ubuntu-binary-rally:4.0.0 + test: docker.io/kolla/ubuntu-source-rally:4.0.0 db_init: docker.io/kolla/ubuntu-source-cinder-api:3.0.3 db_sync: docker.io/kolla/ubuntu-source-cinder-api:3.0.3 ks_user: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3 @@ -236,6 +236,7 @@ conf: rados_connect_timeout: -1 rbd_user: "admin" rally_tests: + run_tempest: false override: append: diff --git a/glance/templates/configmap-bin.yaml b/glance/templates/configmap-bin.yaml index fbd397e761..56917d3632 100644 --- a/glance/templates/configmap-bin.yaml +++ b/glance/templates/configmap-bin.yaml @@ -16,6 +16,7 @@ limitations under the License. {{- if .Values.manifests.configmap_bin }} {{- $envAll := . }} +{{- $rallyTests := .Values.conf.rally_tests }} --- apiVersion: v1 kind: ConfigMap @@ -23,7 +24,7 @@ metadata: name: glance-bin data: rally-test.sh: | -{{- include "helm-toolkit.scripts.rally_test" . | indent 4 }} +{{ tuple $rallyTests | include "helm-toolkit.scripts.rally_test" | indent 4 }} db-init.py: | {{- include "helm-toolkit.scripts.db_init" . | indent 4 }} db-sync.sh: | diff --git a/glance/values.yaml b/glance/values.yaml index 2ca5cac4b3..e8091b7085 100644 --- a/glance/values.yaml +++ b/glance/values.yaml @@ -27,7 +27,7 @@ labels: release_group: null images: - test: docker.io/kolla/ubuntu-binary-rally:4.0.0 + test: docker.io/kolla/ubuntu-source-rally:4.0.0 db_init: docker.io/kolla/ubuntu-source-glance-api:3.0.3 db_sync: docker.io/kolla/ubuntu-source-glance-api:3.0.3 ks_user: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3 @@ -57,6 +57,7 @@ bootstrap: conf: rally_tests: + run_tempest: false override: append: images: diff --git a/helm-toolkit/templates/scripts/_rally_test.sh.tpl b/helm-toolkit/templates/scripts/_rally_test.sh.tpl index da7ddd5143..5da4a0fbfc 100644 --- a/helm-toolkit/templates/scripts/_rally_test.sh.tpl +++ b/helm-toolkit/templates/scripts/_rally_test.sh.tpl @@ -14,15 +14,22 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- define "helm-toolkit.scripts.rally_test" }} +{{- define "helm-toolkit.scripts.rally_test" -}} #!/bin/bash set -ex +{{- $rallyTests := index . 0 }} : ${RALLY_ENV_NAME:="openstack-helm"} rally-manage db create rally deployment create --fromenv --name ${RALLY_ENV_NAME} rally deployment use ${RALLY_ENV_NAME} rally deployment check +{{- if $rallyTests.run_tempest }} +rally verify create-verifier --name ${RALLY_ENV_NAME}-tempest --type tempest +SERVICE_TYPE=$(rally deployment check | grep ${RALLY_ENV_NAME} | awk -F \| '{print $3}' | tr -d ' ' | tr -d '\n') +rally verify start --pattern tempest.api.$SERVICE_TYPE* +rally verify delete-verifier --id ${RALLY_ENV_NAME}-tempest --force +{{- end }} rally task validate /etc/rally/rally_tests.yaml rally task start /etc/rally/rally_tests.yaml rally deployment destroy --deployment ${RALLY_ENV_NAME} diff --git a/keystone/templates/configmap-bin.yaml b/keystone/templates/configmap-bin.yaml index 5af30fca1e..52efbc7cff 100644 --- a/keystone/templates/configmap-bin.yaml +++ b/keystone/templates/configmap-bin.yaml @@ -16,6 +16,7 @@ limitations under the License. {{- if .Values.manifests.configmap_bin }} {{- $envAll := . }} +{{- $rallyTests := .Values.conf.rally_tests }} --- apiVersion: v1 kind: ConfigMap @@ -27,7 +28,7 @@ data: {{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{- end }} rally-test.sh: | -{{- include "helm-toolkit.scripts.rally_test" . | indent 4 }} +{{ tuple $rallyTests | include "helm-toolkit.scripts.rally_test" | indent 4 }} db-init.py: | {{- include "helm-toolkit.scripts.db_init" . | indent 4 }} db-sync.sh: | diff --git a/keystone/values.yaml b/keystone/values.yaml index 255ffd9d13..bf0358b03b 100644 --- a/keystone/values.yaml +++ b/keystone/values.yaml @@ -25,7 +25,7 @@ release_group: null images: bootstrap: docker.io/kolla/ubuntu-source-keystone:3.0.3 - test: docker.io/kolla/ubuntu-binary-rally:4.0.0 + test: docker.io/kolla/ubuntu-source-rally:4.0.0 db_init: docker.io/kolla/ubuntu-source-keystone:3.0.3 db_sync: docker.io/kolla/ubuntu-source-keystone:3.0.3 fernet_setup: docker.io/kolla/ubuntu-source-keystone:3.0.3 @@ -241,6 +241,7 @@ jobs: conf: rally_tests: + run_tempest: false override: append: paste: diff --git a/neutron/templates/configmap-bin.yaml b/neutron/templates/configmap-bin.yaml index 0f577050d0..5ec823825e 100644 --- a/neutron/templates/configmap-bin.yaml +++ b/neutron/templates/configmap-bin.yaml @@ -16,6 +16,7 @@ limitations under the License. {{- if .Values.manifests.configmap_bin }} {{- $envAll := . }} +{{- $rallyTests := .Values.conf.rally_tests }} --- apiVersion: v1 kind: ConfigMap @@ -27,7 +28,7 @@ data: {{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{- end }} rally-test.sh: | -{{- include "helm-toolkit.scripts.rally_test" . | indent 4 }} +{{ tuple $rallyTests | include "helm-toolkit.scripts.rally_test" | indent 4 }} db-init.py: |+ {{- include "helm-toolkit.scripts.db_init" . | indent 4 }} db-sync.sh: |+ diff --git a/neutron/templates/configmap-etc.yaml b/neutron/templates/configmap-etc.yaml index c1b98af7f1..8441428639 100644 --- a/neutron/templates/configmap-etc.yaml +++ b/neutron/templates/configmap-etc.yaml @@ -84,7 +84,17 @@ metadata: name: neutron-etc data: rally_tests.yaml: |+ +{{ if .Values.conf.rally_tests.override -}} +{{ .Values.conf.rally_tests.override | indent 4 }} +{{- else -}} +{{- if .Values.conf.rally_tests.prefix -}} +{{ .Values.conf.rally_tests.prefix | indent 4 }} +{{- end }} {{ tuple "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} +{{- end }} +{{- if .Values.conf.rally_tests.append -}} +{{ .Values.conf.rally_tests.append | indent 4 }} +{{- end }} api-paste.ini: |+ {{ if .Values.conf.paste.override -}} {{ .Values.conf.paste.override | indent 4 }} diff --git a/neutron/templates/pod-rally-test.yaml b/neutron/templates/pod-rally-test.yaml index 3a854cbe96..2aeba33af1 100644 --- a/neutron/templates/pod-rally-test.yaml +++ b/neutron/templates/pod-rally-test.yaml @@ -29,7 +29,7 @@ metadata: spec: restartPolicy: Never initContainers: -{{ tuple $envAll $dependencies $mounts_neutron_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} +{{ tuple $envAll $dependencies $mounts_neutron_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }} containers: - name: {{.Release.Name}}-token-issue-test image: {{ .Values.images.test }} @@ -42,6 +42,7 @@ spec: - name: RALLY_ENV_NAME value: {{.Release.Name}} command: + - bash - /tmp/rally-test.sh volumeMounts: - name: neutron-etc diff --git a/neutron/values.yaml b/neutron/values.yaml index 6890e371ea..8ea01ed38a 100644 --- a/neutron/values.yaml +++ b/neutron/values.yaml @@ -21,7 +21,7 @@ release_group: null images: bootstrap: docker.io/kolla/ubuntu-source-neutron-server:3.0.3 - test: docker.io/kolla/ubuntu-binary-rally:4.0.0 + test: docker.io/kolla/ubuntu-source-rally:4.0.0 db_init: docker.io/kolla/ubuntu-source-neutron-server:3.0.3 db_sync: docker.io/kolla/ubuntu-source-neutron-server:3.0.3 ks_user: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3 @@ -354,6 +354,10 @@ pod: cpu: "2000m" conf: + rally_tests: + run_tempest: false + override: + append: paste: override: append: diff --git a/nova/templates/configmap-bin.yaml b/nova/templates/configmap-bin.yaml index 0a30bfb440..e76e823f34 100644 --- a/nova/templates/configmap-bin.yaml +++ b/nova/templates/configmap-bin.yaml @@ -16,6 +16,7 @@ limitations under the License. {{- if .Values.manifests.configmap_bin }} {{- $envAll := . }} +{{- $rallyTests := .Values.conf.rally_tests }} --- apiVersion: v1 kind: ConfigMap @@ -23,7 +24,7 @@ metadata: name: nova-bin data: rally-test.sh: | -{{- include "helm-toolkit.scripts.rally_test" . | indent 4 }} +{{ tuple $rallyTests | include "helm-toolkit.scripts.rally_test" | indent 4 }} db-init.py: |+ {{- include "helm-toolkit.scripts.db_init" . | indent 4 }} db-sync.sh: |+ diff --git a/nova/templates/configmap-etc.yaml b/nova/templates/configmap-etc.yaml index 659836e9e7..f5904f57f6 100644 --- a/nova/templates/configmap-etc.yaml +++ b/nova/templates/configmap-etc.yaml @@ -94,7 +94,17 @@ metadata: name: nova-etc data: rally_tests.yaml: |+ +{{ if .Values.conf.rally_tests.override -}} +{{ .Values.conf.rally_tests.override | indent 4 }} +{{- else -}} +{{- if .Values.conf.rally_tests.prefix -}} +{{ .Values.conf.rally_tests.prefix | indent 4 }} +{{- end }} {{ tuple "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} +{{- end }} +{{- if .Values.conf.rally_tests.append -}} +{{ .Values.conf.rally_tests.append | indent 4 }} +{{- end }} nova.conf: |+ {{ if .Values.conf.nova.override -}} {{ .Values.conf.nova.override | indent 4 }} diff --git a/nova/templates/pod-rally-test.yaml b/nova/templates/pod-rally-test.yaml index 6e4159e277..8a75c334dd 100644 --- a/nova/templates/pod-rally-test.yaml +++ b/nova/templates/pod-rally-test.yaml @@ -29,10 +29,11 @@ metadata: spec: restartPolicy: Never initContainers: -{{ tuple $envAll $dependencies $mounts_nova_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} +{{ tuple $envAll $dependencies $mounts_nova_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }} containers: - name: {{.Release.Name}}-token-issue-test image: {{ .Values.images.test }} + imagePullPolicy: {{ .Values.images.pull_policy }} env: {{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }} {{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 8 }} @@ -40,6 +41,7 @@ spec: - name: RALLY_ENV_NAME value: {{.Release.Name}} command: + - bash - /tmp/rally-test.sh volumeMounts: - name: nova-etc diff --git a/nova/values.yaml b/nova/values.yaml index 032b07c8c3..34358909d9 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -50,7 +50,7 @@ labels: node_selector_value: enabled images: - test: docker.io/kolla/ubuntu-binary-rally:4.0.0 + test: docker.io/kolla/ubuntu-source-rally:4.0.0 db_init: docker.io/kolla/ubuntu-source-nova-api:3.0.3 db_sync: docker.io/kolla/ubuntu-source-nova-api:3.0.3 ks_user: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3 @@ -265,6 +265,10 @@ console: vncserver_proxyclient_interface: conf: + rally_tests: + run_tempest: false + override: + append: paste: override: append: