From e6e36815b201f0aa5a84facd63f58141bdba3a92 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Tue, 4 Nov 2014 11:49:43 +0100 Subject: [PATCH] Add some rally scenarios This change adds configuration directory for rally. Implements blueprint rally-gate-check Change-Id: I49ed3025bb90355b851526af9b5a469c7c84fdc9 --- rally-jobs/README.rst | 29 ++++ rally-jobs/ceilometer.yaml | 213 ++++++++++++++++++++++++++++ rally-jobs/extra/README.rst | 6 + rally-jobs/extra/fake.img | 0 rally-jobs/plugins/README.rst | 9 ++ rally-jobs/plugins/plugin_sample.py | 27 ++++ 6 files changed, 284 insertions(+) create mode 100644 rally-jobs/README.rst create mode 100644 rally-jobs/ceilometer.yaml create mode 100644 rally-jobs/extra/README.rst create mode 100644 rally-jobs/extra/fake.img create mode 100644 rally-jobs/plugins/README.rst create mode 100644 rally-jobs/plugins/plugin_sample.py diff --git a/rally-jobs/README.rst b/rally-jobs/README.rst new file mode 100644 index 000000000..5531b764d --- /dev/null +++ b/rally-jobs/README.rst @@ -0,0 +1,29 @@ +Rally job related files +======================= + +This directory contains rally tasks and plugins that are run by OpenStack CI. + +Structure +--------- + +* plugins - directory where you can add rally plugins. Almost everything in + Rally is a plugin. Benchmark context, Benchmark scenario, SLA checks, Generic + cleanup resources, .... + +* extra - all files from this directory will be copy pasted to gates, so you + are able to use absolute paths in rally tasks. + Files will be located in ~/.rally/extra/* + +* ceilometer is a task that is run in gates against Ceilometer + + +Useful links +------------ + +* More about Rally: https://rally.readthedocs.org/en/latest/ + +* How to add rally-gates: https://rally.readthedocs.org/en/latest/rally_gatejob.html + +* About plugins: https://rally.readthedocs.org/en/latest/plugins.html + +* Plugin samples: https://github.com/stackforge/rally/tree/master/doc/samples/plugins diff --git a/rally-jobs/ceilometer.yaml b/rally-jobs/ceilometer.yaml new file mode 100644 index 000000000..059a8a697 --- /dev/null +++ b/rally-jobs/ceilometer.yaml @@ -0,0 +1,213 @@ +--- + + CeilometerAlarms.create_alarm: + - + args: + meter_name: "ram_util" + threshold: 10.0 + type: "threshold" + statistic: "avg" + alarm_actions: ["http://localhost:8776/alarm"] + ok_actions: ["http://localhost:8776/ok"] + insufficient_data_actions: ["http://localhost:8776/notok"] + runner: + type: "constant" + times: 10 + concurrency: 10 + context: + users: + tenants: 1 + users_per_tenant: 1 + sla: + max_failure_percent: 0 + + CeilometerAlarms.create_and_delete_alarm: + - + args: + meter_name: "ram_util" + threshold: 10.0 + type: "threshold" + statistic: "avg" + alarm_actions: ["http://localhost:8776/alarm"] + ok_actions: ["http://localhost:8776/ok"] + insufficient_data_actions: ["http://localhost:8776/notok"] + runner: + type: "constant" + times: 10 + concurrency: 10 + context: + users: + tenants: 1 + users_per_tenant: 1 + sla: + max_failure_percent: 0 + + CeilometerAlarms.create_and_list_alarm: + - + args: + meter_name: "ram_util" + threshold: 10.0 + type: "threshold" + statistic: "avg" + alarm_actions: ["http://localhost:8776/alarm"] + ok_actions: ["http://localhost:8776/ok"] + insufficient_data_actions: ["http://localhost:8776/notok"] + runner: + type: "constant" + times: 10 + concurrency: 10 + context: + users: + tenants: 1 + users_per_tenant: 1 + sla: + max_failure_percent: 0 + + CeilometerAlarms.create_and_update_alarm: + - + args: + meter_name: "ram_util" + threshold: 10.0 + type: "threshold" + statistic: "avg" + alarm_actions: ["http://localhost:8776/alarm"] + ok_actions: ["http://localhost:8776/ok"] + insufficient_data_actions: ["http://localhost:8776/notok"] + runner: + type: "constant" + times: 10 + concurrency: 10 + context: + users: + tenants: 1 + users_per_tenant: 1 + sla: + max_failure_percent: 0 + + CeilometerAlarms.list_alarms: + - + runner: + type: "constant" + times: 10 + concurrency: 10 + context: + users: + tenants: 1 + users_per_tenant: 1 + sla: + max_failure_percent: 0 + + CeilometerMeters.list_meters: + - + runner: + type: "constant" + times: 10 + concurrency: 10 + context: + users: + tenants: 1 + users_per_tenant: 1 + sla: + max_failure_percent: 0 + + CeilometerResource.list_resources: + - + runner: + type: "constant" + times: 10 + concurrency: 10 + context: + users: + tenants: 1 + users_per_tenant: 1 + sla: + max_failure_percent: 0 + + CeilometerStats.create_meter_and_get_stats: + - + args: + user_id: "user-id" + resource_id: "resource-id" + counter_volume: 1.0 + counter_unit: "" + counter_type: "cumulative" + runner: + type: "constant" + times: 20 + concurrency: 10 + context: + users: + tenants: 1 + users_per_tenant: 1 + sla: + max_failure_percent: 0 + + CeilometerQueries.create_and_query_alarms: + - + args: + filter: {"and": [{"!=": {"state": "dummy_state"}},{"=": {"type": "threshold"}}]} + orderby: !!null + limit: 10 + meter_name: "ram_util" + threshold: 10.0 + type: "threshold" + statistic: "avg" + alarm_actions: ["http://localhost:8776/alarm"] + ok_actions: ["http://localhost:8776/ok"] + insufficient_data_actions: ["http://localhost:8776/notok"] + runner: + type: "constant" + times: 20 + concurrency: 10 + context: + users: + tenants: 1 + users_per_tenant: 1 + sla: + max_failure_percent: 0 + + CeilometerQueries.create_and_query_alarm_history: + - + args: + orderby: !!null + limit: !!null + meter_name: "ram_util" + threshold: 10.0 + type: "threshold" + statistic: "avg" + alarm_actions: ["http://localhost:8776/alarm"] + ok_actions: ["http://localhost:8776/ok"] + insufficient_data_actions: ["http://localhost:8776/notok"] + runner: + type: "constant" + times: 20 + concurrency: 10 + context: + users: + tenants: 1 + users_per_tenant: 1 + sla: + max_failure_percent: 0 + + CeilometerQueries.create_and_query_samples: + - + args: + filter: {"=": {"counter_unit": "instance"}} + orderby: !!null + limit: 10 + counter_name: "cpu_util" + counter_type: "gauge" + counter_unit: "instance" + counter_volume: "1.0" + resource_id: "resource_id" + runner: + type: "constant" + times: 20 + concurrency: 10 + context: + users: + tenants: 1 + users_per_tenant: 1 + sla: + max_failure_percent: 0 + diff --git a/rally-jobs/extra/README.rst b/rally-jobs/extra/README.rst new file mode 100644 index 000000000..aab343c51 --- /dev/null +++ b/rally-jobs/extra/README.rst @@ -0,0 +1,6 @@ +Extra files +=========== + +All files from this directory will be copy pasted to gates, so you are able to +use absolute path in rally tasks. Files will be in ~/.rally/extra/* + diff --git a/rally-jobs/extra/fake.img b/rally-jobs/extra/fake.img new file mode 100644 index 000000000..e69de29bb diff --git a/rally-jobs/plugins/README.rst b/rally-jobs/plugins/README.rst new file mode 100644 index 000000000..33bec0d25 --- /dev/null +++ b/rally-jobs/plugins/README.rst @@ -0,0 +1,9 @@ +Rally plugins +============= + +All *.py modules from this directory will be auto-loaded by Rally and all +plugins will be discoverable. There is no need of any extra configuration +and there is no difference between writing them here and in rally code base. + +Note that it is better to push all interesting and useful benchmarks to Rally +code base, this simplifies administration for Operators. diff --git a/rally-jobs/plugins/plugin_sample.py b/rally-jobs/plugins/plugin_sample.py new file mode 100644 index 000000000..e69eee396 --- /dev/null +++ b/rally-jobs/plugins/plugin_sample.py @@ -0,0 +1,27 @@ +# 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 of plugin for Ceilometer. + +For more Ceilometer related benchmarks take a look here: +github.com/stackforge/rally/blob/master/rally/benchmark/scenarios/ceilometer/ + +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 CeilometerPlugin(base.Scenario): + pass