From d7cb4cad0c472a56b235b17f4dea15ec1da3b457 Mon Sep 17 00:00:00 2001 From: Sergey Skripnick Date: Fri, 1 Aug 2014 16:09:58 +0300 Subject: [PATCH] Add config file for performance gate job This job is called gate-rally-dsvm-fakevirt-heat. Also added readme and plugin sample. Change-Id: Ic4f482e566f3552b3fdf7129b8447e7def036441 --- rally-scenarios/README.rst | 13 +++++++++ rally-scenarios/extra/README.rst | 2 ++ rally-scenarios/heat-fakevirt.yaml | 22 +++++++++++++++ rally-scenarios/plugins/sample_plugin.py | 36 ++++++++++++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 rally-scenarios/README.rst create mode 100644 rally-scenarios/extra/README.rst create mode 100644 rally-scenarios/heat-fakevirt.yaml create mode 100644 rally-scenarios/plugins/sample_plugin.py diff --git a/rally-scenarios/README.rst b/rally-scenarios/README.rst new file mode 100644 index 0000000000..40512c9f12 --- /dev/null +++ b/rally-scenarios/README.rst @@ -0,0 +1,13 @@ +This directory contains rally benchmark scenarios to be run by OpenStack CI. + +Structure: +* heat.yaml is rally task that will be run in gates +* plugins - directory where you can add rally plugins. So you don't need + to merge benchmark in scenarios in rally to be able to run them in heat. +* extra - all files from this directory will be copied to gates, so you will + be able to use absolute path in rally tasks. Files will be in ~/.rally/extra/* + + +* more about rally: https://wiki.openstack.org/wiki/Rally +* how to add rally-gates: https://wiki.openstack.org/wiki/Rally/RallyGates +* how to write plugins https://rally.readthedocs.org/en/latest/plugins.html diff --git a/rally-scenarios/extra/README.rst b/rally-scenarios/extra/README.rst new file mode 100644 index 0000000000..cc6500cc44 --- /dev/null +++ b/rally-scenarios/extra/README.rst @@ -0,0 +1,2 @@ +All files from this directory will be copied to gates, so you will be able +to use absolute path in rally tasks. Files will be in ~/.rally/extra/* diff --git a/rally-scenarios/heat-fakevirt.yaml b/rally-scenarios/heat-fakevirt.yaml new file mode 100644 index 0000000000..a827224f89 --- /dev/null +++ b/rally-scenarios/heat-fakevirt.yaml @@ -0,0 +1,22 @@ +--- + HeatStacks.create_and_list_stack: + - + runner: + type: "constant" + times: 2000 + concurrency: 20 + context: + users: + tenants: 30 + users_per_tenant: 1 + + HeatStacks.create_and_delete_stack: + - + runner: + type: "constant" + times: 200 + concurrency: 20 + context: + users: + tenants: 10 + users_per_tenant: 3 diff --git a/rally-scenarios/plugins/sample_plugin.py b/rally-scenarios/plugins/sample_plugin.py new file mode 100644 index 0000000000..ac99796fa0 --- /dev/null +++ b/rally-scenarios/plugins/sample_plugin.py @@ -0,0 +1,36 @@ +# Copyright 2014 Mirantis Inc. +# All Rights Reserved. +# +# 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. + +"""Sample plugin for Heat. + +For more Heat related benchmarks take a look here: +http://github.com/stackforge/rally/blob/master/rally/benchmark/scenarios/heat/ + +About plugins: https://rally.readthedocs.org/en/latest/plugins.html + +Rally concepts https://wiki.openstack.org/wiki/Rally/Concepts +""" + + +from rally.benchmark.scenarios import base + + +class HeatPlugin(base.Scenario): + + @base.scenario(context={"cleanup": ["heat"]}) + def list_benchmark(self, container_format, + image_location, disk_format, **kwargs): + """Get heatclient and do whatever.""" + stacks = list(self.clients("heat").stacks.list())