diff --git a/README.md b/README.md index 98536f043..fe7fa6232 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,12 @@ Table of Contents * [From your local machine:](#from-your-local-machine) * [(Optional) Install shaker:](#optional-install-shaker) * [(Optional) Install connmon:](#optional-install-connmon) - * [(Optional) Install pbench:](#optional-install-pbench) * [Run performance checks](#run-performance-checks) * [Run performance stress tests through browbeat on the undercloud:](#run-performance-stress-tests-through-browbeat-on-the-undercloud) * [Install Browbeat directly on undercloud:](#install-browbeat-directly-on-undercloud) * [From your undercloud:](#from-your-undercloud) * [(Optional) Install shaker:](#optional-install-shaker-1) * [(Optional) Install connmon:](#optional-install-connmon-1) - * [(Optional) Install pbench:](#optional-install-pbench-1) * [Run performance checks](#run-performance-checks-1) * [Run performance stress tests through browbeat:](#run-performance-stress-tests-through-browbeat) @@ -71,12 +69,6 @@ $ ansible-playbook -i hosts install/shaker.yml $ ansible-playbook -i hosts install/connmon.yml ``` -### (Optional) Install pbench: -``` -$ ansible-playbook -i hosts install/connmon.yml -``` -* pbench install is under improvement at this time and likely requires additional setup to complete install. - ### Run Overcloud checks ``` $ ansible-playbook -i hosts check/site.yml @@ -121,12 +113,6 @@ $ ssh undercloud-root [stack@ospd ansible]$ ansible-playbook -i hosts install/connmon.yml ``` -### (Optional) Install pbench: -``` -[stack@ospd ansible]$ ansible-playbook -i hosts install/connmon.yml -``` -* pbench install is under improvement at this time and likely requires additional setup to complete install. - ### Run Overcloud checks ``` [stack@ospd ansible]$ ansible-playbook -i hosts check/site.yml diff --git a/ansible/install/group_vars/all b/ansible/install/group_vars/all index 81a5c4f53..f8bcb9068 100644 --- a/ansible/install/group_vars/all +++ b/ansible/install/group_vars/all @@ -14,12 +14,3 @@ graphite_host: 1.1.1.1 graphite_prefix: openstack grafana_api_key: (Your Grafana API Key) - -# pbench repos, you must replace the internal to the correct repo to install pbench -pbench_internal_repo_file_url: http://pbench.example.com/repo/yum.repos.d/pbench.repo -pbench_repo_file_url: https://copr.fedoraproject.org/coprs/ndokos/pbench/repo/epel-7/ndokos-pbench-epel-7.repo -configtools_repo_file_url: https://copr.fedoraproject.org/coprs/ndokos/configtools/repo/epel-7/ndokos-configtools-epel-7.repo - -# Enterprise Linux Repo name. Copied from undercloud to controllers for -# installing any pbench dependencies -repo_name: rhos-release-rhel-7.2.repo diff --git a/browbeat-complete.yaml b/browbeat-complete.yaml index 5586152b1..9240c497e 100644 --- a/browbeat-complete.yaml +++ b/browbeat-complete.yaml @@ -6,22 +6,11 @@ browbeat: rally_venv: /home/stack/browbeat-venv/bin/activate connmon: true rerun: 3 - pbench: - enabled: false - hosts: ansible/pbench-host-file - interval: 2 - tools: - - mpstat - - iostat - - sar - - vmstat - - pidstat num_workers: None ansible: hosts: ansible/hosts install: connmon: ansible/install/connmon.yml - pbench: ansible/install/pbench.yml browbeat: ansible/install/browbeat.yml check: ansible/check/site.yml adjust: diff --git a/browbeat-config.yaml b/browbeat-config.yaml index dc3c1f087..8e8668c31 100644 --- a/browbeat-config.yaml +++ b/browbeat-config.yaml @@ -6,22 +6,11 @@ browbeat: connmon: true rally_venv: /home/stack/browbeat-venv/bin/activate rerun: 1 - pbench: - enabled: false - hosts: ansible/pbench-host-file - interval: 2 - tools: - - mpstat - - iostat - - sar - - vmstat - - pidstat num_workers: None ansible: hosts: ansible/hosts install: connmon: ansible/install/connmon.yml - pbench: ansible/install/pbench.yml browbeat: ansible/install/browbeat.yml check: ansible/check/site.yml adjust: diff --git a/browbeat.py b/browbeat.py index f01fc8da8..a55080f04 100755 --- a/browbeat.py +++ b/browbeat.py @@ -4,7 +4,6 @@ import yaml import logging import sys sys.path.append('lib/') -from Pbench import * from Tools import * from Rally import * import ConfigParser, os @@ -32,7 +31,7 @@ except ImportError : exit(1) # Browbeat specific options -_install_opts=['pbench','connmon','browbeat'] +_install_opts=['connmon','browbeat'] _config_file = 'browbeat-config.yaml' _config = None @@ -122,15 +121,10 @@ if __name__ == '__main__': else: _config=_load_config(_config_file) hosts_path=_config['ansible']['hosts'] - if _config['browbeat']['pbench']['enabled'] : - pbench_hosts_path=_config['browbeat']['pbench']['hosts'] if _cli_args.hosts : _logger.info("Loading new hosts file : %s"% _cli_args.hosts[0]) hosts_path=_cli_args.hosts - if _config['browbeat']['pbench']['enabled'] : - hosts = ConfigParser.ConfigParser(allow_no_value=True) - hosts.read(pbench_hosts_path) tools = Tools(_config) rally = Rally(_config,hosts) rally.start_workloads() diff --git a/lib/Pbench.py b/lib/Pbench.py deleted file mode 100644 index 399fe34d4..000000000 --- a/lib/Pbench.py +++ /dev/null @@ -1,93 +0,0 @@ -import logging -import sys -sys.path.append("./") -from Tools import * - -class Pbench: - - def __init__(self,config,hosts): - self.logger = logging.getLogger('browbeat.Pbench') - self.tools = Tools() - self.config = config - self.hosts = hosts - return None - - # PBench Start Tools - def register_tools(self): - tool="register-tool" - register_tool=self.tools.find_cmd(tool) - tool="clear-tools" - clear_tools=self.tools.find_cmd(tool) - interval = self.config['browbeat']['pbench']['interval'] - as_sudo = self.config['browbeat']['sudo'] - # Clear out old tools - cmd = "" - if as_sudo : - cmd +="sudo " - cmd = "%s" % clear_tools - self.logger.info('PBench Clear : Command : %s' % cmd) - self.tools.run_cmd(cmd) - # Now Register tools - self.logger.info('PBench register tools') - for tool in self.config['browbeat']['pbench']['tools'] : - cmd = "" - if as_sudo : - cmd +="sudo " - cmd += "%s " % register_tool - cmd += "--name=%s -- --interval=%s" % (tool,interval) - self.logger.debug('PBench Start : Command : %s' % cmd) - if not self.tools.run_cmd(cmd) : - self.logger.error("Issue registering tool.") - return False - return self.register_remote_tools() - - def get_results_dir(self,prefix): - cmd="find /var/lib/pbench-agent/ -name \"*%s*\" -print"%prefix - return self.tools.run_cmd(cmd) - - def register_remote_tools(self): - tool="register-tool" - register_tool=self.tools.find_cmd(tool) - interval = self.config['browbeat']['pbench']['interval'] - if len(self.hosts.options('hosts')) > 0 : - for node in self.hosts.options('hosts'): - cmd = "" - as_sudo = self.config['browbeat']['sudo'] - if as_sudo : - cmd +="sudo " - cmd = "" - for tool in self.config['browbeat']['pbench']['tools'] : - cmd = "" - if as_sudo : - cmd +="sudo " - cmd += "%s " % register_tool - cmd += "--name=%s --remote=%s -- --interval=%s" % (tool,node,interval) - self.logger.debug('PBench register-remote: Command : %s' % cmd) - if not self.tools.run_cmd(cmd) : - self.logger.error("Issue registering tool.") - return False - return True - - # PBench Stop Tools - def stop_pbench(self,sudo=False): - tool="stop-tools" - stop_tool=self.tools.find_cmd(tool) - cmd = "" - if sudo : - cmd +="sudo " - cmd = "%s" % stop_tool - self.logger.info('PBench Stop : Command : %s' % cmd) - self.tools.run_cmd(cmd) - return True - - # Move Results - def move_results(self,sudo=False): - tool="move-results" - move_tool=self.tools.find_cmd(tool) - cmd = "" - if sudo : - cmd +="sudo " - cmd = "%s" % move_tool - self.logger.info('PBench move-results : Command : %s' % cmd) - self.tools.run_cmd(cmd) - return True diff --git a/lib/Rally.py b/lib/Rally.py index 29c437526..a6c2cbe20 100644 --- a/lib/Rally.py +++ b/lib/Rally.py @@ -1,5 +1,4 @@ from Connmon import Connmon -from Pbench import Pbench from Tools import Tools import os import datetime @@ -18,8 +17,6 @@ class Rally: self.error_count = 0 self.test_count = 0 self.scenario_count = 0 - if hosts is not None: - self.pbench = Pbench(self.config, hosts) def run_scenario(self, task_file, scenario_args, result_dir, test_name): self.logger.debug("--------------------------------") @@ -30,21 +27,11 @@ class Rally: self.logger.debug("--------------------------------") from_ts = int(time.time() * 1000) - if self.config['browbeat']['pbench']['enabled']: - task_args = str(scenario_args).replace("'", "\\\"") - self.pbench.register_tools() - self.logger.info("Starting Scenario") - tool = "rally" - rally = self.tools.find_cmd(tool) - cmd = ("user-benchmark --config={1} -- \"./pbench/browbeat-run-rally.sh" - " {0} {1} \'{2}\'\"".format(task_file, test_name, task_args)) - self.tools.run_cmd(cmd) - else: - task_args = str(scenario_args).replace("'", "\"") - cmd = "source {}; \\".format(self.config['browbeat']['rally_venv']) - cmd +="rally task start {} --task-args \'{}\' 2>&1 | tee {}.log".format(task_file, - task_args, test_name) - self.tools.run_cmd(cmd) + task_args = str(scenario_args).replace("'", "\"") + cmd = "source {}; \\".format(self.config['browbeat']['rally_venv']) + cmd +="rally task start {} --task-args \'{}\' 2>&1 | tee {}.log".format(task_file, + task_args, test_name) + self.tools.run_cmd(cmd) to_ts = int(time.time() * 1000) if 'grafana' in self.config and self.config['grafana']['enabled']: @@ -175,11 +162,6 @@ class Rally: for data in glob.glob("./{}*".format(test_name)): shutil.move(data, result_dir) - if self.config['browbeat']['pbench']['enabled']: - pbench_results_dir = self.pbench.get_results_dir(time_stamp) - shutil.copytree(result_dir, - "{}/results/".format(pbench_results_dir)) - self.pbench.move_results() self._get_details() else: diff --git a/pbench/group_vars/all b/pbench/group_vars/all new file mode 100644 index 000000000..a6d087976 --- /dev/null +++ b/pbench/group_vars/all @@ -0,0 +1,9 @@ +--- +# pbench repos, you must replace the internal to the correct repo to install pbench +pbench_internal_repo_file_url: http://pbench.example.com/repo/yum.repos.d/pbench.repo +pbench_repo_file_url: https://copr.fedoraproject.org/coprs/ndokos/pbench/repo/epel-7/ndokos-pbench-epel-7.repo +configtools_repo_file_url: https://copr.fedoraproject.org/coprs/ndokos/configtools/repo/epel-7/ndokos-configtools-epel-7.repo + +# Enterprise Linux Repo name. Copied from undercloud to controllers for +# installing any pbench dependencies +repo_name: rhos-release-rhel-7.2.repo diff --git a/ansible/install/pbench.yml b/pbench/pbench.yml similarity index 100% rename from ansible/install/pbench.yml rename to pbench/pbench.yml diff --git a/ansible/install/roles/pbench/tasks/main.yml b/pbench/roles/pbench/tasks/main.yml similarity index 100% rename from ansible/install/roles/pbench/tasks/main.yml rename to pbench/roles/pbench/tasks/main.yml diff --git a/requirements.txt b/requirements.txt index e86a6ddf4..e34869a7b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,3 @@ ansible==1.9.4 matplotlib rally - -# For pbench-agent compatibility: -configtools