Add some rally scenarios

This change adds configuration directory for rally.

Implements blueprint rally-gate-check

Change-Id: I49ed3025bb90355b851526af9b5a469c7c84fdc9
This commit is contained in:
Mehdi Abaakouk 2014-11-04 11:49:43 +01:00
parent 4ec5d4dd9d
commit e6e36815b2
6 changed files with 284 additions and 0 deletions

29
rally-jobs/README.rst Normal file
View File

@ -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

213
rally-jobs/ceilometer.yaml Normal file
View File

@ -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

View File

@ -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/*

View File

View File

@ -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.

View File

@ -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