Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion roles/multibench_run/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,18 @@ It uses a pre-existing VM/host where all the crucible binaries are ready.
By default, the workload launched by default is the example-A of Multi-bench, composed of 2 uperf scenarios and 1 iperf.
![Multi-bench_example-A](images/example-A.png)


If you want to customize the scenarios, you can edit the `run.sh` file which defines the previous layout of test.
You can edit the resources requested by the pods (clients or servers), in order to have a Guaranteed QoS.
You can change the variable `multibench_script` to keep several scenarios ready and easily switch from one to another.

Note: For multibench daily jobs, workload launched is from directory "/root/crucible-examples/multibench/openshift/example-A/daily" on multibench-vm using the script "run-daily.sh" which inturn uses input json file "all-in-one.json".
For any customizations to launch multibench daily jobs, it is required to generate input json file using regulus script from [repo](https://github.com/redhat-performance/regulus/blob/main/bin/reg-c2j-config.py).

```yaml
/root/regulus/bin/reg-c2j-config.py --name iperf,uperf --mv-params iperf-mv-params.json,uperf-mv-params.json --bench-ids iperf:21-26,uperf:1-20,uperf:27-32 --max-sample-failures=2 --endpoint k8s,user:kni,host:provisioner.cluster4.dfwt5g.lab,nodeSelector:client-1-7+21-22+27:nodeSelector-worker0.json,nodeSelector:client-8-14+30:nodeSelector-worker1.json,nodeSelector:client-15-20+23-26+28-29+31-32:nodeSelector-worker2.json,nodeSelector:server-1-22+25-27+31-32:nodeSelector:nodeSelector-worker2.json,nodeSelector:server-28:nodeSelector-worker0.json,nodeSelector:server-23-24+29:nodeSelector-worker1.json,userenv:stream9,resources:default:resource-2req-daily.json,resources:client-1-20:resource-1req-daily.json,controller-ip:192.168.5.30,client:1-32,server:1-32
```

## Example - how to use the role
In this example, the two mandatory variables for the role are defined in the Ansible inventory:

Expand All @@ -44,4 +52,4 @@ A host `multibench` should be defined in the Ansible inventory like so:
hosts:
my-host.my-lab:
ansible_user: root
```
```
4 changes: 2 additions & 2 deletions roles/multibench_run/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
nb_iterations: "{{ multibench_sample | default('3') }}"
num_samples: "{{ multibench_sample | default('3') }}"
multibench_tags:
automation: ansible
multibench_script_dir: "/root/crucible-examples/multibench/openshift/example-A"
multibench_script_dir: "/root/crucible-examples/multibench/openshift/example-A/daily"
multibench_script: "run.sh"
8 changes: 8 additions & 0 deletions roles/multibench_run/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
delegate_to: "{{ multibench_host }}"
become: true

- name: Generate input json file for multibench run
ansible.builtin.template:
src: templates/all-in-one.json.j2
dest: "{{ multibench_script_dir }}/all-in-one.json"
mode: '0644'
delegate_to: "{{ multibench_host }}"
become: true

- name: Creating an output directory if needed
when:
- multibench_run_output_dir is undefined
Expand Down
Loading