Remove pbench from code

We have a solution that works better internally and externally. Pbench
had a set of challanges.

(akrzos) Moved pbench ansible install playbook into pbench folder
(akrzos) cleaned up other garbage
(akrzos) Fix merge conflict

Change-Id: Ie0a59d799846c3c9f5970c1a3b83ae50ebced0b8
This commit is contained in:
Joe Talerico 2016-02-12 10:28:51 -05:00 committed by Alex Krzos
parent 8f45b1d885
commit 4f662d08f4
11 changed files with 15 additions and 171 deletions

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -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()

View File

@ -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

View File

@ -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:

9
pbench/group_vars/all Normal file
View File

@ -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

View File

@ -1,6 +1,3 @@
ansible==1.9.4
matplotlib
rally
# For pbench-agent compatibility:
configtools