Add oooq Ansible Role Support

This adds support for Browbeat to run as a oooq role
none of the playbooks or the roles located in ansible/oooq
are usable if called without oooq, so maybe they should go
in the ci-scripts folder.

Change-Id: Iefcae69af591a790bdeb4acc3c85e75292b6b8ce
This commit is contained in:
jkilpatr 2016-08-26 13:33:12 +00:00
parent c7f1d1a0e7
commit c964919a21
26 changed files with 851 additions and 25 deletions

View File

@ -3,8 +3,7 @@ gathering = smart
fact_caching_timeout = 86400
fact_caching = jsonfile
fact_caching_connection = /tmp/browbeat_fact_cache
timeout=30
timeout = 30
[ssh_connection]
# Load the specific ssh config file in this directory
ssh_args = -F ssh-config

View File

@ -0,0 +1,29 @@
---
- include: baremetal-prep-virthost.yml
- name: Configure Browbeat
hosts: undercloud
roles:
- browbeat/pre-install-setup
- browbeat/oooq-metadata
- browbeat/collectd-undercloud
- include: baremetal-quickstart-extras.yml
- name: Install Browbeat
hosts: undercloud
vars:
results_in_httpd: false
roles:
- browbeat/common
- browbeat/browbeat
- browbeat/browbeat-network
- name: Run Browbeat
hosts: undercloud
roles:
- browbeat/collectd
- browbeat/gather-metadata
- browbeat/bug-check
- browbeat/grafana-dashboard-setup
- browbeat/browbeat-run

View File

@ -0,0 +1,27 @@
# This is the playbook used by the `quickstart.sh` script.
- include: quickstart-extras.yml
- name: Configure Browbeat
hosts: undercloud
roles:
- browbeat/pre-install-setup
- browbeat/oooq-metadata
- name: Install Browbeat
hosts: undercloud
vars:
results_in_httpd: false
roles:
- browbeat/common
- browbeat/browbeat
- browbeat/browbeat-network
- name: Run Browbeat
hosts: undercloud
roles:
- browbeat/collectd
- browbeat/gather-metadata
- browbeat/bug-check
- browbeat/grafana-dashboard-setup
- browbeat/browbeat-run

View File

@ -0,0 +1,7 @@
---
- name: Run Browbeat
shell:
"source {{ ansible_env.HOME }}/browbeat-venv/bin/activate; \
cd {{ ansible_env.HOME }}/browbeat/; \
python browbeat.py rally > {{ ansible_env.HOME }}/browbeat/results/browbeat_run.log"

View File

@ -0,0 +1,17 @@
---
# Checks the cloud for known bugs and produces a bug report
# not functional on osp8 or earlier, therefore errors are ignored
- name: Check Cloud for Bugs
shell:
"cd {{ ansible_env.HOME }}/browbeat/ansible; \
ansible-playbook -i hosts \
--extra-vars @{{ ansible_env.HOME }}/browbeat/ci-scripts/config/tripleo/oooq/all.yml \
check/site.yml > {{ ansible_env.HOME }}/browbeat/results/check.log"
register: check_run
ignore_errors: true
until: check_run.rc == 0
retries: 2
delay: 60
environment:
ANSIBLE_SSH_ARGS: "-F {{ ansible_env.HOME }}/browbeat/ansible/ssh-config"

View File

@ -0,0 +1,25 @@
- name: Template undercloud only hosts file
template:
"src=hosts.j2 \
dest={{ ansible_env.HOME }}/browbeat/ansible/hosts"
- name: Template ssh-config
template:
"src=ssh-config.j2 \
dest={{ ansible_env.HOME }}/browbeat/ansible/ssh-config"
- name: Install CollectD
shell:
"cd {{ ansible_env.HOME }}/browbeat/ansible; \
ansible-playbook -i hosts -c local \
--extra-vars graphite_host={{ graphite_host_template }} \
--extra-vars graphite_prefix={{ graphite_prefix_template }} \
install/collectd-openstack.yml \
--extra-vars @{{ ansible_env.HOME }}/browbeat/ci-scripts/config/tripleo/oooq/all.yml \
> {{ ansible_env.HOME }}/browbeat/results/collecd_install.log"
register: collectd_install
until: collectd_install.rc == 0
retries: 2
delay: 60
environment:
ANSIBLE_SSH_ARGS: "-F {{ ansible_env.HOME }}/browbeat/ansible/ssh-config"

