yardstick.git
8 years agoAdd new sequence runner 46/946/3
Kristian Hunt [Thu, 2 Jul 2015 13:32:44 +0000 (15:32 +0200)]
Add new sequence runner

The "sequence" runner will use an input value of the test for every
run from a pre-defined list from the task file.
Example runner section of the task file:
    type: Sequence
    interval: 1
    scenario_option_name: packetsize
    sequence:
    - 100
    - 150
    - 200

JIRA: YARDSTICK-47

Change-Id: I5bde9b78cb356499c338ef3da26ac1783670887d
Signed-off-by: Kristian Hunt <kristian.hunt@gmail.com>
8 years agoRename server resources aligning with task file 17/917/2
Hans Feldt [Mon, 29 Jun 2015 13:39:34 +0000 (15:39 +0200)]
Rename server resources aligning with task file

In the task file we have cross referencing between servers (VMs).
This is done with DNS style naming. However servers created in the
cloud does not get the same type of name.

This patch aligns the cloud resource name with the one in the task file.
This prepares for running external scripts that takes server names as
input (see YARDSTICK-46)

The "instances" support in model.Server is not really working and
should be removed or fixed. No sample task file is using this
feature for now.

Change-Id: If2f752a82d224f07e4b5ee2361c1ff2454f39462
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
8 years agoAdd Pktgen test step duration 12/912/1
Kristian Hunt [Fri, 26 Jun 2015 08:53:33 +0000 (10:53 +0200)]
Add Pktgen test step duration

JIRA: YARDSTICK-48

Step duration for Pktgen can be configured for each step.

Change-Id: Ida6e2f7d8a1c7d86fb2e65389b5b56d5958d3ad9
Signed-off-by: Kristian Hunt <kristian.hunt@gmail.com>
8 years agoAdd support to list and show runners & scenarios 05/905/3
Hans Feldt [Fri, 26 Jun 2015 09:53:21 +0000 (11:53 +0200)]
Add support to list and show runners & scenarios

Example usage and output:

$ yardstick runner list
+------------------------------------------------------------------------------+
| Type             | Description
+------------------------------------------------------------------------------+
| Duration         | Run a scenario for a certain amount of time
| Arithmetic       | Run a scenario arithmetically stepping an input value
| Constant         | Run a scenario a certain number of times
+------------------------------------------------------------------------------+
$ yardstick runner show Duration
Run a scenario for a certain amount of time

If the scenario ends before the time has elapsed, it will be started again.

  Parameters
    duration - amount of time the scenario will be run for
        type:    int
        unit:    seconds
        default: 1 sec
    interval - time to wait between each scenario invocation
        type:    int
        unit:    seconds
        default: 1 sec

$ yardstick scenario list
+------------------------------------------------------------------------------+
| Type             | Description
+------------------------------------------------------------------------------+
| Iperf3           | Execute iperf3 between two hosts
| Pktgen           | Execute pktgen between two hosts
| Ping             | Execute ping between two hosts
+------------------------------------------------------------------------------+
$ yardstick scenario show Iperf3
Execute iperf3 between two hosts

By default TCP is used but UDP can also be configured.
For more info see http://software.es.net/iperf

  Parameters
    bytes - number of bytes to transmit
      only valid with a non duration runner, mutually exclusive with blockcount
        type:    int
        unit:    bytes
        default: 56
    udp - use UDP rather than TCP
        type:    bool
        unit:    na
        default: false
    nodelay - set TCP no delay, disabling Nagle's Algorithm
        type:    bool
        unit:    na
        default: false
    blockcount - number of blocks (packets) to transmit,
      only valid with a non duration runner, mutually exclusive with bytes
        type:    int
        unit:    bytes
        default: -

JIRA: -
Change-Id: If218e129a30af7e20792190003c214677e732252
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
8 years agoadd new command line handler 11/811/4
Jo¶rgen Karlsson [Fri, 12 Jun 2015 09:19:57 +0000 (11:19 +0200)]
add new command line handler

