summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2018-12-26 02:57:47 -0500
committerxudan <xudan16@huawei.com>2018-12-26 03:15:09 -0500
commit083efad304a64217426b827a666ae828e7b4d0e7 (patch)
treebd64573cd7cfcbffecb42355131e13bb84eb25ad /etc
parentd72355c25b456ac5660bf0ebb15f7265e1e634cf (diff)
Add a patch to make ram_num configurable for DPDKovp-2.1.0
1. add a patch to change bottlenecks source code within git repo /home/opnfv/bottlenecks 2. add a script to run the patch within Bottlenecks git repo 3. copy the edited file yardstick.py to /usr/local/lib 4. change the results dir from /home/opnfv/bottlenecks/results to /home/opnfv/results which is out of Bottlenecks git repo JIRA: BOTTLENECKS-248 Change-Id: I86ff51ec41caf79fb16e0985db8eefa679153102 Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'etc')
-rw-r--r--etc/conf/bottlenecks_config.yml14
-rw-r--r--etc/conf/cmd_config.yml4
-rw-r--r--etc/patches/bottlenecks/make-ram_num-configurable/0001-Allow-change-ram_num-when-enable-DPDK.patch30
-rwxr-xr-xetc/patches/bottlenecks/make-ram_num-configurable/apply.sh14
4 files changed, 57 insertions, 5 deletions
diff --git a/etc/conf/bottlenecks_config.yml b/etc/conf/bottlenecks_config.yml
index b36f8650..ecc50c49 100644
--- a/etc/conf/bottlenecks_config.yml
+++ b/etc/conf/bottlenecks_config.yml
@@ -3,29 +3,33 @@
{% set validate_testcase = validate_testcase or '' %}
{% set testcase = testcase or '' %}
{% set deploy_scenario = deploy_scenario or 'unknown' %}
+{% set ram_num = ram_num or '512' %}
{% set dovetail_home = dovetail_home or '' %}
bottlenecks:
image_name: opnfv/bottlenecks
docker_tag: ovp-2.0.0
opts: '-id --privileged=true'
- envs: '-e DEPLOY_SCENARIO={{deploy_scenario}} -e Yardstick_TAG=stable -e OUTPUT_FILE={{testcase}}.out'
+ envs: '-e DEPLOY_SCENARIO={{deploy_scenario}} -e RAM_NUM={{ram_num}}
+ -e Yardstick_TAG=stable -e OUTPUT_FILE={{testcase}}.out'
volumes:
- '-v /var/run/docker.sock:/var/run/docker.sock'
+ - '-v {{dovetail_home}}/patches:/home/patches'
- '-v {{dovetail_home}}/results/bottlenecks:/tmp'
config:
dir: '/home/opnfv/userconfig'
pre_condition:
- 'cp /home/opnfv/userconfig/images/ubuntu-16.04-server-cloudimg-amd64-disk1.img /tmp/yardstick.img'
+ - '/home/patches/bottlenecks/make-ram_num-configurable/apply.sh'
cmds:
- 'python /home/opnfv/bottlenecks/testsuites/run_testsuite.py testcase {{validate_testcase}} False'
post_condition:
- - 'mkdir -p /home/opnfv/bottlenecks/results'
- - 'cp /tmp/bottlenecks.log /home/opnfv/bottlenecks/results'
- - 'cp /tmp/bottlenecks.stress.ping.out /home/opnfv/bottlenecks/results'
+ - 'mkdir -p /home/opnfv/results'
+ - 'cp /tmp/bottlenecks.log /home/opnfv/results'
+ - 'cp /tmp/bottlenecks.stress.ping.out /home/opnfv/results'
- 'rm /tmp/yardstick.img'
result:
- dir: '/home/opnfv/bottlenecks/results'
+ dir: '/home/opnfv/results'
openrc: '/tmp/admin_rc.sh'
extra_container:
- 'Bottlenecks-Yardstick'
diff --git a/etc/conf/cmd_config.yml b/etc/conf/cmd_config.yml
index f02c864e..ca00075f 100644
--- a/etc/conf/cmd_config.yml
+++ b/etc/conf/cmd_config.yml
@@ -69,6 +69,10 @@ cli:
flags:
- '--deploy-scenario'
help: 'Specify the DEPLOY_SCENARIO which will be used as input by each testcase respectively'
+ ramnum:
+ flags:
+ - '--ram-num'
+ help: "Specify the RAM_NUM if it's DPDK scenario. The default value is 512 if not set."
mandatory:
flags:
- '--mandatory'
diff --git a/etc/patches/bottlenecks/make-ram_num-configurable/0001-Allow-change-ram_num-when-enable-DPDK.patch b/etc/patches/bottlenecks/make-ram_num-configurable/0001-Allow-change-ram_num-when-enable-DPDK.patch
new file mode 100644
index 00000000..148f656a
--- /dev/null
+++ b/etc/patches/bottlenecks/make-ram_num-configurable/0001-Allow-change-ram_num-when-enable-DPDK.patch
@@ -0,0 +1,30 @@
+From f0443e9921efa7570dd3da1687ae94a8b442f5c2 Mon Sep 17 00:00:00 2001
+From: Dovetail <verified@opnfv.org>
+Date: Wed, 26 Dec 2018 03:36:36 +0000
+Subject: [PATCH] Allow change ram_num when enable DPDK
+
+Signed-off-by: Dovetail <verified@opnfv.org>
+---
+ utils/infra_setup/runner/yardstick.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/utils/infra_setup/runner/yardstick.py b/utils/infra_setup/runner/yardstick.py
+index 562e918..6071585 100644
+--- a/utils/infra_setup/runner/yardstick.py
++++ b/utils/infra_setup/runner/yardstick.py
+@@ -46,9 +46,12 @@ def yardstick_command_parser(debug, cidr, outfile, parameter):
+ image_name = config.bottlenecks_config["yardstick_image_name"]
+ parameter["image_name"] = image_name
+ DEPLOY_SCENARIO = os.getenv("DEPLOY_SCENARIO")
++ RAM_NUM = os.getenv("RAM_NUM")
+ if DEPLOY_SCENARIO:
+ if "ovs" in DEPLOY_SCENARIO:
+ parameter["dpdk_enabled"] = True
++ if RAM_NUM:
++ parameter["ram_num"] = RAM_NUM
+ LOG.info(parameter)
+ if parameter is not None:
+ cmd += " --task-args " + '"' + str(parameter) + '"'
+--
+2.7.4
+
diff --git a/etc/patches/bottlenecks/make-ram_num-configurable/apply.sh b/etc/patches/bottlenecks/make-ram_num-configurable/apply.sh
new file mode 100755
index 00000000..51ebeea0
--- /dev/null
+++ b/etc/patches/bottlenecks/make-ram_num-configurable/apply.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -e
+set -u
+
+cd /home/opnfv/bottlenecks
+# without setting the user, git does not allow to create a commit
+git config --global user.email "verified@opnfv.org"
+git config --global user.name "Dovetail"
+
+git am $(dirname $0)/0001-Allow-change-ram_num-when-enable-DPDK.patch
+
+cp utils/infra_setup/runner/yardstick.py /usr/local/lib/python2.7/dist-packages/utils/infra_setup/runner/yardstick.py
+
+exit 0