summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker/Dockerfile2
-rw-r--r--docker/Dockerfile.aarch64.patch2
-rw-r--r--samples/fio.yaml30
-rw-r--r--samples/lmbench.yaml33
-rwxr-xr-xyardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash4
5 files changed, 60 insertions, 11 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index eeeeabca9..d594b46b9 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -26,7 +26,7 @@ ENV YARDSTICK_REPO_DIR="${REPOS_DIR}/yardstick/" \
RUN apt-get update && apt-get install -y git python python-setuptools python-pip iputils-ping && apt-get -y autoremove && apt-get clean
RUN easy_install -U setuptools==30.0.0
-RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 openstacksdk==0.9.17 python-openstackclient==3.12.1 python-heatclient==1.11.1 ansible==2.4.2
+RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 openstacksdk==0.9.17 python-openstackclient==3.12.1 python-heatclient==1.11.1 ansible==2.5.5
RUN mkdir -p ${REPOS_DIR}
diff --git a/docker/Dockerfile.aarch64.patch b/docker/Dockerfile.aarch64.patch
index a6909ee4b..bad472007 100644
--- a/docker/Dockerfile.aarch64.patch
+++ b/docker/Dockerfile.aarch64.patch
@@ -31,7 +31,7 @@ index 71ce6b58..fce7c116 100644
+RUN apt-get update && apt-get install -y git python python-setuptools python-pip iputils-ping && apt-get -y autoremove && \
+ apt-get install -y libssl-dev && apt-get -y install libffi-dev && apt-get clean
RUN easy_install -U setuptools==30.0.0
- RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 openstacksdk==0.9.17 python-openstackclient==3.12.1 python-heatclient==1.11.1 ansible==2.4.2
+ RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 openstacksdk==0.9.17 python-openstackclient==3.12.1 python-heatclient==1.11.1 ansible==2.5.5
@@ -40,7 +41,8 @@ RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/yardstick ${Y
RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR}
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 %}
diff --git a/samples/lmbench.yaml b/samples/lmbench.yaml
index ea2966b24..7050243f9 100644
--- a/samples/lmbench.yaml
+++ b/samples/lmbench.yaml
@@ -9,6 +9,13 @@
---
# 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"
@@ -19,7 +26,7 @@ scenarios:
test_type: "latency"
stop_size: 32.0
- host: demeter.demo
+ host: demeter{{ separator }}demo
runner:
type: Arithmetic
@@ -39,7 +46,7 @@ scenarios:
test_type: "bandwidth"
benchmark: "wr"
- host: demeter.demo
+ host: demeter{{ separator }}demo
runner:
type: Arithmetic
@@ -55,7 +62,24 @@ scenarios:
action: monitor
context:
+ type: {{ context_type }}
name: demo
+ {% 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
@@ -71,6 +95,5 @@ context:
networks:
test:
- cidr: '10.0.1.0/24'
-
-
+ cidr: "10.0.1.0/24"
+ {% endif %}
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash b/yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash
index d34ce9338..cda469cf9 100755
--- a/yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash
@@ -16,7 +16,7 @@ set -e
process_name=$1
if [ "$process_name" = "keystone" ]; then
- for pid in $(ps aux | grep "keystone" | grep -iv heartbeat | grep -iv monitor | grep -v grep | grep -v /bin/sh | awk '{print $2}'); \
+ for pid in $(ps aux | grep "keystone" | grep -iv monitor | grep -v grep | grep -v /bin/sh | awk '{print $2}'); \
do
kill -9 "${pid}"
done
@@ -26,7 +26,7 @@ elif [ "$process_name" = "haproxy" ]; then
kill -9 "${pid}"
done
else
- for pid in $(pgrep -fa [^-_a-zA-Z0-9]${process_name} | grep -iv heartbeat | awk '{print $1}');
+ for pid in $(pgrep -fa [^-_a-zA-Z0-9]${process_name} | awk '{print $1}');
do
kill -9 "${pid}"
done