Add Rally Chart

Basic functioning chart
Helm tests to verify functionality
Documentation to support

Implements: blueprint openstack-helm-chart-rally
Change-Id: Idcff88db63a5d8be6099969c41f6c34450c61064
This commit is contained in:
Darla Ahlert 2017-08-04 13:28:35 -05:00
parent 31c57875ab
commit cbb6ed9172
47 changed files with 15094 additions and 7 deletions

25
rally/Chart.yaml Normal file
View File

@ -0,0 +1,25 @@
# 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.
apiVersion: v1
description: OpenStack-Helm rally
name: rally
version: 0.1.0
home: https://docs.openstack.org/developer/rally
icon: https://www.openstack.org/themes/openstack/images/project-mascots/rally/OpenStack_Project_rally_vertical.png
sources:
- https://git.openstack.org/cgit/openstack/rally
- https://git.openstack.org/cgit/openstack/openstack-helm
maintainers:
- name: OpenStack-Helm Authors

24
rally/README.rst Normal file
View File

@ -0,0 +1,24 @@
=====
Rally
=====
This chart provides a benchmarking tool for OpenStack services that
allows us to test our cloud at scale. This chart leverages the Kolla
image for Rally and includes a templated configuration file that
allows configuration overrides similar to other charts in OpenStack-Helm.
You can choose which services to benchmark by changing the services
listed in the ``values.yaml`` file under the ``enabled_tests`` key.
Installation
------------
This chart can be deployed by running the following command:
::
helm install --name=rally ./rally --namespace=openstack
This will install Rally into your cluster appropriately. When you run
this install command, the chart will bring up a few jobs that will
complete the benchmarking of the OpenStack services that you have
specified.

18
rally/requirements.yaml Normal file
View File

@ -0,0 +1,18 @@
# 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.
dependencies:
- name: helm-toolkit
repository: http://localhost:8879/charts
version: 0.1.0

View File

@ -0,0 +1,19 @@
#!/bin/bash
{{/*
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.
*/}}
set -ex
{{ .Values.bootstrap.script | default "echo 'Not Enabled'" }}

View File

@ -0,0 +1,31 @@
#!/bin/bash
{{/*
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.
*/}}
set -ex
function create_or_update_db () {
revisionResults=$(rally-manage db revision)
if [ $revisionResults = "None" ]
then
rally-manage db create
else
rally-manage db upgrade
fi
}
create_or_update_db

View File

@ -0,0 +1,50 @@
#!/bin/bash
{{/*
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.
*/}}
set -ex
: ${RALLY_ENV_NAME:="openstack-helm"}
function run_rally () {
CURRENT_TEST=$1
rally deployment use ${RALLY_ENV_NAME}
rally deployment check
rally task validate /tasks/rally/${CURRENT_TEST}.yaml
rally task start /tasks/rally/${CURRENT_TEST}.yaml
rally task list
rally task report --out /var/lib/rally/data/${CURRENT_TEST}.html
}
function create_deployment () {
listResults=$(rally deployment list)
if [ $(echo $listResults | awk '{print $1;}') = "There" ]
then
rally deployment create --fromenv --name ${RALLY_ENV_NAME}
fi
}
create_deployment
IFS=','; for TEST in $ENABLED_TESTS; do
run_rally $TEST
done
exit 0

View File