New command line handler with pluggable classes.

Task subcommand added.

To run a scenario: yardstick -d task start samples/ping.yaml

$ yardstick -h
usage: yardstick [-h] [-V] [-d] [-v] {task} ...

Command-line interface to yardstick

optional arguments:
  -h, --help     show this help message and exit
  -V, --version  display version
  -d, --debug    increase output verbosity to debug
  -v, --verbose  increase output verbosity to info

subcommands:
  {task}

$ yardstick task -h
usage: yardstick task [-h] {start} ...

Task commands.

       Set of commands to manage benchmark tasks.

optional arguments:
  -h, --help  show this help message and exit

subcommands:
  {start}

$ yardstick task start -h
usage: yardstick task start [-h] [--keep-deploy] [--parse-only]
                            [--output-file OUTPUT_FILE]
                            taskfile

Start a benchmark scenario.

positional arguments:
  taskfile              path to taskfile

optional arguments:
  -h, --help            show this help message and exit
  --keep-deploy         keep context deployed in cloud
  --parse-only          parse the benchmark config file and exit
  --output-file OUTPUT_FILE
                        file where output is stored, default
                        /tmp/yardstick.out

JIRA :-
Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
Change-Id: If0672594efa4c94c94ebb73f0bc97ecfe3e00c62

8 years agoFix ipaddress bug in main.py 64/864/2
Jo¶rgen Karlsson [Thu, 18 Jun 2015 11:43:51 +0000 (13:43 +0200)]
Fix ipaddress bug in main.py

Make sure argument to ip_address() is always unicode.

Change-Id: Id319134fb412ba0ba26c57b8b7285b60e7222a79
JIRA:-
Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
8 years agoFix order of arguments in ping.py 61/861/1
Jo¶rgen Karlsson [Thu, 18 Jun 2015 10:10:02 +0000 (12:10 +0200)]
Fix order of arguments in ping.py

The bash script expects 'destination' followed by 'option'

Change-Id: If1c42f867caaa05c794cc81acc34fdce1774eb7c
Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
8 years agoAdd support for single server ping test 33/833/2
Hans Feldt [Tue, 16 Jun 2015 07:27:31 +0000 (09:27 +0200)]
Add support for single server ping test

A simple test case is added that will ping an external server on
the internet. See samples/ping-ext-ip.yaml

Change-Id: I15eb3cb6ab9e5c1cf280f2aade2bf4c9646d6cd4
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
8 years agoMerge "fix error in ping-serial yaml file"
Jo¶rgen Karlsson [Tue, 16 Jun 2015 11:44:26 +0000 (11:44 +0000)]
Merge "fix error in ping-serial yaml file"

8 years agofix error in ping-serial yaml file 40/840/1
Jo¶rgen Karlsson [Tue, 16 Jun 2015 11:30:59 +0000 (13:30 +0200)]
fix error in ping-serial yaml file

Change-Id: Ibd98cdcc0ed56ab376d0c2f8f37d2b53e07f2d2b
JIRA:-
Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
8 years agoMerge "add unit test for ping"
Jo¶rgen Karlsson [Tue, 16 Jun 2015 08:57:07 +0000 (08:57 +0000)]
Merge "add unit test for ping"

8 years agoadd unit test for ping 25/825/3
Jo¶rgen Karlsson [Mon, 15 Jun 2015 14:15:24 +0000 (16:15 +0200)]
add unit test for ping

Running of unittest from run_test.sh is NOT enabled.

JIRA:-
Change-Id: I741d63e8ab37570c3cf67353fafc7f5210382219
Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
8 years agoAdd support for external HOT template 01/801/4
Hans Feldt [Wed, 3 Jun 2015 08:50:48 +0000 (10:50 +0200)]
Add support for external HOT template

An external HOT template is a separate yaml file in native
Heat format HOT. The external template is referenced in the task
file and used as template for a "context". Parameters required at
template instantiation are also configured in the task file.
See new sample file ping-hot.yaml