View File

@ -0,0 +1,2 @@
[undercloud]
undercloud

View File

@ -0,0 +1,4 @@
Host undercloud
HostName localhost
Port 22
User stack

View File

@ -0,0 +1,2 @@
graphite_host_template: "1.2.3.4.5"
graphite_prefix_template: "CI"

View File

@ -0,0 +1,19 @@
---
#role to install CollectD on all nodes
- name: Install CollectD
shell:
"cd {{ ansible_env.HOME }}/browbeat/ansible; \
ansible-playbook -i hosts \
--extra-vars collectd_compute=true \
--extra-vars graphite_host={{ graphite_host_template }} \
--extra-vars graphite_prefix={{ graphite_prefix_template }} \
--extra-vars @{{ ansible_env.HOME }}/browbeat/ci-scripts/config/tripleo/oooq/all.yml \
install/collectd-openstack.yml \
> {{ ansible_env.HOME }}/browbeat/results/collecd_install.log"
register: collectd_install
until: collectd_install.rc == 0
retries: 2
delay: 60
environment:
ANSIBLE_SSH_ARGS: "-F {{ ansible_env.HOME }}/browbeat/ansible/ssh-config"

View File

@ -0,0 +1,2 @@
graphite_host_template: "1.2.3.4.5"
graphite_prefix_template: "CI"

View File

@ -0,0 +1,16 @@
---
#Gathers Browbeat metdata and inserts it into elasticsearch
# and flat files in browbeat/results
- name: Gather Metadata
shell:
"cd {{ ansible_env.HOME }}/browbeat/ansible; \
ansible-playbook -i hosts \
--extra-vars @{{ ansible_env.HOME }}/browbeat/ci-scripts/config/tripleo/oooq/all.yml \
gather/site.yml > {{ ansible_env.HOME }}/browbeat/results/metadata.log"
register: metadata_run
until: metadata_run.rc == 0
retries: 2
delay: 60
environment:
ANSIBLE_SSH_ARGS: "-F {{ ansible_env.HOME }}/browbeat/ansible/ssh-config"

View File

@ -0,0 +1,18 @@
---
# Sets up Grafana dashboards for the system data. this must be run after
# the overcloud setup because it checks the hosts file to determine what
# hosts exist to be dasboarded
- name: Setup Grafana Dashboards
shell:
"cd {{ ansible_env.HOME }}/browbeat/ansible; \
ansible-playbook -vvv -i hosts \
--extra-vars grafana_host={{ grafana_host_template }} \
--extra-vars grafana_username={{ grafana_username_template }} \
--extra-vars grafana_password={{ grafana_password_template }} \
--extra-vars dashboard_cloud_name={{ graphite_prefix_template }} \
--extra-vars @{{ ansible_env.HOME }}/browbeat/ci-scripts/config/tripleo/oooq/all.yml \
install/grafana-dashboards.yml > {{ ansible_env.HOME }}/browbeat/results/dashboards.log"
environment:
ANSIBLE_SSH_ARGS: "-F {{ ansible_env.HOME }}/browbeat/ansible/ssh-config"
when: "{{ grafana_enabled_template }}"

View File

@ -0,0 +1,6 @@
grafana_enabled_template: false
grafana_host_template: 1.2.3.4
grafana_username_template: admin
grafana_password_template: admin
graphite_prefix_template: "browbeat-ci"

View File

@ -0,0 +1,15 @@
---
#Collect and template Metadata about the deployment
- name: Get Overcloud Image Build date
shell: "curl -s -v -X HEAD {{ undercloud_image_url }} 2>&1 | grep '^< Date:'"
register: build
ignore_errors: true
- name: Make sure the results directory exists
file: "path={{ ansible_env.HOME }}/browbeat/metadata state=directory"
- name: Template Deployment Metadata
template:
"src=version.json.j2 \
dest={{ ansible_env.HOME }}/browbeat/metadata/version.json"

View File

