X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=samples%2Ffio.yaml;h=0890766cf06fe7a99ab56ebc384f87fb1b1d414a;hb=c5a1c0f39672b16edbd28f06162bf764a29111a2;hp=6e77f681a53405918e709df809645e4b70104ca6;hpb=3bca848a141ba2728d036a1423b514027b0e4b98;p=yardstick.git diff --git a/samples/fio.yaml b/samples/fio.yaml index 6e77f681a..0890766cf 100644 --- a/samples/fio.yaml +++ b/samples/fio.yaml @@ -1,27 +1,42 @@ +############################################################################## +# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## --- # 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. # -# sudo fio -filename=/home/ec2-user/data.raw -bs=4k -ipdepth=1 -rw=rw \ +# sudo fio -filename=/home/ubuntu/data.raw -bs=4k -ipdepth=1 -rw=rw \ # -ramp_time=10 -runtime=60 -name=yardstick-fio -ioengine=libaio \ # -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/ec2-user/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 @@ -36,13 +51,32 @@ scenarios: action: monitor context: + type: {{ context_type }} name: demo - image: yardstick-trusty-server + {% 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: ec2-user + user: ubuntu servers: fio: floating_ip: true networks: test: cidr: "10.0.1.0/24" + {% endif %}