Skip to content
Permalink
Browse files

Benchmark undercloud

Now we have the option to benchmark both undercloud and overcloud by setting rally_benchmark variable in browbeat-config.yaml

Change-Id: Id04bc9b6b24dfc8a0d8216b6c3596422567cce95
  • Loading branch information
asyedham committed Feb 12, 2020
1 parent 8dcac2c commit 26bab04c727691b7a3440ac2fec3457bceca45ec
@@ -18,6 +18,12 @@ tripleo: true
home_dir: "/home/{{browbeat_user}}"
browbeat_path: "{{home_dir}}/browbeat"

# Creates rally deployment Undercloud
rally_undercloud_enabled: true

# The Undercloud RC file
stackrc: "{{home_dir}}/stackrc"

# The Overcloud RC file
overcloudrc: "{{home_dir}}/overcloudrc"

@@ -39,14 +39,45 @@
- name: Setup rally database
shell: . {{ rally_venv }}/bin/activate; rally db recreate

- name: Setup rally deployment
- block:
- name: copy of stackrc
copy:
src: "{{ stackrc }}"
dest: "{{home_dir}}/undercloudrc"

- name: Get the OS_AUTH_URL value in stackrc
shell: cat undercloudrc | grep OS_AUTH_URL=
register: os_auth_url

- name: Add v3 to OS_AUTH_URL in stackrc
replace:
path: "{{home_dir}}/undercloudrc"
regexp: "{{ os_auth_url.stdout }}"
replace: '{{ os_auth_url.stdout }}/v3'

- name: Setup rally deployment for undercloud
shell: . {{ rally_venv }}/bin/activate; . "{{home_dir}}/undercloudrc"; rally deployment create --fromenv --name undercloud

- name: Check Rally deployment for undercloud
shell: . {{ rally_venv }}/bin/activate; . "{{home_dir}}/undercloudrc"; rally deployment check
register: rally_deployment_check_undercloud

- name: Fail if Rally deployment cannot be verfied on undercloud
fail:
msg: "Failed to verify that your deployment is ready to benchmark"
when: rally_deployment_check_undercloud.rc != 0

when: rally_undercloud_enabled

- name: Setup rally deployment for overcloud
shell: . {{ rally_venv }}/bin/activate; . {{ overcloudrc }}; rally deployment create --fromenv --name overcloud

- name: Check Rally deployment
- name: Check Rally deployment for overcloud
shell: . {{ rally_venv }}/bin/activate; . {{ overcloudrc }}; rally deployment check
register: rally_deployment_check
register: rally_deployment_check_overcloud

- name: Fail if Rally deployment cannot be verfied
- name: Fail if Rally deployment cannot be verfied for overcloud
fail:
msg: "Failed to verify that your deployment is ready to benchmark"
when: rally_deployment_check.rc != 0
when: rally_deployment_check_overcloud.rc != 0

@@ -51,6 +51,7 @@ workloads:
- name: authenticate
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 64
- 128
@@ -83,6 +84,7 @@ workloads:
- name: cinder
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 16
- 32
@@ -105,6 +107,7 @@ workloads:
- name: keystonebasic
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 256
times: 5000
@@ -122,6 +125,7 @@ workloads:
- name: neutron
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 16
- 32
@@ -157,6 +161,7 @@ workloads:
- name: nova
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 16
- 32
@@ -200,6 +205,7 @@ workloads:
- name: glance
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 8
times: 10
@@ -225,6 +231,7 @@ workloads:
- name: plugins
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 16
- 32
@@ -81,6 +81,7 @@ workloads:
- name: authenticate
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 8
times: 100
@@ -98,6 +99,7 @@ workloads:
- name: cinder
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 2
times: 10
@@ -111,6 +113,7 @@ workloads:
- name: keystonebasic
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 8
times: 100
@@ -125,6 +128,7 @@ workloads:
- name: neutron
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 2
times: 10
@@ -171,6 +175,7 @@ workloads:
- name: nova
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 2
times: 10
@@ -210,6 +215,7 @@ workloads:
- name: glance
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 2
times: 10
@@ -224,6 +230,7 @@ workloads:
- name: octavia
enabled: false
type: rally
rally_deployment: overcloud
concurrency:
- 2
times: 10
@@ -268,6 +275,7 @@ workloads:
- name: simple-plugins
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 8
times: 10
@@ -312,6 +320,7 @@ workloads:
- name: plugin-workloads
enabled: false
type: rally
rally_deployment: overcloud
concurrency:
- 1
times: 1
@@ -21,6 +21,9 @@ mapping:
type: str
required: True
enum: ["rally"]
rally_deployment:
type: str
required: False
scenarios:
type: seq
sequence:
@@ -216,6 +216,7 @@ def run_workload(self, workload, run_iteration):
self.update_total_scenarios()
scenario_name = scenario["name"]
scenario_file = scenario["file"]

del scenario["enabled"]
del scenario["file"]
del scenario["name"]
@@ -237,9 +238,31 @@ def run_workload(self, workload, run_iteration):
del scenario["concurrency"]
else:
concurrencies = def_concurrencies

if "times" not in scenario:
scenario["times"] = def_times

if "rally_deployment" in scenario:
_rally_deployment = scenario["rally_deployment"]
elif "rally_deployment" in workload:
scenario["rally_deployment"] = workload["rally_deployment"]
_rally_deployment = scenario["rally_deployment"]
else:
_rally_deployment = 'overcloud'
self.logger.info("Default rally deployment {} in use.".format(_rally_deployment))

rally_deployments = ['undercloud', 'overcloud']
if _rally_deployment in rally_deployments:
cmd = "source {}; ".format(get_workload_venv('rally', True))
cmd += "rally deployment use {}".format(_rally_deployment)
cmd_stdout = self.tools.run_cmd(cmd)['stdout']
if cmd_stdout == "Deployment {} is not found.".format(_rally_deployment):
self.logger.error("Rally deployment {} is not found.".format(_rally_deployment))
exit(1)
else:
self.logger.error("Wrong rally benchmark name specified.")
continue

concurrency_count_dict = collections.Counter()
for concurrency in concurrencies:
scenario["concurrency"] = concurrency
@@ -45,6 +45,7 @@ workloads:
- name: browbeat-test-authenticate
enabled: false
type: rally
rally_deployment: underclouud
concurrency:
- 1
times: 1
@@ -41,7 +41,7 @@ shaker:
external_host: 2.2.2.2

workloads:
# Missing name
# Missing name for workload
- enabled: false
type: rally
concurrency:
@@ -5,6 +5,25 @@ rally:
name: valid-test-authenticate-01
enabled: true
type: rally
rally_deployment: overcloud
concurrency:
- 1
times: 1
scenarios:
- name: valid-test-authentic-keystone
enabled: true
file: rally/authenticate/keystone-cc.yml
- name: valid-test-authentic-neutron
enabled: false
file: rally/authenticate/validate_neutron-cc.yml
- name: valid-test-authentic-octavia
enabled: true
file: rally/authenticate/validate_octavia-cc.yml
- valid: true
data:
name: valid-test-authenticate-02
enabled: true
type: rally
concurrency:
- 1
times: 1
@@ -23,6 +42,7 @@ rally:
name: invalid-test-authenticate-01
enabled: true
type: rally-incorrect
rally_deployment: 1
concurrency:
- 1
times: 1

0 comments on commit 26bab04

Please sign in to comment.
You can’t perform that action at this time.