@ -0,0 +1,15 @@
{# Determine the OSP Series name via a dictionary on $version #}
{% set series = {"kilo": "7", "liberty": "8", "mitaka": "9", "newton": "10", "ocata": "11", "pike": "12", "master":"11"}[release] | default("Unknown Version") -%}
{% set version = {"kilo": "7-tripleo", "liberty": "8-tripleo", "mitaka": "9-tripleo", "newton": "10-tripleo", "ocata": "11-tripleo", "pike": "12-tripleo", "master":"11-tripleo"}[release] | default("Unknown Version") -%}
{% if osp_release is defined %}
{% set series = {"rhos-7":"7", "rhos-8":"8", "rhos-9":"9", "rhos-10":"10", "master":"master"}[osp_release] | default("Unknown Version") -%}
{% set version = {"rhos-7":"7-director", "rhos-8":"8-director", "rhos-9":"9-director", "rhos-10":"10-director", "master":"11-director"}[osp_release] | default("Unknown Version") -%}
{% endif %}
{
"osp_series": "{{series}}",
"osp_version": "{{version}}",
"dlrn_hash": "{{dlrn_hash}}",
"osp_deployment_installer": "oooq",
"build": "{{build.stdout}}",
"uc_build_date": "{{lookup('pipe','date +%Y%m%d-%H%M%S')}}"
}

View File

@ -0,0 +1 @@
dlrn_hash: "Not a Jenkins Build"

View File

@ -0,0 +1,46 @@
---
- name: Make sure rsync is installed
yum: name=rsync state=present
become: true
- name: Copy browbeat to the undercloud
synchronize: "src={{ local_working_dir }}/browbeat dest={{ ansible_env.HOME }}/ use_ssh_args=yes"
- name: Set hosts gen as executable
shell: "chmod +x {{ ansible_env.HOME }}/browbeat/ansible/generate_tripleo_hostfile.sh"
- name: Fetch Browbeat vars file
fetch:
"src={{ ansible_env.HOME }}/browbeat/ansible/install/group_vars/all.yml \
dest=/tmp/all.yml \
flat=yes"
- name: Load Browbeat vars
include_vars: /tmp/all.yml
- name: Fetch CI vars file
fetch:
"src={{ ansible_env.HOME }}/browbeat/ci-scripts/config/tripleo/oooq/all.yml \
dest=/tmp/install_vars.yml \
flat=yes"
- name: Load CI vars
include_vars: /tmp/install_vars.yml
- name: Template Browbeat configuration
template:
"src={{ browbeat_config_file }} \
dest={{ ansible_env.HOME }}/browbeat/browbeat-config.yaml"
- name: Install Pip
retries: 10
delay: 60
until: pip.rc == 0
register: pip
shell: curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"; sudo python get-pip.py
become: true
- name: Install Ansible
pip: name=ansible state=present
become: true

View File

@ -0,0 +1,145 @@
browbeat:
results : results/
rerun: 1
cloud_name: {{ browbeat_cloud_name }}
elasticsearch:
enabled: {{ elastic_enabled_template }}
host: {{ elastic_host_template }}
port: 9200
metadata_files:
- name: hardware-metadata
file: metadata/hardware-metadata.json
- name: environment-metadata
file: metadata/environment-metadata.json
- name: software-metadata
file: metadata/software-metadata.json
- name: version
file: metadata/version.json
ansible:
ssh_config: ansible/ssh-config
hosts: ansible/hosts
adjust:
keystone_token: ansible/browbeat/adjustment-keystone-token.yml
neutron_l3: ansible/browbeat/adjustment-l3.yml
nova_db: ansible/browbeat/adjustment-db.yml
workers: ansible/browbeat/adjustment-workers.yml
grafana_snapshot: ansible/browbeat/snapshot-general-performance-dashboard.yml
metadata: ansible/gather/site.yml
connmon:
enabled: {{ connmon_enabled_template }}
sudo: true
grafana:
enabled: {{ grafana_enabled_template }}
grafana_ip: {{ grafana_host_template }}
grafana_port: 3000
dashboards:
- openstack-general-system-performance
snapshot:
enabled: false
snapshot_compute: false
rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
plugins:
- netcreate-boot: rally/rally-plugins/netcreate-boot
- netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping
- subnet-router-create: rally/rally-plugins/subnet-router-create
benchmarks:
- name: authenticate
enabled: true
concurrency:
- 8
- 16
- 24
times: 2500
scenarios:
- name: authentic-keystone
enabled: true
file: rally/authenticate/keystone-cc.yml
- name: keystonebasic
enabled: true
concurrency:
- 16
times: 1000
scenarios:
- name: create-and-list-tenants
enabled: true
file: rally/keystonebasic/create_and_list_tenants-cc.yml
- name: neutron
enabled: true
concurrency:
- 4
- 8
- 12
times: 128
scenarios:
- name: create-list-router
enabled: true
file: rally/neutron/neutron-create-list-router-cc.yml
- name: create-list-network
enabled: true
file: rally/neutron/neutron-create-list-network-cc.yml
- name: create-list-subnet
enabled: true
file: rally/neutron/neutron-create-list-subnet-cc.yml
- name: create-list-port
enabled: true
file: rally/neutron/neutron-create-list-port-cc.yml
- name: create-list-security-group
enabled: true
file: rally/neutron/neutron-create-list-security-group-cc.yml
- name: nova
enabled: true
concurrency:
- 4
- 8
- 12
times: 64
scenarios:
- name: boot-snapshot-delete
enabled: true
file: rally/nova/nova-boot-snapshot-cc.yml
image_name: cirros
flavor_name: m1.tiny
net_id:
- name: boot-list
enabled: true
file: rally/nova/nova-boot-list-cc.yml
image_name: cirros
flavor_name: m1.tiny
net_id:
- name: glance
enabled: true
concurrency:
- 4
- 8
- 12
times: 64
scenarios:
- name: create-and-delete-image
enabled: true
image_location: /home/stack/cirros
flavor_name: m1.tiny
file: rally/glance/create-and-delete-image-cc.yml
- name: plugins
enabled: true
concurrency:
- 4
- 8
- 12
times: 64
scenarios:
- name: netcreate-5-boot
enabled: true
image_name: cirros
flavor_name: m1.tiny
file: rally/rally-plugins/netcreate-boot/netcreate_boot.yml
num_networks: 5
- name: netcreate-10-boot
enabled: true
image_name: cirros
flavor_name: m1.tiny
file: rally/rally-plugins/netcreate-boot/netcreate_boot.yml
num_networks: 10

View File

@ -0,0 +1,245 @@
# Tests to be compleated for the install-and-check.sh script minimal and short workloads are performed
# to confirm functionality.
browbeat:
results : results/
rerun: 1
cloud_name: {{ browbeat_cloud_name }}
elasticsearch:
enabled: {{ elastic_enabled_template }}
host: {{ elastic_host_template }}
port: 9200
metadata_files:
- name: hardware-metadata
file: metadata/hardware-metadata.json
- name: environment-metadata
file: metadata/environment-metadata.json
- name: software-metadata
file: metadata/software-metadata.json
- name: version
file: metadata/version.json
ansible:
ssh_config: ansible/ssh-config
hosts: ansible/hosts
adjust:
keystone_token: ansible/browbeat/adjustment-keystone-token.yml
neutron_l3: ansible/browbeat/adjustment-l3.yml
nova_db: ansible/browbeat/adjustment-db.yml
workers: ansible/browbeat/adjustment-workers.yml
grafana_snapshot: ansible/browbeat/snapshot-general-performance-dashboard.yml
metadata: ansible/gather/site.yml
connmon:
enabled: {{ connmon_enabled_template }}
sudo: true
grafana:
enabled: {{ grafana_enabled_template }}
grafana_ip: {{ grafana_host_template }}
grafana_port: 3000
dashboards:
- openstack-general-system-performance
snapshot:
enabled: false
snapshot_compute: false
perfkit:
enabled: true
sleep_before: 0
sleep_after: 0
venv: /home/stack/perfkit-venv/bin/activate
default:
image: centos7
machine_type: m1.small
os_type: rhel
openstack_image_username: centos
openstack_floating_ip_pool: browbeat_public
openstack_network: browbeat_private
benchmarks:
- name: fio-centos-m1-small
enabled: false
benchmarks: fio
data_disk_size: 4
rally:
enabled: true
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
plugins:
- netcreate-boot: rally/rally-plugins/netcreate-boot
- netcreate-boot-ping: rally/rally-plugins/netcreate-boot-ping
- subnet-router-create: rally/rally-plugins/subnet-router-create
benchmarks:
- name: authenticate
enabled: true
concurrency:
- 8
- 16
times: 10
scenarios:
- name: authentic-keystone
enabled: true
file: rally/authenticate/keystone-cc.yml
sla_max_avg_duration: 6
sla_max_seconds: 30
sla_max_failure: 0
- name: cinder
enabled: true
concurrency:
- 1
- 2
times: 4
scenarios:
- name: create-attach-volume-centos
enabled: true
file: rally/cinder/cinder-create-and-attach-volume-cc.yml
sla_max_seconds: 30
sla_max_failure: 0
- name: keystonebasic
enabled: false
concurrency:
- 8
times: 10
scenarios:
- name: create-and-list-tenants
enabled: true
file: rally/keystonebasic/create_and_list_tenants-cc.yml
sla_max_seconds: 30
sla_max_failure: 0
times: 50
- name: neutron
enabled: true
concurrency:
- 2
- 4
times: 10
scenarios:
- name: create-list-network
enabled: true
file: rally/neutron/neutron-create-list-network-cc.yml
sla_max_seconds: 30
sla_max_failure: 0
- name: nova
enabled: true
concurrency:
- 1
- 2
times: 16
scenarios:
- name: boot-snapshot-delete
enabled: true
file: rally/nova/nova-boot-snapshot-cc.yml
image_name: cirros
flavor_name: m1.tiny
- name: plugins
enabled: true
concurrency:
- 8
- 16
times: 16
scenarios:
- name: netcreate-boot
enabled: true
image_name: cirros
flavor_name: m1.tiny
file: rally/rally-plugins/netcreate-boot/netcreate_boot.yml
sla_max_avg_duration: 12
sla_max_seconds: 30
sla_max_failure: 0
#shaker scenarios require at least 2 compute nodes
shaker:
enabled: true
server: localhost
port: 5555
flavor: m1.small
join_timeout: 600
sleep_before: 5
sleep_after: 5
venv: /home/stack/shaker-venv
dns_nameserver: 192.168.23.1
shaker_region: regionOne
scenarios:
- name: l2-4-1
enabled: true
density: 4
compute: 1
progression: linear
time: 60
file: lib/python2.7/site-packages/shaker/scenarios/openstack/dense_l2.yaml
- name: l2-8-1
enabled: true
density: 8
compute: 1
progression: linear
time: 60
file: lib/python2.7/site-packages/shaker/scenarios/openstack/dense_l2.yaml
- name: l2-4-2
enabled: true
density: 4
compute: 2
progression: linear
time: 60
file: lib/python2.7/site-packages/shaker/scenarios/openstack/dense_l2.yaml
- name: l2-4-8
enabled: true
density: 8
compute: 2
progression: linear
time: 60
file: lib/python2.7/site-packages/shaker/scenarios/openstack/dense_l2.yaml
- name: l3-north-south-4-1
enabled: true
placement: single_room
density: 4
compute: 1
progression: null
file: lib/python2.7/site-packages/shaker/scenarios/openstack/dense_l3_north_south.yaml
- name: l3-north-south-8-1
enabled: false
placement: single_room
density: 8
compute: 1
progression: null
time: 60
file: lib/python2.7/site-packages/shaker/scenarios/openstack/dense_l3_north_south.yaml
- name: l3-north-south-4-2
enabled: true
placement: single_room
density: 4
compute: 2
progression: null
time: 60
file: lib/python2.7/site-packages/shaker/scenarios/openstack/dense_l3_north_south.yaml
- name: l3-north-south-8-2
enabled: true
placement: single_room
density: 8
compute: 2
progression: null
time: 60
file: lib/python2.7/site-packages/shaker/scenarios/openstack/dense_l3_north_south.yaml
- name: l3-east-west-4-1
enabled: true
density: 4
compute: 1
placement: single_room
time: 60
file: lib/python2.7/site-packages/shaker/scenarios/openstack/dense_l3_east_west.yaml
- name: l3-east-west-8-1
enabled: true
density: 8
compute: 1
placement: single_room
time: 60
file: lib/python2.7/site-packages/shaker/scenarios/openstack/dense_l3_east_west.yaml
- name: l3-east-west-4-2
enabled: true
density: 4
compute: 2
placement: single_room
time: 60
file: lib/python2.7/site-packages/shaker/scenarios/openstack/dense_l3_east_west.yaml
- name: l3-east-west-8-2
enabled: true
density: 8
compute: 2
time: 60
placement: single_room
file: lib/python2.7/site-packages/shaker/scenarios/openstack/dense_l3_east_west.yaml

View File

@ -0,0 +1,7 @@
elastic_enabled_template: false
elastic_host_template: "1.2.3.4.5"
connmon_enabled_template: false
grafana_enabled_template: false
grafana_host_template: "1.2.3.4.5"
browbeat_config_file: "browbeat-basic.yaml.j2"
browbeat_cloud_name: "browbeat_ci"

View File

@ -5,37 +5,50 @@ Table of Contents
- `Script Documentation <#script-documentation>`__
- `Install and Check <#install-and-check>`__
- `Invoking Locally <#invoking-locally>`__
- `Browbeat as a Quickstart Extra <#browbeat-as-a-quickstart-extra>`__
- `Invoking Locally <#invoking-locally>`__
CI Structure
============
For an example Jenkins configuration see `this job <https://ci.centos.org/view/rdo/view/POC/job/poc-browbeat-tripleo-quickstart-mitaka-delorean-full-deploy-minimal/>`_
If you would like to make your own CI job add your CI script to this directory and invoke it as minimally as possible on the Jenkins end, this will help us keep script changes in the repository and better test them before merging.
If you would like to make your own CI job add your CI script to this directory and invoke it as
minimally as possible on the Jenkins end, this will help us keep script changes in the repository
and better test them before merging.
Script Documentation
====================
Install and Check
-----------------
Currently the main CI script that is run against every commit submittied to the Openstack Gerrit. For each test a fresh Openstack instance is deployed using `TripleO Quickstart <https:github.com/openstack/tripleo-quickstart>`_, Browbeat is then installed. Both of these happen regardless of what was included in the commit. Workload tests are run only if a file diff between the commit and Browbeat master contains the workload name. Success is defined as all processes in the script exiting with exit code 0, note Browbeat will return zero if a test fails its SLA or otherwise fails in a manner that's not total.
Currently the main CI script that is run against every commit submitted to the Openstack Gerrit.
For each test a fresh Openstack instance is deployed using
`TripleO Quickstart <https:github.com/openstack/tripleo-quickstart>`_, Browbeat is then installed.
Both of these happen regardless of what was included in the commit. Workload tests are run only if
a file diff between the commit and Browbeat master contains the workload name. Success is defined
as all processes in the script exiting with exit code 0, note Browbeat will return zero if a test
fails its SLA or otherwise fails in a manner that's not total.
To add an additional workload to the script add the workload name to the tools loop near the bottom of the file.
To add an additional workload to the script add the workload name to the tools loop near
the bottom of the file.
::
for tool in rally perfkit shaker <tool name>; do
Then add configuration details that run all functions of the added task or plugin to the browbeat-ci.yaml file in ci-scripts/config.
Then add configuration details that run all functions of the added task or plugin to the
browbeat-ci.yaml file in ci-scripts/config.
You can view the output of this job `here <https://ci.centos.org/view/rdo/view/POC/job/poc-browbeat-tripleo-quickstart-mitaka-delorean-full-deploy-minimal/>`_
Invoking Locally
~~~~~~~~~~~~~~~~
To run tripleo/install-and-check.sh using your local machine as the driver for a TripleO Quickstart / Browbeat deployment create an empty directory to use as your workspace and point virthost at a machine running CentOS 7+ or RHEL 7+ with at least 32gb of ram.
To run tripleo/install-and-check.sh using your local machine as the driver for a
TripleO Quickstart / Browbeat deployment create an empty directory to use as your
workspace and point virthost at a machine running CentOS 7+ or RHEL 7+ with at least 32gb of ram.
::
@ -56,7 +69,8 @@ Clone the required repositories
$ git clone https://github.com/openstack/tripleo-quickstart/
$ git clone https://github.com/redhat-openstack/ansible-role-tripleo-inventory
Install the Ansible roles from Github into the virtual environment, as well as a few Python packages
Install the Ansible roles from Github into the virtual environment,
as well as a few Python packages
::
@ -68,14 +82,86 @@ Install the Ansible roles from Github into the virtual environment, as well as a
$ python setup.py install
$ pip install --upgrade ansible netaddr
Install the package dependencies, if you're nervous about using root just look inside of quickstart.sh, these are very generic and you might already have all of them installed.
Install the package dependencies, if you're nervous about using root just look inside of
quickstart.sh, these are very generic and you might already have all of them installed.
::
$ sudo bash $WORKSPACE/tripleo-quickstart/quickstart.sh --install-deps
Finally invoke the script and settle in, this command will take about two hours to complete and will place all the relevant ssh credentials and other information to access your instance once the run is complete in the workspace directory.
Finally invoke the script and settle in, this command will take about two hours to complete
and will place all the relevant ssh credentials and other information to access your instance
once the run is complete in the workspace directory.
::
$ bash $WORKSPACE/browbeat/ci-scripts/tripleo/install-and-check.sh mitaka delorean minimal periodic
Browbeat as a Quickstart Extra
------------------------------
`TripleO Quickstart <https:github.com/openstack/tripleo-quickstart>`_ provides an extensible
interface to allow "Extras" to add to to its core functionality of generating an entierly virtual
Openstack Deployment using TripleO. The focus of this script is to deploy barmetal clouds in CI
for effective and extensible automated benchmarking.
Invoking Locally
~~~~~~~~~~~~~~~~
Please read `The Extras Documentation <https://review.openstack.org/#/c/346733/22/doc/source/working-with-extras.rst>`_
for a general background on how TripleO Quickstart Extras operate. Please also reference
`The Baremetal Environments Documentation <http://images.rdoproject.org/docs/baremetal/>`_
if you need to configure your job to run on baremetal.
Browbeat provides two playbooks for use with Quickstart `quickstart-browbeat.yml`
and `baremetal-virt-undercloud-tripleo-browbeat.yml` the first playbook is for deploying
an entierly virtual setup on a single baremetal machine. The second playbook creates a
virtual undercloud on a undercloud host machine and deploys a baremetal overcloud as configured
by the users hardware environment.
Dependencies for this script (at least for Fedora 25) are
sudo dnf install ansible git python-virtualenv gcc redhat-rpm-config openssl-devel
To run virtual TripleO Quickstart CI set the following environmental vars and run `quickstart-virt.sh`
this will create a TripleO environment and run a short Browbeat test. Since this is a all virtual setup
it is not suggested for serious benchmarking.
export WORKSPACE={TripleO Quickstart Workspace}
export RELEASE={release}
export VIRTHOST={undercloud-fqdn}
pushd $WORKSPACE/browbeat/ci-scripts/tripleo
bash quickstart-virt.sh
To run the baremetal CI follow the requisite steps to setup a hardware environment (this is nontrival)
then create a workspace folder and clone TripleO Quickstart and Browbeat into that workspace. Set the
variables below and then run `microbrow.sh`.
export WORKSPACE={TripleO Quickstart Workspace}
export HW_ENV={hw-env}
export RELEASE={release}
export GRAPH_HOST={Graphite + grafana host}
export GRAFANA_USER={username}
export GRAFANA_PASS={password}
export CLOUD_NAME={cloud-name}
export BENCHMARK={benchmark config file ex browbeat-basic.yaml.j2}
export ELASTIC_HOST={elastic host}
export VIRTHOST={undercloud-fqdn}
pushd $WORKSPACE/browbeat/ci-scripts/tripleo
bash microbrow.sh
Configurable Options
~~~~~~~~~~~~~~~~~~~~
By default a cloud will be setup and a very basic benchmark will be run and all results will be
placed only in the `browbeat/results` folder on the virtual undercloud. If configured to use
Elasticsearch metadata and benchmarks results will be inserted into Elasticsearch for easier
visualization and storage. If Graphana is enabled performance metrics will be gathered from all
cloud nodes and stored into the configured graphite instance to be processed by the Grafana
dashboards created using the given username and password. These dashboards will be automatically
overwritten each run to reflect the number of nodes in your cloud and other changes that
may occur between runs.

View File

@ -0,0 +1,7 @@
#variables to override for Browbeat install
dns_server: 192.168.23.1
browbeat_pub_subnet: 192.0.2.0/24
browbeat_pub_pool_start: 192.0.2.100
browbeat_pub_pool_end: 192.0.2.200
browbeat_pub_pool_gw: 192.0.2.1
browbeat_pri_pool_dns: 192.168.23.1

44
ci-scripts/tripleo/microbrow.sh Executable file
View File

@ -0,0 +1,44 @@
#!/bin/bash
export OPT_DEBUG_ANSIBLE=1
export USER=root
export HW_ENV_DIR=$WORKSPACE/tripleo-environments/hardware_environments/$HW_ENV
export NETWORK_ISOLATION=no_vlan
export REQUIREMENTS=quickstart-extras-requirements.txt
export PLAYBOOK=baremetal-virt-undercloud-tripleo-browbeat.yml
export RELEASE=$RELEASE
export VARS="elastic_enabled_template=true \
--extra-vars graphite_enabled_template=true \
--extra-vars elastic_host_template=$ELASTIC_HOST \
--extra-vars graphite_host_template=$GRAPH_HOST \
--extra-vars grafana_host_template=$GRAPH_HOST \
--extra-vars grafana_username_template=$GRAFANA_USER \
--extra-vars grafana_password_template=$GRAFANA_PASS \
--extra-vars browbeat_cloud_name=$CLOUD_NAME \
--extra-vars browbeat_config_file=$BENCHMARK \
--extra-vars graphite_prefix_template=$CLOUD_NAME \
--extra-vars dlrn_hash=$current_build"
socketdir=$(mktemp -d /tmp/sockXXXXXX)
export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r
export REQS=quickstart-extras-requirements.txt
pushd $WORKSPACE/tripleo-quickstart
echo "file://$WORKSPACE/browbeat/#egg=browbeat" >> $REQS
./quickstart.sh \
--requirements $REQS \
--playbook $PLAYBOOK \
--working-dir $WORKSPACE \
--bootstrap \
--no-clone \
-t all \
-S overcloud-validate \
-R $RELEASE \
--config $HW_ENV_DIR/network_configs/no_vlan/config_files/config.yml \
--extra-vars @$HW_ENV_DIR/network_configs/$NETWORK_ISOLATION/env_settings.yml \
--extra-vars $VARS \
$VIRTHOST

View File

@ -0,0 +1,41 @@
#!/bin/bash
export OPT_DEBUG_ANSIBLE=1
export USER=root
export REQUIREMENTS=quickstart-extras-requirements.txt
export PLAYBOOK=browbeat-quickstart.yml
export RELEASE=$RELEASE
export VARS=""
#export VARS="elastic_enabled_template=true \
#--extra-vars graphite_enabled_template=true \
#--extra-vars elastic_host_template=$ELASTIC_HOST \
#--extra-vars graphite_host_template=$GRAPH_HOST \
#--extra-vars grafana_host_template=$GRAPH_HOST \
#--extra-vars grafana_username_template=$GRAFANA_USER \
#--extra-vars grafana_password_template=$GRAFANA_PASS \
#--extra-vars browbeat_cloud_name=$CLOUD_NAME \
#--extra-vars browbeat_config_file=$BENCHMARK \
#--extra-vars graphite_prefix_template=$CLOUD_NAME \
#--extra-vars dlrn_hash=$current_build"
socketdir=$(mktemp -d /tmp/sockXXXXXX)
export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r
export REQS=quickstart-extras-requirements.txt
pushd $WORKSPACE/tripleo-quickstart
echo "file://$WORKSPACE/browbeat/#egg=browbeat" >> $REQS
./quickstart.sh \
--requirements $REQS \
--playbook $PLAYBOOK \
--working-dir $WORKSPACE \
--bootstrap \
--no-clone \
-t all \
-S overcloud-validate \
-R $RELEASE \
--extra-vars $VARS \
$VIRTHOST

View File

@ -16,9 +16,9 @@ classifier =
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
#[files]
#packages =
# browbeat
[global]
setup-hooks =
pbr.hooks.setup_hook
[build_sphinx]
source-dir = doc/source
@ -28,16 +28,17 @@ all_files = 1
[upload_sphinx]
upload-dir = doc/build/html
#[compile_catalog]
#directory = browbeat/locale
#domain = browbeat
[files]
data_files =
usr/local/share/ansible/roles/browbeat/ = ansible/install/roles/*
usr/local/share/ansible/roles/browbeat/ = ansible/oooq/roles/*
usr/local/share/ansible/roles/browbeat/browbeat/vars/ = ci-scripts/config/tripleo/oooq-browbeat-role/*
usr/local/share/ansible/roles/browbeat/browbeat/filter_plugins = ansible/install/filter_plugins/*
playbooks = ansible/oooq/*
#[update_catalog]
#domain = browbeat
#output_dir = browbeat/locale
#input_file = browbeat/locale/browbeat.pot
[wheel]
universal = 1
#[extract_messages]
#keywords = _ gettext ngettext l_ lazy_gettext
#mapping_file = babel.cfg
#output_file = browbeat/locale/browbeat.pot
[pbr]
skip_authors = True
skip_changelog = True