Remove hardcoded references to overcloud credentials

1. Make overcloud credentials a configurable parameter in browbeat
configuration

2. Make venv format consistent in browbeat configuration

Change-Id: I2fa05725c89e1bdb9487af70567efaf8ff19bd34
This commit is contained in:
Sai Sindhur Malleni 2017-06-13 11:26:39 -04:00
parent 2dd7fe17d1
commit 8d11344b4b
21 changed files with 51 additions and 27 deletions

View File

@ -2,6 +2,7 @@ browbeat:
results : results/ results : results/
rerun: 3 rerun: 3
cloud_name: {{ browbeat_cloud_name }} cloud_name: {{ browbeat_cloud_name }}
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: {{ elastic_enabled }} enabled: {{ elastic_enabled }}
host: {{ elastic_host }} host: {{ elastic_host }}
@ -42,7 +43,7 @@ rally:
enabled: true enabled: true
sleep_before: 5 sleep_before: 5
sleep_after: 5 sleep_after: 5
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- netcreate-boot: rally/rally-plugins/netcreate-boot - netcreate-boot: rally/rally-plugins/netcreate-boot
- netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping - netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping

View File

@ -4,6 +4,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: {{ browbeat_cloud_name }} cloud_name: {{ browbeat_cloud_name }}
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: {{ elastic_enabled }} enabled: {{ elastic_enabled }}
host: {{ elastic_host }} host: {{ elastic_host }}
@ -44,7 +45,7 @@ rally:
enabled: true enabled: true
sleep_before: 5 sleep_before: 5
sleep_after: 5 sleep_after: 5
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- netcreate-boot: rally/rally-plugins/netcreate-boot - netcreate-boot: rally/rally-plugins/netcreate-boot
- netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping - netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping

View File

@ -3,6 +3,7 @@ browbeat:
results : results/ results : results/
rerun: 3 rerun: 3
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
regather: false regather: false
@ -43,7 +44,7 @@ perfkit:
enabled: true enabled: true
sleep_before: 0 sleep_before: 0
sleep_after: 0 sleep_after: 0
venv: /home/stack/perfkit-venv/bin/activate venv: /home/stack/perfkit-venv
default: default:
image: centos7 image: centos7
machine_type: m1.small machine_type: m1.small
@ -62,7 +63,7 @@ rally:
enabled: true enabled: true
sleep_before: 5 sleep_before: 5
sleep_after: 5 sleep_after: 5
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- netcreate-boot: rally/rally-plugins/netcreate-boot - netcreate-boot: rally/rally-plugins/netcreate-boot
- netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping - netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping

View File

@ -3,6 +3,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: true enabled: true
host: 1.1.1.1 host: 1.1.1.1
@ -43,7 +44,7 @@ perfkit:
enabled: false enabled: false
sleep_before: 0 sleep_before: 0
sleep_after: 0 sleep_after: 0
venv: /home/stack/perfkit-venv/bin/activate venv: /home/stack/perfkit-venv
default: default:
image: centos7 image: centos7
machine_type: m1.small machine_type: m1.small
@ -95,7 +96,7 @@ rally:
enabled: true enabled: true
sleep_before: 5 sleep_before: 5
sleep_after: 5 sleep_after: 5
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- netcreate-boot: rally/rally-plugins/netcreate-boot - netcreate-boot: rally/rally-plugins/netcreate-boot
- netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping - netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping

View File

@ -3,6 +3,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
regather: false regather: false
@ -43,7 +44,7 @@ rally:
enabled: true enabled: true
sleep_before: 5 sleep_before: 5
sleep_after: 5 sleep_after: 5
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- glance-create-boot-delete: rally/rally-plugins/glance-create-boot-delete - glance-create-boot-delete: rally/rally-plugins/glance-create-boot-delete
benchmarks: benchmarks:

View File

@ -4,6 +4,7 @@ browbeat:
results : results/ results : results/
rerun: 3 rerun: 3
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
regather: false regather: false
@ -45,7 +46,7 @@ rally:
enabled: true enabled: true
sleep_before: 5 sleep_before: 5
sleep_after: 5 sleep_after: 5
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
benchmarks: benchmarks:
- name: authenticate - name: authenticate
enabled: true enabled: true

View File

@ -4,6 +4,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
regather: false regather: false
@ -45,7 +46,7 @@ rally:
enabled: true enabled: true
sleep_before: 5 sleep_before: 5
sleep_after: 5 sleep_after: 5
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
benchmarks: benchmarks:
- name: authenticate - name: authenticate
enabled: true enabled: true

View File

