Nova: Helm test functionaility using Rally
This PS adds 'helm test' functionality using Rally to Nova Change-Id: Ie53c42636b58e36c22a9260c67a7981183d741d3 Partial-Implements: blueprint implement-helm-test-for-charts External-Tracking-Id: OSH-89
This commit is contained in:
parent
653f7ed3e4
commit
d69f021e32
@ -17,6 +17,8 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: nova-bin
|
||||
data:
|
||||
rally-test.sh: |
|
||||
{{- include "helm-toolkit.scripts.rally_test" . | indent 4 }}
|
||||
db-init.py: |+
|
||||
{{- include "helm-toolkit.scripts.db_init" . | indent 4 }}
|
||||
db-sync.sh: |+
|
||||
|
@ -60,6 +60,8 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: nova-etc
|
||||
data:
|
||||
rally_tests.yaml: |+
|
||||
{{ tuple "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
nova.conf: |+
|
||||
{{ if .Values.conf.nova.override -}}
|
||||
{{ .Values.conf.nova.override | indent 4 }}
|
||||
|
323
nova/templates/etc/_rally_tests.yaml.tpl
Normal file
323
nova/templates/etc/_rally_tests.yaml.tpl
Normal file
@ -0,0 +1,323 @@
|
||||
---
|
||||
NovaAgents.list_agents:
|
||||
- runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaAggregates.create_and_get_aggregate_details:
|
||||
- args:
|
||||
availability_zone: nova
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaAggregates.create_and_update_aggregate:
|
||||
- args:
|
||||
availability_zone: nova
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaAggregates.list_aggregates:
|
||||
- runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaAvailabilityZones.list_availability_zones:
|
||||
- args:
|
||||
detailed: true
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaFlavors.create_and_delete_flavor:
|
||||
- args:
|
||||
disk: 1
|
||||
ram: 500
|
||||
vcpus: 1
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaFlavors.create_and_list_flavor_access:
|
||||
- args:
|
||||
disk: 1
|
||||
ram: 500
|
||||
vcpus: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaFlavors.create_flavor:
|
||||
- args:
|
||||
disk: 1
|
||||
ram: 500
|
||||
vcpus: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaFlavors.create_flavor_and_add_tenant_access:
|
||||
- args:
|
||||
disk: 1
|
||||
ram: 500
|
||||
vcpus: 1
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaFlavors.create_flavor_and_set_keys:
|
||||
- args:
|
||||
disk: 1
|
||||
extra_specs:
|
||||
quota:disk_read_bytes_sec: 10240
|
||||
ram: 500
|
||||
vcpus: 1
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaFlavors.list_flavors:
|
||||
- args:
|
||||
detailed: true
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaHosts.list_hosts:
|
||||
- runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaHypervisors.list_and_get_hypervisors:
|
||||
- args:
|
||||
detailed: true
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaHypervisors.list_and_get_uptime_hypervisors:
|
||||
- args:
|
||||
detailed: true
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaHypervisors.list_and_search_hypervisors:
|
||||
- args:
|
||||
detailed: true
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaHypervisors.list_hypervisors:
|
||||
- args:
|
||||
detailed: true
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaHypervisors.statistics_hypervisors:
|
||||
- args: {}
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaImages.list_images:
|
||||
- args:
|
||||
detailed: true
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaKeypair.create_and_delete_keypair:
|
||||
- context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaKeypair.create_and_list_keypairs:
|
||||
- context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaSecGroup.create_and_delete_secgroups:
|
||||
- args:
|
||||
rules_per_security_group: 1
|
||||
security_group_count: 1
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaSecGroup.create_and_list_secgroups:
|
||||
- args:
|
||||
rules_per_security_group: 1
|
||||
security_group_count: 1
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaSecGroup.create_and_update_secgroups:
|
||||
- args:
|
||||
security_group_count: 1
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaServerGroups.create_and_list_server_groups:
|
||||
- args:
|
||||
all_projects: false
|
||||
kwargs:
|
||||
policies:
|
||||
- affinity
|
||||
context:
|
||||
users:
|
||||
tenants: 1
|
||||
users_per_tenant: 1
|
||||
runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
NovaServices.list_services:
|
||||
- runner:
|
||||
concurrency: 1
|
||||
times: 1
|
||||
type: constant
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
64
nova/templates/pod-rally-test.yaml
Normal file
64
nova/templates/pod-rally-test.yaml
Normal file
@ -0,0 +1,64 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- $envAll := . }}
|
||||
{{- $ksAdminSecret := .Values.keystone.admin_secret | default "nova-env-keystone-admin" }}
|
||||
{{- $dependencies := .Values.dependencies.tests }}
|
||||
{{- $mounts_nova_tests := .Values.mounts.nova_tests.nova_tests }}
|
||||
{{- $mounts_nova_tests_init := .Values.mounts.nova_tests.init_container }}
|
||||
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{.Release.Name}}-rally-test"
|
||||
annotations:
|
||||
"helm.sh/hook": test-success
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies $mounts_nova_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
containers:
|
||||
- name: {{.Release.Name}}-token-issue-test
|
||||
image: {{ .Values.images.test }}
|
||||
env:
|
||||
{{- with $env := dict "ksUserSecret" $ksAdminSecret }}
|
||||
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 8 }}
|
||||
{{- end }}
|
||||
- name: RALLY_ENV_NAME
|
||||
value: {{.Release.Name}}
|
||||
command:
|
||||
- /tmp/rally-test.sh
|
||||
volumeMounts:
|
||||
- name: nova-etc
|
||||
mountPath: /etc/rally/rally_tests.yaml
|
||||
subPath: rally_tests.yaml
|
||||
readOnly: true
|
||||
- name: nova-bin
|
||||
mountPath: /tmp/rally-test.sh
|
||||
subPath: rally-test.sh
|
||||
readOnly: true
|
||||
- name: rally-db
|
||||
mountPath: /var/lib/rally
|
||||
{{ if $mounts_nova_tests.volumeMounts }}{{ toYaml $mounts_nova_tests.volumeMounts | indent 8 }}{{ end }}
|
||||
volumes:
|
||||
- name: nova-etc
|
||||
configMap:
|
||||
name: nova-etc
|
||||
- name: nova-bin
|
||||
configMap:
|
||||
name: nova-bin
|
||||
defaultMode: 0555
|
||||
- name: rally-db
|
||||
emptyDir: {}
|
||||
{{ if $mounts_nova_tests.volumes }}{{ toYaml $mounts_nova_tests.volumes | indent 4 }}{{ end }}
|
@ -52,6 +52,7 @@ labels:
|
||||
node_selector_value: enabled
|
||||
|
||||
images:
|
||||
test: docker.io/kolla/ubuntu-binary-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
|
||||
@ -191,6 +192,8 @@ dependencies:
|
||||
services:
|
||||
- service: oslo_messaging
|
||||
endpoint: internal
|
||||
- service: image
|
||||
endpoint: internal
|
||||
- service: compute
|
||||
endpoint: internal
|
||||
- service: network
|
||||
@ -236,6 +239,14 @@ dependencies:
|
||||
endpoint: internal
|
||||
- service: compute
|
||||
endpoint: internal
|
||||
tests:
|
||||
service:
|
||||
- service: image
|
||||
endpoint: internal
|
||||
- service: compute
|
||||
endpoint: internal
|
||||
- service: network
|
||||
endpoint: internal
|
||||
|
||||
mounts:
|
||||
nova_compute:
|
||||
@ -262,6 +273,9 @@ mounts:
|
||||
nova_bootstrap:
|
||||
init_container: null
|
||||
nova_bootstrap:
|
||||
nova_tests:
|
||||
init_container: null
|
||||
nova_tests:
|
||||
|
||||
conf:
|
||||
paste:
|
||||
|
@ -56,3 +56,4 @@ fi
|
||||
helm_test_deployment keystone 600
|
||||
helm_test_deployment glance 600
|
||||
helm_test_deployment neutron 600
|
||||
helm_test_deployment nova 600
|
||||
|
Loading…
Reference in New Issue
Block a user