Merge "Add Testcase for Prox Standalone SRIOV." into stable/gambia
[yardstick.git] / samples / fio.yaml
1 ##############################################################################
2 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 ---
10 # Sample benchmark task config file
11 # measure storage performance using fio
12 # can be used both on Openstack and Kubernetes with "context_type"
13 #
14 # For this sample just like running the command below on the test vm and
15 # getting benchmark info back to the yardstick.
16 #
17 # sudo fio -filename=/home/ubuntu/data.raw -bs=4k -ipdepth=1 -rw=rw \
18 #          -ramp_time=10 -runtime=60 -name=yardstick-fio -ioengine=libaio \
19 #          -direct=1 -group_reporting -numjobs=1 -time_based \
20 #          --output-format=json
21
22 {% set context_type = context_type or "Heat" %}
23 {% set separator = separator or "." %}
24 {% if context_type == "Kubernetes" %}
25 {% set separator = "-" %}
26 {% endif %}
27
28 schema: "yardstick:task:0.1"
29
30 scenarios:
31 -
32   type: Fio
33   options:
34     filename: /tmp/data.raw
35     bs: 4k
36     iodepth: 1
37     rw: rw
38     ramp_time: 10
39   host: fio{{ separator }}demo
40   runner:
41     type: Duration
42     duration: 60
43     interval: 1
44   sla:
45     read_bw: 6000
46     read_iops: 1500
47     read_lat: 500.1
48     write_bw: 6000
49     write_iops: 1500
50     write_lat: 500.1
51     action: monitor
52
53 context:
54   type: {{ context_type }}
55   name: demo
56   {% if context_type == "Kubernetes" %}
57
58   servers:
59     fio:
60       image: opnfv/yardstick-image-k8s
61       resources:
62         limits:
63           cpu: 1
64           memory: 1Gi
65         requests:
66           cpu: 1
67           memory: 1Gi
68       command: /bin/bash
69       args: ['-c', 'mkdir /root/.ssh; cp /tmp/.ssh/authorized_keys ~/.ssh/.;
70                     chmod 700 ~/.ssh; chmod 600 ~/.ssh/*; service ssh restart;
71                     while true ; do sleep 10000; done']
72   {% else %}
73   image: yardstick-image
74   flavor: yardstick-flavor
75   user: ubuntu
76   servers:
77     fio:
78       floating_ip: true
79   networks:
80     test:
81       cidr: "10.0.1.0/24"
82   {% endif %}