@ -3,6 +3,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
regather: false regather: false
@ -43,7 +44,7 @@ rally:
enabled: true enabled: true
sleep_before: 5 sleep_before: 5
sleep_after: 5 sleep_after: 5
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- validate-ceilometer: rally/rally-plugins/validate-ceilometer - validate-ceilometer: rally/rally-plugins/validate-ceilometer
- nova-ceilometer: rally/rally-plugins/nova-ceilometer - nova-ceilometer: rally/rally-plugins/nova-ceilometer

View File

@ -6,6 +6,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
regather: false regather: false
@ -46,7 +47,7 @@ rally:
enabled: true enabled: true
sleep_before: 5 sleep_before: 5
sleep_after: 5 sleep_after: 5
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- nova: rally/rally-plugins/nova - nova: rally/rally-plugins/nova
benchmarks: benchmarks:

View File

@ -4,6 +4,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
host: 1.1.1.1 host: 1.1.1.1
@ -44,7 +45,7 @@ rally:
enabled: true enabled: true
sleep_before: 0 sleep_before: 0
sleep_after: 0 sleep_after: 0
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- gnocchi: rally/rally-plugins/gnocchi - gnocchi: rally/rally-plugins/gnocchi
benchmarks: benchmarks:

View File

@ -8,6 +8,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
regather: false regather: false
@ -48,7 +49,7 @@ perfkit:
enabled: true enabled: true
sleep_before: 0 sleep_before: 0
sleep_after: 0 sleep_after: 0
venv: /home/stack/perfkit-venv/bin/activate venv: /home/stack/perfkit-venv
default: default:
image: centos7 image: centos7
machine_type: m1.small machine_type: m1.small

View File

@ -10,6 +10,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
host: 1.1.1.1 host: 1.1.1.1
@ -50,7 +51,7 @@ rally:
enabled: true enabled: true
sleep_before: 5 sleep_before: 5
sleep_after: 5 sleep_after: 5
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- nova: rally/rally-plugins/nova - nova: rally/rally-plugins/nova
- neutron: rally/rally-plugins/neutron - neutron: rally/rally-plugins/neutron

View File

@ -10,6 +10,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
host: 1.1.1.1 host: 1.1.1.1
@ -50,7 +51,7 @@ rally:
enabled: true enabled: true
sleep_before: 5 sleep_before: 5
sleep_after: 5 sleep_after: 5
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- nova: rally/rally-plugins/nova - nova: rally/rally-plugins/nova
- neutron: rally/rally-plugins/neutron - neutron: rally/rally-plugins/neutron

View File

@ -10,6 +10,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
host: 1.1.1.1 host: 1.1.1.1
@ -50,7 +51,7 @@ rally:
enabled: true enabled: true
sleep_before: 5 sleep_before: 5
sleep_after: 5 sleep_after: 5
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- nova: rally/rally-plugins/nova - nova: rally/rally-plugins/nova
- neutron: rally/rally-plugins/neutron - neutron: rally/rally-plugins/neutron

View File

@ -10,6 +10,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
host: 1.1.1.1 host: 1.1.1.1
@ -50,7 +51,7 @@ rally:
enabled: true enabled: true
sleep_before: 5 sleep_before: 5
sleep_after: 5 sleep_after: 5
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- nova: rally/rally-plugins/nova - nova: rally/rally-plugins/nova
- neutron: rally/rally-plugins/neutron - neutron: rally/rally-plugins/neutron

View File

@ -8,6 +8,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
host: 1.1.1.1 host: 1.1.1.1
@ -50,7 +51,7 @@ rally:
# Sleeps 30 minutes after each iteration to allow for system resources to degrade or # Sleeps 30 minutes after each iteration to allow for system resources to degrade or
# display stepped degrading (If the system is hitting saturation or high utilization) # display stepped degrading (If the system is hitting saturation or high utilization)
sleep_after: 1800 sleep_after: 1800
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- nova: rally/rally-plugins/nova - nova: rally/rally-plugins/nova
- neutron: rally/rally-plugins/neutron - neutron: rally/rally-plugins/neutron

View File

@ -7,6 +7,7 @@ browbeat:
results : results/ results : results/
rerun: 1 rerun: 1
cloud_name: openstack cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch: elasticsearch:
enabled: false enabled: false
regather: false regather: false
@ -50,7 +51,7 @@ rally:
# Sleeps 30 minutes after each iteration to allow for system resources to degrade or # Sleeps 30 minutes after each iteration to allow for system resources to degrade or
# display stepped degrading (If the system is hitting saturation or high utilization) # display stepped degrading (If the system is hitting saturation or high utilization)
sleep_after: 1800 sleep_after: 1800
venv: /home/stack/rally-venv/bin/activate venv: /home/stack/rally-venv
plugins: plugins:
- nova: rally/rally-plugins/nova - nova: rally/rally-plugins/nova
benchmarks: benchmarks:

