summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorRex Lee <limingjiang@huawei.com>2018-09-13 01:30:08 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-09-13 01:30:08 +0000
commitea355452bca9ae9939f63c0c0b94f4fbf5c3619a (patch)
tree2b16d35aad951a2dab3e38bca8ebe8fe1b1433ef /samples
parentd5df680a4ccddd16a6434f47665062828630bfca (diff)
parentc961dc64b01567fb9d2e7103fddc4f82e353dbe4 (diff)
Merge "Create a sample fio test case base on kubernetes"
Diffstat (limited to 'samples')
-rw-r--r--samples/fio.yaml30
1 files changed, 28 insertions, 2 deletions
diff --git a/samples/fio.yaml b/samples/fio.yaml
index b6e5a282f..0890766cf 100644
--- a/samples/fio.yaml
+++ b/samples/fio.yaml
@@ -9,6 +9,7 @@
---
# Sample benchmark task config file
# measure storage performance using fio
+# can be used both on Openstack and Kubernetes with "context_type"
#
# For this sample just like running the command below on the test vm and
# getting benchmark info back to the yardstick.
@@ -18,18 +19,24 @@
# -direct=1 -group_reporting -numjobs=1 -time_based \
# --output-format=json
+{% set context_type = context_type or "Heat" %}
+{% set separator = separator or "." %}
+{% if context_type == "Kubernetes" %}
+{% set separator = "-" %}
+{% endif %}
+
schema: "yardstick:task:0.1"
scenarios:
-
type: Fio
options:
- filename: /home/ubuntu/data.raw
+ filename: /tmp/data.raw
bs: 4k
iodepth: 1
rw: rw
ramp_time: 10
- host: fio.demo
+ host: fio{{ separator }}demo
runner:
type: Duration
duration: 60
@@ -44,7 +51,25 @@ scenarios:
action: monitor
context:
+ type: {{ context_type }}
name: demo
+ {% if context_type == "Kubernetes" %}
+
+ servers:
+ fio:
+ image: opnfv/yardstick-image-k8s
+ resources:
+ limits:
+ cpu: 1
+ memory: 1Gi
+ requests:
+ cpu: 1
+ memory: 1Gi
+ command: /bin/bash
+ args: ['-c', 'mkdir /root/.ssh; cp /tmp/.ssh/authorized_keys ~/.ssh/.;
+ chmod 700 ~/.ssh; chmod 600 ~/.ssh/*; service ssh restart;
+ while true ; do sleep 10000; done']
+ {% else %}
image: yardstick-image
flavor: yardstick-flavor
user: ubuntu
@@ -54,3 +79,4 @@ context:
networks:
test:
cidr: "10.0.1.0/24"
+ {% endif %}