Skip to content

Commit 6e19ffd

Browse files
committed
Add task to generate input json file to run multibench
1 parent ce77f64 commit 6e19ffd

File tree

4 files changed

+802
-3
lines changed

4 files changed

+802
-3
lines changed

roles/multibench_run/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,18 @@ It uses a pre-existing VM/host where all the crucible binaries are ready.
2020
By default, the workload launched by default is the example-A of Multi-bench, composed of 2 uperf scenarios and 1 iperf.
2121
![Multi-bench_example-A](images/example-A.png)
2222

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

28+
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".
29+
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).
30+
31+
```yaml
32+
/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
33+
```
34+
2735
## Example - how to use the role
2836
In this example, the two mandatory variables for the role are defined in the Ansible inventory:
2937

@@ -44,4 +52,4 @@ A host `multibench` should be defined in the Ansible inventory like so:
4452
hosts:
4553
my-host.my-lab:
4654
ansible_user: root
47-
```
55+
```
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
nb_iterations: "{{ multibench_sample | default('3') }}"
1+
num_samples: "{{ multibench_sample | default('3') }}"
22
multibench_tags:
33
automation: ansible
4-
multibench_script_dir: "/root/crucible-examples/multibench/openshift/example-A"
4+
multibench_script_dir: "/root/crucible-examples/multibench/openshift/example-A/daily"
55
multibench_script: "run.sh"

roles/multibench_run/tasks/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
delegate_to: "{{ multibench_host }}"
2121
become: true
2222

23+
- name: Generate input json file for multibench run
24+
ansible.builtin.template:
25+
src: templates/all-in-one.json.j2
26+
dest: "{{ multibench_script_dir }}/all-in-one.json"
27+
mode: '0644'
28+
delegate_to: "{{ multibench_host }}"
29+
become: true
30+
2331
- name: Creating an output directory if needed
2432
when:
2533
- multibench_run_output_dir is undefined

0 commit comments

Comments
 (0)