View File

@ -125,9 +125,11 @@ class PerfKit(WorkloadBase.WorkloadBase):
# Build command to run # Build command to run
if 'enabled' in benchmark_config: if 'enabled' in benchmark_config:
del benchmark_config['enabled'] del benchmark_config['enabled']
cmd = ("source /home/stack/overcloudrc; source {0}; " cmd = ("source {0}/bin/activate; source {1} "
"/home/stack/perfkit-venv/PerfKitBenchmarker/pkb.py " "/home/stack/perfkit-venv/PerfKitBenchmarker/pkb.py "
"--cloud={1} --run_uri=browbeat".format(self.config['perfkit']['venv'], cloud_type)) "--cloud={2} --run_uri=browbeat".format(
self.config['perfkit']['venv'],
self.config['browbeat']['overcloud_credentials'], cloud_type))
for parameter, value in benchmark_config.iteritems(): for parameter, value in benchmark_config.iteritems():
if not parameter == 'name': if not parameter == 'name':
self.logger.debug( self.logger.debug(

View File

@ -62,7 +62,7 @@ class Rally(WorkloadBase.WorkloadBase):
plugin_string = "" plugin_string = ""
if len(plugins) > 0: if len(plugins) > 0:
plugin_string = "--plugin-paths {}".format(",".join(plugins)) plugin_string = "--plugin-paths {}".format(",".join(plugins))
cmd = "source {}; ".format(self.config['rally']['venv']) cmd = "source {}/bin/activate; ".format(self.config['rally']['venv'])
cmd += "rally {} task start {} --task-args \'{}\' 2>&1 | tee {}.log".format( cmd += "rally {} task start {} --task-args \'{}\' 2>&1 | tee {}.log".format(
plugin_string, task_file, task_args, test_name) plugin_string, task_file, task_args, test_name)
from_time = time.time() from_time = time.time()
@ -108,18 +108,18 @@ class Rally(WorkloadBase.WorkloadBase):
def gen_scenario_html(self, task_ids, test_name): def gen_scenario_html(self, task_ids, test_name):
all_task_ids = ' '.join(task_ids) all_task_ids = ' '.join(task_ids)
cmd = "source {}; ".format(self.config['rally']['venv']) cmd = "source {}/bin/activate; ".format(self.config['rally']['venv'])
cmd += "rally task report --task {} --out {}.html".format( cmd += "rally task report --task {} --out {}.html".format(
all_task_ids, test_name) all_task_ids, test_name)
return self.tools.run_cmd(cmd)['stdout'] return self.tools.run_cmd(cmd)['stdout']
def gen_scenario_json(self, task_id): def gen_scenario_json(self, task_id):
cmd = "source {}; ".format(self.config['rally']['venv']) cmd = "source {}/bin/activate; ".format(self.config['rally']['venv'])
cmd += "rally task results {}".format(task_id) cmd += "rally task results {}".format(task_id)
return self.tools.run_cmd(cmd)['stdout'] return self.tools.run_cmd(cmd)['stdout']
def gen_scenario_json_file(self, task_id, test_name): def gen_scenario_json_file(self, task_id, test_name):
cmd = "source {}; ".format(self.config['rally']['venv']) cmd = "source {}/bin/activate; ".format(self.config['rally']['venv'])
cmd += "rally task results {} > {}.json".format(task_id, test_name) cmd += "rally task results {} > {}.json".format(task_id, test_name)
return self.tools.run_cmd(cmd)['stdout'] return self.tools.run_cmd(cmd)['stdout']

View File

@ -357,7 +357,8 @@ class Shaker(WorkloadBase.WorkloadBase):
self.logger.info( self.logger.info(
"The uuid for this shaker scenario is {}".format(shaker_uuid)) "The uuid for this shaker scenario is {}".format(shaker_uuid))
cmd_env = ( cmd_env = (
"source {}/bin/activate; source /home/stack/overcloudrc").format(venv) "source {0}/bin/activate; source {1}").format(venv, self.config['browbeat']
['overcloud_credentials'])
if 'external' in filename and 'external_host' in self.config['shaker']: if 'external' in filename and 'external_host' in self.config['shaker']:
external_host = self.config['shaker']['external_host'] external_host = self.config['shaker']['external_host']
cmd_shaker = ( cmd_shaker = (

View File

@ -15,6 +15,10 @@ mapping:
cloud_name: cloud_name:
type: str type: str
required: True required: True
overcloud_credentials:
type: str
required: True
elasticsearch: elasticsearch:
required: True required: True