Keystone validate_ceilometer scenario via plugin

Inital attempt to validate keystone tokens via ceilometer client.

Change-Id: I448382fbdba5d8e01f070f9463a1e08458415a5f
This commit is contained in:
Alex Krzos 2016-06-28 15:36:46 -04:00
parent ff256afd36
commit a6bc8a887e
3 changed files with 112 additions and 0 deletions

55
browbeat-ceilometer.yaml Normal file
View File

@ -0,0 +1,55 @@
# Basic set of initial stress tests to test overcloud before running complete set of benchmarks.
browbeat:
results : results/
rerun: 1
cloud_name: openstack
elasticsearch:
enabled: false
host: 1.1.1.1
port: 9200
metadata_files:
- name: hardware-metadata
file: metadata/hardware-metadata.json
- name: environment-metadata
file: metadata/environment-metadata.json
- name: software-metadata
file: metadata/software-metadata.json
ansible:
hosts: ansible/hosts
adjust:
keystone_token: ansible/browbeat/adjustment-keystone-token.yml
neutron_l3: ansible/browbeat/adjustment-l3.yml
nova_db: ansible/browbeat/adjustment-db.yml
workers: ansible/browbeat/adjustment-workers.yml
grafana_snapshot: ansible/browbeat/snapshot-general-performance-dashboard.yml
connmon:
enabled: false
sudo: true
grafana:
enabled: true
grafana_ip: 1.1.1.1
grafana_port: 3000
dashboards:
- openstack-general-system-performance
snapshot:
enabled: false
snapshot_compute: false
rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
plugins:
- netcreate-boot: rally/rally-plugins/netcreate-boot
- subnet-router-create: rally/rally-plugins/subnet-router-create
- validate-ceilometer: rally/rally-plugins/validate-ceilometer
benchmarks:
- name: plugins
enabled: true
concurrency:
- 2
times: 6
scenarios:
- name: validate-ceilometer
enabled: true
file: rally/rally-plugins/validate-ceilometer/validate-ceilometer.yml

View File

@ -0,0 +1,32 @@
# 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.
from rally.plugins.openstack import scenario
from rally.task import atomic
from rally.task import validation
class KeystonePlugin(scenario.OpenStackScenario):
@validation.number("repetitions", minval=1)
@validation.required_openstack(users=True)
@scenario.configure()
def validate_ceilometer(self, repetitions):
"""Check Ceilometer Client to ensure validation of token.
Creation of the client does not ensure validation of the token.
We have to do some minimal operation to make sure token gets validated.
:param repetitions: number of times to validate
"""
ceilometer_client = self.clients("ceilometer")
with atomic.ActionTimer(self, "authenticate.validate_ceilometer_%s_times" %
repetitions):
for i in range(repetitions):
ceilometer_client.meters.list()

View File

@ -0,0 +1,25 @@
{% set repetitions = repetitions or 2 %}
{% set sla_max_avg_duration = sla_max_avg_duration or 60 %}
{% set sla_max_failure = sla_max_failure or 0 %}
{% set sla_max_seconds = sla_max_seconds or 60 %}
---
KeystonePlugin.validate_ceilometer:
-
args:
repetitions: {{repetitions}}
runner:
concurrency: {{concurrency}}
times: {{times}}
type: "constant"
context:
users:
project_domain: "default"
resource_management_workers: 30
tenants: 1
user_domain: "default"
users_per_tenant: 8
sla:
max_avg_duration: {{sla_max_avg_duration}}
max_seconds_per_iteration: {{sla_max_seconds}}
failure_rate:
max: {{sla_max_failure}}