
Fixes for this patchset: - split out elk-openstack-client.yml to match what's done elsewhere Fixes for patchset #11: - split out filebeat into separate role for openstack clients - update README.md to use elk-openstack-client.yml for this purpose - cleanup filebeat.yml.j2 to use correct syntax (no need for " anymore) Fixes for patchset #10: - add SELinux boolean "httpd_can_network_connect" - add libsemanage-python package dependency for booleans Fixes for patchset #9: - fix for RHEL7 clients, we need to specify remote EPEL rpm - RHEL7 clients need rpm_key module to import EPEL GPG key - switch to using uri module instead of curl for checking elasticsearch indices - add python-httplib2 dependency (needed for uri module) - use curl -XPOST instead of PUT for filebeat index template in elasticsearch Fixes from patchset #7 - remove unneeded rpm usage, switch to yum module - add logic to heapsize tuning so systems > 64G of memory will never exceed the 32G recommended heapsize - logic fix for prepopulating local logs into logstash - remove elasticsearch.yml, rpm provides this and we're not customizing it yet Fixes from patchset #6: - use yum repo Ansible module where we can - remove unecessary EPEL installation (only nginx needs it) - disable EPEL repo after installation to avoid OpenStack breakage This adds: (ELK Server) - Automated ELK stack deployment - SSL client generation - Heap size tuning (1/2 of available memory) - Firewall port additions (depending on active or not) - Supports either firewalld or iptables-services - Additional upstream Filebeat Kibana dashboards (ELK Client) - Sets up filebeat with appropriate SSL certificates - utilizes both hostnames and SubjectAltName support (for environments without DNS services). (Usage) ansible-playbook -i hosts install/elk.yml ansible-playbook -i hosts install/elk-client.yml --extra-vars 'elk_server=X.X.X.X' Change-Id: Iee29f985e0bbcdf706ad869f132d4c0f1593a6b6
Table of Contents
- Browbeat
- Before running browbeat
- How to run Browbeat?
- What is necessary?
- Detailed Install, Check and Run
- Running PerfKitBenchmarker
- Contributing
Browbeat
This started as a project to help determine the number of database connections a given OpenStack deployment uses via stress tests. It has since grown into a set of Ansible playbooks to help check deployments for known issues, install tools and change parameters of the overcloud.
Before running browbeat
- Execute the ansible/gen_hostfile.sh script (builds the ssh config)
- Install Tools (connmon, collectd, graphite, grafana)
- Configure browbeat-config.yaml to match your tests
How to run Browbeat?
On the Red Hat OpenStack Director host, as the Stack user jump into the browbeat venv and you simply run:
(browbeat-venv)[stack@ospd browbeat]$ ./browbeat.py --help
What is necessary?
- Red Hat OpenStack Director
- Why? We use passwordless ssh to reach each controller instance and compute instance.
- OpenStack Rally
- Why? We are using Rally to stress the control plane of the env.
- Ansible
- Why? We started with using bash to make changes to the Overcloud, creating complex sed/awks that we get for free with Ansible (for the most part). If you prefer to not use Ansible, the older versions (no longer maintained) of the browbeat.sh can be found in a older commit.
Detailed Install, Check and Run
Installing Browbeat and running the Overcloud checks can be performed either from your local machine or from the undercloud. The local machine install/check assumes you have ansible installed already.
Install Browbeat from your local machine
From your local machine
$ ssh-copy-id stack@<undercloud-ip>
$ git clone https://github.com/jtaleric/browbeat.git
$ cd browbeat/ansible
$ ./gen_hostfile.sh <undercloud-ip> ~/.ssh/config
$ vi install/group_vars/all # Make sure to edit the dns_server to the correct ip address
$ ansible-playbook -i hosts install/browbeat.yml
$ vi install/group_vars/all # Edit browbeat network settings
$ ansible-playbook -i hosts install/browbeat_network.yml
$ ansible-playbook -i hosts install/shaker_build.yml
(Optional) Install collectd
$ ansible-playbook -i hosts install/collectd.yml
(Optional) Install collectd->graphite dashboards
$ ansible-playbook -i hosts install/dashboards-openstack.yml
(Optional) Install connmon
$ ansible-playbook -i hosts install/connmon.yml
Run Overcloud checks
$ ansible-playbook -i hosts check/site.yml
Your Overcloud check output is located in check/bug_report.log
Run performance stress tests through browbeat on the undercloud:
$ ssh undercloud-root
[root@ospd ~]# su - stack
[stack@ospd ~]$ screen -S browbeat
[stack@ospd ~]$ . browbeat-venv/bin/activate
(browbeat-venv)[stack@ospd ~]$ cd browbeat/
(browbeat-venv)[stack@ospd browbeat]$ vi browbeat-config.yaml # Edit browbeat-config.yaml to control how many stress tests are run.
(browbeat-venv)[stack@ospd browbeat]$ ./browbeat.py -w
Install Browbeat directly on undercloud
From your undercloud
$ ssh undercloud-root
[root@ospd ~]# su - stack
[stack@ospd ~]$ git clone https://github.com/jtaleric/browbeat.git
[stack@ospd ~]$ cd browbeat/ansible
[stack@ospd ansible]$ ./gen_hostfile.sh localhost ~/.ssh/config
[stack@ospd ansible]$ sudo easy_install pip
[stack@ospd ansible]$ sudo pip install ansible
[stack@ospd ansible]$ vi install/group_vars/all # Make sure to edit the dns_server to the correct ip address
[stack@ospd ansible]$ ansible-playbook -i hosts install/browbeat.yml
[stack@ospd ansible]$ vi install/group_vars/all # Edit browbeat network settings
[stack@ospd ansible]$ ansible-playbook -i hosts install/browbeat_network.yml
[stack@ospd ansible]$ ansible-playbook -i hosts install/shaker_build.yml
(Optional) Install collectd
[stack@ospd ansible]$ ansible-playbook -i hosts install/collectd.yml
(Optional) Install collectd->graphite dashboards
[stack@ospd ansible]$ ansible-playbook -i hosts install/dashboards-openstack.yml
(Optional) Install connmon
[stack@ospd ansible]$ ansible-playbook -i hosts install/connmon.yml
Run Overcloud checks
[stack@ospd ansible]$ ansible-playbook -i hosts check/site.yml
Your Overcloud check output is located in check/bug_report.log
Run performance stress tests through browbeat
[stack@ospd ansible]$ . ../../browbeat-venv/bin/activate
(browbeat-venv)[stack@ospd ansible]$ cd ..
(browbeat-venv)[stack@ospd browbeat]$ vi browbeat-config.yaml # Edit browbeat.cfg to control how many stress tests are run.
(browbeat-venv)[stack@ospd browbeat]$ ./browbeat.py -w
Running PerfKitBenchmarker
Work is on-going to utilize PerfKitBenchmarker as a workload provider to browbeat. Many benchmarks work out of the box with browbeat. You must ensure that your network is setup correctly to run those benchmarks and you will need to configure the settings in ansible/install/group_vars/all for browbeat public/private networks. Currently tested benchmarks include: aerospike, bonnie++, cluster_boot, copy_throughput(cp,dd,scp), fio, iperf, mesh_network, mongodb_ycsb, netperf, object_storage_service, ping, scimark2, and sysbench_oltp.
To run browbeat's PerfKit Benchmarks, you can start by viewing the tested benchmark's configuration in conf/browbeat-perfkit-complete.yaml. You must add them to your specific browbeat config yaml file or enable/disable the benchmarks you wish to run in the default config file (browbeat-config.yaml). There are many flags exposed in the configuration files to tune how those benchmarks run. Additional flags are exposed in the soruce code of PerfKitBenchmarker available: https://github.com/GoogleCloudPlatform/PerfKitBenchmarker
Example running only PerfKitBenchmarker benchmarks with browbeat from browbeat-config.yaml:
(browbeat-venv)[stack@ospd browbeat]$ ./browbeat.py -w perfkit -s browbeat-config.yaml
Contributing
Contributions are most welcome! Pull requests need to be submitted using the gerrit code review system. Firstly, you need to login to GerritHub using your GitHub credentials and need to authorize GerritHub to access your account. Once you are logged in click you user name in the top-right corner, go to 'Settings' and under 'SSH Public Keys' you need to paste your public key. You can view your public key using:
$ cat ~/.ssh/id_\{r or d\}sa.pub
Set your username and email for git:
$ git config --global user.email "example@example.com"
$ git config --global user.name "example"
Next, Clone the github repository:
$ git clone https://github.com/jtaleric/browbeat.git
You need to have git-review in order to be able to submit patches using the gerrit code review system. You can install it using:
$ yum install git-review
To set up your cloned repository to work with gerrit:
[user@laptop browbeat]$ git review -s
Make your changes and then commit them. Use:
[user@laptop browbeat]$ git review
The first time you are submitting a patch, you will be requested for a user name which is typically your GerritHub user name(same as GitHub user name).