Merge "Revert making log and results directory"
This commit is contained in:
commit
d3f193d55a
@ -44,6 +44,3 @@
|
|||||||
- name: Install Ansible
|
- name: Install Ansible
|
||||||
pip: name=ansible state=present
|
pip: name=ansible state=present
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Make results directory
|
|
||||||
file: "path={{ ansible_env.HOME }}/browbeat/results state=directory"
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
browbeat:
|
browbeat:
|
||||||
results : "$HOME/browbeat/results"
|
results : results/
|
||||||
rerun: 3
|
rerun: 3
|
||||||
cloud_name: {{ browbeat_cloud_name }}
|
cloud_name: {{ browbeat_cloud_name }}
|
||||||
log : "$HOME/browbeat/log"
|
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
enabled: {{ elastic_enabled_template }}
|
enabled: {{ elastic_enabled_template }}
|
||||||
host: {{ elastic_host_template }}
|
host: {{ elastic_host_template }}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
# Tests to be compleated for the install-and-check.sh script minimal and short workloads are performed
|
# Tests to be compleated for the install-and-check.sh script minimal and short workloads are performed
|
||||||
# to confirm functionality.
|
# to confirm functionality.
|
||||||
browbeat:
|
browbeat:
|
||||||
results : "$HOME/browbeat/results"
|
results : results/
|
||||||
rerun: 1
|
rerun: 1
|
||||||
cloud_name: {{ browbeat_cloud_name }}
|
cloud_name: {{ browbeat_cloud_name }}
|
||||||
log : "$HOME/browbeat/log"
|
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
enabled: {{ elastic_enabled_template }}
|
enabled: {{ elastic_enabled_template }}
|
||||||
host: {{ elastic_host_template }}
|
host: {{ elastic_host_template }}
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
# Complete set of Stress Tests, this can take a long time (day(s))
|
# Complete set of Stress Tests, this can take a long time (day(s))
|
||||||
browbeat:
|
browbeat:
|
||||||
results : "$HOME/.browbeat/results/"
|
results : results/
|
||||||
rerun: 3
|
rerun: 3
|
||||||
cloud_name: openstack
|
cloud_name: openstack
|
||||||
log : "$HOME/.browbeat/log/"
|
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
enabled: false
|
enabled: false
|
||||||
host: 1.1.1.1
|
host: 1.1.1.1
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
# Basic set of initial stress tests to test overcloud before running complete set of benchmarks.
|
# Basic set of initial stress tests to test overcloud before running complete set of benchmarks.
|
||||||
browbeat:
|
browbeat:
|
||||||
results : "$HOME/.browbeat/results"
|
results : results/
|
||||||
rerun: 1
|
rerun: 1
|
||||||
cloud_name: openstack
|
cloud_name: openstack
|
||||||
log: "$HOME/.browbeat/log"
|
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
enabled: true
|
enabled: true
|
||||||
host: 1.1.1.1
|
host: 1.1.1.1
|
||||||
|
18
browbeat.py
18
browbeat.py
@ -26,10 +26,10 @@ import os
|
|||||||
|
|
||||||
_workload_opts = ['perfkit', 'rally', 'shaker']
|
_workload_opts = ['perfkit', 'rally', 'shaker']
|
||||||
_config_file = 'browbeat-config.yaml'
|
_config_file = 'browbeat-config.yaml'
|
||||||
|
debug_log_file = 'log/debug.log'
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
tools = lib.Tools.Tools()
|
tools = lib.Tools.Tools()
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Browbeat Performance and Scale testing for Openstack")
|
description="Browbeat Performance and Scale testing for Openstack")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
@ -47,14 +47,7 @@ def main():
|
|||||||
_logger.setLevel(logging.DEBUG)
|
_logger.setLevel(logging.DEBUG)
|
||||||
_formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)7s - %(message)s')
|
_formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)7s - %(message)s')
|
||||||
_formatter.converter = time.gmtime
|
_formatter.converter = time.gmtime
|
||||||
|
_dbg_file = logging.FileHandler(debug_log_file)
|
||||||
# Load Browbeat yaml config file:
|
|
||||||
_config = tools._load_config(_cli_args.setup)
|
|
||||||
debug_log_path = tools.sub_env_vars(_config['browbeat']['log'])
|
|
||||||
# create log dir during run time
|
|
||||||
if not os.path.exists(debug_log_path):
|
|
||||||
os.makedirs(debug_log_path)
|
|
||||||
_dbg_file = logging.FileHandler(os.path.join(debug_log_path, 'debug.log'))
|
|
||||||
_dbg_file.setLevel(logging.DEBUG)
|
_dbg_file.setLevel(logging.DEBUG)
|
||||||
_dbg_file.setFormatter(_formatter)
|
_dbg_file.setFormatter(_formatter)
|
||||||
_ch = logging.StreamHandler()
|
_ch = logging.StreamHandler()
|
||||||
@ -68,6 +61,9 @@ def main():
|
|||||||
|
|
||||||
_logger.debug("CLI Args: {}".format(_cli_args))
|
_logger.debug("CLI Args: {}".format(_cli_args))
|
||||||
|
|
||||||
|
# Load Browbeat yaml config file:
|
||||||
|
_config = tools._load_config(_cli_args.setup)
|
||||||
|
|
||||||
# Default to all workloads
|
# Default to all workloads
|
||||||
if _cli_args.workloads == []:
|
if _cli_args.workloads == []:
|
||||||
_cli_args.workloads.append('all')
|
_cli_args.workloads.append('all')
|
||||||
@ -106,10 +102,8 @@ def main():
|
|||||||
_cli_args.setup))
|
_cli_args.setup))
|
||||||
else:
|
else:
|
||||||
_logger.error("{} is missing in {}".format(wkld_provider, _cli_args.setup))
|
_logger.error("{} is missing in {}".format(wkld_provider, _cli_args.setup))
|
||||||
result_dir = tools.sub_env_vars(_config['browbeat']['results'])
|
result_dir = _config['browbeat']['results']
|
||||||
lib.WorkloadBase.WorkloadBase.print_report(result_dir, time_stamp)
|
lib.WorkloadBase.WorkloadBase.print_report(result_dir, time_stamp)
|
||||||
if not os.path.exists(result_dir):
|
|
||||||
os.makedirs(result_dir)
|
|
||||||
_logger.info("Saved browbeat result summary to {}".format(
|
_logger.info("Saved browbeat result summary to {}".format(
|
||||||
os.path.join(result_dir,time_stamp + '.' + 'report')))
|
os.path.join(result_dir,time_stamp + '.' + 'report')))
|
||||||
lib.WorkloadBase.WorkloadBase.print_summary()
|
lib.WorkloadBase.WorkloadBase.print_summary()
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
# Tests to be compleated for the install-and-check.sh script minimal and short workloads are performed
|
# Tests to be compleated for the install-and-check.sh script minimal and short workloads are performed
|
||||||
# to confirm functionality.
|
# to confirm functionality.
|
||||||
browbeat:
|
browbeat:
|
||||||
results : "$HOME/.browbeat/results"
|
results : results/
|
||||||
rerun: 1
|
rerun: 1
|
||||||
cloud_name: openstack
|
cloud_name: openstack
|
||||||
log: "$HOME/.browbeat/log"
|
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
enabled: false
|
enabled: false
|
||||||
host: 1.1.1.1
|
host: 1.1.1.1
|
||||||
|
17
lib/Tools.py
17
lib/Tools.py
@ -126,20 +126,3 @@ class Tools(object):
|
|||||||
else:
|
else:
|
||||||
self.logger.info("Metadata about cloud has been gathered")
|
self.logger.info("Metadata about cloud has been gathered")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Takes a string with $FOO and returns a string
|
|
||||||
# with those variables replaced with their env paths.
|
|
||||||
def sub_env_vars(self, path):
|
|
||||||
path_list = path.split('/')
|
|
||||||
new_path = []
|
|
||||||
for item in path_list:
|
|
||||||
if item.startswith('$'):
|
|
||||||
var = item.translate(None, '$')
|
|
||||||
replacement = os.environ[var]
|
|
||||||
if replacement is None:
|
|
||||||
new_path.extend(item + "/")
|
|
||||||
else:
|
|
||||||
new_path.extend(replacement + "/")
|
|
||||||
else:
|
|
||||||
new_path.extend(item + "/")
|
|
||||||
return ''.join(new_path)
|
|
||||||
|
@ -15,9 +15,6 @@ mapping:
|
|||||||
cloud_name:
|
cloud_name:
|
||||||
type: str
|
type: str
|
||||||
required: True
|
required: True
|
||||||
log:
|
|
||||||
type: str
|
|
||||||
required: True
|
|
||||||
|
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
required: True
|
required: True
|
||||||
|
4
log/.gitignore
vendored
Normal file
4
log/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Ignore everything in this directory
|
||||||
|
*
|
||||||
|
# Except this file
|
||||||
|
!.gitignore
|
4
results/.gitignore
vendored
Normal file
4
results/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Ignore everything in this directory
|
||||||
|
*
|
||||||
|
# Except this file
|
||||||
|
!.gitignore
|
Loading…
Reference in New Issue
Block a user