To build a custom-cirros image for octavia workloads you need to set the below variables

install_browbeat_workloads: true
browbeat_network: <private network ID with external access>
enabled: true for octavia
octavia_test_bin_path, specify the path of test_bin.sh

One can generate the test binary as follows
https://github.com/openstack/octavia-tempest-plugin/blob/master/octavia_tempest_plugin/contrib/test_server/README.rst

Change-Id: If88eba8887b1bf539e4cd4000c5cf8ec1d441539
This commit is contained in:
Asma Syed Hameed 2021-08-03 09:33:20 +05:30
parent a080a85da9
commit 1c256789d7
3 changed files with 23 additions and 1 deletions

View File

@ -57,6 +57,13 @@ supported_distro: ((ansible_distribution == "CentOS" && ansible_distribution_maj
# iptables file - RHEL (/etc/sysconfig/iptables) CentOS (/etc/sysconfig/iptables-config)
iptables_file: /etc/sysconfig/iptables
########################################
# Octavia
########################################
#test_server.bin is a static application that
#simulates HTTP, HTTPS, and UDP servers.
octavia_test_bin_path:
########################################
# Browbeat Workloads
########################################
@ -83,24 +90,35 @@ browbeat_workloads:
dest: "{{ browbeat_path }}/sysbench-user.file"
image: centos7
enabled: false
flavor: m1.small
linpack:
name: browbeat-linpack
src: linpack-user.file
dest: "{{ browbeat_path }}/linpack-user.file"
image: centos7
enabled: false
flavor: m1.small
uperf:
name: browbeat-uperf
src: pbench-uperf-user.file
dest: "{{ browbeat_path }}/pbench-uperf-user.file"
image: centos7
enabled: false
flavor: m1.small
abench:
name: browbeat-abench
src: abench-user.file
dest: "{{ browbeat_path }}/abench-user.file"
image: centos7
enabled: false
flavor: m1.small
octavia:
name: custom-cirros
src: custom-cirros.file
dest: "{{ browbeat_path }}/custom-cirros.file"
image: cirro5
enabled: false
flavor: m1.tiny-cirros
########################################
# Other Install Configuration Items

View File

@ -12,7 +12,7 @@
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}'
shell: source {{ overcloudrc }} ; openstack server create --wait --flavor {{ browbeat_workloads[item].flavor }} --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}'
with_items: "{{ browbeat_workloads }}"
when: browbeat_workloads[item].enabled
register: workload_ids

View File

@ -0,0 +1,4 @@
#!/bin/sh
cd /home/cirros/ && wget "{{ octavia_test_bin_path }}"
echo "Browbeat workload installed"