Change-Id: Ie2b7ea96ea90b75ca4e08a29e2223ceeb1474724
JIRA: YARDSTICK-24
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
8 years agoAdd support for building images 02/802/2
Hans Feldt [Thu, 11 Jun 2015 12:33:10 +0000 (14:33 +0200)]
Add support for building images

Two scripts are added. One that will be installed in user's PATH
and one that is an example of how to modify an image from within.

See README for example and script for more info

Change-Id: Iab743f6e9105d5ba872ffba0512ffee954c6d830
JIRA: YARDSTICK-28
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
8 years agofix deploy without placement groups 95/795/3
Jo¶rgen Karlsson [Wed, 10 Jun 2015 11:24:07 +0000 (13:24 +0200)]
fix deploy without placement groups

Change-Id: Ibc18a2652d3e8f4656fc58d7a5b45daeb36178d1
JIRA: YARDSTICK-30
Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
9 years agoAdd support for multiple contexts(stacks) 74/774/5
Hans Feldt [Fri, 5 Jun 2015 08:17:01 +0000 (10:17 +0200)]
Add support for multiple contexts(stacks)

A list of contexts can be specified, cross referencing between
contexts is supported and shown in the added sample file.

TBD can placement group work between stacks?

Change-Id: I26dbe94e52ba0be5e49f50fd70540a57de2204cb
JIRA: YARDSTICK-31
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoadd pktgen scenario and sample 68/768/4
Jörgen Karlsson [Thu, 4 Jun 2015 07:11:46 +0000 (09:11 +0200)]
add pktgen scenario and sample

Supports measuring network throughput UDP.
SLA can be verified for packet lost per million packets (ppm)

Change-Id: Ie5972f189bbe58b39a2fae98630b2f117c176ae5
JIRA: YARDSTICK-5
Signed-off-by: Jorgen Karlsson <jorgen.w.karlsson@ericsson.com>
9 years agofix exit status at SLA assertion 54/754/2
Hans Feldt [Wed, 3 Jun 2015 16:04:31 +0000 (18:04 +0200)]
fix exit status at SLA assertion

tested by changing SLA action to assert and lower rtt, yardstick
command should exit non zero

Change-Id: I2dd091941fb4359add849f218cacc04f364142cd
JIRA: YARDSTICK-25
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoadd iperf3 scenario and sample 63/663/6
Hans Feldt [Tue, 26 May 2015 19:25:37 +0000 (21:25 +0200)]
add iperf3 scenario and sample

Supports measuring network throughput using TCP and UDP.
SLA can be verified for bytes per second compared against the
summary from iperf3.

Change-Id: Ia387aac64932b9c01a64acdcba152fc46b32e382
JIRA: YARDSTICK-20
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agofix run_tests.sh 86/686/1
Hans Feldt [Thu, 28 May 2015 12:49:11 +0000 (14:49 +0200)]
fix run_tests.sh

Since we have no tests yet, just run flake8

Change-Id: I623d96c924524b2992175d345e176b7fd743413d
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agomake cidr optional in network section 61/661/2
Jörgen Karlsson [Tue, 26 May 2015 16:48:02 +0000 (18:48 +0200)]
make cidr optional in network section

cidr defaults to '10.0.1.0/24' if not specified

Change-Id: I12b25be8d4e4be3b56cf71096dfab439f91cf7d1
JIRA: -
Signed-off-by: Jörgen Karlsson <jorgen.w.karlsson@ericsson.com>
9 years agoadd setup/teardown to scenario base class and runners 52/652/1
Hans Feldt [Tue, 26 May 2015 09:56:24 +0000 (11:56 +0200)]
add setup/teardown to scenario base class and runners

Prepare for "service type" of scenarios that e.g. needs to start
a service in setup and shut it down in teardown.

In the runners, instantiation of the scenario is moved after the
"worker START" log to get a more logical sequence logged.

