diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg index 5f4138eff..3ffc85b83 100644 --- a/ansible/ansible.cfg +++ b/ansible/ansible.cfg @@ -3,6 +3,7 @@ gathering = smart fact_caching_timeout = 86400 fact_caching = jsonfile fact_caching_connection = /tmp/browbeat_fact_cache +timeout=30 [ssh_connection] # Load the specific ssh config file in this directory diff --git a/ansible/install/group_vars/all.yml b/ansible/install/group_vars/all.yml index 50219a9ff..071c14147 100644 --- a/ansible/install/group_vars/all.yml +++ b/ansible/install/group_vars/all.yml @@ -37,8 +37,9 @@ shaker_venv: /home/stack/shaker-venv # Shaker version to Install shaker_version: 0.0.15 -# The default PerfKit venv: +# PerfKitBenchmarker Settings perfkit_venv: /home/stack/perfkit-venv +perfkit_version: v1.7.0 # Guest images for the Overcloud images: diff --git a/ansible/install/roles/browbeat-network/tasks/main.yml b/ansible/install/roles/browbeat-network/tasks/main.yml index a85baa09f..fb1d5534b 100644 --- a/ansible/install/roles/browbeat-network/tasks/main.yml +++ b/ansible/install/roles/browbeat-network/tasks/main.yml @@ -4,14 +4,14 @@ # - name: Create browbeat public network - shell: ". {{overcloudrc}}; neutron net-create {{browbeat_pub_net_name}} --router:external | grep -E ' id ' | awk '{print $4}'" + shell: ". {{overcloudrc}}; neutron net-create {{browbeat_pub_net_name}} --shared --router:external | grep -E ' id ' | awk '{print $4}'" register: public_net_id - name: Create browbeat public subnet shell: ". {{overcloudrc}}; neutron subnet-create {{public_net_id.stdout}} {{browbeat_pub_subnet}} --allocation-pool start={{browbeat_pub_pool_start}},end={{browbeat_pub_pool_end}} --gateway={{browbeat_pub_pool_gw}} --disable-dhcp" - name: Create browbeat private network - shell: ". {{overcloudrc}}; neutron net-create {{browbeat_pri_net_name}} | grep -E ' id ' | awk '{print $4}'" + shell: ". {{overcloudrc}}; neutron net-create {{browbeat_pri_net_name}} --shared | grep -E ' id ' | awk '{print $4}'" register: private_net_id - name: Create browbeat private subnet diff --git a/ansible/install/roles/browbeat/tasks/main.yml b/ansible/install/roles/browbeat/tasks/main.yml index e88f451cc..d6cbbc47f 100644 --- a/ansible/install/roles/browbeat/tasks/main.yml +++ b/ansible/install/roles/browbeat/tasks/main.yml @@ -94,30 +94,39 @@ - name: Install requirements.txt into browbeat-venv pip: requirements={{ browbeat_path }}/requirements.txt virtualenv={{ browbeat_venv }} -- name: Determine if perfkit is already cloned +# PerfKitBenchmarker Install +- name: Determine if PerfKitBenchmarker is already cloned stat: path={{ perfkit_venv }}/PerfKitBenchmarker register: perfkit_exists -- debug: msg="PerfKit already exists on the host" +- debug: msg="PerfKitBenchmarker already exists on the host" when: perfkit_exists.stat.isdir is defined and perfkit_exists.stat.isdir - name: Clone PerfKitBenchmarker on undercloud git: - repo=https://github.com/GoogleCloudPlatform/PerfKitBenchmarker.git - dest={{ perfkit_venv }}/PerfKitBenchmarker - version=v1.4.0 + repo: https://github.com/GoogleCloudPlatform/PerfKitBenchmarker.git + dest: "{{perfkit_venv}}/PerfKitBenchmarker" + version: "{{perfkit_version}}" when: perfkit_exists.stat.isdir is undefined - - name: Install PerfKitBenchmarker requirements into perfkit-venv pip: - requirements={{ perfkit_venv }}/PerfKitBenchmarker/requirements.txt - virtualenv={{ perfkit_venv }} + requirements: "{{perfkit_venv}}/PerfKitBenchmarker/requirements.txt" + virtualenv: "{{perfkit_venv}}" - name: Install PerfKitBenchmarker Openstack requirements into perfkit-venv pip: - requirements={{ perfkit_venv }}/PerfKitBenchmarker/requirements-openstack.txt - virtualenv={{ perfkit_venv }} + requirements: "{{ perfkit_venv }}/PerfKitBenchmarker/perfkitbenchmarker/providers/openstack/requirements.txt" + virtualenv: "{{perfkit_venv}}" + +# (akrzos) - Using 2.6 seems most stable, Using latest or >2.6 as per PerfKitBenchmarker +# openstack/requirements.txt results in an openstack cli error. +- name: Downgrade python-openstackclient inside perfkit-venv + pip: + name: python-openstackclient + version: 2.6.0 + virtualenv: "{{perfkit_venv}}" +# End PerfKitBenchmarker Install - name: Install rally into rally-venv pip: name=rally version={{ rally_version }} virtualenv={{ rally_venv }} diff --git a/browbeat-complete.yaml b/browbeat-complete.yaml index 899749d76..861719c58 100644 --- a/browbeat-complete.yaml +++ b/browbeat-complete.yaml @@ -50,11 +50,12 @@ perfkit: openstack_image_username: centos openstack_floating_ip_pool: browbeat_public openstack_network: browbeat_private + timing_measurements: runtimes benchmarks: - name: fio-centos-m1-small enabled: false benchmarks: fio - data_disk_size: 4 + openstack_volume_size: 1 rally: enabled: true sleep_before: 5 diff --git a/browbeat-config.yaml b/browbeat-config.yaml index 4aa36ed72..4898259cc 100644 --- a/browbeat-config.yaml +++ b/browbeat-config.yaml @@ -50,11 +50,12 @@ perfkit: openstack_image_username: centos openstack_floating_ip_pool: browbeat_public openstack_network: browbeat_private + timing_measurements: runtimes benchmarks: - name: fio-centos-m1-small enabled: false benchmarks: fio - data_disk_size: 4 + openstack_volume_size: 1 shaker: enabled: true server: 1.1.1.1 diff --git a/ci-scripts/config/tripleo/install-and-check/all.yml b/ci-scripts/config/tripleo/install-and-check/all.yml index ee7f9c176..25270c1b0 100644 --- a/ci-scripts/config/tripleo/install-and-check/all.yml +++ b/ci-scripts/config/tripleo/install-and-check/all.yml @@ -37,8 +37,9 @@ shaker_venv: /home/stack/shaker-venv # Shaker version to install shaker_version: 0.0.15 -# The default PerfKit venv: +# PerfKitBenchmarker Settings perfkit_venv: /home/stack/perfkit-venv +perfkit_version: v1.7.0 # Guest images for the Overcloud images: diff --git a/conf/browbeat-perfkit-complete.yaml b/conf/perfkit-benchmarks.yaml similarity index 73% rename from conf/browbeat-perfkit-complete.yaml rename to conf/perfkit-benchmarks.yaml index f97b7a357..6bf32f138 100644 --- a/conf/browbeat-perfkit-complete.yaml +++ b/conf/perfkit-benchmarks.yaml @@ -1,7 +1,12 @@ -# Complete set of PerfKit Benchmarks run from Browbeat +# Examples of PerfKit Benchmarks run from Browbeat +# +# Not all benchmark flags are exposed in this file because PerfKit +# ships with many benchmarks and many configuration options for +# each of the benchmarks. The settings for the benchmarks below +# are not tuned for best performance analysis either. browbeat: results : results/ - rerun: 3 + rerun: 1 cloud_name: openstack elasticsearch: enabled: false @@ -50,6 +55,7 @@ perfkit: openstack_image_username: centos openstack_floating_ip_pool: browbeat_public openstack_network: browbeat_private + timing_measurements: runtimes benchmarks: - name: aerospike-centos-m1-small enabled: false @@ -57,28 +63,18 @@ perfkit: - name: block_storage_workload-database-centos-m1-small enabled: false benchmarks: block_storage_workload - data_disk_size: 20 + openstack_volume_size: 20 workload_mode: database - name: block_storage_workload-logging-centos-m1-small enabled: false benchmarks: block_storage_workload - data_disk_size: 20 + openstack_volume_size: 20 workload_mode: logging - name: block_storage_workload-streaming-centos-m1-small - enabled: true - benchmarks: block_storage_workload - data_disk_size: 20 - workload_mode: streaming - - name: bonnie-centos-m1-small enabled: false - benchmarks: bonnie++ - data_disk_size: 20 - image: centos7 - machine_type: m1.small - os_type: rhel - openstack_image_username: centos - openstack_floating_ip_pool: browbeat_public - openstack_network: browbeat_private + benchmarks: block_storage_workload + openstack_volume_size: 20 + workload_mode: streaming - name: cluster_boot-centos-m1-small enabled: false benchmarks: cluster_boot @@ -87,28 +83,27 @@ perfkit: enabled: false benchmarks: copy_throughput copy_benchmark_mode: cp - data_disk_size: 20 + openstack_volume_size: 20 - name: copy_throughput-dd-centos-m1-small enabled: false benchmarks: copy_throughput copy_benchmark_mode: dd - data_disk_size: 20 + openstack_volume_size: 20 - name: copy_throughput-scp-centos-m1-small enabled: false benchmarks: copy_throughput copy_benchmark_mode: scp - data_disk_size: 20 + openstack_volume_size: 20 - name: fio-centos-m1-small enabled: false benchmarks: fio - data_disk_size: 4 + openstack_volume_size: 20 - name: fio-centos-m1-small-10m enabled: false benchmarks: fio - data_disk_size: 10 - config_override: "fio.vm_groups.default.vm_count=2" + openstack_volume_size: 20 fio_generate_scenarios: all - fio_run_for_minutes: 10 + fio_runtime: 600 fio_working_set_size: 4 - name: iperf-centos-m1-small enabled: false @@ -117,30 +112,12 @@ perfkit: enabled: false benchmarks: mesh_network num_vms: 3 - - name: mongodb_ycsb-centos-m1-small - enabled: false - benchmarks: mongodb_ycsb - data_disk_size: 20 - num_striped_disks: 1 - ycsb_client_vms: 1 - mongodb_writeconcern: acknowledged - name: netperf-centos-m1-small enabled: false benchmarks: netperf - - name: object_storage_service-centos-m1-small - enabled: false - benchmarks: object_storage_service - storage: OpenStack - object_storage_scenario: all - openstack_swift_insecure: true - data_disk_size: 10 - name: ping-centos-m1-small enabled: false benchmarks: ping - - name: redis-centos-m1-small - enabled: false - benchmarks: redis - redis_clients: 2 - name: redis_ycsb-centos-m1-small enabled: false benchmarks: redis_ycsb @@ -151,8 +128,8 @@ perfkit: - name: sysbench_oltp-centos-m1-small enabled: false benchmarks: sysbench_oltp - data_disk_size: 20 + openstack_volume_size: 20 - name: unixbench-centos-m1-small enabled: false benchmarks: unixbench - data_disk_size: 10 + openstack_volume_size: 20 diff --git a/lib/PerfKit.py b/lib/PerfKit.py index 6f9671dba..5ecd535e6 100644 --- a/lib/PerfKit.py +++ b/lib/PerfKit.py @@ -82,8 +82,8 @@ class PerfKit(WorkloadBase.WorkloadBase): cmd += " --{}={}".format(parameter, value) # Remove any old results - if os.path.exists("/tmp/perfkitbenchmarker/run_browbeat"): - shutil.rmtree("/tmp/perfkitbenchmarker/run_browbeat") + if os.path.exists("/tmp/perfkitbenchmarker/runs/browbeat"): + shutil.rmtree("/tmp/perfkitbenchmarker/runs/browbeat") if self.config['connmon']['enabled']: self.connmon.start_connmon() @@ -139,10 +139,10 @@ class PerfKit(WorkloadBase.WorkloadBase): "File missing: {}/pkb.stderr.log".format(result_dir)) # Copy all results - for perfkit_file in glob.glob("/tmp/perfkitbenchmarker/run_browbeat/*"): + for perfkit_file in glob.glob("/tmp/perfkitbenchmarker/runs/browbeat/*"): shutil.move(perfkit_file, result_dir) - if os.path.exists("/tmp/perfkitbenchmarker/run_browbeat"): - shutil.rmtree("/tmp/perfkitbenchmarker/run_browbeat") + if os.path.exists("/tmp/perfkitbenchmarker/runs/browbeat"): + shutil.rmtree("/tmp/perfkitbenchmarker/runs/browbeat") # Grafana integration self.grafana.create_grafana_urls( diff --git a/lib/validate.yaml b/lib/validate.yaml index f4f3c3136..ea70d95e9 100644 --- a/lib/validate.yaml +++ b/lib/validate.yaml @@ -151,6 +151,12 @@ mapping: openstack_network: type: str required: True + ignore_package_requirements: + type: bool + required: False + timing_measurements: + type: str + required: False benchmarks: type: seq sequence: