Merge "Build the custom images for workload-plugin if enabled"

This commit is contained in:
Zuul 2020-10-23 10:50:43 +00:00 committed by Gerrit Code Review
commit 28a42fbe19
3 changed files with 28 additions and 4 deletions

View File

@ -82,21 +82,25 @@ browbeat_workloads:
src: sysbench-user.file
dest: "{{ browbeat_path }}/sysbench-user.file"
image: centos7
enabled: false
linpack:
name: browbeat-linpack
src: linpack-user.file
dest: "{{ browbeat_path }}/linpack-user.file"
image: centos7
enabled: false
uperf:
name: browbeat-uperf
src: pbench-uperf-user.file
dest: "{{ browbeat_path }}/pbench-uperf-user.file"
image: centos7
enabled: false
abench:
name: browbeat-abench
src: abench-user.file
dest: "{{ browbeat_path }}/abench-user.file"
image: centos7
enabled: false
########################################
# Other Install Configuration Items

View File

@ -9,11 +9,13 @@
src: "{{ browbeat_workloads[item].src }}"
dest: "{{ browbeat_workloads[item].dest }}"
with_items: "{{ browbeat_workloads }}"
when: browbeat_workloads[item].enabled
- name: Build images
shell: source {{ overcloudrc }} ; openstack server create --wait --flavor m1.small --image {{ browbeat_workloads[item].image }} --nic net-id={{ browbeat_network }} --user-data {{ browbeat_workloads[item].dest }} {{ browbeat_workloads[item].name }} | egrep '\sid\s' | awk '{print $4}'
register: workload_ids
with_items: "{{ browbeat_workloads }}"
when: browbeat_workloads[item].enabled
register: workload_ids
- name: Check status of images
shell: source {{ overcloudrc }} ; nova console-log {{ item.stdout }}
@ -21,22 +23,28 @@
until: guest_output.stdout.find("Browbeat workload installed") != -1
retries: 30
with_items: "{{ workload_ids.results }}"
when: item.changed
- name: Clean up glance
shell: source {{ overcloudrc }} ; openstack image delete {{ browbeat_workloads[item].name }}
with_items: "{{ browbeat_workloads }}"
ignore_errors: true
when: browbeat_workloads[item].enabled
- name: Copy prepared workload guest into Glance
shell: source {{ overcloudrc }} ; openstack server image create --wait --name {{ browbeat_workloads[item].name }} {{ browbeat_workloads[item].name }}
with_items: "{{ browbeat_workloads }}"
when: browbeat_workloads[item].enabled
- name: Update visibility
shell: source {{ overcloudrc }} ; openstack image set {{ browbeat_workloads[item].name }} --public
with_items: "{{ browbeat_workloads }}"
when: browbeat_workloads[item].enabled
- name: Delete workload guests after copying
shell: |
. {{ overcloudrc }}
source {{ overcloudrc }}
openstack server delete {{browbeat_workloads[item].name}}
with_items: "{{browbeat_workloads}}"
when: browbeat_workloads[item].enabled

View File

@ -63,8 +63,20 @@ We currently support a handful of workloads
- Pbench-Uperf - Networking throughput / RR test
- Linpack - Microbenchmark for CPU load
To enable installation of the Browbeat workloads set install_browbeat_workloads: true in
ansible/install/group_vars/all.yml.
To enable installation of the Browbeat workloads set install_browbeat_workloads: true
in ansible/install/group_vars/all.yml.
To build the custom images for workloads set enabled: true
in ansible/install/group_vars/all.yml.
Example:
browbeat_workloads:
sysbench:
name: browbeat-sysbench
src: sysbench-user.file
dest: "{{ browbeat_path }}/sysbench-user.file"
image: centos7
enabled: true
It is also required to provide the neutron network id of a private network which
has external access. To set this, edit ansible/install/group_vars/all.yml and