Change-Id: Idfaf5bb396eab9261e820291885b5a1dbc32f71e
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoadd Dockerfile for yardstick 40/640/2
Hans Feldt [Fri, 22 May 2015 12:32:44 +0000 (14:32 +0200)]
add Dockerfile for yardstick

This allows running yardstick from a container not using a
virtualenv.

Example commands to build and run:
docker build -t opnfv/yardstick .
docker run -it --rm opnfv/yardstick

Change-Id: Ia5a433c116d61e8d27e5ddb7186ef4b3ecd35e87
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoadd main cmd for yardstick 39/639/1
Hans Feldt [Fri, 22 May 2015 12:01:37 +0000 (14:01 +0200)]
add main cmd for yardstick

Some necessary setup fixes (after the pbr 1.0.1 release)

JIRA: -
Change-Id: I6259f7211b2f446e57461b7b6ac0e42387b92f5c
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoadd package context with module model 17/617/2
Hans Feldt [Thu, 21 May 2015 05:49:14 +0000 (07:49 +0200)]
add package context with module model

The "model" module contains classes that helps the main logic of yardstick
to maintain a logical model/representation of the context as described in
the yaml file.

The main class Context has methods to deploy and undeploy the context
into/from some target cloud.

Change-Id: Ia04d9132ab8ef5de5dab686929e4b7ac05d7af30
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoadd orchestrator package with heat module 16/616/2
Hans Feldt [Thu, 21 May 2015 05:37:49 +0000 (07:37 +0200)]
add orchestrator package with heat module

The heat module contains two classes, Template and Stack. Resources
are added to a Template instance and then deployed. This returns a
Stack instance that holds the output values from the deployment and
that also has a method to undeploy - delete the stack.

Change-Id: Ief3f75bbb015e5d43023b8d8e8ece49673572b13
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoadd yardstick ssh key 23/623/2
Hans Feldt [Thu, 21 May 2015 09:38:13 +0000 (11:38 +0200)]
add yardstick ssh key

yardstick for now uses a pre-generated ssh key

Change-Id: Iac9f76c82c58e45f1ec8ac1bf529c3ba3562da4e
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agofix flake8 complaints 22/622/2
Hans Feldt [Thu, 21 May 2015 09:20:53 +0000 (11:20 +0200)]
fix flake8 complaints

run_tests.sh now runs clean

Change-Id: Idadebabfa9306cf750207326f5f0b5a35530af34
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agofix run_tests exit status 21/621/1
Hans Feldt [Thu, 21 May 2015 09:27:57 +0000 (11:27 +0200)]
fix run_tests exit status

previously run_tests always returned 0 no matter the result.
It can now be hooked up to a gerrit gate job.

Change-Id: I2c4bccec71c179fd2b1b965613c34179da830ac5
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoadd package runners and a few runners 08/608/2
Hans Feldt [Wed, 20 May 2015 12:28:24 +0000 (14:28 +0200)]
add package runners and a few runners

The "duration" runner will run a test for an amount of time.
The "arithmetic" runner will increase an input value of the test for
every run until a limit is reached.

Change-Id: I31c9864604110ce3f5d19ec110144d1c886c7620
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoadd ping benchmark type 07/607/1
Hans Feldt [Wed, 20 May 2015 12:08:22 +0000 (14:08 +0200)]
add ping benchmark type

This simple benchmark can be used to measure network latency.

Change-Id: I41f5b9f32544b2e668d39220fcfb87ed493f4baa
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoadd ssh module 96/596/2
Hans Feldt [Tue, 19 May 2015 12:38:02 +0000 (14:38 +0200)]
add ssh module

The ssh module is used when executing benchmark scenarios using
remote login to a VM.

ssh.py originates from rally but is stripped down and slightly
modified (some dependencies removed).

Change-Id: I0dc479fa1cb06e7469c20e24d3124f020b97a73c
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoadd package scenarios with module base 95/595/1
Hans Feldt [Tue, 19 May 2015 08:42:51 +0000 (10:42 +0200)]
add package scenarios with module base

