Skip to content

Commit

Permalink
Merge "Remove hardcoded references to overcloud credentials"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Aug 3, 2017
2 parents 4c34cea + 8d11344 commit 3cfdf3b
Show file tree
Hide file tree
Showing 21 changed files with 51 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ browbeat:
results : results/
rerun: 3
cloud_name: {{ browbeat_cloud_name }}
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: {{ elastic_enabled }}
host: {{ elastic_host }}
Expand Down Expand Up @@ -42,7 +43,7 @@ rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- netcreate-boot: rally/rally-plugins/netcreate-boot
- netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: {{ browbeat_cloud_name }}
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: {{ elastic_enabled }}
host: {{ elastic_host }}
Expand Down Expand Up @@ -44,7 +45,7 @@ rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- netcreate-boot: rally/rally-plugins/netcreate-boot
- netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping
Expand Down
5 changes: 3 additions & 2 deletions browbeat-complete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ browbeat:
results : results/
rerun: 3
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
regather: false
Expand Down Expand Up @@ -43,7 +44,7 @@ perfkit:
enabled: true
sleep_before: 0
sleep_after: 0
venv: /home/stack/perfkit-venv/bin/activate
venv: /home/stack/perfkit-venv
default:
image: centos7
machine_type: m1.small
Expand All @@ -62,7 +63,7 @@ rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- netcreate-boot: rally/rally-plugins/netcreate-boot
- netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping
Expand Down
5 changes: 3 additions & 2 deletions browbeat-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: true
host: 1.1.1.1
Expand Down Expand Up @@ -43,7 +44,7 @@ perfkit:
enabled: false
sleep_before: 0
sleep_after: 0
venv: /home/stack/perfkit-venv/bin/activate
venv: /home/stack/perfkit-venv
default:
image: centos7
machine_type: m1.small
Expand Down Expand Up @@ -95,7 +96,7 @@ rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- netcreate-boot: rally/rally-plugins/netcreate-boot
- netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping
Expand Down
3 changes: 2 additions & 1 deletion conf/browbeat-glance-complete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
regather: false
Expand Down Expand Up @@ -43,7 +44,7 @@ rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- glance-create-boot-delete: rally/rally-plugins/glance-create-boot-delete
benchmarks:
Expand Down
3 changes: 2 additions & 1 deletion conf/browbeat-keystone-complete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ browbeat:
results : results/
rerun: 3
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
regather: false
Expand Down Expand Up @@ -45,7 +46,7 @@ rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
benchmarks:
- name: authenticate
enabled: true
Expand Down
3 changes: 2 additions & 1 deletion conf/browbeat-keystone-minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
regather: false
Expand Down Expand Up @@ -45,7 +46,7 @@ rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
benchmarks:
- name: authenticate
enabled: true
Expand Down
3 changes: 2 additions & 1 deletion conf/ceilometer-minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
regather: false
Expand Down Expand Up @@ -43,7 +44,7 @@ rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- validate-ceilometer: rally/rally-plugins/validate-ceilometer
- nova-ceilometer: rally/rally-plugins/nova-ceilometer
Expand Down
3 changes: 2 additions & 1 deletion conf/ceilometer-persist-response-timing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
regather: false
Expand Down Expand Up @@ -46,7 +47,7 @@ rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- nova: rally/rally-plugins/nova
benchmarks:
Expand Down
3 changes: 2 additions & 1 deletion conf/gnocchi-minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
host: 1.1.1.1
Expand Down Expand Up @@ -44,7 +45,7 @@ rally:
enabled: true
sleep_before: 0
sleep_after: 0
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- gnocchi: rally/rally-plugins/gnocchi
benchmarks:
Expand Down
3 changes: 2 additions & 1 deletion conf/perfkit-benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
regather: false
Expand Down Expand Up @@ -48,7 +49,7 @@ perfkit:
enabled: true
sleep_before: 0
sleep_after: 0
venv: /home/stack/perfkit-venv/bin/activate
venv: /home/stack/perfkit-venv
default:
image: centos7
machine_type: m1.small
Expand Down
3 changes: 2 additions & 1 deletion conf/telemetry-nova-neutron-gnocchi-10k-1000-per-30m.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
host: 1.1.1.1
Expand Down Expand Up @@ -50,7 +51,7 @@ rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- nova: rally/rally-plugins/nova
- neutron: rally/rally-plugins/neutron
Expand Down
3 changes: 2 additions & 1 deletion conf/telemetry-nova-neutron-gnocchi-1k-100-per-30m.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
host: 1.1.1.1
Expand Down Expand Up @@ -50,7 +51,7 @@ rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- nova: rally/rally-plugins/nova
- neutron: rally/rally-plugins/neutron
Expand Down
3 changes: 2 additions & 1 deletion conf/telemetry-nova-neutron-gnocchi-1k-500-per-30m.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
host: 1.1.1.1
Expand Down Expand Up @@ -50,7 +51,7 @@ rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- nova: rally/rally-plugins/nova
- neutron: rally/rally-plugins/neutron
Expand Down
3 changes: 2 additions & 1 deletion conf/telemetry-nova-neutron-gnocchi-5k-500-per-30m.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
host: 1.1.1.1
Expand Down Expand Up @@ -50,7 +51,7 @@ rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- nova: rally/rally-plugins/nova
- neutron: rally/rally-plugins/neutron
Expand Down
3 changes: 2 additions & 1 deletion conf/telemetry-nova-persist-instances-with-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
host: 1.1.1.1
Expand Down Expand Up @@ -50,7 +51,7 @@ rally:
# 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)
sleep_after: 1800
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- nova: rally/rally-plugins/nova
- neutron: rally/rally-plugins/neutron
Expand Down
3 changes: 2 additions & 1 deletion conf/telemetry-nova-persist-instances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ browbeat:
results : results/
rerun: 1
cloud_name: openstack
overcloud_credentials: /home/stack/overcloudrc
elasticsearch:
enabled: false
regather: false
Expand Down Expand Up @@ -50,7 +51,7 @@ rally:
# 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)
sleep_after: 1800
venv: /home/stack/rally-venv/bin/activate
venv: /home/stack/rally-venv
plugins:
- nova: rally/rally-plugins/nova
benchmarks:
Expand Down
8 changes: 5 additions & 3 deletions lib/PerfKit.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def index_results(self, sucessful_run, result_dir, test_name, browbeat_rerun, be
as perfkit_results_json:
for result_count, json_result in enumerate(perfkit_results_json):
complete_result_json = {'browbeat_scenario': benchmark_config}
complete_result_json['results'] = {'unit':{}, 'value': {}}
complete_result_json['results'] = {'unit': {}, 'value': {}}
single_result = self.elastic.load_json(json_result.strip())
complete_result_json['browbeat_rerun'] = browbeat_rerun
complete_result_json['timestamp'] = str(es_ts).replace(" ", "T")
Expand Down Expand Up @@ -125,9 +125,11 @@ def run_benchmark(self, benchmark_config, result_dir, test_name, cloud_type="Ope
# Build command to run
if 'enabled' in benchmark_config:
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 "
"--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():
if not parameter == 'name':
self.logger.debug(
Expand Down
8 changes: 4 additions & 4 deletions lib/Rally.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def run_scenario(self, task_file, scenario_args, result_dir, test_name, benchmar
plugin_string = ""
if len(plugins) > 0:
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(
plugin_string, task_file, task_args, test_name)
from_time = time.time()
Expand Down Expand Up @@ -108,18 +108,18 @@ def _get_details(self):

def gen_scenario_html(self, task_ids, test_name):
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(
all_task_ids, test_name)
return self.tools.run_cmd(cmd)['stdout']

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)
return self.tools.run_cmd(cmd)['stdout']

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)
return self.tools.run_cmd(cmd)['stdout']

Expand Down
3 changes: 2 additions & 1 deletion lib/Shaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,8 @@ def run_scenario(self, scenario, result_dir, test_name, filename,
self.logger.info(
"The uuid for this shaker scenario is {}".format(shaker_uuid))
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']:
external_host = self.config['shaker']['external_host']
cmd_shaker = (
Expand Down
4 changes: 4 additions & 0 deletions lib/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ mapping:
cloud_name:
type: str
required: True
overcloud_credentials:
type: str
required: True


elasticsearch:
required: True
Expand Down

0 comments on commit 3cfdf3b

Please sign in to comment.