123 lines
3.3 KiB
YAML
123 lines
3.3 KiB
YAML
title: OMSimulator
|
|
|
|
description:
|
|
This scenario uses oslo.messaging simulator tool to execute MQ test plan.
|
|
|
|
parameters:
|
|
tester_hosts: List of hosts were omsimulator will be executed
|
|
rabbit_hosts: List of hosts were RabbitMQ runs
|
|
rabbit_url: RabbitMQ address
|
|
client_url: Override RabbitMQ address for the client
|
|
server_url: Override RabbitMQ address for the server
|
|
|
|
setup:
|
|
-
|
|
hosts: {{ tester_hosts }}
|
|
tasks:
|
|
- apt: name=git
|
|
become: yes
|
|
- apt: name=daemon
|
|
become: yes
|
|
- name: installing omsimulator
|
|
git: repo=git://git.openstack.org/openstack/oslo.messaging
|
|
dest=/tmp/performa/oslo.messaging
|
|
- apt: name=python-dev
|
|
become: yes
|
|
- apt: name=python-pip
|
|
become: yes
|
|
- pip: name=virtualenv
|
|
become: yes
|
|
- pip: requirements=/tmp/performa/oslo.messaging/requirements.txt virtualenv=/tmp/performa/oslo.messaging/.venv
|
|
- pip: name=eventlet virtualenv=/tmp/performa/oslo.messaging/.venv
|
|
- command: /tmp/performa/oslo.messaging/.venv/bin/python setup.py install
|
|
args:
|
|
chdir: /tmp/performa/oslo.messaging
|
|
-
|
|
hosts: {{ rabbit_hosts }}
|
|
tasks:
|
|
- apt: name=atop
|
|
become: yes
|
|
- apt: name=daemon
|
|
become: yes
|
|
|
|
|
|
execution:
|
|
-
|
|
hosts: {{ rabbit_hosts }}
|
|
tasks:
|
|
- atop: command=start
|
|
-
|
|
hosts: {{ tester_hosts }}
|
|
matrix:
|
|
threads: [ 1, 2, 5, 10, 20, 50 ]
|
|
tasks:
|
|
- omsimulator:
|
|
mode: call
|
|
duration: 100
|
|
url: {{ rabbit_url }}
|
|
client_url: {{ client_url }}
|
|
server_url: {{ server_url }}
|
|
-
|
|
hosts: {{ tester_hosts }}
|
|
matrix:
|
|
threads: [ 1, 2, 5, 10, 20, 50 ]
|
|
tasks:
|
|
- omsimulator:
|
|
mode: cast
|
|
duration: 100
|
|
url: {{ rabbit_url }}
|
|
client_url: {{ client_url }}
|
|
server_url: {{ server_url }}
|
|
-
|
|
hosts: {{ tester_hosts }}
|
|
matrix:
|
|
threads: [ 1, 2, 5, 10, 20, 50 ]
|
|
tasks:
|
|
- omsimulator:
|
|
mode: notify
|
|
duration: 100
|
|
url: {{ rabbit_url }}
|
|
client_url: {{ client_url }}
|
|
server_url: {{ server_url }}
|
|
-
|
|
hosts: {{ rabbit_hosts }}
|
|
tasks:
|
|
- atop:
|
|
command: stop
|
|
labels: [ PRC ]
|
|
|
|
aggregation:
|
|
-
|
|
update:
|
|
query:
|
|
{ task: omsimulator }
|
|
values:
|
|
pipeline:
|
|
- $match: { task: atop, status: OK, label: PRC, name: { $regex: beam.* }, host: {{ rabbit_hosts[0] }} }
|
|
- $group: { _id: null, rabbit_sys_0: { $avg: "$sys" }, rabbit_user_0: { $avg: "$user" }, rabbit_total_0: { $avg: { $add: [ "$sys", "$user" ] }} }
|
|
|
|
{% if rabbit_hosts[1] %}
|
|
-
|
|
update:
|
|
query:
|
|
{ task: omsimulator }
|
|
values:
|
|
pipeline:
|
|
- $match: { task: atop, status: OK, label: PRC, name: { $regex: beam.* }, host: {{ rabbit_hosts[1] }} }
|
|
- $group: { _id: null, rabbit_sys_1: { $avg: "$sys" }, rabbit_user_1: { $avg: "$user" }, rabbit_total_1: { $avg: { $add: [ "$sys", "$user" ] }} }
|
|
{% endif %}
|
|
|
|
{% if rabbit_hosts[2] %}
|
|
-
|
|
update:
|
|
query:
|
|
{ task: omsimulator }
|
|
values:
|
|
pipeline:
|
|
- $match: { task: atop, status: OK, label: PRC, name: { $regex: beam.* }, host: {{ rabbit_hosts[2] }} }
|
|
- $group: { _id: null, rabbit_sys_2: { $avg: "$sys" }, rabbit_user_2: { $avg: "$user" }, rabbit_total_2: { $avg: { $add: [ "$sys", "$user" ] }} }
|
|
{% endif %}
|
|
|
|
report:
|
|
template: omsimulator.rst
|