@ -0,0 +1,41 @@
{{/*
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.
*/}}
{{- if .Values.manifests.configmap_bin }}
{{- $envAll := . }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: rally-bin
data:
{{- if .Values.bootstrap.enabled }}
bootstrap.sh: |+
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
db-init.py: |
{{- include "helm-toolkit.scripts.db_init" . | indent 4 }}
ks-service.sh: |
{{- include "helm-toolkit.scripts.keystone_service" . | indent 4 }}
ks-endpoints.sh: |
{{- include "helm-toolkit.scripts.keystone_endpoints" . | indent 4 }}
ks-user.sh: |
{{- include "helm-toolkit.scripts.keystone_user" . | indent 4 }}
manage-db.sh: |
{{ tuple "bin/_manage-db.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
run-task.sh: |
{{ tuple "bin/_run-task.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}

View File

@ -0,0 +1,60 @@
{{/*
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.
*/}}
{{- if .Values.manifests.configmap_etc }}
{{- $envAll := . }}
{{- if empty .Values.conf.rally.keystone_authtoken.auth_uri -}}
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.rally.keystone_authtoken "auth_uri" | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.rally.keystone_authtoken.auth_url -}}
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.rally.keystone_authtoken "auth_url" | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.rally.keystone_authtoken.region_name -}}
{{- set .Values.conf.rally.keystone_authtoken "region_name" .Values.endpoints.identity.auth.user.region_name | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.rally.keystone_authtoken.project_name -}}
{{- set .Values.conf.rally.keystone_authtoken "project_name" .Values.endpoints.identity.auth.user.project_name | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.rally.keystone_authtoken.project_domain_name -}}
{{- set .Values.conf.rally.keystone_authtoken "project_domain_name" .Values.endpoints.identity.auth.user.project_domain_name | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.rally.keystone_authtoken.user_domain_name -}}
{{- set .Values.conf.rally.keystone_authtoken "user_domain_name" .Values.endpoints.identity.auth.user.user_domain_name | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.rally.keystone_authtoken.username -}}
{{- set .Values.conf.rally.keystone_authtoken "username" .Values.endpoints.identity.auth.user.username | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.rally.keystone_authtoken.password -}}
{{- set .Values.conf.rally.keystone_authtoken "password" .Values.endpoints.identity.auth.user.password | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.rally.keystone_authtoken.memcached_servers -}}
{{- tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.rally.keystone_authtoken "memcached_servers" | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.rally.database.connection -}}
{{- tuple "oslo_db" "internal" "user" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.rally.database "connection" | quote | trunc 0 -}}
{{- end -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: rally-etc
data:
rally.conf: |+
{{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.rally | indent 4 }}
{{- end }}

View File

@ -0,0 +1,47 @@
{{/*
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.
*/}}
{{- if .Values.manifests.configmap_tasks }}
{{- $envAll := . }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: rally-tasks
data:
authenticate.yaml: |+
{{ toYaml .Values.conf.rally_tasks.authenticate_task | indent 4 }}
ceilometer.yaml: |+
{{ toYaml .Values.conf.rally_tasks.ceilometer_task | indent 4 }}
cinder.yaml: |+
{{ toYaml .Values.conf.rally_tasks.cinder_task | indent 4 }}
glance.yaml: |+
{{ toYaml .Values.conf.rally_tasks.glance_task | indent 4 }}
heat.yaml: |+
{{ toYaml .Values.conf.rally_tasks.heat_task | indent 4 }}
keystone.yaml: |+
{{ toYaml .Values.conf.rally_tasks.keystone_task | indent 4 }}
magnum.yaml: |+
{{ toYaml .Values.conf.rally_tasks.magnum_task | indent 4 }}
neutron.yaml: |+
{{ toYaml .Values.conf.rally_tasks.neutron_task | indent 4 }}
nova.yaml: |+
{{ toYaml .Values.conf.rally_tasks.nova_task | indent 4 }}
senlin.yaml: |+
{{ toYaml .Values.conf.rally_tasks.senlin_task | indent 4 }}
swift.yaml: |+
{{ toYaml .Values.conf.rally_tasks.swift_task | indent 4 }}
{{- end }}

View File

@ -0,0 +1,55 @@
{{/*
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.
*/}}
{{- if .Values.manifests.configmap_test_templates }}
{{- $envAll := . }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: heat-tasks-test-templates
data:
random-strings.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.random_strings "tasks/test-templates/_random-strings.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
updated-random-strings-replace.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.updated_random_strings_replace "tasks/test-templates/_updated-random-strings-replace.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
updated-random-strings-add.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.updated_random_strings_add "tasks/test-templates/_updated-random-strings-add.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
updated-random-strings-delete.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.updated_random_strings_delete "tasks/test-templates/_updated-random-strings-delete.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
resource-group-with-constraint.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.resource_group_with_constraint "tasks/test-templates/_resource-group-with-constraint.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
resource-group-with-outputs.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.resource_group_with_outputs "tasks/test-templates/_resource-group-with-outputs.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
resource-group-server-with-volume.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.resource_group_server_with_volume "tasks/test-templates/_resource-group-server-with-volume.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
resource-group.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.resource_group "tasks/test-templates/_resource-group.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
default.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.default "tasks/test-templates/_default.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
autoscaling-group.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.autoscaling_group "tasks/test-templates/_autoscaling-group.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
autoscaling-policy.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.autoscaling_policy "tasks/test-templates/_autoscaling-policy.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
server-with-ports.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.server_with_ports "tasks/test-templates/_server-with-ports.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
server-with-volume.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.server_with_volume "tasks/test-templates/_server-with-volume.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
updated-resource-group-increase.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.updated_resource_group_increase "tasks/test-templates/_updated-resource-group-increase.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
updated-resource-group-reduce.yaml: |+
{{- tuple .Values.conf.rally_tasks.heat_tests.updated_resource_group_reduce "tasks/test-templates/_updated-resource-group-reduce.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
{{- end }}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,60 @@
{{/*
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.
*/}}
{{- if .Values.manifests.ingress_api }}
{{- $envAll := . }}
{{- if .Values.network.rally.ingress.public }}
{{- $backendServiceType := "benchmark" }}
{{- $backendPort := "rally" }}
{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
ingress.kubernetes.io/proxy-body-size: {{ .Values.network.rally.ingress.proxy_body_size }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}
{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }}
- host: {{ $vHost }}
http:
paths:
- path: /
backend:
serviceName: {{ $backendName }}
servicePort: {{ $backendPort }}
{{- end }}
{{- else }}
{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }}
- host: {{ $vHost }}
http:
paths:
- path: /
backend:
serviceName: {{ $backendName }}
servicePort: {{ $backendPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,63 @@
{{/*
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.
*/}}
{{- if .Values.manifests.job_bootstrap }}
{{- $envAll := . }}
{{- if .Values.bootstrap.enabled }}
{{- $dependencies := .Values.dependencies.bootstrap }}
{{- $mounts_rally_bootstrap := .Values.pod.mounts.rally_bootstrap.rally_bootstrap }}
{{- $mounts_rally_bootstrap_init := .Values.pod.mounts.rally_bootstrap.init_container }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: rally-bootstrap
spec:
template:
metadata:
labels:
{{ tuple $envAll "rally" "bootstrap" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec:
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers:
{{ tuple $envAll $dependencies $mounts_rally_bootstrap_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers:
- name: rally-bootstrap
image: {{ .Values.images.bootstrap }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.bootstrap | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
env:
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }}
command:
- /tmp/bootstrap.sh
volumeMounts:
- name: rally-bin
mountPath: /tmp/bootstrap.sh
subPath: bootstrap.sh
readOnly: true
{{- if $mounts_rally_bootstrap.volumeMounts }}{{ toYaml $mounts_rally_bootstrap.volumeMounts | indent 12 }}{{ end }}
volumes:
- name: rally-bin
configMap:
name: rally-bin
defaultMode: 0555
{{- if $mounts_rally_bootstrap.volumes }}{{ toYaml $mounts_rally_bootstrap.volumes | indent 8 }}{{ end }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,77 @@
{{/*
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.
*/}}
{{- if .Values.manifests.job_db_init }}
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.db_init }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: rally-db-init
spec:
template:
metadata:
labels:
{{ tuple $envAll "rally" "db-init" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec:
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers:
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers:
- name: rally-db-init
image: {{ .Values.images.db_init | quote }}
imagePullPolicy: {{ .Values.images.pull_policy | quote }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.db_init | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
env:
- name: ROOT_DB_CONNECTION
valueFrom:
secretKeyRef:
name: {{ .Values.secrets.oslo_db.admin }}
key: DB_CONNECTION
- name: OPENSTACK_CONFIG_FILE
value: /etc/rally/rally.conf
- name: OPENSTACK_CONFIG_DB_SECTION
value: database
- name: OPENSTACK_CONFIG_DB_KEY
value: connection
command:
- /tmp/db-init.py
volumeMounts:
- name: rally-bin
mountPath: /tmp/db-init.py
subPath: db-init.py
readOnly: true
- name: etcrally
mountPath: /etc/rally
- name: rally-etc
mountPath: /etc/rally/rally.conf
subPath: rally.conf
readOnly: true
volumes:
- name: etcrally
emptyDir: {}
- name: rally-etc
configMap:
name: rally-etc
defaultMode: 0444
- name: rally-bin
configMap:
name: rally-bin
defaultMode: 0555
{{- end }}

View File

@ -0,0 +1,67 @@
{{/*
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 := . }}
{{- $dependencies := .Values.dependencies.ks_endpoints }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: rally-ks-endpoints
spec:
template:
metadata:
labels:
{{ tuple $envAll "rally" "ks-endpoints" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec:
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers:
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers:
{{- range $key1, $osServiceType := tuple "benchmark" }}
{{- range $key2, $osServiceEndPoint := tuple "admin" "internal" "public" }}
- name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }}
image: {{ $envAll.Values.images.ks_endpoints }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.ks_endpoints | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/ks-endpoints.sh
volumeMounts:
- name: ks-endpoints-sh
mountPath: /tmp/ks-endpoints.sh
subPath: ks-endpoints.sh
readOnly: true
env:
{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.admin }}
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }}
- name: OS_SVC_ENDPOINT
value: {{ $osServiceEndPoint }}
- name: OS_SERVICE_NAME
value: {{ tuple $osServiceType $envAll | include "helm-toolkit.endpoints.keystone_endpoint_name_lookup" }}
- name: OS_SERVICE_TYPE
value: {{ $osServiceType }}
- name: OS_SERVICE_ENDPOINT
value: {{ tuple $osServiceType $osServiceEndPoint "api" $envAll | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }}
{{- end }}
{{- end }}
volumes:
- name: ks-endpoints-sh
configMap:
name: rally-bin
defaultMode: 0555

View File

@ -0,0 +1,61 @@
{{/*
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 := . }}
{{- $dependencies := .Values.dependencies.ks_service }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: rally-ks-service
spec:
template:
metadata:
labels:
{{ tuple $envAll "rally" "ks-service" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec:
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers:
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers:
{{- range $key1, $osServiceType := tuple "benchmark" }}
- name: {{ $osServiceType }}-ks-service-registration
image: {{ $envAll.Values.images.ks_service }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.ks_service | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/ks-service.sh
volumeMounts:
- name: ks-service-sh
mountPath: /tmp/ks-service.sh
subPath: ks-service.sh
readOnly: true
env:
{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.admin }}
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }}
- name: OS_SERVICE_NAME
value: {{ tuple $osServiceType $envAll | include "helm-toolkit.endpoints.keystone_endpoint_name_lookup" }}
- name: OS_SERVICE_TYPE
value: {{ $osServiceType }}
{{- end }}
volumes:
- name: ks-service-sh
configMap:
name: rally-bin
defaultMode: 0555

View File

@ -0,0 +1,62 @@
{{/*
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 := . }}
{{- $dependencies := .Values.dependencies.ks_user }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: rally-ks-user
spec:
template:
metadata:
labels:
{{ tuple $envAll "rally" "ks-user" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec:
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers:
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers:
- name: rally-ks-user
image: {{ .Values.images.ks_user }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.ks_user | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/ks-user.sh
volumeMounts:
- name: ks-user-sh
mountPath: /tmp/ks-user.sh
subPath: ks-user.sh
readOnly: true
env:
{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.admin }}
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }}
- name: SERVICE_OS_SERVICE_NAME
value: "rally"
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.user }}
{{- include "helm-toolkit.snippets.keystone_user_create_env_vars" $env | indent 12 }}
{{- end }}
- name: SERVICE_OS_ROLE
value: {{ .Values.endpoints.identity.auth.user.role | quote }}
volumes:
- name: ks-user-sh
configMap:
name: rally-bin
defaultMode: 0555

View File

@ -0,0 +1,65 @@
{{/*
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.
*/}}
{{- if .Values.manifests.job_manage_db }}
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.manage_db }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: rally-manage-db
spec:
template:
metadata:
labels:
{{ tuple $envAll "rally" "manage-db" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec:
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers:
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers:
- name: rally-manage-db
image: {{ .Values.images.manage_db }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.manage_db | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/manage-db.sh
volumeMounts:
- name: rally-bin
mountPath: /tmp/manage-db.sh
subPath: manage-db.sh
readOnly: true
- name: etcrally
mountPath: /etc/rally
- name: rally-etc
mountPath: /etc/rally/rally.conf
subPath: rally.conf
readOnly: true
volumes:
- name: etcrally
emptyDir: {}
- name: rally-etc
configMap:
name: rally-etc
defaultMode: 0444
- name: rally-bin
configMap:
name: rally-bin
defaultMode: 0555
{{- end }}

View File

@ -0,0 +1,103 @@
{{/*
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.
*/}}
{{- if .Values.manifests.job_run_task }}
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.run_task }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: rally-run-task
spec:
template:
metadata:
labels:
{{ tuple $envAll "rally" "run-task" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec:
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers:
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
- name: rally-run-task-init
image: {{ .Values.images.run_task }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.run_task | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext:
runAsUser: 0
command:
- chown
- -R
- "rally:"
- /var/lib/rally/data
volumeMounts:
- name: rally-reports
mountPath: /var/lib/rally/data
containers:
- name: rally-run-task
image: {{ .Values.images.run_task }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.run_task | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/run-task.sh
env:
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }}
- name: ENABLED_TESTS
value: {{ include "helm-toolkit.utils.joinListWithComma" .Values.enabled_tasks }}
volumeMounts:
- name: rally-bin
mountPath: /tmp/run-task.sh
subPath: run-task.sh
readOnly: true
- name: etcrally
mountPath: /etc/rally
- name: rally-etc
mountPath: /etc/rally/rally.conf
subPath: rally.conf
readOnly: true
- name: rally-tasks
mountPath: /tasks/rally
readOnly: true
- name: heat-tasks-test-templates
mountPath: /tmp/tasks/test-templates
readOnly: true
- name: rally-reports
mountPath: /var/lib/rally/data
volumes:
- name: etcrally
emptyDir: {}
- name: rally-etc
configMap:
name: rally-etc
defaultMode: 0444
- name: rally-tasks
configMap:
name: rally-tasks
defaultMode: 0444
- name: rally-bin
configMap:
name: rally-bin
defaultMode: 0555
- name: heat-tasks-test-templates
configMap:
name: heat-tasks-test-templates
- name: rally-reports
persistentVolumeClaim:
claimName: {{ .Values.pvc.name }}
{{- end }}

View File

@ -0,0 +1,29 @@
{{/*
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.
*/}}
{{- if .Values.manifests.pdb_api }}
{{- $envAll := . }}
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: rally-api
spec:
minAvailable: {{ .Values.pod.lifecycle.disruption_budget.rally.min_available }}
selector:
matchLabels:
{{ tuple $envAll "rally" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
{{- end }}

View File

@ -0,0 +1,30 @@
{{/*
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.
*/}}
{{- if .Values.manifests.pvc_rally }}
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ .Values.pvc.name }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.pvc.requests.storage }}
storageClassName: {{ .Values.pvc.storage_class }}
{{- end }}

View File

@ -0,0 +1,30 @@
{{/*
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.
*/}}
{{- if .Values.manifests.secret_db }}
{{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }}
{{- $secretName := index $envAll.Values.secrets.oslo_db $userClass }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
type: Opaque
data:
DB_CONNECTION: {{ tuple "oslo_db" "internal" $userClass "mysql" $envAll | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | b64enc -}}
{{- end }}
{{- end }}

View File

@ -0,0 +1,30 @@
{{/*
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.
*/}}
{{- if .Values.manifests.secret_keystone }}
{{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }}
{{- $secretName := index $envAll.Values.secrets.identity $userClass }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
type: Opaque
data:
{{- tuple $userClass "internal" $envAll | include "helm-toolkit.snippets.keystone_secret_openrc" | indent 2 -}}
{{- end }}
{{- end }}

View File

@ -0,0 +1,32 @@
{{/*
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.
*/}}
{{- if .Values.manifests.service_ingress_api }}
{{- $envAll := . }}
{{- if .Values.network.rally.ingress.public }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ tuple "benchmark" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
spec:
ports:
- name: http
port: 80
selector:
app: ingress-api
{{- end }}
{{- end }}

View File

@ -0,0 +1,36 @@
{{/*
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.
*/}}
{{- if .Values.manifests.service }}
{{- $envAll := . }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ tuple "benchmark" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
spec:
ports:
- name: rally
port: {{ .Values.conf.rally.rally_api.bind_port }}
{{ if .Values.network.rally.node_port.enabled }}
nodePort: .Values.network.rally.node_port.port
{{ end }}
selector:
{{ tuple $envAll "rally" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.rally.node_port.enabled }}
type: NodePort
{{ end }}
{{- end }}

View File

@ -0,0 +1,46 @@
heat_template_version: 2013-05-23
parameters:
flavor:
type: string
default: m1.tiny
constraints:
- custom_constraint: nova.flavor
image:
type: string
default: cirros-0.3.4-x86_64-uec
constraints:
- custom_constraint: glance.image
scaling_adjustment:
type: number
default: 1
max_size:
type: number
default: 5
constraints:
- range: {min: 1}
resources:
asg:
type: OS::Heat::AutoScalingGroup
properties:
resource:
type: OS::Nova::Server
properties:
image: { get_param: image }
flavor: { get_param: flavor }
min_size: 1
desired_capacity: 3
max_size: { get_param: max_size }
scaling_policy:
type: OS::Heat::ScalingPolicy
properties:
adjustment_type: change_in_capacity
auto_scaling_group_id: {get_resource: asg}
scaling_adjustment: { get_param: scaling_adjustment }
outputs:
scaling_url:
value: {get_attr: [scaling_policy, alarm_url]}

View File

@ -0,0 +1,17 @@
heat_template_version: 2013-05-23
resources:
test_group:
type: OS::Heat::AutoScalingGroup
properties:
desired_capacity: 0
max_size: 0
min_size: 0
resource:
type: OS::Heat::RandomString
test_policy:
type: OS::Heat::ScalingPolicy
properties:
adjustment_type: change_in_capacity
auto_scaling_group_id: { get_resource: test_group }
scaling_adjustment: 1

View File

@ -0,0 +1 @@
heat_template_version: 2014-10-16

View File

@ -0,0 +1,13 @@
heat_template_version: 2014-10-16
description: Test template for rally create-update-delete scenario
resources:
test_string_one:
type: OS::Heat::RandomString
properties:
length: 20
test_string_two:
type: OS::Heat::RandomString
properties:
length: 20

View File

@ -0,0 +1,44 @@
heat_template_version: 2014-10-16
description: >
Test template that creates a resource group with servers and volumes.
The template allows to create a lot of nested stacks with standard
configuration: nova instance, cinder volume attached to that instance
parameters:
num_instances:
type: number
description: number of instances that should be created in resource group
constraints:
- range: {min: 1}
instance_image:
type: string
default: cirros-0.3.4-x86_64-uec
instance_volume_size:
type: number
description: Size of volume to attach to instance
default: 1
constraints:
- range: {min: 1, max: 1024}
instance_flavor:
type: string
description: Type of the instance to be created.
default: m1.tiny
instance_availability_zone:
type: string
description: The Availability Zone to launch the instance.
default: nova
resources:
group_of_volumes:
type: OS::Heat::ResourceGroup
properties:
count: {get_param: num_instances}
resource_def:
type: templates/server-with-volume.yaml.template
properties:
image: {get_param: instance_image}
volume_size: {get_param: instance_volume_size}
flavor: {get_param: instance_flavor}
availability_zone: {get_param: instance_availability_zone}

View File

@ -0,0 +1,21 @@
heat_template_version: 2013-05-23
description: Template for testing caching.
parameters:
count:
type: number
default: 40
delay:
type: number
default: 0.1
resources:
rg:
type: OS::Heat::ResourceGroup
properties:
count: {get_param: count}
resource_def:
type: OS::Heat::TestResource
properties:
constraint_prop_secs: {get_param: delay}

View File

@ -0,0 +1,37 @@
heat_template_version: 2013-05-23
parameters:
attr_wait_secs:
type: number
default: 0.5
resources:
rg:
type: OS::Heat::ResourceGroup
properties:
count: 10
resource_def:
type: OS::Heat::TestResource
properties:
attr_wait_secs: {get_param: attr_wait_secs}
outputs:
val1:
value: {get_attr: [rg, resource.0.output]}
val2:
value: {get_attr: [rg, resource.1.output]}
val3:
value: {get_attr: [rg, resource.2.output]}
val4:
value: {get_attr: [rg, resource.3.output]}
val5:
value: {get_attr: [rg, resource.4.output]}
val6:
value: {get_attr: [rg, resource.5.output]}
val7:
value: {get_attr: [rg, resource.6.output]}
val8:
value: {get_attr: [rg, resource.7.output]}
val9:
value: {get_attr: [rg, resource.8.output]}
val10:
value: {get_attr: [rg, resource.9.output]}

View File

@ -0,0 +1,13 @@
heat_template_version: 2014-10-16
description: Test template for rally create-update-delete scenario
resources:
test_group:
type: OS::Heat::ResourceGroup
properties:
count: 2
resource_def:
type: OS::Heat::RandomString
properties:
length: 20

View File

@ -0,0 +1,64 @@
heat_template_version: 2013-05-23
parameters:
# set all correct defaults for parameters before launch test
public_net:
type: string
default: public
image:
type: string
default: cirros-0.3.4-x86_64-uec
flavor:
type: string
default: m1.tiny
cidr:
type: string
default: 11.11.11.0/24
resources:
server:
type: OS::Nova::Server
properties:
image: {get_param: image}
flavor: {get_param: flavor}
networks:
- port: { get_resource: server_port }
router:
type: OS::Neutron::Router
properties:
external_gateway_info:
network: {get_param: public_net}
router_interface:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_resource: router }
subnet_id: { get_resource: private_subnet }
private_net:
type: OS::Neutron::Net
private_subnet:
type: OS::Neutron::Subnet
properties:
network: { get_resource: private_net }
cidr: {get_param: cidr}
port_security_group:
type: OS::Neutron::SecurityGroup
properties:
name: default_port_security_group
description: >
Default security group assigned to port. The neutron default group is not
used because neutron creates several groups with the same name=default and
nova cannot chooses which one should it use.
server_port:
type: OS::Neutron::Port
properties:
network: {get_resource: private_net}
fixed_ips:
- subnet: { get_resource: private_subnet }
security_groups:
- { get_resource: port_security_group }

View File

@ -0,0 +1,39 @@
heat_template_version: 2013-05-23
parameters:
# set all correct defaults for parameters before launch test
image:
type: string
default: cirros-0.3.4-x86_64-uec
flavor:
type: string
default: m1.tiny
availability_zone:
type: string
description: The Availability Zone to launch the instance.
default: nova
volume_size:
type: number
description: Size of the volume to be created.
default: 1
constraints:
- range: { min: 1, max: 1024 }
description: must be between 1 and 1024 Gb.
resources:
server:
type: OS::Nova::Server
properties:
image: {get_param: image}
flavor: {get_param: flavor}
cinder_volume:
type: OS::Cinder::Volume
properties:
size: { get_param: volume_size }
availability_zone: { get_param: availability_zone }
volume_attachment:
type: OS::Cinder::VolumeAttachment
properties:
volume_id: { get_resource: cinder_volume }
instance_uuid: { get_resource: server}
mountpoint: /dev/vdc

View File

@ -0,0 +1,23 @@
heat_template_version: 2013-05-23
description: >
Test template for create-update-delete-stack scenario in rally.
The template updates resource parameters without resource re-creation(replacement)
in the stack defined by autoscaling_policy.yaml.template. It allows to measure
performance of "pure" resource update operation only.
resources:
test_group:
type: OS::Heat::AutoScalingGroup
properties:
desired_capacity: 0
max_size: 0
min_size: 0
resource:
type: OS::Heat::RandomString
test_policy:
type: OS::Heat::ScalingPolicy
properties:
adjustment_type: change_in_capacity
auto_scaling_group_id: { get_resource: test_group }
scaling_adjustment: -1

View File

@ -0,0 +1,19 @@
heat_template_version: 2014-10-16
description: >
Test template for create-update-delete-stack scenario in rally.
The template updates the stack defined by random-strings.yaml.template with additional resource.
resources:
test_string_one:
type: OS::Heat::RandomString
properties:
length: 20
test_string_two:
type: OS::Heat::RandomString
properties:
length: 20
test_string_three:
type: OS::Heat::RandomString
properties:
length: 20

View File

@ -0,0 +1,11 @@
heat_template_version: 2014-10-16
description: >
Test template for create-update-delete-stack scenario in rally.
The template deletes one resource from the stack defined by random-strings.yaml.template.
resources:
test_string_one:
type: OS::Heat::RandomString
properties:
length: 20

View File

@ -0,0 +1,19 @@
heat_template_version: 2014-10-16
description: >
Test template for create-update-delete-stack scenario in rally.
The template deletes one resource from the stack defined by
random-strings.yaml.template and re-creates it with the updated parameters
(so-called update-replace). That happens because some parameters cannot be
changed without resource re-creation. The template allows to measure performance
of update-replace operation.
resources:
test_string_one:
type: OS::Heat::RandomString
properties:
length: 20
test_string_two:
type: OS::Heat::RandomString
properties:
length: 40

View File

@ -0,0 +1,16 @@
heat_template_version: 2014-10-16
description: >
Test template for create-update-delete-stack scenario in rally.
The template updates one resource from the stack defined by resource-group.yaml.template
and adds children resources to that resource.
resources:
test_group:
type: OS::Heat::ResourceGroup
properties:
count: 3
resource_def:
type: OS::Heat::RandomString
properties:
length: 20

View File

@ -0,0 +1,16 @@
heat_template_version: 2014-10-16
description: >
Test template for create-update-delete-stack scenario in rally.
The template updates one resource from the stack defined by resource-group.yaml.template
and deletes children resources from that resource.
resources:
test_group:
type: OS::Heat::ResourceGroup
properties:
count: 1
resource_def:
type: OS::Heat::RandomString
properties:
length: 20

12514
rally/values.yaml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -125,4 +125,9 @@ $OPENSTACK hypervisor list > ${LOGS_DIR}/openstack/hypervisor.txt
$OPENSTACK hypervisor show $(hostname) > ${LOGS_DIR}/openstack/hypervisor-$(hostname).txt
$OPENSTACK network agent list > ${LOGS_DIR}/openstack/network_agent.txt
if [ "x$RALLY_CHART_ENABLED" == "xtrue" ]; then
mkdir -p ${LOGS_DIR}/openstack/rally
kubectl -n openstack logs $(kubectl -n openstack get pods -l job-name=rally-run-task --no-headers --output=name --show-all | awk -F '/' '{ print $NF; exit 0 }') > ${LOGS_DIR}/openstack/rally/rally_results.log
fi
exit $1

View File

@ -0,0 +1,31 @@
apiVersion: batch/v1
kind: Job
metadata:
labels:
version: v0.1.0
name: get-rally-data
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: get-rally-data
image: docker.io/alpine:latest
imagePullPolicy: Always
command:
- /bin/sh
- -ec
- |
cp -av /mnt/rally-pvc/* /mnt/rally-data
volumeMounts:
- name: pvc-rally
mountPath: /mnt/rally-pvc
- name: rally-data
mountPath: /mnt/rally-data
volumes:
- name: pvc-rally
persistentVolumeClaim:
claimName: pvc-rally
- name: rally-data
hostPath:
path: /tmp/rally-data

View File

@ -148,6 +148,15 @@ if [ "x$SDN_PLUGIN" == "xovs" ]; then
fi
kube_wait_for_pods openstack ${POD_START_TIMEOUT_OPENSTACK}
if [ "x$INTEGRATION" == "xmulti" ] || [ "x$RALLY_CHART_ENABLED" == "xtrue" ]; then
if [ "x$PVC_BACKEND" != "xceph" ]; then
helm install --namespace=openstack ${WORK_DIR}/cinder --name=cinder \
--values=${WORK_DIR}/tools/overrides/mvp/cinder.yaml
else
helm install --namespace=openstack ${WORK_DIR}/cinder --name=cinder
fi
fi
if [ "x$PVC_BACKEND" == "xceph" ] && [ "x$SDN_PLUGIN" == "xovs" ]; then
helm install --namespace=openstack ${WORK_DIR}/nova --name=nova \
--set conf.nova.libvirt.virt_type=qemu
@ -186,12 +195,6 @@ helm install --namespace=openstack ${WORK_DIR}/heat --name=heat
kube_wait_for_pods openstack ${POD_START_TIMEOUT_OPENSTACK}
if [ "x$INTEGRATION" == "xmulti" ]; then
if [ "x$PVC_BACKEND" == "xceph" ]; then
helm install --namespace=openstack ${WORK_DIR}/cinder --name=cinder
else
helm install --namespace=openstack ${WORK_DIR}/cinder --name=cinder \
--values=${WORK_DIR}/tools/overrides/mvp/cinder.yaml
fi
helm install --namespace=openstack ${WORK_DIR}/horizon --name=horizon
kube_wait_for_pods openstack ${POD_START_TIMEOUT_OPENSTACK}
@ -211,3 +214,12 @@ if [ "x$INTEGRATION" == "xmulti" ]; then
helm_test_deployment nova ${SERVICE_TEST_TIMEOUT}
helm_test_deployment barbican ${SERVICE_TEST_TIMEOUT} norally
fi
if [ "x$RALLY_CHART_ENABLED" == "xtrue" ]; then
helm install --namespace=openstack ${WORK_DIR}/magnum --name=magnum
helm install --namespace=openstack ${WORK_DIR}/senlin --name=senlin
kube_wait_for_pods openstack ${POD_START_TIMEOUT_OPENSTACK}
helm install --namespace=openstack ${WORK_DIR}/rally --name=rally
kube_wait_for_pods openstack 28800
fi

View File

@ -84,7 +84,7 @@ else
if ! [ "x$INTEGRATION_TYPE" == "x" ]; then
# Run Basic Full Stack Tests
if [ "x$INTEGRATION" == "xaio" ]; then
if [ "x$INTEGRATION" == "xaio" ] && [ "x$RALLY_CHART_ENABLED" == "xfalse" ]; then
bash ${WORK_DIR}/tools/gate/openstack/network_launch.sh
bash ${WORK_DIR}/tools/gate/openstack/vm_cli_launch.sh
bash ${WORK_DIR}/tools/gate/openstack/vm_heat_launch.sh

View File

@ -98,3 +98,4 @@ export OSH_PUB_NET_STACK=${OSH_PUB_NET_STACK:="heat-public-net-deployment"}
export OSH_SUBNET_POOL_STACK=${OSH_SUBNET_POOL_STACK:="heat-subnet-pool-deployment"}
export OSH_BASIC_VM_STACK=${OSH_BASIC_VM_STACK:="heat-basic-vm-deployment"}
export OSH_VM_KEY_STACK=${OSH_VM_KEY_STACK:="heat-vm-key"}
export RALLY_CHART_ENABLED=${RALLY_CHART_ENABLED:="false"}