The Scenario class is a base class for all "real" scenarios.

Change-Id: I4891321bdf489bce3e5c7e25c0c75e6882e344e4
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoadd package common with module utils 94/594/1
Hans Feldt [Tue, 19 May 2015 08:32:34 +0000 (10:32 +0200)]
add package common with module utils

The utils module supports finding subclasses of a class. This
is used to find Runner and Scenarios types. utils.py originates from
rally but is stripped down and slightly modified (some dependencies
removed).

Change-Id: Ibc196698e1212899b0836988d0345696b00c5caf
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoMerge "add cmdparser"
Hans Feldt [Tue, 19 May 2015 08:17:16 +0000 (08:17 +0000)]
Merge "add cmdparser"

9 years agoadd sample benchmark configuration files 44/544/3
Hans Feldt [Wed, 13 May 2015 12:24:49 +0000 (14:24 +0200)]
add sample benchmark configuration files

Change-Id: I21a9e2db57d12e16bc0358bfa6c34c4d1d6a4de0
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoadd cmdparser 47/547/1
Hans Feldt [Wed, 13 May 2015 15:56:50 +0000 (17:56 +0200)]
add cmdparser

cmdparser.py is the parser for the command line tool yardstick

Change-Id: I0a27be35ad21d54d8c5cc7c2ab72aa60ed8f5d1f
JIRA: -
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoAdd yardstick package 45/545/1
Jörgen Karlsson [Wed, 13 May 2015 12:39:53 +0000 (14:39 +0200)]
Add yardstick package

JIRA: -

Change-Id: Icb1c08befb66e883c11166eb36670252d63e9cf9
Signed-off-by: Jörgen Karlsson <jorgen.w.karlsson@ericsson.com>
9 years agoadd README and scripts for build and test 32/532/3
Hans Feldt [Tue, 12 May 2015 16:25:42 +0000 (18:25 +0200)]
add README and scripts for build and test

README.rst is work in progress and probably not proper rst format
yet but should still contain valuable information.

run_tests.sh is a script that runs unit and style tests on the
code. It can be used as a gate check in gerrit. Similar scripts
are standard practice in other open source projects.

JIRA: -
Change-Id: I5e586b346ff45f1151960a0e7fda2fe6072422c0
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoMerge "Adding .gitreview to yardstick JIRA:0000 more information at https://wiki...
Ana C [Wed, 13 May 2015 08:10:23 +0000 (08:10 +0000)]
Merge "Adding .gitreview to yardstick JIRA:0000 more information at https://wiki.opendaylight.org/view/Git-review_Workflow"

9 years agoadd gitignore file 13/513/1
Hans Feldt [Tue, 12 May 2015 08:44:51 +0000 (10:44 +0200)]
add gitignore file

JIRA: -

Change-Id: Ibddb67cd6699f84e2adafcef9fc5d53796d546d2
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
9 years agoAdding .gitreview to yardstick JIRA:0000 more information at https://wiki.opendayligh... 42/442/1
Aric Gardner [Wed, 29 Apr 2015 15:56:00 +0000 (11:56 -0400)]
Adding .gitreview to yardstick JIRA:0000 more information at https://wiki.opendaylight.org/view/Git-review_Workflow

Change-Id: I801aed126c0980c871e0ce7c795273a176efc98b
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
9 years agoAdding .gitreview to yardstick JIRA:0000 more information at https://wiki.opendayligh...
Aric Gardner [Wed, 29 Apr 2015 15:56:00 +0000 (11:56 -0400)]
Adding .gitreview to yardstick JIRA:0000 more information at https://wiki.opendaylight.org/view/Git-review_Workflow

Change-Id: I801aed126c0980c871e0ce7c795273a176efc98b
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
9 years agoInitial empty repository
Aric Gardner [Wed, 29 Apr 2015 14:57:33 +0000 (14:57 +0000)]
Initial empty repository