make samples/lmbench.yaml to support both Openstack and K8s
with context_type specified. It defaultly use Heat context, if
for k8s,
yardstick -d task start samples/lmbench.yaml --task-args
'{"context_type": "Kubernetes"}'
JIRA: YARDSTICK-1310
Change-Id: Ifa542e830fb5ab7823bd4f994ab5d7a8e8a5b415
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
---
# Sample benchmark task config file
# measure memory read latency and memory bandwidth using lmbench
---
# Sample benchmark task config file
# measure memory read latency and memory bandwidth using lmbench
+# can be used both on Openstack and Kubernetes with "context_type"
+
+{% set context_type = context_type or "Heat" %}
+{% set separator = separator or "." %}
+{% if context_type == "Kubernetes" %}
+{% set separator = "-" %}
+{% endif %}
schema: "yardstick:task:0.1"
schema: "yardstick:task:0.1"
test_type: "latency"
stop_size: 32.0
test_type: "latency"
stop_size: 32.0
+ host: demeter{{ separator }}demo
test_type: "bandwidth"
benchmark: "wr"
test_type: "bandwidth"
benchmark: "wr"
+ host: demeter{{ separator }}demo
+ type: {{ context_type }}
+ {% if context_type == "Kubernetes" %}
+ servers:
+ demeter:
+ 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
image: yardstick-image
flavor: yardstick-flavor
user: ubuntu
- cidr: '10.0.1.0/24'
-
-
+ cidr: "10.0.1.0/24"
+ {% endif %}